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 re, sys | |
import requests | |
import spotipy | |
import spotipy.util as util | |
from bs4 import BeautifulSoup | |
# Get the ID of the track from Spotify | |
def get_track_id(username, title, artist): | |
print("Searching for {} by {}".format(title, artist)) | |
scope = 'playlist-modify-public' |
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
// ==UserScript== | |
// @name SpeedGrader Status | |
// @namespace http://tampermonkey.net/ | |
// @version 0.4 | |
// @description Set Canvas Assignment statuses from the SpeedGrader | |
// @author You | |
// @include /^https://.*\.instructure\.com/ | |
// @grant none | |
// ==/UserScript== |
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 canvasapi import Canvas | |
# Instantiate the Canvas object | |
canvas = Canvas("your_url", "your_key") | |
# Get the course by it's ID | |
course = canvas.get_course(course_id) | |
# Get a list of Enrollment items | |
# Use the 'type' and 'state' kwargs to only get active students |
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 multiprocessing as mp | |
from canvasapi import Canvas | |
import json | |
def process_submissions(assignment): | |
obj = {} | |
canvas = Canvas(url, key) |
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
// Pie Chart visualization client-side scripting | |
// Initialize the script and grab the data from the spreadsheet. | |
google.script.run.withSuccessHandler(drawChart).getSpreadsheetData(); | |
google.load("visualization", "1", {packages:["corechart"]}); | |
// Using the returned data from the spreadsheet, draw the chart. | |
// ssData is a 2D array of the candidate name and their electoral vote totals from the spreadsheet. | |
function drawChart(ssData) { | |
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
/** | |
* getLookup - Get an array of videos matching the search key request | |
* | |
* @param {Object[]} keys - Array of search terms | |
* @returns {Object[]} matches - Array of video objects matched to the tag | |
*/ | |
function getLookup(keys) { | |
var sheet = ss.getSheetByName("db"); | |
var data = sheet.getDataRange().getValues(); | |
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
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true |
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 canvasapi import Canvas | |
API_URL = 'https://my.url.com' | |
API_KEY = 'mySTringKEy123' | |
canvas = Canvas(API_URL, API_KEY) | |
outcome = canvas.get_outcome(5426) | |
class Rating: |
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
const functions = require('firebase-functions'); | |
const admin = require('firebase-admin'); | |
const nodemailer = require('nodemailer'); | |
admin.initializeApp(functions.config().firebase); | |
// set up email credentials in firebase.config | |
// See https://github.com/firebase/functions-samples/tree/master/quickstarts/email-users for example | |
const gmailEmail = functions.config().gmail.email; |
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
// Copyright 2017 Brian E. Bennett | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |
// and associated documentation files (the "Software"), to deal in the Software without restriction, | |
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |
// subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |