atlas news
    
Sandro Tosi : Python
10  mai     21h07
Empire State Building Lights iCalendar
   I’m very lucky to be able to see the Empire State Building from my apartment windows, and at night the lights are fantastic But i’m also curious to know what’s going to be today’s lights, and tomorrow, etc.I thought I’d easily find a calendar to add to gCal to show that, but i wasn’t able to find...
08  décembre     07h13
Python: send emails with embedded images
   to send emails with images you need to use MIMEMultipart, but the basic approach: import smtplib from email.mime.multipart import MIMEMultipart from email.mime.image import MIMEImage msg MIMEMultipart ’alternative’ msg ’Subject’ subject msg ’From’ from addr msg ’To’ to addr ...
09  mai     02h37
It’s a waiting game... but just how long we gotta wait?
   While waiting for my priority date to become current, and with enough quarantine time on my hand, i just come up with a very simple Python tool to parse the USCIS Visa Bulletin to gather some data from that. You can find code and images in this GitHub repo. For now it only contains a single...
21  novembre     17h29
Attending the Codecademy
   You’ve probably already got it, I’m surveying several sites to improve programming skills. This episode is about Codecademy. It’s a very well done site, for people that want to learn a language. It has a Python track, along with several others: Ruby, JQuery, Javascript amp; so on. You’ll be...
18  novembre     18h22
Spending a Sunday on CodingBat.com
   I’ve played a bit with Project Euler but all of their problems are math centric, which is nice but not exactly what I’m looking for: some real world programming problems to get back into the coding field. So asking my friend Google, I found CodingBat: it has a Python section with several tasks to...
14  novembre     19h03
Project Euler - Problem 4
   Here’s my solution to Project Euler problem : handy function to check if a number is palindrome def is palindrome i : return str i str i :: what’s the max max p multiply all numbers i between and , with all between i and for i in xrange , : ...
11  août     01h53
Mercurial: how to completely remove a named branch
   I like so much the git feature branch workflow, that in the early days of development on Python with Mercurial I created some named branches; well, that is something you should not do. In Mercurial, the changeset contains the branch name, so you cannot develop on a separated named branch and...
01  août     22h13
And what am I now? A Python Core Developer
   Yeah, since a couple of hours I’m officially a Python Core Developer and this confirms it, so I’m not dreaming I’m now in that mixed state in between the happiness and the fear I’ll do stupid mistakes and I’ll be ashamed of myself. But hey, it’s only those who do nothing that make no...
18  mai     23h10
I’m going to EuroPython 2011
   I just got confirmation my company will sponsor me for EuroPython thanks Register.it , so I’ll be able to attend the whole week; a lot of amazing talks and the code sprints in the weekend: this is going to be a great time Are you coming
11  avril     14h15
Python: group a list in sub-lists of n items
   A long list, and you want to process its items n at a time; easy, but how to split that list in sublists of n elements except the last one, of course I looked a bit into the stdlib but it doesn’t seem to exist anything I could use oh, did I say I’m still on . so I directed my research to...
21  janvier     07h40
EuroPython 2011 Florence, IT - it’s coming
   Just when I was looking for a contact email to ask news about EuroPython dates... I noticed they are already there June to Book your flights, reserve your vacations, hope to see you all there PS: this year, PyCon Italia joins EuroPython in a single conference the bigger the funnier
29  décembre     08h37
Re: Converting date to epoch
   Alexander,did you even consider that I might need to convert a date to epoch in a python script :
28  décembre     22h00
Convert a date to epoch
   it seems like an easy quest, ain’t it well, it took me far too long to get it done, so let just write it down, so that maybe I won’t forget in seconds: import time str ’ ’ format ’ Y m d’ time.mktime time.strptime str, format . int and here...
20  octobre     18h54
Feeling welcome: Python, you’re doing it right
   It was for a very long time I think back from PyconIT that I wanted to contribute to python. About a month and a half ago I started reading all the documentation I could about development processes amp; workflows, mercurial stuff I don’t have commit right, so I prefer working on a DVCS than...
17  septembre     13h53
HTTP requests specifying the Host header (in Python)
   Since it took me some time to find this solution, I think it might be worth to share it.When you have a web server listening on a single IP address but serving several domains, it’s quite common to run: curl H Host: domain http: ip address path to the page.htmlif you need to view that domain...
26  mars     09h41
I’m going to Pycon Italia 4
   Yep, I’ll be there this year too sadly I can’t say it’s my fourth time, since I missed Pycon .I’m not that excited about the proposed talks, hey we don’t need that much of Django : I hope the invited speakers will surprise me, I’m confident the organization will do that.See ya there
17  mars     11h23
Check Nagios from the desktop: nagstamon
   I just discovered nagstamon and all the team fallen in love with it I tried to use Nagios Checker, the Firefox plugin to notify of any Nagios alert, but that doesn’t play nicely with several opened windows alerts are multiplied for the number of windows, since it seems everyone does the checks,...
05  mars     23h45
Project Euler - Problem 14
   Inspired by S. Lott and his blog post and by the pure genius that xkcd is giving us these days, today included I gave a look to Project Euler problem , that’s about the Collatz conjecture.The straightforward recursive solution:def collatz n : if n : return if n : return ...
03  février     11h11
Convert a time string (with microseconds) in a datetime
   I struggled a bit with datetime amp; friends providing a strftime that support f for microseconds output but not a strptime . That’s really boring and counter intuitive, and luckily it was fixed in . : python . import datetime datetime.datetime.strptime ’ : : . ’, ’ H...
07  janvier     19h40
Is being pirated sign of success?
   I don’t know and I don’t think so but for sure it’s less money in my pocket : Anyhow, just the other day I found my book was available for free download in a post on a rapidshare forum.I don’t bother too much, it just a strange feeling...
29  décembre     10h29
Matplotlib for Python Developers - Images available for download
   This is a book on a graphic library, so when they first told me it will be printed in black amp;white I was quite surprised and puzzled. The editor explained it was to reduce paper copy cost, and that the PDF version will still be in full color, but I would be quite upset if I bought the book and...
21  novembre     17h21
Matplotlib for Python Developers - PUBLISHED
   Some days are passed, but I’m still pleased to announce thatThe first book about Matplotlib has been PUBLISHED It was a really nice experience, it offered me the possibility to work on Matplotlib, do some really interesting stuff, and I’m quite proud of it : On the other hand, it was not a ...
07  septembre     09h54
The beast is quite done
   At the end, I made it: the book is in pre order phase yayyyI’m at the end of reviewing chapters, so I can see the light at the end of the tunnel : Probably I’ll be able to sleep more than hrs at night and have additional spare time to work on the projects I’ve neglected in these months
22  juin     14h13
Web scraping with Python for fun and profit
   Web is everywhere, we know. It is also used more and more to present information to a wide audience. Sadly, it is commonly the only way data is presented...That said, we need to get that info; the process of extracting information from web pages is knows as web scraping, and note that’s is a very...
28  mai     08h28
Update on the Matplotlib book
   Some people asked me how’s the book writing is going. Ah you’re right, it’s a loooong time I didn’t say anything of the progress, and here it is.I’ve just turned the half of the book: about days ago I’ve sent the th chapter out of and up to now I’ve covered this high level contents by...