This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.... | |
In the T6 command, the reader streams data as it comes in. | |
If your software isn't keeping up with him, eventually the serial buffer on the PC will fill up. When that happens, the reader pauses reading and will flash the LEDs to indicate that it's waiting for the host. If you empty the buffer, it should start up again and keep reading. Maybe this is happening intermittently in your setup. | |
You can emulate this behavior in terraterm. | |
Connect to the reader, issue a t6 with tags present. Then, close hyperterm while the reader is running. It should keep reading for a few seconds, then it will stop and go into flashing mode. If you reconnect the terminal program, data should start streaming again. | |
.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from boto.s3.connection import S3Connection | |
from boto.s3.key import Key | |
from django.conf import settings | |
PROCESSED_PATH = 'uploads/videos/processed/' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
David Halberstam ("Being a professional means doing your job on the days you don't want to do it"), | |
Ferris Bueller ("Life moves pretty fast — if you don't stop and look around once in awhile, you could miss it") | |
Milton Berle ("If opportunity doesn't knock, build a door")? Hmmmmmm. I'd go with this advice … | |
SG: Don't worry about what other people are doing. Worry about what you're doing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bitmapist | |
ANONYMOUS_USER_KEY = 'anonymous_user' | |
def generate_event(event_name, user_id=None): | |
if user_id is None: | |
user_id = 'anon:%s' % bitmapist.get_redis().incr(ANONYMOUS_USER_KEY) | |
bitmapist.mark_event(event_name, user_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# `serial` refers to the pyserial library which can be found here: http://pyserial.sourceforge.net/ | |
import serial | |
BAUD_RATE = 9600 | |
RFID_BYTES = 12 | |
START_CHAR = '\x02' | |
ser = serial.Serial('/dev/tty.usbserial-AH01D7DV', BAUD_RATE) | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GoProInterface(object): | |
""" | |
This is a sample API (written in Python) of how I envision | |
the calls to be made to the firmware. | |
Sample (Python) Usage: | |
>>> gpi = GoProInterface('~/gopro/videos/') | |
>>> gpi.start() | |
>>> gpi.stop() | |
/Users/sean/gopro/videos/0001.m4v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This program interfaces with the GoPro camera and records footage for a | |
set amount period of time defined by the optional `--seconds` arg. | |
""" | |
import argparse | |
import time | |
import serial | |
parser = argparse.ArgumentParser(description='Captures video from GoPro for set number of seconds.') | |
parser.add_argument( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ella.photos.models import Photo, redis, REDIS_PHOTO_KEY | |
OLD_BASE_URL = 'http://production-media.turn.com' | |
NEW_BASE_URL = 'http://production-media.purpleclover.com' | |
for p in Photo.objects.all().order_by('id'): | |
print 'p', p.id, p | |
# Get the photo hash from redis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scout.promos.models import Stream | |
# CHANGE THESE AS NEEDED | |
DOMAIN_TO_REPLACE = 'http://www.purpleclover.com' | |
DOMAIN_TO_FIND = 'http://prod.turn.bermanbrauntech.com' | |
for name, _ in Stream.list_streams(): | |
stream = Stream.get_stream(name) | |
for promo in stream.get_promos(): | |
if promo: |