This file contains hidden or 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/python | |
import os, sys | |
import xml.etree.ElementTree as ET | |
tree = ET.parse("filename.kml") | |
places = list(tree.iter('{http://earth.google.com/kml/2.0}Placemark')) | |
print '"name", "longitude", "latidude", "elevation"' |
This file contains hidden or 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 python2.7 | |
# -*- coding: utf-8 -*- | |
import socket | |
import colorsys # for HSV-to-RGB-conversion | |
UDP_IP = "10.0.0.200" | |
UDP_PORT = 1337 | |
ROWS = 16 |
This file contains hidden or 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
require 'socket' | |
# 3 colors by 30 pixels by 16 pixels + 4 bytes of checksum (which is never checked) = 1924 byts | |
frame = (1..1924).map{|x|"\xFF"} * "" | |
u1 = UDPSocket.new | |
u1.send a, 0, "matelight", 1337 | |
# For the emulator use: | |
u1.send a, 0, "127.0.0.1", 1337 |
This file contains hidden or 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
root@precise32:/vagrant# npm install | |
npm WARN cannot run in wd [email protected] node microflo.js update-defs && node-gyp rebuild (wd=/vagrant) | |
npm WARN package.json [email protected] No repository field. | |
npm WARN package.json [email protected] No repository field. | |
npm http GET https://registry.npmjs.org/serialport | |
npm http 304 https://registry.npmjs.org/serialport | |
npm http GET https://registry.npmjs.org/mkdirp/0.3.4 | |
npm http GET https://registry.npmjs.org/component-require/0.3.1 | |
npm http GET https://registry.npmjs.org/batch/0.2.1 | |
npm http GET https://registry.npmjs.org/debug |
This file contains hidden or 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
lass LedChainWS : public Component { | |
public: | |
LedChainWS() | |
: Component(outPorts, 2) | |
, pindata(-1) | |
, pinclk(-1) | |
, number(-1) | |
, initialized(false) | |
, currentPixelAddress(-1) | |
#ifdef HAVE_ADAFRUIT_WS2801 |
This file contains hidden or 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
/** | |
* Plasma-Leitungs-Code für die c-base | |
*/ | |
// most launchpads have a red LED | |
#define LED1 P1_7 | |
#define LED2 P1_6 | |
#define LED3 P2_5 | |
#define LED4 P2_4 | |
#define LED5 P2_3 |
This file contains hidden or 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
/* | |
Fade for c-info wall at c-base | |
*/ | |
#include <SPI.h> | |
#include <Ethernet.h> | |
#include <PubSubClient.h> | |
// Apparently the preprocessor variables B0 and B1 are already taken. | |
// Therefore we use the prefix CBASE |
This file contains hidden or 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
DRACHI = """ | |
+---------------------+ | |
| D A N K E S C H Ö N | / \ //\\ | |
+------------|\___/|--+ / \// .\\ | |
\ /O O \__ / // | \ \\ | |
\ / / \/_/ // | \ \\ | |
@___@' \/_ // | \ \\ | |
| \/_ // | \ \\ | |
| \/// | \ \\ | |
_|_ / ) // | \ _\\ |
This file contains hidden or 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 | |
for i in `cowsay -l | tail -n +2` | |
do | |
echo $i | |
cowsay -f $i "Ich bin die Kuh" | |
sleep 3 | |
done |
This file contains hidden or 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 pydub import AudioSegment | |
sound1 = AudioSegment.from_file("loop.wav") | |
kick = AudioSegment.from_file("kick.wav") | |
snare = AudioSegment.from_file("snare.wav") | |
ms = len(sound1)//4 | |
beat = AudioSegment.silent(duration=ms).overlay(kick).overlay(snare, position=ms//2) * 4 | |
combined = (sound1.overlay(beat) * 4).fade_in(1000).fade_out(1000) |
OlderNewer