While installing and configuring trac on my development VM it wouldn’t load over HTTP (500 error). Stracing the process returned the issue, Error: unsupported locale setting So it looks like it doesn’t have the locale installed (In my case EN_GB) this is easily fixed by running, sudo dpkg-reconfigure locales Then
Continue readingCategory: Python
Articles relating to python, python coding, python system administration, python threading, learning python
python load betfair data to mysql
The script below will import the betfair data from data.betfair.com into a mySQL table. First create the table, CREATE TABLE history ( sports_id int(11) DEFAULT NULL, event_id int(11) DEFAULT NULL, country varchar(10) DEFAULT NULL, scheduled_off varchar(30) DEFAULT NULL, actual_off varchar(30) DEFAULT NULL, full_description varchar(150) DEFAULT NULL, odds double DEFAULT NULL,
Continue readingpython attheraces.com data scraping
I have been working on scraping the data from attheraces.com for a project I am working on which combines this and betfair data for some statistical analysis. In case this is useful to anyone here is the regex I have written, meetings = re.findall(“<h5 id=\”fastfixhead(\d+)\”.*\”>(\w+)<\/a><\/h5>”, info) for meeting in meetings:
Continue readingTwitter Mass Unfollow With Python
I decided to revive my old twitter account and wanted to unfollow all my old friends list, the majority were gained from an auto-follow script a few years ago and are nothing but spam. Given I want to start using twitter I only want to follow people I am
Continue readingLearning Python
I had set myself a goal to make around 20 blog posts per year, it’s now almost December and I still have not bothered. It is safe to say I am not exactly prolific. I decided that I would learn python, surprisingly it’s been really easy to pick up and
Continue reading