Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
we have statuses now? is this AOL?

John Fink jbfink

💭
we have statuses now? is this AOL?
  • McMaster University
  • Hamilton, Ontario
View GitHub Profile
View bcdata2.txt
['{"csrf_token":"ab1a6504f2266e58c2c83d77f049883a9b06784c61ad7518b4ead42bd47fc781","product_attributes":{"sku":"1432","upc":null,"weight":null,"base":false,"image":null,"price":{"without_tax":{"formatted":"$5.25","value":5.25,"currency":"CAD"},"tax_label":"Tax"},"stock":0,"stock_message":"Out of stock","out_of_stock_behavior":"label_option","out_of_stock_message":"Out of stock","available_modifier_values":[188,189,190,191,192],"in_stock_attributes":[188,190,191],"instock":false,"purchasable":true,"purchasing_message":"The selected product combination is currently unavailable."}}']
View bcdata.txt
['\n var BCData = {"csrf_token":"ab1a6504f2266e58c2c83d77f049883a9b06784c61ad7518b4ead42bd47fc781","product_attributes":{"sku":"1432","upc":null,"weight":null,"base":false,"image":null,"price":{"without_tax":{"formatted":"$5.25","value":5.25,"currency":"CAD"},"tax_label":"Tax"},"stock":0,"stock_message":"Out of stock","out_of_stock_behavior":"label_option","out_of_stock_message":"Out of stock","available_modifier_values":[188,189,190,191,192],"in_stock_attributes":[188,190,191],"instock":false,"purchasable":true,"purchasing_message":"The selected product combination is currently unavailable."}};\n
View code.py
import board
import random
import time
from digitalio import DigitalInOut, Direction
PRESS3 = DigitalInOut(board.BUTTON_3)
PRESS2 = DigitalInOut(board.BUTTON_2)
PRESS1 = DigitalInOut(board.BUTTON_1)
PRESS_JOYSTICK = DigitalInOut(board.SWITCH_PRESS)
View raindrops.py
def convert(number):
numberoutput = ""
if number % 3 == 0:
numberoutput = numberoutput + "Pling"
if number % 5 == 0:
numberoutput = numberoutput + "Plang"
if number % 7 == 0:
numberoutput = numberoutput + "Plong"
print(numberoutput)
View code.py
import board
import random
import time
from digitalio import DigitalInOut, Direction
PRESS3 = DigitalInOut(board.BUTTON_3)
PRESS_JOYSTICK = DigitalInOut(board.SWITCH_PRESS)
def light():
View mapwarper-apt.txt
sudo apt-get install -y ruby ruby-dev postgresql-10-postgis-2.4 postgresql-server-dev-all postgresql-contrib build-essential git-core libxml2-dev libxslt1-dev imagemagick libmapserver2 gdal-bin libgdal-dev ruby-mapscript bundler nodejs
View letter-from-president.txt
These are unsettling times. The spread of COVID-19 around the world and its arrival in our own region has brought McMaster and all other organizations to uncharted territory. As of today, the risk of catching the virus continues to remain low.
The University’s focus is always clearly on our students, faculty and staff. And while the university has taken many measures to prepare and keep our community informed as the pandemic has unfolded, it is now time to take a more significant decision to suspend classes at McMaster.
McMaster in-person classes for undergraduate and graduate students will end at the end of day Friday March 13th and no in-person exams will be held at the end of this term.
Faculty members and instructors are asked to work with their Chairs, Directors and Deans to be prepared to communicate with students by Wednesday, March 18th to let them know how the remainder of their courses will be managed and grades assessed so that they can complete their credits within the normal timeframe of t
@jbfink
jbfink / uni-micro.txt
Created Dec 18, 2019
Mail to Urban Drivestyle about the Uni Micro shipment, plus notes
View uni-micro.txt
My email to UD:
-----
Hello Urban Drivestyle folks,
Went and fetched the bike today from the Toronto airport. By and large, it looks great. There are some things missing, however:
No throttle - I assume this was shipped separately via FedEx as I have a package that they will deliver tomorrow.
@jbfink
jbfink / sentiment.py
Created Nov 2, 2019
sentiment analysis python script, MY FIRST PYTHON SCRIPT
View sentiment.py
import sys
from textblob import TextBlob
print("The file you selected is:", sys.argv[1])
text_file = open(sys.argv[1],"r")
output = text_file.read()
#print(output)
text_sentiment = TextBlob(output)
print(text_sentiment.sentiment)
print("I'M PROGRAMMING")
View gist:e5af857fe32eeb00611fac02a7f0f913
./configure --prefix=/usr/local/stow/R-3.5.3 --enable-R-shlib --with-cairo=yes