Skip to content

Instantly share code, notes, and snippets.

View wroscoe's full-sized avatar

Will Roscoe wroscoe

View GitHub Profile
"""
Author: William Roscoe
Date: 2010.1
This is an attempt at a flat database with single and dynamically created indexes to entity ids.
If you know of a better or comprable simple system please let me know.
This idea is a simple mimic of Google's BigFile system and Friend Feed's python/mysql implementation.
"""
import os, cPickle, time, sqlite3, uuid
```
wroscoe@wroscoe-Dell-System-XPS-L322X:~/code/lever/lever$ ../ve/bin/alembic -c alembic_local.ini upgrade head
INFO [alembic.migration] Context impl PostgresqlImpl.
INFO [alembic.migration] Will assume transactional DDL.
INFO [alembic.migration] Running upgrade 214199e187a -> 2a16dd91d8a, google_id
INFO [alembic.migration] Running upgrade 2a16dd91d8a -> e172a02f06, Normalize email addreses.
INFO [alembic.migration] Running upgrade e172a02f06 -> 3b9047833e2, Prop search api.
INFO [alembic.migration] Running upgrade 3b9047833e2 -> 1641e6ea352, Denormalize note text for search.
INFO [alembic.migration] Running upgrade 1641e6ea352 -> c20337db8c, add tag source
INFO [alembic.migration] Running upgrade c20337db8c -> 2ab3f9b513, Add contact import date.
@wroscoe
wroscoe / gist:9ba590b3f356a01d0ebb
Last active August 29, 2015 14:05
Steps to create keys necessary for iphone app.

Create cert, pem, and p12 files for your App. following this tutorial

Generate a certificate signing request. Use your own email address!

openssl req -new -key private.key -out CertificateSigningRequest.certSigningRequest

On the “What type of certificate do you need?” Apple page, say “iOS App Development”. Go through its little wizard and upload your CertificateSigningRequest.certSigningRequest file. It will give you back a DEV_APN.cer file.

@wroscoe
wroscoe / gist:c5a2c81851d4b60bd3669141e08147de
Created November 21, 2016 20:44
area boundaries problem
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wroscoe
wroscoe / tub_concat.py
Created September 10, 2017 00:44
Concatenate Donkey Tub Files
import os
import sys
import glob
import json
import shutil
def go(src_path, dest_path):
'''
takes a src and dest full path to two tub dir
copies all data from src to the dest
@wroscoe
wroscoe / manage.py
Created September 16, 2017 14:33
donkey car application sept race
#!/usr/bin/env python3
"""
Scripts to drive a donkey 2 car and train a model for it.
Usage:
car.py (drive) [--model=<model>]
car.py (train) (--tub=<tub>) (--model=<model>)
car.py (calibrate)
"""
{
"cells": [
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"import donkeycar as dk\n",
"\n",
{
"cells": [
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"import donkeycar as dk\n",
"\n",
@wroscoe
wroscoe / manage.py
Created October 18, 2017 05:25
Drive function used on donkey car for avc race
def drive(cfg, model_path=None, use_joystick=False):
'''
Construct a working robotic vehicle from many parts.
Each part runs as a job in the Vehicle loop, calling either