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 os | |
import urllib2 | |
import re | |
import ctypes | |
from _winreg import * | |
def apod(): | |
url = "http://apod.nasa.gov/apod/" |
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
--[[ | |
Currently implemented functions are: | |
login(user, passwd) | |
me(auth) | |
submit(title, isSelf, content, subreddit, auth) | |
comment(thing_id, text, auth) | |
]] | |
local json = require "json" | |
local util = require "reddit.util" |
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
require 'snoo' | |
bot = Snoo::Client.new 'http://www.reddit.com', 'r/mylittlestreamlog bot' | |
puts 'Logging in...' | |
bot.log_in(ARGV[0], ARGV[1]) | |
def is_stream(item) | |
data = item['data'] | |
if /(?<!main)stream/i.match(data['title']) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
<title>Eye</title> | |
<style> | |
html, body { background-color: #333; color: #eee; margin: 0; padding: 0; } | |
canvas { background-color: #000; color: #fff; display: block; margin: 16px auto 0; outline: 1px solid #555;} | |
</style> | |
</head> |
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
// Audio Buffer Source | |
var fileInput = $("#audio-file"); | |
bufferSource.gain.value = 1; | |
bufferSource.loop = true; | |
bufferSource.connect(oscillatorGain); | |
fileInput.addEventListener("change", function() { | |
var reader = new FileReader(); | |
reader.onload = function(ev) { | |
context.decodeAudioData(ev.target.result, function(buffer) { |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>WebRTC p2p data</title> | |
<script src="https://webrtc-samples.googlecode.com/svn/trunk/apprtc/js/adapter.js"></script> | |
</head> | |
<body> | |
Testing WebRTC connection. |
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
-------------------------------- | |
-- StringBuffer (for printing out Trees) | |
-------------------------------- | |
local stringBuffer | |
do | |
local function insert(buffer, item) | |
local len = buffer.length + 1 | |
buffer.length = len | |
buffer[len] = item | |
end |
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 <Servo.h> | |
// El numero de motores | |
static const unsigned int numServos = 2; | |
// Los motores, sus pins, y su posicion actual | |
static Servo servos[numServos]; | |
static unsigned int servoPins[numServos] = {9,10}; | |
static unsigned int servoPos[numServos] = {0}; |
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
require 'fast_stemmer' | |
require 'set' | |
class BayesClassifier | |
def initialize(categories) | |
raise "categories must be an Array" unless categories.is_a? Array | |
raise "At least 2 categories are needed" if categories.size < 2 | |
@categories = categories.clone.freeze |
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
/* | |
Coded by Santiago Jaramillo 2012 | |
Connection setup: | |
=== ITG-3200 === | |
VDD -> 3.3V | |
VIO -> 3.3V | |
GND -> GND | |
SDA -> A4 |
OlderNewer