Making of space Shooter using pygame

I procrastinated enough in writing this post so here it goes. Pygame treated me good. So good that I was able to create a decent enough 2-D game in a day! So here is my breakdown of it. Creating the basic rectangles I used the pygame-boilerplate which I made in the process of making this game. It’s nothing groundbreaking. Provides just a basic starting ground for you to base your pygame projects. Saves you some gruntwork. ...

February 2, 2016 · 2 min · Tasdik Rahman

Say Hi to peewee

Once upon a time, when we had to interact with the databases. We had to write bare bones SQL(seequel if you may) or Structured Query language. A language which many common databases like SQLite MySQL MariaDB to name a few. SQL is amazing but for day to day tasks it is pretty daunting and could be one of the ways in which you can shoot yourself squarely in the foot. ...

January 29, 2016 · 4 min · Tasdik Rahman

Getting started with Pygame

Pygame intro As with every other kid out there, I spent long hours sitting in front of the computer playing Games like Super Mario, Dangerous Dave and the likes. So when I got to know about Pygame. I was really getting the itch on creating something in the lines of these games. Of cource, we have better game engines written in other languages like C++, but since I liked python. So I mean what the heck right? ...

January 17, 2016 · 2 min · Tasdik Rahman

Unicode strings in python, a gentle intro

Summary In this post I will try to explain how to handle them in python 2 and 3. I had long undermined the way I handled strings in my projects, but I could feel the gravity of handling strings properly when I was working on vocabulary, a side project of mine. There was this one feature in it where the module had to return the pronunciation for a given word. Well I wrote the logic to parse the content and all the stuff. I had it all figured out, but then I was facing this issue. ...

December 8, 2015 · 7 min · Tasdik Rahman

Submitting python package to pypi

Recently I had written a thin wrapper around getziptastic’s API and I wanted that to be availble as a pypi package. What is PyPI? From the official website: PyPI — the Python Package Index The Python Package Index is a repository of software for the Python programming language. Written something cool? Want others to be able to install it with easy_install or pip? Put your code on PyPI. It’s a big list of python packages that you absolutely must submit your package to for it to be easily one-line installable. ...

November 10, 2015 · 5 min · Tasdik Rahman

Converting python script into an executable

BackDrop: So recently I was building a Calculator using tkinter. I wrote a blog post for the same some time back. Now I thought, how awesome it would be if I could distribute it to my friends and let the use it. Problem was that some of them not being CS grads would not know head or tails about how to run it! So I thought the best way and the easiest way was to convert the pyCalc.py into a .exe file. ...

November 7, 2015 · 3 min · Tasdik Rahman

Creating a gif of the current window

BackDrop: Everybody at some time of their life as netizen would have seen something like this How about we create one? Well recently when I was building a Calculator app, I wanted a gif image to be there in the README.md so as to show the usage of the app. I wrote a How hard can Building a calclator be right? for the same some time back. Did some googling and found out byzanz-record as the tool perfect for me ...

November 7, 2015 · 2 min · Tasdik Rahman

How hard can building a Calculator be right?

BackDrop: So I was reading about this wonderful module called tkinter some days back. And man was I not sucked into it! Sure, we do have some very good GUI modules like PyQT, wxPython, PySide. And I don’t deny the fact that some are way better than tkinter. But one advantage which makes tkinter stand out from the crowd is that, it comes pre-packaged with the python package. What I mean by that is you don’t have to install anything to run and write GUI’s with it and run my Calculator program for instance. ...

November 6, 2015 · 4 min · Tasdik Rahman

Setting up DBPedia Spotlight on your local server

Intro : DBPedia Spotlight can be queried over the API which they provide. But for our convenience, it is not always possible to do so. So setting it up locally was the best solution. You can run DBpedia Spotlight from the comfort of your own machine in one or many of the following ways: Web Service (no installation needed). We offer a WADL service descriptor, so with Eclipse or Netbeans you can automagically create a client to call our Web Service. See: Web Service JAR. We offer a jar with all dependencies included. You can just download it and run from command line. See: Run from a Jar Maven. Our build is mavenized, which means that you can use the scala plugin to run our classes from command line. See: Build from Source with Maven Ubuntu/Debian package. We are also starting to share our downloads as debian packages so that anybody can just install DBpedia Spotlight directly from apt-get, Synaptic or their favorite package manager. See:Debian-Package-Installation:-How-To WAR Files/ Tomcat. DBpedia Spotlight is also build as a WAR file. You can use it through Apache Tomcat. We would be doing it the JAR way. ...

October 24, 2015 · 5 min · Tasdik Rahman

Running CGI Scripts with CGIHTTPServer

Intro : So why should we be interested in CGI which stands for common gateway interface. Well for instance, try to recall the websites that you have been in the last 1 hour. Now out of those websites, some where static and some were dynamic. The latter would mean that the contents of that website kept changing in real time. CGI scripting is helpful when you want to generate content from the data residing in a database. This is not only convenient but also cuts a lot of time. ...

October 20, 2015 · 4 min · Tasdik Rahman