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
swagger: '2.0' | |
info: | |
version: 1.0.0 | |
title: PetStore on Heroku | |
description: | | |
**This example has a working backend hosted in Heroku** | |
You can try all HTTP operation described in this Swagger spec. | |
Find source code of this API [here](https://github.com/mohsen1/petstore-api) |
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
#!/usr/bin/env python | |
# Install dpkg with `brew install dpkg libelf` before running this script | |
import argparse | |
import sys | |
import gzip | |
import urllib | |
import urlparse | |
import posixpath | |
import cStringIO |
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
for i in `ls -1t *.tar.lzo | tail -n+4` | |
do | |
rm $i | |
done |
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
#!/usr/bin/env python | |
# fooling around with using parsley to generate swift. | |
import parsley | |
x = parsley.makeGrammar(""" | |
ab = <'a'+>:a <'b'+>:b -> (a,b) | |
""", {}) |
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
#!/usr/bin/env python | |
# This script finds the best two pairs of resistors for making a diff amp with | |
# a gain of 1. | |
# | |
# List all of your resistor values in a file (one per line), for example: | |
# | |
# 9.990 | |
# 10.004 | |
# 9.999 |
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
#!/usr/bin/env python | |
# Schematic: | |
# | |
# +------+-------+ | |
# | | | | |
# | /\ | | |
# rf / \ rz | |
# | / \ | | |
# | / - + \ | |
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
#!/usr/bin/env python | |
# mux2x8ch.py: mux two 8-channel srzip files into one 16-channel file. | |
# Copyright Jason Pepas, 2017. Released under the terms of the MIT License. | |
import sys | |
import os | |
import zipfile | |
import zlib | |
import tempfile |
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
#!/usr/bin/env python | |
# Si7021-logger.py: read temperature / humidity data from an Arduino and log as CSV. | |
# | |
# linux usage examples: | |
# ./Si7021-logger.py /dev/ttyACM0 | |
# ./Si7021-logger.py /dev/ttyUSB0 | |
# | |
# mac usage examples: | |
# ./Si7021-logger.py /dev/tty.usbserial-DN02TIYO |
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
/* | |
A simple temperature / humidity logger, using the Si7021. | |
Hardware connections: | |
The two pins above the AREF pin are (from the top): SCL and SDA. | |
*/ | |
/* | |
The following Si7021 "Weather" code was adapted from Sparkfun's library. | |
See https://github.com/sparkfun/Si7021_Breakout/tree/master/Libraries |
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
#!/usr/bin/env python | |
import serial | |
import sys | |
import time | |
ser = serial.Serial( | |
port = sys.argv[1], | |
baudrate = 9600, | |
bytesize=serial.EIGHTBITS, |