I will be turning off my lights on the March 29th 2008 for one hour at 7:30 pm. Please join me, and many others on this symbolic event to create awareness for global warming. Try to spread the news in your community.
Here is a video about EARTH HOUR 2008. Let`s help Sydney, Australia to make Earth Hour a global event.
Problem: I have a CSV file where I have source and destination IPs. I want to resolve only destination IPs.
Format of my CSV file: (let`s call it test.csv) (it`s tab separated…)
The solution is pretty simple with python:
reader = csv.reader(open(“./test.csv”, “rb”), delimiter=” “)
for row in reader:
host, aliases, ips = socket.gethostbyaddr(row)
print row + ” ” + host + ” ” + row + ” ” + row
First we import the necessary libs. (socket and csv)
Then we open the file to read with as a csv object. (Careful because our delimiter is not comma, but TAB)
for each row we get the second row (row), convert it to host, alias and ip by gethostbyaddr method.
The last line is to create the new tab separated format. (Just pipe it to a file and you have your new CSV file. [tab separated… but oh well..])
Rest in Peace Sir Arthur C. Clarke.
Today Sir Arthur C Clarke passed away at the age of 90 at Sri Lanka…
I pulled the trigger on this 24 inch iMac. So far so good. I was expecting harsh battles with Leopard… But it looks like things are going very good so far. After some 8 hours of usage, I`m still happy with OS X.
I have some projects in the future. But first i need to get used to “über user friendly” interface…
Happy pi day everyone. And happy birthday Einstein!