Webucator blogs about online learning and training.

Webucator Blog

In Python’s Regular Expression HOWTO, this tkinter-based regular expression tester is mentioned. Here’s what it looks like:
tkinter regular expression tester

I created a similar tool in IPython notebook for the Advanced Python course I’m currently writing. It was a fun project and I learned some cool new IPython notebook tricks, which I’ll share in this post. But first, an 11-second demo: Read the rest of this entry »

Here are the most important things a programmer should know about Unicode and UTF-8: Read the rest of this entry »

“There are only 10 types of people in the world: those who understand binary and those who don’t.”

To understand the joke, you must understand how binary numbers work. And once you understand how binary numbers work, it’s easy to understand how octal and hexadecimal numbers work as well. Read the rest of this entry »

In programming,┬áit’s important to understand a little about how computer languages understand time. In particular, time is not the same across geography. The time in Moscow is different from the time in New York City. These differences wouldn’t cause too much of a problem if they were consistent, but they are not, in large part because Daylight Saving Time (DST) is practiced in some parts of the world, but not in others, and it goes into effect on different dates and times. Even that wouldn’t be too bad if there were some scientific way of determining where and when times were changed. But. alas, there is not. Read the rest of this entry »

As of Python 3.3, there are five different types of clocks in the time module, one of which is deprecated:

  1. time.clock() deprecated in 3.3
  2. time.monotonic()
  3. time.perf_counter()
  4. time.process_time()
  5. time.time()

I’ve been trying to figure out what different uses each of the clock types has. Read the rest of this entry »

I was surprised to find that date.strftime() is slower than converting the date to a string, splitting the string into a list, unpacking the list into year, month, and day strings and then concatenating those to format the date: Read the rest of this entry »

PHP converts dots to underscores in form submissions. Although this is documented and has apparently been true forever, I’ve never run into it before. The question came up in a comment on one of our YouTube videos explaining a change in how browsers deal with image submit buttons. Read the rest of this entry »

I had a bunch of Python files that I needed to convert in bulk to IPython Notebook files. I searched on converting .py to .ipynb, but was only able to find this Stack question, which provides an answer, which appears to be outdated. After digging through the nbformat module documentation for a solution to no avail, I wrote a little script for doing this. Read the rest of this entry »

IPython Notebook has a lot of useful shortcuts. You can access the list as a tooltip on the Help menu: Read the rest of this entry »

About two years ago, I started playing table tennis more seriously. I’m now in sort of a no-man’s land, in which I can beat most people who consider it a basement game, but can’t beat very many people who consider it a sport.

Because I’d rather write Python code than practice against my robot, I’ve created a model in Python to try to get an idea of what I should practice most to win more games. I’m unlikely to follow through on the practice, but I am likely to refine the model if people have ideas of how it could be made better. So, if there are any ping pong programmers out there, please feel free to make suggestions. Read the rest of this entry »

© Webucator, Inc. All rights reserved. | Toll Free: 877-932-8228 | Outside the USA: 315-849-2724 | Fax: 315-849-2723