Skip to content

Instantly share code, notes, and snippets.

View wroscoe's full-sized avatar

Will Roscoe wroscoe

View GitHub Profile

Keybase proof

I hereby claim:

  • I am wroscoe on github.
  • I am wroscoe (https://keybase.io/wroscoe) on keybase.
  • I have a public key ASAYbaKFpcoMLmsHgwlrbAdx53rG96DdIAK5XmRiGZSbOgo

To claim this, I am signing this object:

@wroscoe
wroscoe / config.py
Created August 21, 2018 04:17
My orange donkeycar config.py
import os
#PATHS
CAR_PATH = PACKAGE_PATH = os.path.dirname(os.path.realpath(__file__))
DATA_PATH = os.path.join(CAR_PATH, 'data')
MODELS_PATH = os.path.join(CAR_PATH, 'models')
#VEHICLE
DRIVE_LOOP_HZ = 20
MAX_LOOPS = 100000
@wroscoe
wroscoe / add_people.py
Last active May 6, 2018 04:46
draw rectangles ("people") using Augmentor
import Augmentor
from Augmentor.Operations import Operation
class GeneratePeopleShapes(Augmentor.Operations.Operation):
def __init__(self, probability):
Operation.__init__(self, probability)
@staticmethod
def gen_random_rectangle_coords(top, bottom, left, right):
width =random.randint(5, 59)
@wroscoe
wroscoe / esri geojson.json
Created October 27, 2017 22:13
esrigeojson
{"displayFieldName":"","fieldAliases":{"FID":"FID","FID_":"FID_","class":"class","irrigation":"irrigation","subfield":"subfield","Crop":"Crop","Plant_Date":"Plant_Date","Crop_Type":"Crop_Type","mosaic":"mosaic","Division":"Division","Name":"Name","Shape_Leng":"Shape_Leng","Shape_Area":"Shape_Area"},"geometryType":"esriGeometryPolygon","spatialReference":{"wkid":4326,"latestWkid":4326},"fields":[{"name":"FID","type":"esriFieldTypeOID","alias":"FID"},{"name":"FID_","type":"esriFieldTypeInteger","alias":"FID_"},{"name":"class","type":"esriFieldTypeString","alias":"class","length":80},{"name":"irrigation","type":"esriFieldTypeInteger","alias":"irrigation"},{"name":"subfield","type":"esriFieldTypeString","alias":"subfield","length":80},{"name":"Crop","type":"esriFieldTypeString","alias":"Crop","length":80},{"name":"Plant_Date","type":"esriFieldTypeString","alias":"Plant_Date","length":80},{"name":"Crop_Type","type":"esriFieldTypeString","alias":"Crop_Type","length":80},{"name":"mosaic","type":"esriFieldTypeString"
@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
{
"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 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)
"""
@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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.