View indicator.ino
#define LEDS 32 | |
#define ROWS 8 | |
#define IMG 64 | |
#define COLORS 3 | |
#define BLACK 1 | |
#define RED 2 | |
#define GREEN 3 | |
#define BLUE 5 |
View order_migrations.py
from argparse import ArgumentParser | |
from contextlib import contextmanager | |
from subprocess import Popen, PIPE | |
import sys | |
import os | |
import re | |
def git(*args): | |
resp = Popen(['git'] + list(args), stdout=PIPE, stderr=PIPE) |
View gist:32dbb935b8c533f7bbaa
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332498] ata6.00: exception Emask 0x10 SAct 0x0 SErr 0x90202 action 0xe frozen | |
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332511] ata6.00: irq_stat 0x00400000, PHY RDY changed | |
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332521] ata6: SError: { RecovComm Persist PHYRdyChg 10B8B } | |
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332527] ata6.00: failed command: FLUSH CACHE | |
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332541] ata6.00: cmd e7/00:00:00:00:00/00:00:00:00:00/a0 tag 1 | |
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332541] res 40/00:04:e8:8e:df/00:00:0a:00:00/40 Emask 0x10 (ATA bus error) | |
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332548] ata6.00: status: { DRDY } | |
Jul 30 02:17:51 nvbn-desktop kernel: [ 353.332558] ata6: hard resetting link | |
Jul 30 02:17:52 nvbn-desktop kernel: [ 354.955509] ata6: SATA link up 6.0 Gbps (SStatus 133 SControl 300) | |
Jul 30 02:17:52 nvbn-desktop kernel: [ 354.963561] ata6.00: configured for UDMA/133 |
View main.py
from uasyncio.core import get_event_loop | |
from ssd1306 import get_display | |
from ultrasonic import get_ultrasonic | |
from utils import get_gyro, alts | |
def main(): | |
display = get_display(pinout={'sda': 'Y10', | |
'scl': 'Y9'}, | |
height=64, |
View bf_in_clojure.clj
(ns bf.core) | |
(defn bf> | |
[[stack current]] | |
(let [new-current (inc current)] | |
[(if (>= new-current (count stack)) | |
(conj stack 0) | |
stack) | |
new-current])) |
View python_collections_sucks.py
# python 3: | |
In [1]: a = {'x': 10, 'y': 50} | |
In [2]: b = {'a': 5, 'c': 12} | |
In [3]: a.keys() + b.keys() | |
--------------------------------------------------------------------------- | |
TypeError Traceback (most recent call last) | |
<ipython-input-3-5b3174d08fb5> in <module>() | |
----> 1 a.keys() + b.keys() |
View core.clj
(ns svg-image-example.core | |
(:require [om.core :as om :include-macros true] | |
[om.dom :as dom])) | |
(defn image | |
[{:keys [href x y width height]} _] | |
(reify | |
om/IRender | |
(render [_] | |
(let [html (str "<image x='" x "' y='" y "'" |
View profile.py
from .base import BaseConfig | |
class Config(BaseConfig): | |
DEBUG = True | |
ASSETS_DEBUG = True | |
CSRF_ENABLED = False | |
FALLBACK_TO_PRODUCTION_IMAGES = True | |
SERVER_NAME = 'localhost:5000' |
View core.cljs
(ns ^:figwheel-always rerenderer.examples.core | |
(:require-macros [cljs.core.async.macros :refer [go-loop go]]) | |
(:require [cljs.core.async :refer [chan <! timeout]] | |
[rerenderer.examples.bird :as b] | |
[rerenderer.core :as r :include-macros true] | |
[rerenderer.browser :refer [browser]])) | |
(enable-console-print!) | |
(defn rotating-rectangle |
View core.cljs
(ns ^:figwheel-always rerenderer.examples.core | |
(:require [rerenderer.core :as r :include-macros true] | |
[rerenderer.browser :refer [interprete]])) | |
(enable-console-print!) | |
(def scene (.. js/window -location -hash)) | |
(defn render! | |
[canvas-id] |
OlderNewer