Skip to content

Instantly share code, notes, and snippets.

View capablemonkey's full-sized avatar

Gordon Zheng capablemonkey

View GitHub Profile
// which would you rather debug?
function foo(a, b=4) {
if (a + b > 4) {
return a ** b;
} else if (b < 2 && a + b > 2) {
return a - b;
} else {
return a + b;
}
https://docs.google.com/document/d/16LGZrMZo37vjNVfILw7m5E5-Bk1xkM1cX9MJyb_iMSg/edit?usp=sharing
https://docs.google.com/document/d/1qYCRBp3fNS7SwBA-SWg3vvP5YBcVX5e5GuPe_qf1-v4/edit?usp=sharing
{"statusCode":500,"errorCode":"InternalServerError","message":"com.autodesk.cep.exception.SystemException: org.openid4java.discovery.yadis.YadisException: 0x704: I/O transport error: connect timed out"}
https://docs.google.com/document/d/1Qb1weFB1kc7OCGBKJ_3HOwNS5xbkd-mQ1BDTCcGIHB0/edit?usp=sharing
04817e598f9e183db66efc559ed291636a0f4d59e0ea86ccd45e87d23bcb1376242e3fc10f4cbd64a11c67e5c4a3f7842b4263d7541e27fc04d1b580156a6ab42a
0x88eb6963Ec60e32c0ef060021F87735495f78C13
@capablemonkey
capablemonkey / readme.md
Last active November 5, 2017 21:25
Configuring Fetch teleop joystick speed

The Fetch & Freight manual doesn't mention how to configure the speed/acceleration when using Fetch Robotics' bundled joystick. This is mostly what I discovered from reading the source of fetch_teleop.

fetch_teleop gets parameters from the parameter server under the following namespace:

teleop/<component>/<param>

There are 5 components, each of which have their own params:

@capablemonkey
capablemonkey / decision_tree.rb
Last active October 3, 2017 21:50
Decision Tree builder in Ruby
INSTANCES = [
{f1: "high", f2: "vhigh", f3: 2, f4: 4, f5: "medium", f6: "high", class: "A"},
{f1: "high", f2: "vhigh", f3: 2, f4: 4, f5: "small", f6: "medium", class: "D"},
{f1: "medium", f2: "vhigh", f3: 3, f4: 4, f5: "big", f6: "medium", class: "B"},
{f1: "medium", f2: "vhigh", f3: 3, f4: 4, f5: "big", f6: "high", class: "E"},
{f1: "low", f2: "high", f3: 2, f4: 5, f5: "big", f6: "medium", class: "A"},
{f1: "low", f2: "high", f3: 2, f4: 5, f5: "big", f6: "high", class: "D"},
{f1: "low", f2: "high", f3: 3, f4: 2, f5: "medium", f6: "low", class: "B"},
{f1: "low", f2: "low", f3: 4, f4: 5, f5: "small", f6: "medium", class: "E"},
{f1: "low", f2: "low", f3: 4, f4: 5, f5: "small", f6: "high", class: "A"},
0x9f76a9c19600231e9a9c3c8f4954202a6d4fcba1