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 "Quaternion.h" | |
#include <cmath> | |
// http://content.gpwiki.org/index.php/OpenGL:Tutorials:Using_Quaternions_to_represent_rotation | |
// http://www.flipcode.com/documents/matrfaq.html | |
// http://db-in.com/blog/2011/04/cameras-on-opengl-es-2-x/ | |
// http://wiki.beyondunreal.com/Legacy:Quaternion | |
// http://clb.demon.fi/MathGeoLib/docs/float3x3.cpp_code.html#612 | |
// http://clb.demon.fi/MathGeoLib/docs/Quat_summary.php | |
// http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm |
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
#!/bin/sh -e | |
# | |
# This file belongs in /usr/lib/dhcpcd5/dhcpcd how you get it there is up to you | |
# | |
DHCPCD=/sbin/dhcpcd | |
INTERFACES=/etc/network/interfaces | |
REGEX="^[[:space:]]*iface[[:space:]](*.*)[[:space:]]*inet[[:space:]]*(dhcp|static)" | |
EXCLUDES="" |
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
#!/bin/python | |
# | |
import re | |
import argparse | |
def example(filename): | |
items = [] | |
# P3 with open(filename, newline='') as f: | |
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
#!/usr/bin/python | |
# gathers GSLB statistics for a particular name | |
from __future__ import print_function | |
from time import sleep | |
import curses | |
import dns.name | |
import dns.query |
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
// GIST to outline driving this very cost effective serial servos directly from Particle Photons | |
// Turns out the servo uses half duplex, and requires an Open Drain | |
// Turn off echo, or we can't read. | |
// According to my nScope although the docs say pull-up to 5V I can see it's a 3.3V that's 5V tolerant | |
// ... just like the photon... | |
// So, anyway, 3.3V works just fine. Link to the TX pin (that's Serial1). RX pin is unused. | |
// I used an external 10K pull-up to the 3.3V pin on the photon. You might be able to do this internally too? | |
// | |
// Power the servo separately to > 6V, so be a little careful with your wiring (cos the servo power will fry your serial pin) |
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
{ | |
"id": "ZW095-C", | |
"name": { | |
"en": "Home Energy Meter Gen2" | |
}, | |
"class": "sensor", | |
"capabilities": [ | |
"measure_current", | |
"measure_power", | |
"meter_power", |
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
{ | |
"id": "ZW095-C", | |
"name": { | |
"en": "Home Energy Meter Gen2" | |
}, | |
"class": "sensor", | |
"capabilities": [ | |
"measure_current", | |
"measure_power", | |
"meter_power", |
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
"multiChannelNodes": { | |
"1": { | |
"class": "sensor", | |
"capabilities": [ | |
"measure_power", | |
"meter_power" | |
], | |
"name": { | |
"en": "Clamp 01" | |
}, |
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
class StationCommodity(models.Model): | |
# Buy Sell Don't bring? | |
commodity = models.ForeignKey(Commodity, models.CASCADE) | |
station = models.ForeignKey(Station, models.CASCADE) | |
imported = models.NullBooleanField(blank=True, null=True) # Y N ? | |
exported = models.NullBooleanField(blank=True, null=True) # Y N ? | |
prohibited = models.NullBooleanField(blank=True, null=True) # Y N ? |