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
--Script for setting Reminders for LaunchBar and Alfred | |
--For Alfred, Applescript must NOT be set to run in Background otherwise date parsing does not work | |
--For LaunchBar, place the script in ~/Library/Scripts/LaunchBar | |
--by Michelle L. Gill, 10/07/2012 | |
--Inspired by https://gist.github.com/3187630 | |
--A related Alfred version 2 workflow can be found here: https://github.com/mlgill/alfred-workflow-create-reminder | |
--Changes | |
--02/01/2013 * Fixed an issue with setting the time when the hour is 12 and AM/PM (12-hour clock) is used | |
-- * Removed the ability to set seconds for the time since Reminders doesn't recognize them |
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 | |
a = np.eye(3) | |
b = np.eye(3) | |
c = np.eye(3) | |
for i in range(10): | |
d = np.random.random((3,3)) | |
# copy each matrix element individually | |
d00 = d[0,0].copy() |
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
#!/bin/zsh | |
#### BEGIN USER CONFIG OPTIONS #### | |
# Path to the data file to watch for modifications | |
local_progress_file="/path/to/file_that_is_periodically_modified" | |
# Interval in minutes to wait between queries | |
# Must be an integer | |
interval_min=30 |
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
#!/bin/zsh | |
#### BEGIN USER CONFIG OPTIONS #### | |
# Path to the data file to watch for modifications | |
local_progress_file="/path/to/file_that_is_periodically_modified" | |
# Interval in minutes to wait between queries | |
# Must be an integer | |
interval_min=30 |
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 os, os.path, sys, urllib2, requests, gzip, tarfile | |
class PyPiError(Exception): | |
def __init__(self, value): | |
self.value = value | |
def __str__(self): | |
return repr(self.value) | |
def _chunk_report(bytes_so_far, chunk_size, total_size): | |
if (total_size != None): |
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 keychain | |
def set_get_user_pass(service): | |
# store username and password in keychain if not found | |
if not service in [x[0] for x in keychain.get_services()]: | |
print 'Keychain does not contain %s username and password.' % service | |
username = raw_input('Enter your %s username and press enter:' % service) | |
password = raw_input('Enter your %s password and press enter:' % service) | |
print 'Username %s and password saved for %s.' % (username, service) |
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 sys, os, re | |
sys.path += ['lib'] | |
import keychainsetup, github3 | |
# gist_update_batch | |
# by Michelle L. Gill, michelle@michellelynngill.com | |
# A script to batch update pythonist scipts. Scripts to be updated must | |
# have the following the first line formatted as such: | |
# |
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 dropbox, os, webbrowser | |
# A generic Dropbox module to create a token and login. | |
# Michelle L. Gill, 2014/01/06 | |
# To use: | |
# import dropboxsetup | |
# sess, client = dropboxsetup.init(TOKEN_FILENAME, APP_KEY, APP_SECRET) | |
# TOKEN_DIRECTORY can be set to store tokens in a folder, set to "Tokens" by default |
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 os, sys, pickle, console, re | |
sys.path += ['lib'] | |
import dropboxsetup | |
# dropbox_sync | |
# by Michelle L. Gill, michelle@michellelynngill.com | |
# requires my dropboxsetup module (https://gist.github.com/8311046) | |
# Change log |
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 sys, Image, math | |
# Join two images together, either horizontally or vertically, | |
# with resizing to match joined dimension. Works on Mac OS X or iOS. | |
# On Mac OS X, the Python Imaging Library is required | |
# On iOS, Pythonista is required | |
# Michelle L. Gill, 2014/01/20 | |
# Padding and borders | |
padding = 10 |
OlderNewer