- This is a python desktop app outline that will pull new mail notifications from Gmail and push to arduino.
- Originally done here: http://j4mie.org/blog/how-to-make-a-physical-gmail-notifier/
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
'WHAT IS THIS? | |
' -opens an excel file with named cells, reads them from the specified sheet, | |
' then it will save this to another file. Basically this a template for | |
' generating reports from a large excel file that can be sent to people that only | |
' need minimal information | |
'microsoft tut | |
'http://support.microsoft.com/kb/302094 | |
'also add COM Reference "Microsoft Excel Object Library 14" |
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
/* | |
* Code for cross-fading 3 LEDs, red, green and blue (RGB) | |
* To create fades, you need to do two things: | |
* 1. Describe the colors you want to be displayed | |
* 2. List the order you want them to fade in | |
* | |
* DESCRIBING A COLOR: | |
* A color is just an array of three percentages, 0-100, | |
* controlling the red, green and blue LEDs | |
* |
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 numpy as np | |
class BasicTemplateAlgorithm(QCAlgorithm): | |
'''Basic template algorithm simply initializes the date range and cash''' | |
def Initialize(self): | |
'''Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.''' | |
self.SetStartDate(2004, 1, 1) #Set Start Date | |
self.SetEndDate(2018, 2, 16) #Set End Date | |
self.SetCash(100000) #Set Strategy Cash |
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
<?php | |
/* | |
What: mailer script for notifications: | |
Required params under POST: | |
msg | |
sub | |
ret | |
pass | |
The LCD module is attached via 2 analog pins to the Arduino board.
The arduino board listens for serial data coming in that starts with a line number, it will then send it on its way to the correct line, while calculating what substring it needs to display on the LCD.
The raspberry pi is running the python script that is doing the sending. The raspberry pi has
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
library(rgdal) | |
library(elevatr) | |
# this is the prjection system given as example in the documentation | |
ll_prj <- "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0" | |
# Im using this projection system based on reading this document: | |
# https://www.nceas.ucsb.edu/~frazier/RSpatialGuides/OverviewCoordinateReferenceSystems.pdf | |
us_prj = "+init=epsg:4326 +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0" |
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
function deDupeArrayOfObjects(arr) { | |
var tmpMap = {}; | |
arr.forEach(function(val) { | |
var uniquekey = ''; | |
for(var k in val) { | |
if(val.hasOwnProperty(k) && val[k]) { | |
uniquekey += val[k].toString(); | |
} | |
} | |
tmpMap[uniquekey] = val; |
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
def featureScaling(arr): | |
_max = 0 | |
_min = 10000000 | |
for a in arr: | |
if a < _min: | |
_min = a | |
if a > _max: | |
_max = a | |
scaled = [] |
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
# cassandra runs on 9042 for devCenter management | |
# expose it (9999 locally) running on a remote server locally: | |
ssh -L 9999:localhost:9042 -f -N remoteuser@remotehost |