Python Local Enviornment setup on Ubutnu

I have never coded in my life so its time to learn and do sumthing !!
In my previous Job where i was supposed to code in Python and i was not quick enough to do that, i came to know about this Virtualenv funda.

We need a virtual environment so that we can install certain Python software which we need for specific application, like Python Django framework which has its on deps and which might break other current apps which uses older version of it.

sudo apt-get install python-virtualenv

Suppose you want to create a directory name “pywrk” and this to work on your python virtual environment simply map this directory to virtualenv

$pwd
/home/atul/pywrk
$which python
/usr/bin/python

Lets setup virtualenv now for this directory
$ virtualenv ~atul/pythonwrk/
$ source ~atul/pythonwrk/bin/activate

So we have our own python local environment setup. We can install modify add all packages inside this directory and it will be served for our local environment.

spellchecker in (OO) open-office on ubuntu !!

After 2 hrs of brain storming on weekend in my office finally got spell checker working for my open office 3.2 on ubuntu 10.04. i had to take expert help from Hobbes, nigleb and lastly Indranil dada and it worked.

sudo apt-get install hunspell  myspell-en-us openoffice.org-help-en-us

Once this is installed  open a open office document and TOOLS -> OPTIONS –> LANGUAGES

 

Once this is done check WRITING AIDS and do as screen shot does.

Restart your open-office and you will have spell checker working.

Setting up Monit (On Ubuntu) ..

Apart from playing with the Source Code Open Source Software has given us.

Installing Monit :–

 

sudo apt-get install monit

This command will install Monit on Ubuntu.

In order to Start the Monit we need to edit file  “/etc/default/monit” and set the  “startup= 1″

This will start the Monit, but we need to do the real work inside the “/etc/monit/monirc”  file, and mention what all services we want to be monitored.

I have simply added a script for monitoring my Nginx Server

check process nginx with pidfile /var/run/nginx.pid
start program = “/etc/init.d/nginx start”
stop program  = “/etc/init.d/nginx stop”
group www-data

But before that we need to enable few other services as well like:–

set daemon  20           # check services at 2-minute intervals

set logfile syslog facility log_daemon    #for log analysis

set httpd port 2812 and
use address localhost  # only accept connection from localhost
allow localhost        # allow localhost to connect to the server and
allow admin:monit      # require user ‘admin’ with password ‘monit’
#     allow @monit           # allow users of group ‘monit’ to connect (rw)
#     allow @users readonly  # allow users of group ‘users’ to connect readonly

 

Once am done with this i will restart monit and see the status on localhost:2812 , we will see the status saying nginx is running.

let kill or stop Nginx and see the same url, you will see a message saying Nginx is stopped.

 

As we have asked the monit to check and restart the service at 2 minutes, you will see the process up and running again.

 

 

Sorry state of Indian Mobile providers .

I am really pissed off right now and that is why am writing this.

About Airtel:–

I bought a Postpaid connection November 2010, since i moved to Chennai, i mailed them specifically that kindly Deactivate my number and send me full and final bill on 14th feb 2011.

http://pastebin.com/QLj7GvKL

I immediately get response from them an acknowledgement mail and am happy to know my problem is solved. http://pastebin.com/vh4Qda8J on the same date 14th feb.

On 16th i get another mail from them mentioning my outstanding balance http://pastebin.com/Pdquv6X9 and also telling me i should pay the outstanding bill. At the same time am fucked at least every hour from some Airtel guy from Delhi and am receiving the same while am on Roaming. I visited the Airtel Care at Anna Nager, Chennai requesting for the same and the guy said you have to put the Deactivation request online and since your number is not of the Chennai region we cannot do anything. On 19th i visited the Airtel Care again and paid 400 RS so that rest can be adjusted during the full and final payment. I put the sim inside the bag in order not to waste my money on receiving there calls.

I tried contacting them from there Twitter account and got response

1. http://twitter.com/Airtel_Presence/status/37033395263381504
2.http://twitter.com/Airtel_Presence/status/37033913880682496
3.http://twitter.com/Airtel_Presence/status/37035064948830208
4.http://twitter.com/Airtel_Presence/status/37049980619333632
5.http://twitter.com/Airtel_Presence/status/37094132597919744
6. http://twitter.com/Airtel_Presence/status/37097325830606848
7.http://twitter.com/Airtel_Presence/status/37738353516478464
8.http://twitter.com/Airtel_Presence/status/37809696266137600
9.http://twitter.com/Airtel_Presence/status/37818711851274240

After all this Tweet sharing the result is Zero, I am yet to get my full and final bill.

On 17th Feb i finally get another Email http://pastebin.com/PYxCcHeG

Again on 22nd fen i tried reminding them the same and i got this reply:–

http://twitter.com/Airtel_Presence/status/40033688901255168

As if these guys are totally unaware about earlier conversation. I am yet to get full and final bill from them.

I wonder is this what makes Airtel, India’s number Mobile provider?

About Vodaphone :–

I been a vodaphone user for over 5 years and i had no problem with them. But i am having the same issue when am trying to get my Postpaid number of Delhi disconnected.

I just wonder is getting a postpaid number disconnected is such a BIG DEAL?

I think i am not going to have any more postpaid number, i am going to discontinue my Chennai Postpaid number i have bought last week.

I will not be having any mobile number for few weeks now.

atul