i2c library - http://www.i2cdevlib.com/usage
Pitch and Roll from accel - https://theccontinuum.com/2012/09/24/arduino-imu-pitch-roll-from-accelerometer/
Complementary filter - http://www.pieter-jan.com/node/11
/* | |
Basic MQTT example | |
This sketch demonstrates the basic capabilities of the library. | |
It connects to an MQTT server then: | |
- publishes "hello world" to the topic "outTopic" | |
- subscribes to the topic "inTopic", printing out any messages | |
it receives. NB - it assumes the received payloads are strings not binary | |
It will reconnect to the server if the connection is lost using a blocking |
<source> | |
@type http | |
port 9880 | |
</source> | |
<filter **> | |
@type stdout | |
</filter> | |
<match **> |
i2c library - http://www.i2cdevlib.com/usage
Pitch and Roll from accel - https://theccontinuum.com/2012/09/24/arduino-imu-pitch-roll-from-accelerometer/
Complementary filter - http://www.pieter-jan.com/node/11
#include <Wire.h> | |
#include <I2Cdev.h> | |
#include <ADXL345.h> | |
ADXL345 acc; | |
void setup() { | |
Serial.begin(9600); | |
Wire.begin(); | |
acc.initialize(); |
https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh
Open terminal
Change to download folder location
[Unit] | |
Description=Docker %i container | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
Restart=always | |
ExecStart=/usr/bin/docker start -a %I | |
ExecStop=/usr/bin/docker stop -t 2 %I |
import sklearn | |
import tensorflow as tf | |
from sklearn import datasets | |
iris = datasets.load_iris() | |
# Convert targets to one hot | |
targets_onehot = [0] * len(iris.target) | |
for i,target in enumerate(iris.target): | |
targets_onehot[i] = [0] * 3 |
#!/bin/bash | |
# | |
# How this works: | |
# Curl -> Grabs the organization repos from the github api | |
# grep -> Filter to only clone_url's | |
# grep -> Select the url from that line | |
# xargs -> For each line, run git clone [line] | |
curl -s "https://api.github.com/orgs/${1}/repos?per_page=200" | grep clone_url | grep -oh "https.*git" | xargs -L1 git clone |
#!/bin/bash | |
if [ "$1" = "-h" -o "$1" = "--help" ]; then cat <<EOF | |
appify v3.0.0 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |
#define READ_COUNT 5 | |
float volts[READ_COUNT]; | |
void setup() | |
{ | |
Serial.begin(9600); | |
} | |
void loop() |