Skip to content

Instantly share code, notes, and snippets.

ulineprotocol (micro line protocol)

A tiny line protocol parser for micropython

You can test it with simple calls :

from ulineprotocol import *

parsed = ulp_parse("temperature,location=Paris c=28,f=82 28")
print(parsed[0])
@bcopy
bcopy / Dockerfile
Last active December 6, 2016 13:26 — forked from scr512/gist:3763359be532772f9b2e
Docker example to build Cyclotron
#Dockerfile
FROM phusion/baseimage:latest
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
RUN echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list
RUN apt-get update
RUN apt-get install -y build-essential git mongodb-org supervisor curl wget nginx
RUN curl -sL https://deb.nodesource.com/setup | sudo bash -
RUN apt-get install -y nodejs
RUN npm install -g npm@latest
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
TRIG = 17
ECHO = 18
print "Distance Measurement In Progress"
GPIO.setup(TRIG,GPIO.OUT)
@bcopy
bcopy / easing.py
Created September 25, 2016 21:27 — forked from th0ma5w/easing.py
Easing Equations in Python (orig by Robert Penner)
# ported from http://www.gizma.com/easing/
# by http://th0ma5w.github.io
#
# untested :P
import math
linearTween = lambda t, b, c, d : c*t/d + b

How to use

Install dependencies

sudo easy_install everyconfig visitor

or

sudo pip install everyconfig visitor