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
const uint8_t PROGMEM keymaps[][MATRIX_COLS][MATRIX_ROWS] = { | |
/* Layer 0: Standard ANSI layer */ | |
KEYMAP(\ | |
ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, \ | |
GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, \ | |
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, \ | |
RALT,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, \ | |
LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3, PENT, \ | |
LCTL,LGUI,LALT, SPC, FN0, FN1, FN2,RCTL, LEFT,DOWN,RGHT, P0, PDOT), \ | |
/* Layer 1: programming layer 1*/ |
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 contextlib | |
import pip | |
import re | |
@contextlib.contextmanager | |
def capture(): | |
import sys | |
from io import StringIO | |
oldout,olderr = sys.stdout, sys.stderr | |
try: |
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 kivy | |
kivy.require('1.8.1') | |
from kivy.app import App | |
from kivy.lang import Builder | |
import sys | |
if 'horizontal' in sys.argv: | |
sys.argv.remove('horizontal') |
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 zmq | |
context = zmq.Context() | |
sock = context.socket(zmq.SUB) | |
print "connect" | |
sock.setsockopt(zmq.SUBSCRIBE, '7578128') | |
sock.connect("tcp://127.0.0.1:5557") |