Skip to content

Instantly share code, notes, and snippets.

View acbart's full-sized avatar

Austin Cory Bart acbart

View GitHub Profile
@acbart
acbart / bulk_give_admin.js
Created October 23, 2024 15:39
Bulk Give Admin Permissions to Student Repositories on Github
(function(){
const token = "GITHUB_TOKEN"; // replace with your GitHub token
const BASE_URL = "https://api.github.com";
const ORG_NAME = "REPLACE_WITH_ORG_NAME";
const REPO_BASE_NAME = "REPLACE_WITH_REPO_STARTER_";
const repos = [
// Put your student names here, as a list of strings.
// You can easily get a list of submitted students from the Download->Download Grades button on github classroom.
];
@acbart
acbart / cards_forms.csv
Last active July 15, 2024 18:53
Ars Magica-like Card Game - Generated by ChatGPT
Animal Animal The form dealing with animals and animal products.
Air Auram The form dealing with air, weather, and gases.
Body Corpus The form dealing with the human body.
Mind Mentem The form dealing with thoughts, emotions, and mental processes.
Fire Ignem The form dealing with fire and heat.
Water Aquam The form dealing with water and liquids.
Earth Terram The form dealing with earth and minerals.
Plant Herbam The form dealing with plants and plant products.
Metal Metallum The form dealing with metals and ores.
Spirit Spiritus The form dealing with spirits and ethereal entities.

image

  • Chapter 1 (Introduction): Covers the basics of Computer Science and programming. This appears to be one of the longest chapters, but is actually one of the easiest and shortest. There is a lot of ground to cover, but the pace is very gentle.
    • Part A: Explains what a program is and the basic input-processing-output model. Covers basics of values and types, simple math and logic, and interactive evaluation of expressions.
    • Part B: Explains variables and assignment statements. Introduces the idea of modules and organizing code with comments and imports. The last bit is about strings and string operations (e.g., slicing). Also covers the idea of errors/exceptions.
  • Chapter 2 (Functions): Introduces the idea of functions as "the smallest atomic unit of programming". This chapter is a little harder than the previous, but students usually don't struggle too much.
  • Part A: Starts
@acbart
acbart / example_file.py
Created October 27, 2023 18:51
Designer Game Milestone Examples
"""
This is my milestone 1 submission of Galaga. I only got a few features done, unfortunately.
Here is the link to my video:
https://www.youtube.com/watch?v=dQw4w9WgXcQ
## Galaga Features
# Milestone 1
[X] Spaceship exists
[X] Spaceship moves
@acbart
acbart / assignment_stats_table.js
Created October 4, 2023 15:11
Get all canvas assignment stats for a course in a nice table
(async function() {
function startDialog(title, body) {
if ($('#dialog').length == 0) {
$(document.body).append('<div title="' + title +
'" id="dialog"></div>');
}
$("#dialog").dialog({
autoOpen: false,
show: "blind",
@acbart
acbart / canvas_get_enrollments.js
Created August 23, 2023 15:15
Simple snippet for downloading the email/name/UDID/canvas id of students
(async function(){
// https://stackoverflow.com/questions/8735792/how-to-parse-link-header-from-github-api
let linkParser = (linkHeader)=>{
let re = /,[\s]*<(.*?)>;[\s]*rel="next"/g;
let result = re.exec(linkHeader);
if (result == null) {
return null;
}
return result[1];
@acbart
acbart / common_jupyter_header.py
Last active August 7, 2023 16:07
Common Jupyter Header
## Generally useful built libraries
import sys
import os
import json
import math
import re
import itertools
from collections import defaultdict
from dataclasses import dataclass
from datetime import timedelta, datetime
@acbart
acbart / hackathon_tech.md
Last active April 29, 2023 14:54
Dr. Bart's Hackathon Technology Suggestions

Hello hackers! Here are some suggestions for hacking during the Hackathon of cool things to try playing with.

For Python

Want to make something with Python? Here are some cool things you might try using:

Python in the Browser: Pyodide

Want to have Python running directly in the browser? You can use a new system called Pyodide! I found this guide that seemed like it would get you something basic going: https://testdriven.io/blog/build-spa-with-python-part-1/

@acbart
acbart / dataclasses_examples.py
Last active February 22, 2023 15:32
Dataclass examples of common data structures
from dataclasses import dataclass
@dataclass
class Teacher:
name: str
years_teaching: int
has_corgi: bool
courses: list[str]
me = Teacher("Dr. Bart", 6, True, ["CISC108", "CISC320"])
@acbart
acbart / assignment_stats.js
Created October 26, 2022 20:47
Assignment Stats
(async function() {
function startDialog(title, body) {
if ($('#dialog').length == 0) {
$(document.body).append('<div title="' + title +
'" id="dialog"></div>');
}
$("#dialog").dialog({
autoOpen: false,
show: "blind",