GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing codebright.wordpress.com — codebright Author Archives: codebrightLinear Algebra Review and numpyI’ve signed up for the Machine Learning course from Stanford. One of the first week’s subject areas is a Linear Algebra Review, and the recommended software is GNU Octave. However, I’d prefer to use numpy and Python. Here’s my notes … Continue reading → Tuple TriviaA couple of minor points regarding tuples. When you take a slice of a tuple, there are 3 parameters: – the start index – the end index – the step which produces: It doesn’t matter that, in the second instance, … Continue reading → globals and __main__: a Python gotchaOne of the good features is the lack of gotchas. I define gotchas as traps for the unwary programmer, where something unexpected happens. Thankfully these are rare in Python. But the following is one that is worth knowing about. Consider … Continue reading → Edge case for split / explodeDuring recent coding, using PHP, I found that the explode function behaves in a non-ideal way (for me) when trying to split an empty string: produces: I was expecting (needing?) an empty array. After thinking about it a bit more, … Continue reading → Reading gzip files in Python – fast!I have been doing lots of parsing of Apache log files recently with Python. Speed is of the essence, so I was interested to know if the speed issues mentioned in http://bugs.python.org/issue7471 are still relevant. So I set out to … Continue reading → Python Standard LibraryThere are some gems in the Python standard library which, once found, get regular use – at least by me. Here are some of them. 1. enumerate A built-in function, which allows you to replace code like this: with the … Continue reading → Python regular expression surpriseI came across this regular expression anomaly recently in Python. The regular expression was more complex, but this example illustrates the idea. Try and predict the outcome (should work with Python 2.5 – Python 3.1) This produces: a, bc, d … Continue reading → PHP and PythonMy new job involves a lot more PHP, which seems closely related to Perl. There are a number of observations that I would make in the comparison between PHP and Python. 1. PHP is more verbose. In particular, PHP requires … Continue reading → SendKeys in LinuxSendKeys is a useful function in the Windows API which enables a program to send keystrokes. I was looking for an equivalent in Linux, first in Ubuntu at home, and then in Fedora 13 at work. For Ubuntu (Hardy Heron, … Continue reading → Strange behaviour using ctypes in IronPythonI came across some slightly unexpected behaviour with ctypes in IronPython. Maybe this is the wrong way to look at it – I should be amazed that ctypes works at all in IronPython. But I thought I would document it … Continue reading →
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
|
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |