I along with Ashwin had done a graphics project in which we were supposed to build octree efficiently and to answer near queries for nodes.
The project is here.
Please go through the Readme.
One possible set of instructions to run the code is as follows
1) make
2) make random
3) ./random > input.txt
10
3
4
4) cat input.txt
5) ./octree input.txt
1 (for selecting a node)
1.80277 1.10057 1.23684 (giving the node which basically select any one point from the input.txt ...this is the first random point which was generated)
thats it .... a window will open and use arrow keys to navigate
i = zoom in
o= zoom out
Friday, October 30, 2009
Friday, September 18, 2009
Using Gmail's Email Autocompletion to your advantage
Hello All,
This post is specially directed towards the Hostel Sysads of IIT Bombay Hostels.
What problem are we trying to solve ?
When mails and couriers arrive at the Hall Manager's Office in our hostels, we want to set up an easy system which will allow the Hallie's assistant to notify those who have got mails by sending emails to them.
How?
We will create a file which has mappings from Room No of student to his EmailId in a .csv format which will be accepted by Gmail. Then Gmail's autocompletion feature will display the email id when you write the room no.
This post is specially directed towards the Hostel Sysads of IIT Bombay Hostels.
What problem are we trying to solve ?
When mails and couriers arrive at the Hall Manager's Office in our hostels, we want to set up an easy system which will allow the Hallie's assistant to notify those who have got mails by sending emails to them.
How?
We will create a file which has mappings from Room No of student to his EmailId in a .csv format which will be accepted by Gmail. Then Gmail's autocompletion feature will display the email id when you write the room no.
Requirements:
1) An input file which contains mapping of room no. and email id of person living in that room
2) A python script which converts this input file into .csv [CSV = comma separated values] which Gmail accepts.
Download this zip file. It has three files.
a) A sample input file named "HostelAddressBook.txt". In that file, you will see two columns. First column is a room no. and second column is an email id of person living in that room.
b) HAB4Gmail.py file.
c) An output file "mappings.csv" which was generated after running the python script on the input file.
Steps:
1) Download the above file and extract it.
2) Run the script by typing "python HABinGmail.py" on the terminal in linux.
3) Output file: "mappings.csv" is generated.
4) Import this file into Hostel Office Gmail account by following the instructions given here.
a) A sample input file named "HostelAddressBook.txt". In that file, you will see two columns. First column is a room no. and second column is an email id of person living in that room.
b) HAB4Gmail.py file.
c) An output file "mappings.csv" which was generated after running the python script on the input file.
Steps:
1) Download the above file and extract it.
2) Run the script by typing "python HABinGmail.py" on the terminal in linux.
3) Output file: "mappings.csv" is generated.
4) Import this file into Hostel Office Gmail account by following the instructions given here.
5) Testing: Once the import is completed, start to compose email. In the "To" field, write the room no(e.g. A704 ) which is present in the input file.
The python script used in above code is hardly of ten lines. You can easily understand the code and modify it to suit your needs. Like if you need mappings from a person name to email id rather than room no.
Please do post comments and modifications.
Sunday, September 6, 2009
sources.list for IITB Junta for Ubuntu 9.04 i.e Jaunty
deb ftp://ftp.iitb.ac.in/os/ubuntu/archives/ jaunty main restricted universe multiverse
deb ftp://ftp.iitb.ac.in/os/ubuntu/archives/ jaunty-updates main restricted universe multiverse
deb ftp://ftp.iitb.ac.in/os/ubuntu/archives/ jaunty-backports main restricted universe multiverse
deb ftp://ftp.iitb.ac.in/os/ubuntu/archives/ jaunty-security main restricted universe multiverse
deb ftp://ftp.iitb.ac.in/os/ubuntu/archives/ jaunty-proposed main restricted multiverse universe
deb ftp://ftp.iitb.ac.in/os/ubuntu/archives/ jaunty-updates main restricted universe multiverse
deb ftp://ftp.iitb.ac.in/os/ubuntu/archives/ jaunty-backports main restricted universe multiverse
deb ftp://ftp.iitb.ac.in/os/ubuntu/archives/ jaunty-security main restricted universe multiverse
deb ftp://ftp.iitb.ac.in/os/ubuntu/archives/ jaunty-proposed main restricted multiverse universe
Sunday, August 30, 2009
The The English Language Is Goofy
The following poem was a comment to the post by the above name. I liked it and hence reproducing it here.
We'll begin with a box, and the plural is boxes,
But the plural of ox becomes oxen, not oxes.
One fowl is a goose, but two are called geese,
Yet the plural of moose should never be meese.
You may find a lone mouse or a nest full of mice,
Yet the plural of house is houses, not hice.
If the plural of man is always called men,
Why shouldn't the plural of pan be called pen?
If I speak of my foot and show you my feet,
And I give you a boot, would a pair be called beet?
If one is a tooth and a whole set are teeth,
Why shouldn't the plural of booth be called beeth?
Then one may be that, and three would be those,
Yet hat in the plural would never be hose,
And the plural of cat is cats, not cose.
We speak of a brother and also of brethren,
But though we say mother, we never say methren.
Then the masculine pronouns are he, his and him,
But imagine the feminine: she, shis and shim!
Let's face it - English is a crazy language.
There is no egg in eggplant nor ham in hamburger;
neither apple nor pine in pineapple.
English muffins weren't invented in England .
We take English for granted,
but if we explore its paradoxes,
we find that quicksand can work slowly,
boxing rings are square, and a guinea pig
is neither from Guinea nor is it a pig.
And why is it that writers write but fingers don't fing,
grocers don't groce and hammers don't ham.
Doesn't it seem crazy that you can make
amends but not one amend.
If you have a bunch of odds and ends and
get rid of all but one of them, what do you call it?
If teachers taught, why didn't preachers praught?
If a vegetarian eats vegetables,
what does a humanitarian eat?
Sometimes I think all the folks who grew up speaking
English should be committed to an
asylum for the verbally insane.
In what other language do people recite at a play
and play at a recital? We ship by truck but send
cargo by ship. We have noses that
run and feet that smell. And how can a slim
chance and a fat chance
be the same, while a wise man and a
wise guy are opposites?
You have to marvel at the unique lunacy of
a language in which your house can burn up as
it burns down, in which you fill in a form by
filling it out, and in which an
alarm goes off by going on.
So if Father is Pop, how come Mother isn't Mop?
And that is just the beginning--
even though this is the end!
We'll begin with a box, and the plural is boxes,
But the plural of ox becomes oxen, not oxes.
One fowl is a goose, but two are called geese,
Yet the plural of moose should never be meese.
You may find a lone mouse or a nest full of mice,
Yet the plural of house is houses, not hice.
If the plural of man is always called men,
Why shouldn't the plural of pan be called pen?
If I speak of my foot and show you my feet,
And I give you a boot, would a pair be called beet?
If one is a tooth and a whole set are teeth,
Why shouldn't the plural of booth be called beeth?
Then one may be that, and three would be those,
Yet hat in the plural would never be hose,
And the plural of cat is cats, not cose.
We speak of a brother and also of brethren,
But though we say mother, we never say methren.
Then the masculine pronouns are he, his and him,
But imagine the feminine: she, shis and shim!
Let's face it - English is a crazy language.
There is no egg in eggplant nor ham in hamburger;
neither apple nor pine in pineapple.
English muffins weren't invented in England .
We take English for granted,
but if we explore its paradoxes,
we find that quicksand can work slowly,
boxing rings are square, and a guinea pig
is neither from Guinea nor is it a pig.
And why is it that writers write but fingers don't fing,
grocers don't groce and hammers don't ham.
Doesn't it seem crazy that you can make
amends but not one amend.
If you have a bunch of odds and ends and
get rid of all but one of them, what do you call it?
If teachers taught, why didn't preachers praught?
If a vegetarian eats vegetables,
what does a humanitarian eat?
Sometimes I think all the folks who grew up speaking
English should be committed to an
asylum for the verbally insane.
In what other language do people recite at a play
and play at a recital? We ship by truck but send
cargo by ship. We have noses that
run and feet that smell. And how can a slim
chance and a fat chance
be the same, while a wise man and a
wise guy are opposites?
You have to marvel at the unique lunacy of
a language in which your house can burn up as
it burns down, in which you fill in a form by
filling it out, and in which an
alarm goes off by going on.
So if Father is Pop, how come Mother isn't Mop?
And that is just the beginning--
even though this is the end!
Wednesday, August 26, 2009
Jaunty Ubuntu 9.04 Using more cpu
Recently I installed ubuntu 9.04 on my computer.
All was fine except that it was using more cpu than usual.
I used top and system monitor to determine which process is using more than its normal share.
Unfortunately, I couldn't found any.
Thankfully I found this post.
According to it, the "vino" (VNC server) which comes installed with ubuntu is causing some problem.
So solution my friends (which worked for me) is to simply uninstall it.
I am simply writing this post to duplicate the solution so that this solution comes early in search results.
Thanks for reading and do comment if you find this useful.
Again your comments are important to determine the usefulness of this solution.
All was fine except that it was using more cpu than usual.
I used top and system monitor to determine which process is using more than its normal share.
Unfortunately, I couldn't found any.
Thankfully I found this post.
According to it, the "vino" (VNC server) which comes installed with ubuntu is causing some problem.
So solution my friends (which worked for me) is to simply uninstall it.
I am simply writing this post to duplicate the solution so that this solution comes early in search results.
Thanks for reading and do comment if you find this useful.
Again your comments are important to determine the usefulness of this solution.
Friday, August 21, 2009
Setting up Ldap based logins in Hostel Comp Rooms in IIT Bombay
First of all, a sincere thanks to Pankaj Pandey for helping me out in creating this script and the innumerable ways he has helped me.
We have created a script which allows one to set up Ldap based login in computers.
How it works: We have a file called as ldap_logins in config folder. This file contains ldap logins of those students whom who you want to give login access.
When a student enters his login and password, it verifies the ID with ldap and then checks whether his name is present in the file.
Prerequisites: We have tried this method on only Ubuntu computers. So we don't guarantee that this will work on any other system i.e. Fedora , Gentoo, etc . If it works then fine but if it doesn't we cant help you.
You need to have working computer with Ubuntu running on it. Also iitb-repositories must be properly set, i.e. aptitude command should work.
2) Run the following commands:
sudo ./client_setup.sh
While configuring ldap, it will ask for two things,
a) ldap.iitb.ac.in
b) ou=People,dc=iitb,dc=ac,dc=in
3) Ldap version to be used is 3
4) Select "No" twice.
The script continues and installs other related things.
5) Restart the computer
Go through the script to understand what is happening.
We have also created a python script which will give u ldap logins if you give it a text file containing rollnos. You can get such a list of roll nos from Hall Manager. This script is present in ldap_search folder. The script is straightforward.
To run the script, you need to have ldap module installed.
We have created a script which allows one to set up Ldap based login in computers.
How it works: We have a file called as ldap_logins in config folder. This file contains ldap logins of those students whom who you want to give login access.
When a student enters his login and password, it verifies the ID with ldap and then checks whether his name is present in the file.
Prerequisites: We have tried this method on only Ubuntu computers. So we don't guarantee that this will work on any other system i.e. Fedora , Gentoo, etc . If it works then fine but if it doesn't we cant help you.
You need to have working computer with Ubuntu running on it. Also iitb-repositories must be properly set, i.e. aptitude command should work.
Steps:
1) Download this script and untar.2) Run the following commands:
sudo ./client_setup.sh
While configuring ldap, it will ask for two things,
a) ldap.iitb.ac.in
b) ou=People,dc=iitb,dc=ac,dc=in
3) Ldap version to be used is 3
4) Select "No" twice.
The script continues and installs other related things.
5) Restart the computer
Go through the script to understand what is happening.
We have also created a python script which will give u ldap logins if you give it a text file containing rollnos. You can get such a list of roll nos from Hall Manager. This script is present in ldap_search folder. The script is straightforward.
To run the script, you need to have ldap module installed.
Friday, March 13, 2009
Some Links
http://www.nikal.com
http://www.dontclick.it/
http://www.thelovemovie.com/
http://patterngame.com/linesuperfollow.swf
http://www.msfirefox.com/microsoft-firefox/index.html
http://www.albinoblacksheep.com/flash/end
http://home.iitk.ac.in/~hussain/fav/Animation.swf
http://img184.imageshack.us/my.php?image=wolfek5.swf
http://www.albinoblacksheep.com/flash/3cup
http://chitthi.webchutney.net/
http://www.mousebreaker.com/games/fiveaside/play.php
http://www.lostvectors.com/bowmaster/bow_rel9.swf
Some links which I liked. Try them out. Not sure whether they will still work.
http://www.dontclick.it/
http://www.thelovemovie.com/
http://patterngame.com/linesuperfollow.swf
http://www.msfirefox.com/microsoft-firefox/index.html
http://www.albinoblacksheep.com/flash/end
http://home.iitk.ac.in/~hussain/fav/Animation.swf
http://img184.imageshack.us/my.php?image=wolfek5.swf
http://www.albinoblacksheep.com/flash/3cup
http://chitthi.webchutney.net/
http://www.mousebreaker.com/games/fiveaside/play.php
http://www.lostvectors.com/bowmaster/bow_rel9.swf
Some links which I liked. Try them out. Not sure whether they will still work.
Subscribe to:
Comments (Atom)