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 threading # :( | |
class WaitGroup(object): | |
"""WaitGroup is like Go sync.WaitGroup. | |
Without all the useful corner cases. | |
""" | |
def __init__(self): | |
self.count = 0 | |
self.cv = threading.Condition() |
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
/** | |
* USB HID Keyboard scan codes as per USB spec 1.11 | |
* plus some additional codes | |
* | |
* Created by MightyPork, 2016 | |
* Public domain | |
* | |
* Adapted from: | |
* https://source.android.com/devices/input/keyboard-devices.html | |
*/ |
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
/*skew takes an array of six angles: | |
*x along y | |
*x along z | |
*y along x | |
*y along z | |
*z along x | |
*z along y | |
*/ | |
module skew(dims) { | |
matrix = [ |
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
local CONF = "/etc/nn.conf" | |
local m = require("component").modem | |
local event = require("event") | |
local ser = require("serialization") | |
local fs = require("filesystem") | |
local unicode = require("unicode") | |
_G.port = _G.port or 27091 | |
_G.max = _G.max or 15 | |
_G.effects = _G.effects or {} |
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
git clean -xfd | |
git submodule foreach --recursive git clean -xfd | |
git reset --hard | |
git submodule foreach --recursive git reset --hard | |
git submodule update --init --recursive |