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
javascript:(function(){var url=location.href;var res=url.split("/");var site=res[2];var user=res[3];var repo=res[4];var treeBlob=res[5];var branch=res[6];var nbgitputllerUrl="https://hub.callysto.ca/jupyter/hub/user-redirect/git-pull?repo=";if(site=="github.com"){if(treeBlob){var subPath=url.substring(url.indexOf(branch)+branch.length+1);nbgitputllerUrl+=encodeURIComponent("https://github.com/"+user+"/")+repo+"&branch="+branch+"&subPath="+subPath+"&depth=1";}else{nbgitputllerUrl+=url;}}window.prompt("Callysto nbgitpuller link",nbgitputllerUrl);})(); |
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 pandas as pd | |
noteList = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B'] | |
def generateOctave(note, startingFrequency): | |
frequencyList = [startingFrequency] | |
for x in range(1,9): | |
frequencyList.append(startingFrequency * 2**x) # each octave up is twice the previous frequency | |
frequencyDf = pd.DataFrame({note:frequencyList}) | |
return frequencyDf |
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
def calculateFederalTax(income): | |
taxBrackets = [47630, 95259, 147667, 210371] | |
taxRates = [.15, .205, .26, .29, .33] | |
taxes = [] | |
for i in range(0, len(taxBrackets)): | |
taxes.append(taxBrackets[i] * taxRates[i]) | |
if income < taxBrackets[0]: | |
tax = income * taxRates[0] | |
elif income < taxBrackets[1]: | |
tax = taxes[0] + (income - taxBrackets[0]) * taxRates[1] |
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
javascript:(function(){var url=location.href;var res=url.split("github.com/");var site=res[1];colabGitUrl="https://colab.research.google.com/github/"+site;window.prompt("Colab gitpuller link",colabGitUrl);})(); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
function bitlyGroupId() { | |
var accessToken = ''; // paste in your access token from https://bitly.is/accesstoken | |
var headers = {'Authorization' : 'Bearer '+accessToken}; | |
var params = {'headers' : headers}; | |
var fetchUrl = 'https://api-ssl.bitly.com/v4/groups'; | |
var response = UrlFetchApp.fetch(fetchUrl, params); | |
var group_guid = JSON.parse(response.getContentText()).groups[0].guid; | |
Logger.log(group_guid) | |
return group_guid | |
} |
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 | |
import json | |
def clear_outputs(notebook_name_and_path): | |
original_file = open(notebook_name_and_path, 'r') | |
notebook_contents = json.load(original_file) | |
original_file.close() | |
for cell in notebook_contents['cells']: | |
if cell['cell_type']=='code': | |
cell['outputs'] = [] |
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 | |
import json | |
def clear_outputs(notebook_name_and_path): | |
original_file = open(notebook_name_and_path, 'r') | |
notebook_contents = json.load(original_file) | |
original_file.close() | |
for cell in notebook_contents['cells']: | |
if cell['cell_type']=='code': | |
cell['outputs'] = [] |
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
from mobilechelonian import Turtle | |
t = Turtle() | |
t.speed(10) | |
full = 80 | |
half = full/2 | |
quarter = half/2 | |
diagonal = full*0.707 | |
spacing = 10 |