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
/* PrismJS 1.25.0 | |
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+c+cpp+csv+docker+git+http+json+julia+python+r&plugins=highlight-keywords+toolbar+copy-to-clipboard+match-braces */ | |
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function t(e,r){var a,n;switch(r=r||{},M.util.type(e)){case"Object":if(n=M.util.objId(e),r[n])return r[n];for(var i in a={},r[n]=a,e)e.hasOwnProperty(i)&&(a[i]=t(e[i |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
""" | |
This function accepts a matplotlib axis object with a datetime x-axis | |
and performs magical things to it to make it look not like total shit. | |
""" | |
import matplotlib.dates as dates | |
import matplotlib.ticker as mtick | |
import datetime | |
def label_july_only(x, pos=None): |
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
""" | |
This script runs the Alphasense OPC-N2 via the USB-ISS adapter and logs | |
every X seconds | |
Written by David H Hagan | Dec. 2016 | |
Contact: [email protected] | |
""" | |
import usbiss | |
import opc |
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
""" | |
Simple script to run the Alphasense OPC-N2 using the py-opc library. | |
Written by David H Hagan | March 24, 2016 | |
""" | |
import spidev | |
import opc | |
from time import sleep |
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 pandas as pd | |
import numpy as np | |
import math | |
import matplotlib.pyplot as plt | |
from matplotlib.ticker import ScalarFormatter | |
import seaborn as sns | |
import warnings | |
class DataError(TypeError): | |
pass |
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 | |
import json | |
class API(object): | |
def __init__(self, **kwargs): | |
self._key = kwargs.pop('key', '') | |
self._pswd = kwargs.pop('pswd', '') | |
self._version = kwargs.pop('version', None) | |
self._baseurl = kwargs.pop('baseurl', None) | |
self._headers = {'content-type': 'application/json'} |
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
{% macro form_field(field) -%} | |
{% set with_label = kwargs.pop('with_label', False) %} | |
{% set placeholder = '' %} | |
{% if not with_label %} | |
{% set placeholder = field.label.text %} | |
{% endif %} | |
<div class="control-group {% if field.errors %}error{% endif %}"> | |
{% if with_label %} | |
<label for="{{ field.id }}" class="control-label"> | |
{{ field.label.text }}{% if field.flags.required %} *{% endif %}: |
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
fig, ax = plt.subplots(1, 1) | |
with sns.axes_style('white'): | |
ax.plot(final.index, final['AFE1_X2-01_degC'], label = 'T RTD-X2-01') | |
ax.plot(final.index, final['AFE2_X2-01_degC'], label = 'T RTD-X2-01b') | |
ax.plot(final.index, final['AFE1_X2-02_degC'], label = 'T RTD-X2-02') | |
ax.plot(final.index, final['AFE2_X2-02_degC'], label = 'T RTD-X2-02b') | |
ax.set_title("X2-Series RTD Intercomparison") | |
ax.set_xlabel("Local Time (EST)") | |
ax.set_ylabel("T degC") |
NewerOlder