Some index.dat files record not only websites visited, but also the files on the computer (and any other devices) which have been opened. This gives an accurate account of what files have been viewed and possibly edited. Using the registry, any files accessed that are not on the C: drive can be linked to a USB stick … Continue reading Visualising data: File Directories
Category: code
Image Steganography
Steganography is the art of hiding something in something else in plain sight. Usually images or text are hidden within other images or sound files. For example, in the image below of trees there is an image of a cat hidden inside it. Wikipedia explains that for each component of each RGB value, if you take just … Continue reading Image Steganography
PostgreSQL full text search and SQLAlchemy
You may have noticed I have added a search bar at the top of the website. Here is how to make use of PostgreSQL's full text search facility with SQLAlchemy, a Python SQL Toolkit and Object Relational Mapper. To set up searching on one of your tables, add this to the model where your table classes are defined. Alternatively … Continue reading PostgreSQL full text search and SQLAlchemy
Script to put your music in a database
I made this script a while back now to populate a database with all the music on my computer (so excuse any poor Python!). It assumes you are on Windows and have all your music in one folder, arranged by artist with sub folder albums with songs in them. It also assumes you'll use PostgreSQL, … Continue reading Script to put your music in a database
Creating captchas in Python #2
Once the script to generate captchas is set up (see previous post) this can be easily tied into a Python web page. This assumes you are using Werkzeug and Mako, but I'm sure Django/Pylons with Jinja etc won't be too different. The code to display the image in the Mako template is below. For the image, … Continue reading Creating captchas in Python #2
Blog tags in Python
Creating the blog tags for this website was a bit tricky because I wasn't sure how to make the tags have different sizes according to their significance. I started off with 5 spans and ordered the tags in terms of frequency and divided them equally into the spans. However tags are not evenly distributed, so … Continue reading Blog tags in Python
Creating captchas in Python
In making this website and in my 4th year honours project I implemented a captcha (which you can see if you try and make a comment). I thought this would be a bit of a nightmare to do, but with Steven's help and the awesomeness of Python, it was quite easy. The code originally comes from here, but I … Continue reading Creating captchas in Python