Skip to content

Instantly share code, notes, and snippets.

@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 / gist:7762481
Created December 3, 2013 01:41
This script reads an Abstractspoon ToDoList file, searches for tasks overdue, due today and due within the next 7 days and puts the results in a text file in Markdown format. It includes Due Dates, Categories and Priorities per task. More information in www.movingelectrons.net
import sys
import csv
import operator
import time
from datetime import date
'''Summary:
This script reads the .csv file generated by TodoList (from abstractspoon) using csvreader (csv library) and puts the contents in a list of lists that is later iterated over to separate tasks in 4 buckets (lists of lists): Overdue, Today, Tomorrow and Next 7 days. Each of these lists has the priority column converted to integer so that they can be sorted by the column. The results are then written to a .txt file'''
# Contants definition
file = sys.argv[1] # .csv file from Abstractspoon TodoList
@Moving-Electrons
Moving-Electrons / EN_Meeting_Template.py
Last active September 15, 2017 08:04
Evernote Template Note - Pythonista
# This script uses Evernote's API to create a new template note to be used in meetings.
# The template includes the following fields: Date, Time, Attendance, Objective, Remarks and
# Action Items. The fields are shown using Evernote Markup Language. It also automatically
# adds the the date when the note was created at the end of the note's title.
#
# When run, it lists all notebooks in a user's account (just as reference), then
# asks for the title of the new note (automatically adding the current date at the
# end in ISO format YYYY-MM-DD), then asks for the tags to be assigned to the note and
# creates it in a pre-defined notebook (hard coded in the ntbkName variable below).
#