This file contains hidden or 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
from Adafruit_IO import Client | |
import Adafruit_ADS1x15 | |
import requests | |
import numpy as np | |
import time | |
# setup client with token issued by adafruit IO | |
aio = Client(‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’) | |
# Create an ADS1115 ADC (16-bit) instance. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
def convOOM(x): | |
'''Function to return tuple with nearest order of mag along with a | |
string prefix in the correct SI units.''' | |
assert isinstance(x, float), 'Function expect type float' | |
assert (1e-24 < x < 1e27), ('Range must be between 1.0e-24 and 1.0e26: ' | |
'Exponent expression might be better choice than SI orders of mag.') | |
OOMlist = ['y', 'z', 'a', 'f', 'p', 'n', 'u', 'm', '', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y'] | |
OOMnum = np.log10(x) // 3 | |
return x * 10 ** (-3 * int(OOMnum)), OOMlist[int(OOMnum + 8)] |
This file contains hidden or 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 requests | |
def triggerIFTTT(triggerName, token): | |
''' Function for triggering events on IFTTT.com | |
Users must provide a name of the event and a token. | |
''' | |
assert isinstance(triggerName, str), "var triggerName should be a string" | |
assert isinstance(token, str), "var token should be a string" | |
# Generate url to trigger event |
This file contains hidden or 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
\documentclass[a4paper, 11pt]{article} | |
\usepackage{graphicx} %graphics package for including images | |
\usepackage{amsmath} | |
\usepackage{amssymb} | |
\usepackage{float} | |
\numberwithin{equation}{section} | |
This file contains hidden or 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
# Here external ports are set to 80 (http) and 443 (https with SSL/TLS). | |
# Change this to a different port if you have a port mapping on your router | |
# for external access. | |
# | |
# This should auto generate certificates and act as a proxy between containers | |
# and the exposed port when the following is included in your app: | |
# environment: | |
# - VIRTUAL_HOST=nextcloud.example.com | |
# - LETSENCRYPT_HOST=nextcloud.example.com | |
# |
This file contains hidden or 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
version: '2' | |
volumes: | |
nextcloud: | |
nextcloudDB: | |
services: | |
db: | |
image: mariadb | |
restart: always |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Disabled</key> | |
<false/> | |
<key>KeepAlive</key> | |
<true/> | |
<key>Label</key> | |
<string>local.jupyter.notebook</string> |
This file contains hidden or 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
## Note: This is explicitly broken into stages for debug. To minimize size the run commands must be combined together so that docker doesn't cache files from each stage in layers. | |
FROM alpine:latest | |
MAINTAINER Andrew Wade <[email protected]> | |
# Set the working directory to /app | |
WORKDIR /builddir | |
# Copy the current directory contents into the container at /app | |
ADD . /builddir |