-
Couple of thoughts about web crawling

-
Proxying pypi / npm / etc for fun and profit!
Package managers for source code (like pypi, npm, nuget, maven, gems, etc) are great! We should all use them. But what happens if the central repository goes down? Suddenly all your continious builds / deploys fail for no reason. Here is a way to prevent that: Configure Apache as a caching proxy fronting these services.…
-
Passing UTF-8 trough HTTP
These days we should write every code as if it will be used by international people with a wide variety of personal information (just look at Falsehoods Programmers Believe About Names for some headscratchers). I would like to do add my small contribution to this by showing how UTF-8 encoded strings can be passed into…
-
Converting datetime to UTC in python
So you need to convert a python datetime object which has a timezone set (“aware” in the Python nomenclature) to an UTC one with no timezone set (“naive”), for example because NDB on GAE can’t store anything else. The solution will look something like this: date = date.astimezone(tz.tzutc()).replace(tzinfo=None) For searcheability: the exception thrown by NDB…
-
GeekMeet talk about Google App Engine
-
Running pep8 and pylint programatically
Having tools like pep8 and pylint are great, especially given the huge amount of dynamism involved in Python – which results in many opportunities to shooting yourself in the foot. Sometimes however you want to invoke these tools in more specialized ways, for example only on the files which changed since the last commit. Here…
-
Clearing your Google App Engine datastore
-
Using Jython from Maven
This blogpost was originally posted to the Transylvania JUG blog. On the surface it looks simple: just add the dependency and you can run the example code. However what the jython artifact doesn’t get you are the standard python libraries like re. This means that as soon as you try to do something like the…
-
Negative zero – what is it?
Computers have two ways of representing numbers: One is called sign and magnitude – usually you have one bit specifying the sign (again, most of time you have 0 for positive and 1 for negative) and the rest of the bits specify the absolute value (“magnitude”) of the number. The other is ordering the numbers…