Skip to content

Instantly share code, notes, and snippets.

Jeff House houseofjeff

View GitHub Profile
@houseofjeff
houseofjeff / cron_parser.py
Last active Aug 29, 2015
An interesting look at how easy parsing & matching a cron-style schedule string can be.
View cron_parser.py
from __future__ import division
import re
import random
from datetime import datetime, timedelta
def main():
timing_test(100000)
def simple_test():
@houseofjeff
houseofjeff / scheduler_with_remote.ino
Last active Aug 29, 2015
Arduino Scheduler Framework w/ Remote-Control Sleep-mode
View scheduler_with_remote.ino
//------------------------------------------------------------------------------
//
// An Arduino Scheduler Framework with Remote-control Sleep Mode.
//
// For details, see my blog post:
// http://houseofjeff.com/2014/07/15/a-scheduling-framework-remote-control-sleep-mode-for-arduino/
//
// This sample is licensed under the MIT License (MIT)
// Copyright (c) 2014, by Jeff House
// Full text of license at the bottom of the file
@houseofjeff
houseofjeff / ir_identify.ino
Last active Aug 29, 2015
Identify a specific IR message with an Arduino
View ir_identify.ino
//------------------------------------------------------------------------------
// Interrupt 0 fires on pin D2
#define IR_PIN 2
// the maximum pulse we'll listen for
#define MAX_PULSE 30000
// the largest message we expect to receive (in bits)
#define MAX_MSG_SIZE 50
@houseofjeff
houseofjeff / ir_capture.ino
Last active Apr 3, 2020
Capture/Record IR remote signals with an Arduino
View ir_capture.ino
//------------------------------------------------------------------------------
// Interrupt 0 fires on pin D2
#define IR_PIN 2
// the maximum pulse we'll listen for
#define MAX_PULSE 30000
// the largest message we expect to receive (in bits)
#define MAX_MSG_SIZE 50
@houseofjeff
houseofjeff / tuplesalsocool.py
Last active Aug 29, 2015
Python Intro - #2 - Tuples
View tuplesalsocool.py
# Welcome back for Jeff's second 5 minute intro to Python.
# This time we'll talk about the list's immutable cousin, the tuple.
from collections import namedtuple
def main():
# tuples can be considered as immutable lists. A lot of what
# I'm going to show you here can also be done with lists, but
# it seems to fit better here.
@houseofjeff
houseofjeff / listsarecool.py
Last active Aug 29, 2015
Python Intro - #1 - Lists
View listsarecool.py
# Welcome to Jeff's first 5 minute intro to Python.
# More illustrative of a language than just the syntax, I think
# how a language handles data says a lot. So, I'm going to talk
# mostly about that, and let's start with lists.
# Since we all know how to program, I'm going to just leave a lot to
# be picked up by example rather than by exposition.
# --- save as 'listsarecool.py'
You can’t perform that action at this time.