Handling Unicode Input in Python

We have looked at reading data into Python, but have ignored the issue of character encoding. In English speaking countries we often assume a text file or string is simple ASCII. More often than not, the file is actually a Unicode file. With Python 2, ignoring this issue would not usually result in any problems ...

Python Data Validation: Date & Time

Regardless of language, handling dates and times is trickier than simple numbers and strings. This is because, even within the Gregorian system, there are a wide range of different formats in addition to multiple time zones and daylight savings / summer time corrections. Just to complicate things, the corrections vary according to date, and these ...

Python Data Validation

Python is a good scripting language for data analysis and processing, but are you sure your imported data is valid? As well as import errors, it is possible the data itself contains errors such as values in the wrong field, inconsistent values/fields, and unexpected situations. Immediately after reading the data, you must validate it, and ...

Solving the Six Degrees of Kevin Bacon Problem 1

This article shows you how to solve the “Six Degrees of Kevin Bacon” game using a mixture of SPARQL and Python. SPARQL SPARQL is a query language for triple stores that was born out of the Semantic Web effort. A triple is a simple 3 part statement or ‘fact’ such as “Australia is Country”. This ...

Importing Data into Python

Python is a popular tool for data manipulation and processing. In this first post about Python data manipulation and input, we look at a number of different ways to get your data files loaded into Python. Structured non-tabular data Structured non-tabular data typically consists of data records with fields which are not always present, in ...

A Ripple Effect for Android

The code in this article shows you how to apply a wave effect over a bitmap. Unlike many apps in the Google Play Store, this is a genuine wave effect that implements the 2d Wave Equation: ∂2u∂t2=c2∂2u∂x2+∂2u∂y2 2d Wave Equation Here is a sample animation: The code is presented below with comments.  A full physical ...

How to Show the Latest WordPress Posts in an External Page

We have recently re-organized the Winwaed.com homepage, and needed a widget to show the titles of the latest blog posts. In common with many WordPress installations, the website consists of static pages and a separate WordPress installation. The widget needed to work in a PHP page external to the WordPress installation, but access the WordPress ...

Microsoft Authenticode and the Micro-ISV

This report was originally written in spring 2006 for a post-graduate Information Assurance class with the Graduate School of Management at the University of Dallas. It was originally published elsewhere on this site but has been moved here due to a website re-organisation. The report analyses Microsoft’s Authenticode from the point of view of the ...

Excel Power Map 1

(this was originally published in the old MapPoint section of the Mapping-Tools.com HowTo pages) The Microsoft Excel Power Map is a new mapping extension for Excel 2013 and Office 365, and is a part of the Excel PowerBI (“Power Business Intelligence”) extensions. These have now been released as a part of the Excel 2013 Service ...

Converting a COM IPicture into a .NET Image 3

This article was originally published on the Mapping-Tools Howto pages for programming MapPoint. Although it was originally written with MapPoint in mind, it is useful in a wider context where a .NET application is trying to use a COM image (IPicture). Hence it has been retained and moved here. A program can create MapPoint images ...