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

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

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

Running CGI Scripts on Apache2

Intro Have you ever wanted to create a webpage or process user input from a web-based form using Python? These tasks can be accomplished through the use of Python CGI (Common Gateway Interface) scripts with an Apache web server. CGI scripts are called by a web server when a user requests a particular URL or interacts with the webpage (such as clicking a “Submit” button). After the CGI script is called and finishes executing, the output is used by the web server to create a webpage displayed to the user. ...

September 30, 2015 · 3 min · Tasdik Rahman

Install Hadoop(Multi Node)

Intro: In this article, I will describe the required steps for setting up a distributed, multi-node Apache Hadoop cluster backed by the Hadoop Distributed File System (HDFS), running on Ubuntu Linux. I am using nano as the text editor for this article but you can use any other text-editor like vi, sublime or atom for doing the same I suggest you set up hadoop on single node before directly going for multi node as it will be easier to debug any errors. I have explained about how to setup single node hadoop on ubuntu ...

September 13, 2015 · 8 min · Tasdik Rahman

Install Hadoop(Single node)

On a starting note : I am assuming that you have a fresh Ubuntu install on your system as this will cut down a lot of frustration trying to debug why Hadoop is not running. I am using nano as the text editor for this article but you can use any other text-editor like vi, sublime or atom for doing the same Next article : Install Hadoop Multi Node 1.0.3 on Ubuntu 14.04.2 ...

September 10, 2015 · 6 min · Tasdik Rahman

ROS Jade : Configuration

Configuring ROS If you have not installed ROS, I have written a short guide describing the process. It can be found here found here Install ROS - Jade on Ubuntu 14.10 The first step is to check whether the environment variables for ROS are setup properly Do a {% highlight bash %} tasdik@Acer:~$ export | grep ROS {% endhighlight %} Look for ROS_ROOT and ROS_PACKAGE_PATH whether they are set. It should look something like this ...

August 28, 2015 · 2 min · Tasdik Rahman

ROS Jade : Installation

What the heck is ROS anyway : Robot Operating System (ROS) is a collection of software frameworks for robot software development, providing operating system-like functionality on a heterogeneous computer cluster. So in layman terms, it just helps us build robot applications. Previous post on ROS : Configuring ROS - Jade on Ubuntu 14.10 Note : ROS Jade ONLY supports Trusty (14.04), Utopic (14.10) and Vivid (15.04) for debian packages. If you are on any other version of Ubuntu or have a different flavor of linux installed, I suggest you head over to wiki.ros.org. ...

August 28, 2015 · 4 min · Tasdik Rahman