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
### downloaded from web. Contact me if you developed this and would like attribution. wyojustin | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
from google.auth.transport.requests import AuthorizedSession | |
from google.oauth2.credentials import Credentials | |
import json | |
import os.path | |
import argparse | |
import logging | |
def parse_args(arg_input=None): |
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
#include <Time.h> | |
#include <Wire.h> | |
#include <WiFiManager.h> | |
#include <FastLED.h> | |
#include <PubSubClient.h> | |
#include <EEPROM.h> | |
#include <EEPROMAnything.h> | |
#include <NTPClient.h> | |
#include <WebSocketsServer.h> |
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
import numpy as np | |
import pylab as pl | |
def check_edges(edges): | |
'''Check that no edge is a loop or that has a multiple edge.''' | |
sorted_edges = [] | |
out = True | |
try: | |
for i, j in edges: | |
assert i != j, "No loop allowed in Graph" |
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 bibliopixel.animation import BaseMatrixAnim | |
import bibliopixel.colors as colors | |
def getRule(val, n=8): | |
bits = [(val >> i) & 1 for i in range(n)] | |
def f(i): | |
return bits[i] | |
return f | |
def getVal(l): |
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
class updateDriverThread(threading.Thread): | |
... cut | |
def run(self): | |
while not self.stopped(): | |
try: | |
self._wait.wait() | |
self._updating.clear() | |
self._driver._update(self._data) | |
self._data = [] |
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
import time | |
from numpy import * | |
import struct | |
import serial | |
PIXEL_DATA = 2 | |
BRIGHTNESS = 3 | |
def msg(s, code, payload): | |
sz = len(payload) |
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
import time | |
from pixel_maps import ultim8x8, ultim8x24, ultim8x72, ultim24x24, ultim16x56 | |
from bibliopixel.drivers.serial_driver import DriverSerial, LEDTYPE | |
from bibliopixel.drivers.visualizer import DriverVisualizer | |
from bibliopixel import LEDMatrix, log, MatrixRotation | |
from BiblioPixelAnimations.matrix.bloom import Bloom | |
ROTATE_0 = MatrixRotation.ROTATE_0 | |
ROTATE_90 = MatrixRotation.ROTATE_90 | |
ROTATE_180 = MatrixRotation.ROTATE_180 |
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 pixel_maps import ultim8x8, ultim8x24, ultim8x72, ultim24x24, ultim16x56 | |
from bibliopixel.drivers.serial_driver import DriverSerial, LEDTYPE | |
from bibliopixel import LEDMatrix, log | |
from BiblioPixelAnimations.matrix.ScreenGrab import ScreenGrab | |
log.setLogLevel(log.DEBUG) | |
# pixel_map = ultim8x8 ### ULTiM8x8 | |
# pixel_map = ultim8x24 ### ULTiM8x24 | |
# pixel_map = ultim24x24 ### ULTiM24x24 |
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
enum CMDTYPE | |
{ | |
SETUP_DATA = 1, | |
PIXEL_DATA = 2, | |
BRIGHTNESS = 3, | |
GETID = 4, | |
SETID = 5, | |
GETVER = 6, | |
GET_NUM_LEDS = 7 | |
}; |
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
/* | |
AlphaClock.ino | |
-- Alpha Clock Five Firmware, version 2.1 -- | |
Version 2.1.0 - January 31, 2013 | |
Copyright (c) 2013 Windell H. Oskay. All right reserved. | |
http://www.evilmadscientist.com/ | |