Skip to content

Instantly share code, notes, and snippets.

@quizzicol
quizzicol / README.md
Created December 8, 2015 11:16
population v GDP
@quizzicol
quizzicol / README.md
Created December 8, 2015 11:16
population v GDP
@quizzicol
quizzicol / README.md
Last active December 8, 2015 09:08
Intro to D3
@quizzicol
quizzicol / README.md
Last active December 6, 2015 14:10
dots on a map
# import modules and establish Oracle ODBC connection
# plot config
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import matplotlib.cm as cm
%matplotlib inline
import pyodbc
axes = [ax, axb, axc]
legend_loc = ['upper left', 'upper right', (0.75, 0.7)]
axes_grid = [True, False, False]
ax_data = zip(axes, legend_loc, axes_grid)
for axis, legend_loc, grid in ax_data:
handles, labels = axis.get_legend_handles_labels()
axis.legend(handles, labels, loc=legend_loc, frameon=False)
axis.grid(grid)
@quizzicol
quizzicol / Python - Useful snippets
Created December 4, 2014 06:20
Python - Useful snippets
{
"metadata": {
"name": "",
"signature": "sha256:e3717668e11ea67888f9f37c428dddc06343ee08573444bd09bc32db963b02c8"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@quizzicol
quizzicol / email regex
Created December 3, 2014 08:24
email check regex
[a-z0-9!#$%&'*+/=?^_`{|}˜-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}˜-]+)*@ (?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?
angular.module('app', ['ngResource', 'ngRoute']);
angular.module('app').config( function( $routeProvider, $locationProvider ) {
$locationProvider.html5Mode(true);
$routeProvider
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="D3 intro 4 - bar chart" />
<script src="http://d3js.org/d3.v3.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>