Skip to content

Instantly share code, notes, and snippets.

View goatrocks's full-sized avatar
🫠

micah cahill goatrocks

🫠
View GitHub Profile
import json
import datetime
import requests
import time
def walgreens(client):
today = datetime.date.today()
post_content = {
"serviceId": "99",
"position": {
import json
import datetime
import requests
import time
def walgreens():
today = datetime.date.today()
post_content = {
"serviceId": "99",
"position": {
@goatrocks
goatrocks / scrape.py
Last active February 25, 2021 05:33
This will scrape the MA immunizations site and display a toast notification (for os x) and use twilio to send you an SMS if the sites you're looking for have appointment slots
import requests
from bs4 import BeautifulSoup
import time
import re
from dotenv import load_dotenv
import os
from twilio.rest import Client
load_dotenv()
@goatrocks
goatrocks / alt-view.html
Last active May 26, 2016 17:26 — forked from jdanyow/app.html
gist for fiddling around with aurelia
<template ref="filter">
<div> <p>Alt-${name}, ${title}</p></div>
<div>
<ol>
<li repeat.for="piece of data">
${data.title}
</li>
</ol> </div>
</template>
@goatrocks
goatrocks / circularlist.py
Created May 13, 2012 19:50
removing the nth item from a circular list of things
def removeTasks(taskList,n):
spotInList = 0
while len(taskList) > 1:
for x in range(1,n):
spotInList = spotInList + 1
if spotInList >= len(taskList):
spotInList = 0
taskList.remove(taskList[spotInList])
return taskList
@goatrocks
goatrocks / even-odd.py
Created May 5, 2012 04:34
programming praxis: even-odd partition in python
import random
import sys
"""
Programming praxis: http://programmingpraxis.com/2012/05/04/even-odd-partition/
"""
def isEven(num):
if num % 2 == 0:
return True
@goatrocks
goatrocks / fibdigits.py
Created May 3, 2012 00:06
find the # of digits in the nth # in the fibonacci sequence
def fibFor(nth):
n = 0
n1 = 1
for x in range(0,nth):
n1 = n + n1
n = n1 - n
print "There are %d digits in the %dth number of the fibonacci sequence" % (len(str(n)),nth)
return n