Ramblings Of a Madman

Yeah, like i would know a good description…

Posts for Tag: time wasting

Wank'o'meter is fun

Last night i laughed like i didn't in a really long time, watching my brother play with the android app "wank'o'meter". Try it out, it's guaranteed fun :)

Adventures at the Indian embassy (or how Portuguese services suck)

Where should i start? Ah, yes, the motivation: In about a month i am supposed to go to India in a business trip and - as such - i will require a visa.

I went to the embassy on Wednesday morning only to find out that visa applications are not handled on Wednesdays. Just my luck! It was clearly my fault, since i did not properly check the opening times on their - extremely hard to find - website. Did i mention you spend one hour in traffic just to get there? Suffice to say i was pissed, though mostly at myself. I did try to call them, but the automated response only directed people to their website. Why they bother having a phone is beyond me.

The next day i went back again (1 more hour in traffic) and finally got a ticket. The system works like this: You wait in the streets until a security guard calls you. Then he checks to see if your papers are all in order, and finally gives you a numbered ticket and sends you into the actual waiting/service room where you... wait some more. I arrived at the gate at around 11 am. I got ticket number 35. The embassy opens at 9.30 and they only had served around 19 tickets. I did my math and promptly went back home, at the risk of spending the entire day waiting. Again - probably my fault - but one should take some time to see the number of people that uses our services and get the appropriate amount of workers to be able to deal with them in a timely fashion. Two workers for 50 people, when the average time per person is 20 minutes, will not work.

Third day: Decided that i should be one of the first people to get there and get a ticket. Left home around 8 am. Arrived at the embassy at 9:15. Got ticket number 4. Not bad. Funny fact about lines in portugal: they don't exist. I arrived at the embassy gate and there were around 10 people there already (the embassy opens at 9.30, though they only started actually working at 10). I asked politely "is there a line?" and was greeted with the response "not really, you know how it is with us portuguese, we just remember who came first". This is exactly the kind of crap that pisses me off: lack of order and organization. But then again, looking at my living room right now, i shouldn't really complain :)

So, i got my number and went ahead into the waiting room. Now, the website states that - for business visas - one is required the following:

- Invitation letter from the Indian partner,

OR

- Invitation letter from the Portuguese company explaining the details of the visit.

Note the emphasized "OR".

After waiting for roughly 30 minutes, the lady tells me that i'm missing a letter from my company (i only had the one from the Indian company). I tried to explain that the website said i only needed that one but there was nothing that could be done. She told me how long it would take, explained that it had to be analyzed by two different entities and told me how much it would cost. Since - up until then - i saw everyone paying in cash i decided it would be a good idea to ask if they accepted cards. No cards. Really? What century is this? And you could put out a sign explaining that so that i would know about it - oh call me crazy - before i waited in line or - i don't know - you could put it IN YOUR WEBSITE?

So here's my summary of improvements, if anyone closely related to the Indian embassy in Portugal reads this and cares enough to help people not waste their time and money getting a freaking visa:

Update your website! Seriously, read that again: Update your website. It's the 21st century and pretty much everyone uses the web to know information about this kind of things; Put up a sign that you do not take cards as a method of payment. I do understand why you make the entrance process so explicitly phased, but people need to know what to count on when they get in there. I don't want to stand in line for 1 hour (a very typical case, trust me) only to find out i cannot pay with my card. Also, see point number 1! Get more people working there. Clearly the waiting times should tell you that you are understaffed.

There, ended up being constructive. I feel much better now :)

UPDATE: As a good friend of mine very well pointed out, i should help other people find their website :)

My face in space?

[caption id="attachment_1103" align="alignright" width="300" caption="Congratulations, you're face has been stolen..."] [/caption]

Wanna get your face in space? Just go to NASA's website, choose a mission, and upload your pic. Time waste? Maybe. Fun to see your face in the rocket? Yep.

The timeless wisdom of Glenn Quagmire

For all the "Family Guy" fans out there, here's a collection of Quagmire's best quotes.

My personal favorite:

Also, here are some of the best quotes by Stewie.

Dig a hole through Earth

Turns out that a hole made in my home country, Portugal, would end up in New Zealand:

Check the source website here, and figure out where your country leads to on the other side of the world :D

Several years of email statistics - code included

Out of boredom, I decided to create a couple of python scripts to download the dates of all the email I ever sent through Gmail and get some statistics on it.

Here they are: Number of emails sent per weekday, month, and hour.

I didn't know what to expect, to be honest, but – at first sight – nothing out of the ordinary. The per weekday chart shows, obviously, that I send less email on weekends (though I send more on Sundays than Saturdays, go figure). Friday is also not as busy as the rest of the week (kind of expected :)).

Per month shows that my most active month for email sending is October. No clue why is that, but it might be related to the beginning of the Autumn weather, somehow :)

Finally, per hour shows that I'm not that much of a night email kind of guy. Most of my emails are sent throughout the day, with the usual break for lunch around 13. This actually showed me how late I'm having lunch, hehe. My most active hours of the day for email sending seem to be 10am and 2pm (mid morning and right after lunch). But the interesting part is how, after both of these periods, it decays really smoothly. I wasn't expecting that.

And there you go, another time waster. Here are the scripts, if you plan on using them. Just replace the 'username' and 'password' part on the first one, to retrieve your sent email from your gmail account.

Cheers. get_email.py import getpass, imaplib

M = imaplib.IMAP4_SSL('imap.gmail.com', 993) M.login('username@gmail.com', 'password') M.select('[Gmail]/Sent Mail')

typ, data = M.search(None, 'ALL') fout = open("dates.txt", "w")

for num in data0.split(): typ, data = M.fetch(num, '(RFC822)') split_data = data0[1].split('\r') for line in split_data: if line.startswith('\nDate:'): print data0[0] fout.write('%s\r\n' % line[7:]) M.close() M.logout()

fout.close() generate_chart.py from datetime import datetime from pychart import *

def parse(data, format): try: return datetime.strptime(data, format) except ValueError: pass return None

months = {} weekdays = {} hours = {}

def increment_item(dict, item): if not dict.has_key(item): dict[item] = 0 dict[item] = dict[item] + 1

def store(dt): increment_item(weekdays, parsed.weekday()) increment_item(hours, parsed.hour) increment_item(months, parsed.month)

fin = open('dates.txt', 'r')

for line in fin: parsed = parse(line[:24], '%a, %d %b %Y %H:%M:%S')

if not parsed: #print 'Could not parse "%s"' % line pass else: store(parsed) #print parsed

#print months #print weekdays #print hours

def create_data(data): final_data = [] for item in data: final_data.append((item, data[item])) return final_data

datasets = ( #('Months', create_data(months)), ('Weekdays', create_data(weekdays)), #('Hours', create_data(hours)), )

import cairo

width, height = (640, 480) surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height) options = { 'legend': {'hide': False}, 'background': {'color': '#f0f0f0'}, }

import pycha.bar

chart = pycha.bar.VerticalBarChart(surface, options) chart.addDataset(datasets) chart.render() surface.write_to_png('weekdays.png')

fin.close()

New blog... yes, I know, another one...

…but bare with me on this. It's going to be a place where I will post all of the stupid ideas that go through my mind, no matter how dumb-as-f@ck they are.

Read more on the first post: http://nocivus.tumblr.com/post/110480581/the-first-idea