Status();

Random post..

Status messages on IM services have become a scrap board.

The messages are mostly classified into the following categories:

1. Oh! look I am a genius kind:

Example:

“The glass is neither half full nor half empty, its twice as big as required”

2. The advertisement space:

Examples:

“Internships @ gigabucks- The Bla Bla Case Study Launch: Sep 20, Saturday, 6 PM, Outreach Auditorium”

“Need a pendrive ASAP”

3. People striving for attention:

Example:

“Check out my Blog: http://blogs.iamwilliwonka.com”

4. The Pseudo RSS news feed kind:

Example:

“XYZ company merged with LMN ”

5. Look I am working hard kind:

Example:

“2 assignments, 1 quiz and a 4 hour lab :(”

6. Yaay!…I got a new gadget kind:

Example:

“Wow, finally I am gonna get my hands dirty with raid/terabyte machines…. It should be fun… any suggestions which distro I should use?

7. I am here - Catch me if you can  kind:

Example:

“@ Hyderabad-Chiran Fort club”

8.Ooo… My computer plays music kind:

Example:

“♪ The-police-siren.mp3″

9.Random Rants:

Example:

“Very soon, people from hell will be sent to live with you for punishment(obviously their punishment not yours)… BTW ‘aamir’ and ‘a wednesday’ should have a genre of their own, what? disagree? I am not surprised, I can understand.”

10.The normal boring kind:

Examples:

“Away”

“Sleep”

“Idle”

“Food”

“Hungry”

Most of the example are taken from the status messages of people on my Google Talk.

Here is mine at the time of writing this post.

While(1){
   Sleep();
   IF(AWAKE){
      EAT FOOD;
   }
}
 
#after 40 minutes or so I realized that Sleep(); was not necessary :)
 
While(1){
   IF(AWAKE){
      EAT FOOD;
   }
}

ISCII - The Desi SCII

Thanks to Nareshov, I worked quite a bit on ISCII and managed to churn out some code that helps to convert it into UTF8. The script is quite general and can be quickly modded for other SCII to UTF8 conversions.

The Script requires you to have a CSV file with the mappings from the SCII to Unicode written in it. The CSV can be written by looking into your SCII table and the corresponding Unicode one available http://www.unicode.org/charts/

Example ISCII-Telugu CSV and the Python Code : scii2utf8.zip

Be sure to see the output in a terminal that understands UTF8.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import csv
 
filetable = open("iscii-telugu.csv","rb")
convtable_length=95 #length of the csv above.
 
reader=csv.reader(filetable)
convtable={}
lang={}
icing=0
 
for row in reader:
	if(icing == 0):
		lang[row.pop(0)] =  row.pop(1)
		icing =1
		print "Language conversion between" 
                #Just a bit of icing
		print  lang
	else:
		if(icing<convtable_length+1):
	           convtable[int(row.pop(0),16)] = int(row.pop(1),16)
 
#print convtable
 
def code2utf(a):
	if(a>6)&63)+128)+chr((a&63)+128),"utf-8")
 
def conv2utf(s):
	stri=u""
	for let in s:
		if(convtable.__contains__(ord(let))):
			stri=stri+code2utf(convtable[ord(let)])
		else:
			stri=stri+let
	return stri.encode('utf-8')
 
print conv2utf(unicode("ÍÚÂÍÚÌ¢ µÂÏ×¢ ÈÞÂÛ ÈÏèÍÝÖÛ¢ ¸ ÍÂèê ",'utf-8')) 
# Some test lines from the gita.

Ola people

I decided to resurrect this blog….Hopefully I will start posting something good.