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
MODKEY=Mod4 | |
# Colors tuples: "<text> <background> <border>" | |
WMII_NORMCOLORS='#ffffff #000000 #ffffff' | |
WMII_FOCUSCOLORS='#ffffff #555555 #ffffff' | |
WMII_BACKGROUND='#cccccc' | |
WMII_FONT='fixed' |
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
#!/bin/sh | |
## TOGGLE LED on a RASPBERRY PI | |
# Christopher Woodall and Thomas Nadovich | |
# June 9, 2012 | |
# | |
# Some reference material: http://elinux.org/RPi_Low-level_peripherals | |
# Done using the special made image of Debian Squeeze for the Raspberry Pi | |
# MUST BE ROOT: | |
# precede with `su -` if you trust me |
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
#!/bin/sh | |
echo "25" > /sys/class/gpio/export | |
echo "out" > /sys/class/gpio/gpio25/direction | |
echo "24" > /sys/class/gpio/export | |
echo "in" > /sys/class/gpio/gpio24/direction | |
OUTPUT="0" | |
INPUT="$(cat /sys/class/gpio/gpio24/value)" |
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 UFixedPoint(object): | |
def __init__(self, num, m, n): | |
self.mask = 2**(m + n) - 1 | |
self.k = (1 << (n - 1)) | |
self.m = m | |
self.n = n | |
temp = int(num * 2**self.n) | |
self.value = temp & self.mask |
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 struct | |
from itertools import izip_longest | |
def grouper(n, iterable, fillvalue=None): | |
"grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx... From stackoverflow" | |
args = [iter(iterable)] * n | |
return izip_longest(fillvalue=fillvalue, *args) | |
# Extract data from data_file which is a "binary string". Returns it in the format (Data[31 downto 8], Data[7 downto 0]) | |
# which is technically data, ADC channel |
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
/* Results for image http://universitypublishingonline.org/content/978/11/3952/429/2/9781139524292prf3_abstract_CBO.jpg | |
ENGLISH TEXT OF FRENCH PREFACE‘ | |
This book was chiefly intended for English (and American) | |
readers. Those points are emphasised which in the judgment of | |
the author required emphasis for such readers. It may be worth | |
while, therefore, in preparing a French translation, to indicate | |
quite frankly and in a few words one or two of those aspects of | |
the situation arising out of the Treaty of Versailles, which are of | |
special significance for France. |
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 numpy as np | |
import scipy | |
from scipy import signal | |
import pylab as pl | |
if __name__ == "__main__": | |
N = 1024*8 | |
A = 2**14 | |
An = 400 | |
phase = np.pi/5 |
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
#!python | |
import serial | |
from multiprocessing import Queue, Process, Event, Value | |
import logging | |
class SerialTransporter(object): | |
def __init__(self, port, baud=115200, timeout=1): | |
self.port = port | |
self.baud = baud |
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
#include <iostream> | |
#include <stdint.h> | |
using namespace std; | |
template <uint32_t f> | |
bool ProcessTask(void); | |
template <uint32_t f> | |
uint32_t RunProcess(uint32_t start) { |
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
green() { | |
printf "\e[32m${1}\e[00m" | |
} | |
light_red() { | |
printf "\e[91m${1}\e[00m" | |
} | |
radioactive="\u2622" | |
check_mark="\u2714" |