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 <Arduino.h> | |
#include "Matrix.h" | |
Matrix::Matrix(const int *row_pins, const int *column_pins) { | |
this->row_pins = (int *) row_pins; // FIXME | |
this->column_pins = (int *) column_pins; // FIXME | |
for (rows = 0; row_pins[rows] != -1; ++rows) { | |
pinMode(row_pins[rows], OUTPUT); |
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 sys | |
import inspect | |
import re | |
def alias(obj) : | |
rename_regexp = re.compile(r"([a-z0-9])([A-Z])") | |
make_name = ( lambda name : re.sub(rename_regexp, r"\1_\2", name).lower() ) | |
if inspect.isclass(obj) : | |
names_list = dir(obj) | |
for name in names_list : |
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
{ | |
"added": 1388068674.595086, | |
"cancel": false, | |
"parents": [], | |
"splitted": 1388068674.664528, | |
"tasks": { | |
"29501016-8d30-4cfc-ac82-48676d199676": { | |
"created": 1388068674.760826, | |
"finished": null, | |
"recycled": 1388068674.760827, |
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 sys | |
import json | |
import pickle | |
import uuid | |
import cherrypy | |
import chrpc.server | |
from ulib import typetools | |
from ulib import validators |
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 kazoo.client | |
import kazoo.exceptions | |
from kazoo.protocol.paths import join as zjoin | |
import threading | |
import time | |
# ===== | |
class TimeOf: | |
def __init__(self, name, print_result=True): |
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 sys | |
import importlib.abc | |
# ===== | |
def setup(*args, **kwargs): | |
finder = _Finder(*args, **kwargs) | |
sys.meta_path = [finder] + sys.meta_path | |
return finder |
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
FROM mdevaev/archlinux | |
MAINTAINER Devaev Maxim <mdevaev@gmail.com> | |
RUN pacman --noconfirm -Syy \ | |
&& pacman --noconfirm -S \ | |
python-setuptools \ | |
python-mako \ | |
lighttpd \ | |
php \ | |
php-cgi \ |
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
from RPi import GPIO | |
import time | |
CLOCK_PIN = 4 | |
DATA_PIN = 15 | |
DELAY = 0.00020 | |
def send_bit(bit): |
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
func uint32 main(str[] argv): | |
keyval<unt32:str> kv; | |
for uint32 i = 0; i < 10; i++: | |
kv.append("Number: {}".fmt(i)) | |
for (uint32 k, str v) in kv.items(): | |
print(k, v) | |
return 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
#include <Arduino.h> | |
#include <Rotary.h> | |
// http://techdocs.altium.com/display/FPGA/PS2+Keyboard+Scan+Codes | |
const int KBD_CLOCK_PIN = A1; | |
const int KBD_DATA_PIN = A2; | |
const unsigned char K_PFX = 0xE0; | |
const unsigned char K_SEP = 0xFF; |
OlderNewer