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
from pymongo import Connection | |
import time | |
from datetime import datetime | |
import plotly | |
conn = Connection('localhost', 27017) | |
db = conn.skynet | |
collection = db.events | |
# 24 hour time range |
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
import platform | |
import requests | |
class SeedBox: | |
def __init__(self, agentConfig, checksLogger, rawConfig): | |
self.agentConfig = agentConfig | |
self.checksLogger = checksLogger | |
self.rawConfig = rawConfig | |
self.version = platform.python_version_tuple() |
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
// Author:Chris Hannam | |
// This library is free software; you can redistribute it and/or | |
// modify it under the terms of the GNU Lesser General Public | |
// License as published by the Free Software Foundation; either | |
// version 2.1 of the License, or (at your option) any later version. | |
// | |
// This library is distributed in the hope that it will be useful, | |
// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// Lesser General Public License for more details. |
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
import platform | |
import requests | |
class Weather: | |
def __init__(self, agentConfig, checksLogger, rawConfig): | |
self.agentConfig = agentConfig | |
self.checksLogger = checksLogger | |
self.rawConfig = rawConfig | |
self.version = platform.python_version_tuple() |
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
import serial | |
import requests | |
from datetime import datetime, timedelta | |
import time | |
serial_port = '/dev/ttyUSB0' | |
ser = serial.Serial(serial_port, 9600, timeout=1) | |
def demo(): | |
ser.write('0,0,135\n') |
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
/* | |
I started with the sample from this guy | |
Sweep | |
by BARRAGAN <http://barraganstudio.com> | |
This example code is in the public domain. | |
modified 8 Nov 2013 | |
by Scott Fitzgerald | |
http://arduino.cc/en/Tutorial/Sweep |
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
from flask import Flask | |
import serial | |
from datetime import datetime, timedelta | |
from time import sleep | |
serial_port = '/dev/tty.usbserial-A501S1GX' # most likely you will need to change this! | |
ser = serial.Serial(serial_port, 9600) | |
sleep(1.5) | |
app = Flask(__name__) |
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 <DHT.h> | |
#include <Wire.h> | |
#include <Adafruit_Sensor.h> | |
#include <Adafruit_TSL2561_U.h>s | |
#include <OneWire.h> | |
#include <VirtualWire.h> | |
#include<stdlib.h> | |
char *message; | |
Adafruit_TSL2561_Unified tsl = Adafruit_TSL2561_Unified(TSL2561_ADDR_FLOAT, 12345); |
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
""" | |
Server Density Plugin | |
Minecraft player monitor | |
https://github.com/serverdensity/sd-agent-plugins/ | |
Version: 1.0.0 | |
""" | |
import json |
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
# Show current git branch or SVN subfolder in prompt. | |
GREEN="\[\033[0;32m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
GRAY="\[\033[1;30m\]" | |
LIGHT_BLUE="\[\033[1;34m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
COLOR_OFF="\[\e[0m\]" | |
function prompt_func() { | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |
OlderNewer