Skip to content

Instantly share code, notes, and snippets.

@bennettscience
bennettscience / TBMod.md
Last active February 19, 2024 16:17
Tecmo Bowl modding instructions with links

Apparently, Tecmo Bowl is one of the most modded games ever. Much of this information is found on the tecmobowl.org forums, along with more software.

  1. Tecmo Bowl Team Manager

Tecmo Bowl is the simplest title. Tecmo Super Bowl got a little more complex, so the editor is more complex. Personally, as I was tinkering, I enjoyed replaying the original vs Tecmo Super Bowl, but that's just me. All things aside, you need an editor.

These programs allow you to load the game file (ROM, see below) and edit team names and rosters through a desktop app. If you're on a Mac and want to run Tecmo Bowl Manager, I can send more detailed instructions, because I got that running as well.

@bennettscience
bennettscience / pity_party_scraper.py
Last active July 22, 2019 18:03
A script to scrape The Pity Part playlist from WDBM and create a spotify playlist
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'
@bennettscience
bennettscience / sgstatus.user.js
Last active May 29, 2019 19:04
Update the assignment status from the speedgrader in canvas
// ==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==
@bennettscience
bennettscience / script.py
Created May 10, 2019 11:45
Sample script of changing the enrollment statuses with canvasapi
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
@bennettscience
bennettscience / PyRSS2Gen.py
Last active January 19, 2023 10:08
InstagramRSS - Follow your favorite public accounts from RSS feeds.
"""PyRSS2Gen - A Python library for generating RSS 2.0 feeds."""
""" Distributed under the BSD license here."""
__name__ = "PyRSS2Gen"
__version__ = (1, 1, 0)
__author__ = "Andrew Dalke <dalke@dalkescientific.com>"
_generator_name = __name__ + "-" + ".".join(map(str, __version__))
import datetime
@bennettscience
bennettscience / pool_test.py
Created May 1, 2019 13:44
First take at using multiprocessing with UCFOpen's canvasapi in Python
import multiprocessing as mp
from canvasapi import Canvas
import json
def process_submissions(assignment):
obj = {}
canvas = Canvas(url, key)
@bennettscience
bennettscience / clearChildNotes.gs
Created January 15, 2019 19:32
Copy notes between Google Sheets
// If you make a mistake, this will clear all notes from the child sheets
function clearChildNotes() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Sheet2');
var buildings = sheet.getRange(1, 1, sheet.getLastRow(), 3).getValues();
for(var i=0; i<buildings.length; i++) {
SpreadsheetApp.openByUrl(buildings[i][1]).getSheetByName('Sheet1').clearNotes();
}
}
@bennettscience
bennettscience / Code.gs
Created March 29, 2018 18:49
Event manager Apps Script webapp
var ss = SpreadsheetApp.getActiveSpreadsheet();
/**
* doGet - Return webapp
*
* @param {String} e query string to serve different pages
* @returns {String} rendered HTML to the browser
*/
function doGet(e) {
if (!e.parameter.page) {
@bennettscience
bennettscience / onEdit.gs
Last active May 9, 2023 07:22
Dynamic data validation in Apps Script
function onEdit(e) {
var row = e.range.getRow();
var col = e.range.getColumn();
// If the edited column was 2 or 3, do the next part. Ignore other changes
if(col == 2 || col == 3) {
var value = sheet.getRange(row, col).getValue();
updateList(row,col, value);
}
}
@bennettscience
bennettscience / helpbotBrain.gs
Last active March 22, 2018 11:46
Main files for an apps script bot and webapp pair
/**
* 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();