How To Convert An Existing Django Project To Eclipse Project

mainSo you have a Django project and you want to use Eclipse IDE to modify and control it. When I say “existing Django project”, I mean a Django project created without using Eclipse. If you are not sure how to use Eclipse to manage your Python project, you can check out this blog post. You basically need to install PyDev and configure the Python path for Eclipse. Once you install everything, you should be able to see PyDev listed when you start a new Eclipse project.   Continue reading

How To Install Valgrind On Mac OS X

mainAs your code gets bigger, keeping track of memory becomes critical. These things often become the source of huge crashes and annoying bugs. Detecting them manually is a very tedious process. So we need a tool to manage all this for us. This is where Valgrind comes into picture. Valgrind is a programming tool for memory debugging, memory leak detection, and profiling. It can be used to keep track of all the memory allocated at all stages in your program. Although it was initially meant to be a memory debugger, it has grown to become a generic framework for building dynamic analysis tools. You can use Valgrind to build new tools as well. There are Valgrind tools like Memcheck that can automatically detect many memory management and threading bugs, and profile your programs in detail. Valgrind is widely used in the industry and it’s well respected within the coding community. Let’s see how we can get it up and running on Mac OS X.   Continue reading

OpenCV On Mac: How To Get It Up And Running?

opencvOpenCV is a computer vision library used extensively by people in the computer vision field. Until a couple of years ago, OpenCV was a bit hacky and the usage was not very straightforward. But determined efforts by multiple companies finally standardized the process and now it is nice and clean. Computer vision algorithms are computationally intensive, requiring lot of processing power to run in real time. Before OpenCV came along, the efforts were very fragmented and repetitive, and there was no standard library as such. Hence Intel decided to do something about it and came up with OpenCV. The advantage of OpenCV is that the algorithms are highly optimized and the library is available on almost all the popular platforms. I have outlined the procedure below to get OpenCV up and running on your Mac.   Continue reading

Git Is Gone In OS X Mountain Lion

gitThis blog post is for a very specific group of people who cared enough to notice that git command line tool is not working on their brand new MacBooks with Mountain Lion! If that sentence didn’t make sense to you, then you are probably at the wrong place. I got my new Mac last week and I wanted to clone some code from Github. So I opened the terminal to clone it and behold, “git” is apparently not a recognized command! I have already installed the latest developer preview of Xcode (version 4.6 DP3), so what went wrong here? It turns out that we need to manually install the git command line tools. We still live in a world where git is not an integral part of all the systems! Xcode 4.6 doesn’t install the command line tools by default, and Git is one of the tools included in these command line tools. Anyway, there’s a simple fix for it.   Continue reading

How To Build A Web Crawler?

webI was reading an article the other day and I came across the term “web crawler”. The context in which it was used got me a little curious about the design of a web crawler. A web crawler is a simple program that scans or “crawls” through web pages to create an index of the data it’s looking for. There are several uses for the program, perhaps the most popular being search engines using it to provide web surfers with relevant websites. Google has perfected the art of crawling over the years! A web crawler can pretty much be used by anyone who is trying to search for information on the Internet in an organized manner. It is referred to by different names like web spider, bot, indexer etc. Anyway, that article got me thinking about building a web crawler. I just wanted to fiddle with it and see how much time it will take to get something working on my machine. It turned out to be quite easy!   Continue reading

Python Development In Eclipse

As your code gets bigger, effective code management becomes an integral part of your project. This post is about setting up Python development environment in Eclipse. Most of the Python developers will already be aware of this. For those of you who are not, read on. Eclipse is an IDE which supports many different languages. It has plugins for various different frameworks as well. We will discuss about how we can set up everything from scratch. Once you set everything up, you will be able to run and debug you Python code easily. It provides many different options and it has a nice UI too.   Continue reading