Skip to content

Instantly share code, notes, and snippets.

@Moving-Electrons
Moving-Electrons / ambient_conditions.py
Created January 16, 2018 00:31
This script check ambient conditions every 2 minutes and updates an LED matrix graph accordingly. It uses a Raspberry Pi Zero W, Adafruit VCNL4010 proximity sensor and a Sense HAT. More info can be found at www.movingelectrons.net.
#!/usr/bin/python3
# Import the VCNL40xx module.
import Adafruit_VCNL40xx
from sense_hat import SenseHat
import time
import threading
import subprocess
# Create a VCNL4010 instance.
@Moving-Electrons
Moving-Electrons / StockPriceCheck.py
Last active June 19, 2021 10:11
This Python script checks stock prices in Google Finance pages and send notifications (email and instant) if predetermined conditions in a csv file (passed as argument) are met. More info: http://www.movingelectrons.net/blog/2014/01/12/how-to-get-alerts-on-stock-price-changes-using-python.html
#!/usr/local/bin/python2.7
import string, re, os, time, smtplib, sys
from urllib import urlopen
import httplib, urllib #used in the Pushover code
def quote_grab(symbol):
baseurl = 'http://google.com/finance?q='
@Moving-Electrons
Moving-Electrons / ssh_command.py
Last active February 19, 2022 21:01
This script connects through SSH to the Computer/Server using the Username & Password defined in the header. It then runs a command/script that is passed as an argument by long pressing the Run icon in Pythonista or by calling the script through Pythonista's URL scheme with an argument. More information in www.movingelectrons.net , scripting sec…
import paramiko
import console
import sys
import keychain
'''This script connects through SSH to the Computer/Server using the Username & Password defined in the header.
It then runs a command/script that is passed as an argument by long pressing the Run icon in Pythonista or by
calling the script through Pythonista's URL scheme with an argument.
General Notes: