Skip to content

Instantly share code, notes, and snippets.

View acbart's full-sized avatar

Austin Cory Bart acbart

View GitHub Profile
@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",
@acbart
acbart / evil_or_tree.py
Created September 11, 2022 02:45
Abusing the short-circuit of OR to allow recursive definitions
from dataclasses import dataclass
@dataclass
class Empty:
pass
@dataclass
class Tree:
value: int
left: Empty or Tree
@acbart
acbart / simple_tracing.py
Created September 6, 2022 14:28
Simple code, easy to trace
from bakery import assert_equal
name = "Captain"
def shorten(word: str) -> str:
return word[:3]
assert_equal(shorten(name), "Cap")
assert_equal(shorten("Babbage"), "Bab")
@acbart
acbart / heart.py
Created September 1, 2022 14:34
heart.py
# -*- coding: utf-8 -*-
"""
This program draws a heart using MatPlotLib.
You don't have to worry about how it does it, just
make sure that it runs. If it's successful, a heart
will appear in a new window.
"""
# Import graphing library
@acbart
acbart / trace_test.py
Created August 19, 2022 19:29
Trace a program, determine when a class vs function is being entered
import sys
import os
import builtins
build_class_orig = __build_class__
class Tracer:
def __init__(self, code, filename):
self.code = code
self.filename = filename
@acbart
acbart / mutable_data_examples.py
Created August 14, 2022 15:54
Mutable Data Code from CS1 Bakery Assignment
# Comment out each section's triple quotes to show or hide them!
"""
def double(number: int) -> int:
new_number = number * 2
return new_number
def double_mutate(number: int) -> int:
number = number * 2
return number
@acbart
acbart / vip_ideas.md
Last active October 9, 2024 08:48
Vague Project ideas for the Digital Education VIP F22

These are some vague ideas for projects I am working on or starting, and could use some interested students to engage with!

Apply at: https://vip.udel.edu/projects/Digital-Education

  1. Canvas extensions via Userscript, many ways we can do more here: https://github.com/UD-CIS-Teaching/more-canvas-tools/
  2. Extending, documenting, testing, building out the Pedal project (sophisticated autograding framework): https://pedal-edu.github.io/
  3. Game development library for CS1, meant to be truly novice friendly: https://designer-edu.github.io/
  4. Analyzing the huge quantity of autograding data from CISC108 that I've collected over the years and utterly failed to capitalize on correctly.
  5. Properly dockerizing BlockPy so that it's much easier for others to use
  6. Porting over the CT@VT curriculum to use BlockPy more extensively: https://ct-vt.github.io/