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 functools | |
import timeit | |
import time | |
@functools.lru_cache(maxsize=None) | |
def fib(n): | |
if n < 2: | |
return n | |
return fib(n-1) + fib(n-2) |
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
/* | |
WiFi Web Server LED Blink | |
A simple web server that lets you blink an LED via the web. | |
This sketch will print the IP address of your WiFi module (once connected) | |
to the Serial monitor. From there, you can open that address in a web browser |
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
https://us-school.pk12ls.com/school/fe1b3ad5-8762-4e0f-8e3d-56440bfbe441/D0680545/player.html |
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
void setup() { | |
pinMode(4, OUTPUT); | |
setHighStrengthOutputPinMode(4); | |
} | |
void loop() { | |
digitalWrite(4, HIGH); | |
} | |
bool setHighStrengthOutputPinMode( uint32_t ulPin) |
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 Adafruit_IO import * | |
import json | |
import requests | |
import RPi.GPIO as GPIO | |
import smbus | |
import time | |
aio = Client('XXXXXXXXXXXXXXXXX_ADAFRUIT_API_KEY_GOES_HERE_XXXXXXXXXXXXXXXXX') | |
GPIO.setmode(GPIO.BCM) # choose BCM or BOARD |
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
// Copyright 2014, Brandon Stafford, brandon@rascalmicro.com | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions | |
// are met: | |
// 1. Redistributions of source code must retain the above copyright | |
// notice, this list of conditions and the following disclaimer. | |
// 2. Redistributions in binary form must reproduce the above copyright | |
// notice, this list of conditions and the following disclaimer in the |
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
infile = "infile.txt" # the file to open | |
copies = 3 # how many copies to make | |
marker = "STARTHERE\n" | |
with open(infile, 'r') as infile: | |
lines = infile.readlines() | |
#print(lines) | |
startline = lines.index(marker) | |
result = ''.join(lines + (lines[startline + 1:] * copies)) |
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
Brand | Model | Size | Width | Good/bad | |
---|---|---|---|---|---|
New Balance | Fresh Foam Gobi | 14 | EE | Ill-fitting and stiff, but low arch is good. VL-6 last. Might be okay. Should try v2, will drop in July 2017. | |
New Balance | Fresh Foam Hierro v2 | 14 | 4E | Almost good but arch too high. Same PL-4 last as favorite MO69v1's. Disappointing. | |
New Balance | Minimus 10v1 | 14 | EE | Almost good but arch too high. NL-1 last. Very comfy other than arch. | |
Montrail | Fluid Flex FKT | 14 | -- | WINNER! 8 pairs, 6 left. Update: not on Zappos any more. One color on columbia.com, May 2017. | |
Brooks | Puregrit 4 | 14 | -- | Trevor recommended but haven't tried yet because of previous Brooks being too short in 14. | |
Topo | MT-2 | 14 | -- | Kept. Might be serviceable. | |
Montrail | Fluid Flex ST | 14 | -- | WINNER! 3 pairs. Update: no longer available. | |
Nike | Air Zoom Wildhorse 3 | 14 | -- | kept. Insole is a little stiff but could be a winner. | |
Montrail | Fluid Flex II | 14 | ? | Good. 1 pair. Blisters on long runs. Update: no longer available. |
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 csv, re, requests | |
pattern = re.compile('<li>REPRESENTATIVE: (\d\d)</li>\n\t\t\t<li>SENATORIAL: (\d\d)</li>') | |
infile = csv.reader(open('addresses.csv', 'r')) | |
with open('output.csv', 'wb') as outfile: | |
for line in infile: | |
unique_id = line[0] | |
address = line[1] |
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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; |