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
"""Convert Dreem CSV to OSCAR-friendly Zeo CSV | |
Liberty taken with the ZQ column, pinning it to 0. Other non-common fields are nulled. | |
Tested with Python 3.7.3 and 2.7.10. | |
Usage: | |
python dreem_csv_to_oscar_zeo.py data_in.csv data_out.csv | |
""" | |
from csv import DictReader, DictWriter | |
from datetime import datetime, timedelta |
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
"""Fun things for Dabeaz's superbad superboard. | |
Default Audio Format: | |
Frame rate: 48kHz | |
Channels: 1 | |
Bytes per sample: 1 | |
Superboard Encoding: | |
Baud rate: 300 |
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() { | |
// Core clock runs at 16MHz, three different timers can divide this freq | |
// by using a prescalar factor. Different PWM modes are available for each | |
// timer. We are using Fast PWM, which has the counter count from 0 to TOP. | |
// Thus, timer frequency would be 16MHz / prescalar / TOP count. The output | |
// turns on when the timer is at 0, and turns off when reaches the compare | |
// register value. As the compare register approaches TOP, the duty cycle | |
// approaches 100%. Since 0 is included in the high state, the effective | |
// counts in the high state will be the register value + 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 urllib2 | |
import random | |
import difflib | |
import datetime | |
def fetch(url): | |
"""Fetches requested url, returns lines in list""" | |
response = urllib2.urlopen(url) | |
lines = response.readlines() | |
return lines |
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
Project now resides as GitHub repo here: https://github.com/jeremyblow/NS2 |
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
Sources: | |
- http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/ | |
- http://www.raspberrypi.org/phpBB3/viewtopic.php?f=66&t=22975 | |
- http://www.thomaskho.com/blog/2006/02/qemu-and-the-network-bridge/ | |
- http://toast.djw.org.uk/qemu.html | |
- http://wiki.debian.org/QEMU#Host_and_guests_on_same_network | |
Files needed: | |
- http://downloads.raspberrypi.org/images/raspbian/2013-02-09-wheezy-raspbian/2013-02-09-wheezy-raspbian.zip.torrent | |
- http://xecdesign.com/downloads/linux-qemu/kernel-qemu |