I thought it would be neat to keep an eye on the popular google search terms related to Python.
The list below uses JavaScript from Google Trends. You can use the kebab menu icon to choose between "Top" and "Rising" search phrases.
Posted on in programming
I thought it would be neat to keep an eye on the popular google search terms related to Python.
The list below uses JavaScript from Google Trends. You can use the kebab menu icon to choose between "Top" and "Rising" search phrases.
Posted on in Programming
I was recently asked to take two lists and interleave them. Although I can not
think of a scenario off the top of my head where this might be useful, it doesn't
strike me as a completely silly thing to do.
StackOverflow's top answer
for this problem uses itertools.chain …
Posted on in Programming
Things have changed quite a lot since this post was originally written in 2016. Currently, I would recommend switching over to making asynchronous calls via aiohttp.
One of my scripts that makes an API call has been failing silently lately. It appears that the connection is timing out, but I …
Posted on in uncategorized
The new year is finally upon us. Traditionally, I have not been one to make New Year's Resolutions. This year, I decided that rather than a list of resolutions, I would create a list of goals. These are things I would like to achieve over the next year. In other …
Posted on in Programming
I've got some code that generates loss reports for EVE Online. It uses the
EVE-KILL API and
Python's urllib2 library. Near
the end of October 2015, I noticed that my calls to the API were returning a
403: Forbidden
error from the server. I didn't realize it at the time …
Posted on in Programming
Although I was getting this output in relation to one of my Jinja2 templates, it really isn't a Jinja2 problem.
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 69: ordinal not in range(128)
The bit of code here should be doing nothing more than printing a float …
Posted on in Programming
I've mentioned before that
empty strings in Python are false.
This leads to a common if not string
paradigm. Unfortunately, this can be
problematic. Check out this snippet:
>>> string = ""
>>> if not string:
... print("empty")
...
empty
That pretty much worked out just as we imagined. The empty string returned False
and …
Posted on in Programming
Although I use Git all day long, I actually prefer to use Mercurial for my personal stuff. When I started working on this project to maintain slaptijack.com with Pelican rather than continuing to use Wordpress, one of the things that really interested me was the ability to keep Markdown …
Posted on in Programming
This is was my next project.
Update: For now I've solved this problem by using FeedWordPress to pull the Atom feed for the Pelican-specific portion of the website.
Posted on in Programming