Skip to main content

Posts

4chan Image Spider using 'wget'

4chan is a great fun tool, where people from across the globe dump their thoughts (could be in a racist, offensive and sexual way as well). It has various boards according to various interests which includes /int/, /s/, the infamous /b/, /a/, /c/ and a lot more. 4chan image boards can also be fun at times. In this blog, I give you a tool for grabbing the images from 4chan boards. It uses a unix utility wget for downloading images automatically. Windows users might get an equivalent version from here . wget.exe -H -A '.jpg,.jpeg,.png,.gif,' -rc -Di.4cdn.org -P 4chan-pics -erobots=off http://boards.4chan.org/b/res/14479452 where, ' -P [name] ' gives it the directory name of the folder in your home folder ' -H ' Goes to outside links ' -nd ' is no-directory which won't put the images in separate folders. ' -r ' is recursive ' -A[.extension] ' tells it what extensions to download ' -D[location] ' is the server ...

cmd.Cmd module

Python has lots of surprises for it's lovers, one such pleasant one is the cmd.Cmd module .    A programmer might encounter tons of project where she might have to write a command line interpreter for his program to execute it. Typical undergrad lab. projects have tonnes of such project where one has to implement something, say for example Graph or a toy ticket reservation system. All these projects require the developer to create a command terminal which will prompt the user to write a command from some predefined set of them and then print the result in the terminal. Python provides a brilliant solution to such repreatative task in the form of a module cmd.Cmd. The best part is that the it gives the developer the freedom to do his implementation task independently to the command interpreter module. Cmd module offers tonnes of feature, some of them are -- command auto-completion auto help functions auto generated description of the command from the python docs. f...

Death by Puns : Networking Protocols

A TCP packet walks in to a bar and says “I want a beer”, barman says “you want a beer?” and TCP packet says “yes, a beer”. In high society, TCP is more welcome than UDP. At least it knows a proper handshake. A bunch of TCP packets go into a bar, until it’s overcrowded. The next day, half as many go in. A bunch of TCP packets walk into a bar. The bartender says, “Hang on just a second; I need to close the window.” When I try to send SYNs to chicks, I don’t get any ACKs. Just FINs and RSTs. IP packet with TTL=1 arrives at bar. Bartender: “Sorry can’t let you leave…and you don’t get any beer either…”. The worst part about token ring jokes is that if someone starts telling one while you are telling yours, all joking stops. The great thing about TCP jokes is that you always get them. The problem with TCP jokes is that people keep retelling them slower until you get them. I would tell some UDP jokes too but I ne...

Python script for Autoshutdown v2

This blog is an improvement to the script I mentioned in  Python Script for Autoshutdown . But soon after months to follow, my ISP has blocked pinging to internet, and since my logic was to try to ping Google servers; I had to alter my logic to use HTTP connection. I have changed the script to use HTTP instead of just pinging. This is my code in Python. As always, please feel free to suggest any improvement.

Nuclear Power : A Prudent Answer

Internet is filled with people in either volley trying to persuade the common-er about merits and demerits of nuclear energy at large. Most of these discussion are mainly very ideological and filled with fervour and passion. I will, in this blog try to give you a balanced view in this regard. Well, if you ask me to answer in one line, for or against. My answer would be for it, but there's more to it. For those who have the patience and time read on... Nuclear energy in its present form is mainly fission based i.e. a single atomic nucleus is smashed by a neutron into two smaller nuclei. The bombardment of this nucleus with neutron makes it unstable which eventually results in its splitting into fragments also called as fission fragment. Since this process makes the atom split into two, nuclear scientist call it fission reaction. There's another kind of nuclear reaction wherein atomic nucleus are fused together and quite appropriately it's called fusion reaction. ...

Motorola XT502 Custom ROMs

I purchased an Android Phone in the early days of it coming to Indian market and I able to afford it ( just got a job), during mid 2010. The recent and popular version was Éclairs. I just went up to the shop and bought a nice and shiny Motorola Quench XT3 (XT502). When in other places XT502 was having Andriod Donut, I got as a special offer Éclairs. I was happy as hell. The Droid A couple of year passes, and newer versions of Android came from Éclairs to Froyo to Gingerbread then to the bigger version upgrades like Honeycomb, Ice Cream Sandwich and then Jelly Bean. By the end of 2012, I was literally surviving on my Motorola with Éclairs. I had to upgrade, anyhow. Now more that Motorola denied any upgrades for Quench XT3 . A trivia, Android version names are taken from sugary desserts with lexicographic sequencing. So, I did up-gradation from Éclairs to Gingerbread using a custom ROM from Cyanogenmod . An excellent community of enthusiast who develop their own custom ROMs oft...

What are you?

What are you? Are you the physical body? Or are you the collection of neuronal synapses which gives your brain a specific topography? Or are you the thoughts present inside your mind? We are neither of the above. Why, you wonder? Here's why, because, Every human eats food, which replaces the biomass already present in the cells, which in-turn make up our body. It has been established that over a period of 8-10 years, every body cell gets replaced with a brand new cell. Every cell/atom in our body is younger than 10 years. So, it means that body can be ruled out as the candidate for 'what' we are! Scientist claim that the memory in our mind comes from the synaptic junctions in our brain. There is a phenomenon which occur in our brain called synaptic plasticity , which makes the synapse strengthen or loosen up depending upon the use or dis-use of that neuronal pathway. So, it means that over a time, our sypanses change and modify depending on what we expe...