A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.
- xcode 5.1.1
- python 3.4.0
- Qt libraries 5.2.1
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
| // Enter the day you would like to create | |
| WITH { day: 18, month: 1, year: 2014 } as dayMap | |
| // Merge hours in a day | |
| MERGE (thisDay:Day { day: dayMap.day, month: dayMap.month, year: dayMap.year }) | |
| MERGE (firstHour:Hour { day: dayMap.day, month: dayMap.month, year: dayMap.year, hour: 1 }) | |
| CREATE (thisDay)-[:FIRST]->(firstHour) | |
| FOREACH (i IN tail(range(1, 24)) | | |
| MERGE (thishour:Hour { day: dayMap.day, month: dayMap.month, year: dayMap.year, hour: i }) | |
| MERGE (lasthour:Hour { day: dayMap.day, month: dayMap.month, year: dayMap.year, hour: i - 1 }) |
| import os | |
| import numpy as np | |
| from itertools import izip | |
| from argparse import ArgumentParser | |
| from collections import OrderedDict | |
| from skimage.io import ImageCollection, imsave | |
| from skimage.transform import resize | |
| camvid_colors = OrderedDict([ |
Pandas DataFrames are fantastic. However, concatenating them using standard approaches,
such as pandas.concat(), can be very slow with large dataframes.
This is a work around for that problem.
Note: this approach assumes that:
(a) the goal is a row-wise concatenation (i.e., axis=0) and
(b) all dataframes share the same column names.
If these assumptions are not met, this approach could still work…but it will likely need to be modified.