Feature Engineering And Deep Learning

In this post I will have a look at the first two projects within Udacity’s self-driving car project. More specifically I will share some of my thoughts in a “meta-learning” sense; how do things that I know and current do relate to machine perception/deep learning problems. Finding Lane Lines on the Road Traffic Sign Recognition The aspect of these projects which interest me much isn’t so much the “deep learning” portion, but rather tackling problems which I will describe as perception problems. [Read More]

Taking Bayesian Optimization For A Test Run

Some notes on Bayesian Optimization using Matern Kernel as per NIPS Practical Bayesian Optimization paper . # see http://scikit-learn.org/stable/auto_examples/gaussian_process/plot_gpr_prior_posterior.html import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np %matplotlib inline from sklearn.gaussian_process import GaussianProcessRegressor from sklearn.gaussian_process.kernels import Matern kernel = Matern(nu=2.5) gp = GaussianProcessRegressor(kernel=kernel) # suppose we are fitting this function.. X = np.linspace(0, 5, 100) y = np.sin((X - 2.5) ** 2) plt. [Read More]

Downloading Stuff From Reddit

Recently I’ve been playing around with changing wallpapers, but I realised it is just so much work curating images to use. So I thought one way was to use Reddit and rely on various subreddits as inspiration. As I got into it, I found that if the subreddit was relevant, I was just downloading everything. So why not automate this! Using Reddit’s API, where all we have to do is add . [Read More]

Introducing Formdown

Announcing formdown. This is a simple python module which assists with generating pesky forms without all the html tags. This can be combined with datepicker. Example: form = """name=____ date: datepicker=_____""" print formdown.parse_form(form) Output <p><label>Name</label><input type="text" name="name" id="name" /></p> <p><label>Date</label><input type="text" name="date" id="date" class="datepicker"/></p> <p><input type="submit" value="Submit"></p> Note that since we have class="datepicker", we will need to change the sample on the homepage: $(function() { $( ".datepicker" ).datepicker(); }); Hopefully this can be helpful! [Read More]

Introduction To Flask

Flask is not something I haven’t heard of before, but I thought I’ll have a look at this microframework just to see whats different, and perhaps learn a different way to build web applications. Getting Started Lets begin with the typical “Hello World” example. from flask import Flask app = Flask(__name__) @app.route('/') def get_tasks(): return "Hello World" if __name__ == '__main__': app.run(debug=True, port=8080) This isn’t anything overly complicated or magical. Though when compared with some other frameworks this is beautifully simplistic. [Read More]

Documentation Generator For Sas In Python

After playing around with pycco I decided to give a go of creating a custom one for SAS. When applying pycco onto SAS, you will run into strange formatting since when you have: some sas code /*a comment*/ you would expect the comment to reference that line of code. pycco handles this correctly. In comparison since SAS doesn’t have a concept of “functions” (yes there are macros, but lets ignore that for a moment). [Read More]

What I Have Learnt Writing A Sas Parser

So I’ve just released v0.01-alpha of my SAS transcompiler to Python (Stan). Here is just a list of things I’ve learnt : SAS very similar to a PL\0 language by statements are inferior to the split-apply-combine strategy pyparsing makes life very easy (compared with dealing with lots of regex) iPython magics are ridiculously easy to write writing Python packages isn’t that hard, but there is a lot of extraneous options Some of the (many) things which are missing: [Read More]

Who Owes What Revisited

Perhaps its just an itch, but I couldn’t resist. So here is Wow. As stated before I thought the best way was to emulate APScheduler. Usage is fairly similar. To start Wow simply use. {% highlight python %} z = Wow() {% endhighlight %} Then to add a payment: {% highlight python %} z.add_payment(“deposit”, 39.25, “Chapman”, “Tim”) {% endhighlight %} Finally to calculate, simply do {% highlight python %} print z. [Read More]

Who Owes What

Over the Christmas break I went on a holiday with a group of friends, and we stumbled on a bit of a dilemma: Who owes what? Of course its easy to determine that before your trip, with the plane tickets and accommodation. But what about during your trip? The taxi fares, the meals, souvenirs, etc. You wouldn’t want to pick it through with a fine comb whilst trying to enjoy your holiday! [Read More]

Sydney Hat Restaurants

This weekend, I decided to create a visualisation, to the best of my ability using the hat restaurant list from Gault and Millau Sydney Restaurant Guide. The result is here, and the screenshot is below: Lessons Learn Scraping the Table This is not the first (and probably not the last time) I will scrap data off websites like that. Firstly the table from www.noodlies.com is slightly malformed. It isn’t quite in the format you expect, and is not in unicode format which makes apostrophes look strange in python (when you force it into unicode). [Read More]