• Data Visualization in Python – Bar Graph in Matplotlib

      In last post I covered line graph. In this post I am going to show how to draw bar graph by using Matplotlib. Bar Graph What is bar graph? According to Wikipedia A bar chart or bar graph is a chart or graph that presents categorical data with rectangular bars with heights or lengths proportional to the values that they represent. The bars can be plotted vertically or horizontally.    So in short, bar graphs are good if you to want to present the data of different groups that are being compared with each other. For this post I have picked the data of movies genres released from 1995-2017. The source of data is here. [crayon-5c6a8842084ab481330257/] I take two lists, label and…

  • Data Visualization in Python – Line Graph in Matplotlib

      I recently covered data gathering via scraping. Now I am going to cover how the data can be visualized. The best way to do is to plot graphs. Graphs makes it easier to see the relation between a data variable with other. There are various kinds of graphs available: Line, Bar, Chart, Histogram etc. Since we are dealing in Python, it provides a very good library for plotting cool graphs. It’s called Matplotlib. From the Official Site: Matplotlib is a Python 2D plotting library which produces publication quality figures in a variety of hardcopy formats and interactive environments across platforms. Installation The best way to install it by using…

  • Structures and Methods in Go

    In this post I am going to discuss Go lang’s another features, structs As I told earlier that Go is not a typical Object Oriented Language. Structures is kind of answers of what you do with Classes and objects. Well, Structure is not a special concept to Go only. If you have worked on C language then you could have an idea what is it all about. Let’s write a simple program [crayon-5c6a88420905d141294134/] Ok this is the complete program. After typical declarations I am defining a struct with name person. As you remember you write variable name first and then it’s type in Go. Alright.. so now we have to use…

  • Implementing beanstalk to create a scaleable web scraper

    Image Credit (http://blog.hqc.sk.ca/wp-content/uploads/2012/12/Queue-2012-12-11.jpg) Queues are often used to make applications scaleable by offloading the data and process them later. In this post I am going to use BeansTalk queue management system in Python. Before I get into real task, allow me to give a brief intro of Beanstalk. What is Beanstalk? From the official website: Beanstalk is a simple, fast work queue. Its interface is generic, but was originally designed for reducing the latency of page views in high-volume web applications by running time-consuming tasks asynchronously. It’s demon called beanstalkd which you can run on *nix based machines. Since I am on OSX so I called brew install beanstalkd to install it. Once…

  • Let’s Go:: A very brif introduction to Go language

      Hello World I am back! I know it took *a bit* long resuming this blog as I got pretty busy in other stuff related to my work. Alright so this post is about writing applications in Go, a programming language create at Google by Ken Thompson(“K” from famous K&R) and the creator of Unix and Rob Pike. I had not thought of learning another programming but there a few reasons I go for the Go Go is a minimal language like Python. Since it was developed by Googlers who are also Python lovers, they came up a language which is simple to write like Python but more efficient like…

  • Develop database driven applications in Python with Peewee

    It is not uncommon that most of the applications these days are interacting with database these days. Specially with RDBMS based engines( DB engines that support SQL). Like any other languages Python also provides native and 3rd party libraries to interact with database. Normally you have to write SQL queries for CRUD operations. That’s OK but at times it happens that things get messy: The Big Boss decided to move from MySQL to.. MSSQL and you have no choice but to nod at him and making changes in your queries compatible with other Db Engine. You gotta make multiple queries just to retrieve a single piece of info from the…

  • Guest blogging

    Image: Wikipedia Those professionals often ask me about blogging and related things always come up excuses like how to buy hosting or it will take time to get noticed by Google( All of such excuses are lame). So, I am inviting anyone to be my guest(blogger) and write the stuff you want. As my blog’s subheading says: programming, productivity,entrepreneurship and life hacks, therefore only topics pertaining these will be published. My blog is not SUPER famous but gets traffic of xxx to x,xxx figure per day. Therefore, if you have an interest and looking for a launching pad, you are most welcome. I will give full credit to you. You can provide a summary of…

  • How to automate your deployment and SSH activities with Fabric

    It is not uncommon for developers to interact with remote servers. Beside FTP clients many use terminals or consoles to carry out different tasks. SSH is usually used to connect with remote servers and execute different commands; from running git to initiating a web or db server, almost every thing can be done by using an SSH Client. Recently I came across an awesome tool called Fabric. It’s a Python based tool that automates your command line activities. What is Fabric? From official website:   Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks. It provides a…

  • Develop your first web application in Django 1.10 – Part 5

    In last post I talked about using forms, in this last part of the series I am going to discuss about Django Admin and how can this powerful feature be used for records management. Django Admin Before we get into coding, we need to create a superuser(Admin). Open Terminal, go in your project’s root folder where manage.py resides and run the following command: [crayon-5c6a88420af6a028532260/] The interactive tool will ask a series of things. Once it’s over, check your settings.py file that whether admin app is available in INSTALLED_APPS or not. It should have django.contrib.admin as an app there. if all set, go to http://127.0.0.1:8000/admin and log in with the user you just created. You should…

  • Develop your first web application in Django 1.10 – Part 4

    Learn how to use Django Forms to submit user input data into Database. In previous post I discussed about Db interaction with a Django application and how to pass data in a html view and display it. Now we will move onto next step and will learn how to use HTML forms to store data in database. Django Forms The form I am going to deal is.. yeah, the project form so that I can submit project details. I will create a new folder under tracker/templates and will call it project. The reason to do is that I want to view file separate w.r.t modules. In the file I am going…