Skip to content

Instantly share code, notes, and snippets.

View acbart's full-sized avatar

Austin Cory Bart acbart

View GitHub Profile
# Adjust this string to have your desired alphabet of letters
alphabet = "ABCDE"
# Adjust this list of strings to have the significantly different pairs
forbidden = ["AD", "AE", "CE", "DE"]
Then run!
def split_bads(universe, bad):
left, right = bad
modified = True
@acbart
acbart / pedal_blockpy_example.py
Last active July 17, 2018 20:31
Pedal BlockPy Example
# BlockPy Examples
################################################################################
# Boiler plate code automatically prepended before execution
# Import get_output, set_success, gently, explain
from pedal.report import *
# In JS, patch `get_program`, and then imperative define the report's source
report.set_source(get_program())
# Run the tifa analysis; stuff is automatically added to the report
from pedal.tifa import tifa_analysis()
_tifa = tifa_analysis()
@acbart
acbart / settings.yaml
Created August 13, 2018 19:21
Example settings.yaml file
defaults:
canvas-token: "TOKEN"
canvas-url: "https://vt.instructure.com/api/v1/"
canvas-base-url: "https://vt.instructure.com/"
course: f18_ct
courses:
f17_python:
id: 57639
ta_map: "tas/f17_1064_ta_map.yaml"
f18_ct:
SUITS = ['♠', '♦', '♥', '♣']
RANKS = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
ALL = [rank+suit for rank in RANKS for suit in SUITS]
def backtrack(a, k):
if is_solution(a):
process_solution(a)
else:
k = k + 1
candidates = construct_candidates(a, k)
Write syntactically correct values that incorporate complex expressions
Write syntactically correct literals that compose multiple types
Write syntactically correct String, Float, Integer, Boolean, and None values
Write syntactically correct Lists and Dictionaries literal values
Write statements and expressions that access data in nested data structures
Write simple programs
Write code with branching conditions
Write code that uses functions defined in an external module
Write code that involves simple if statement
Write code that involves nested if statements
@acbart
acbart / Test Reverse.md
Created February 7, 2019 02:16
Reversed markdown list
  1. first item
  2. second item
  3. another item {: reversed="reversed"}
@acbart
acbart / ClassConduct.md
Created July 28, 2019 00:40 — forked from evanpeck/ClassConduct.md
A code of conduct that is inserted into the syllabus of CS courses. I'd love to improve it + make it more actionable. Don't hesitate to suggest changes!

Code of Conduct

You have two primary responsibilities:

  • Promote an inclusive, collaborative learning environment.
  • Take action when others do not.

Professionally, we adhere to ACM’s Code of Ethics. More broadly, a course like INSERT COURSE NAME involves reflection, collaboration, and communication. Computer science has a checkered history with respect to inclusion – in corporate environments, in our classrooms, and in the products we create. We strive to promote characteristics of transparency and inclusivity that reflect what we hope our field becomes (and not necessarily what it has been or is now).

We reject behavior that strays into harassment, no matter how mild. Harassment refers to offensive verbal or written comments in reference to gender, sexual orientation, disability, physical appearance, race, or religion; sexual images in public spaces; deliberate intimidation, stalking, following, harassing photography or recording, sustained d

@acbart
acbart / remap_blockpy_sneks_problems.js
Created August 18, 2019 19:58
Quick snippet to fix most of the programming problems in S19 Sneks curriculum
(function() {
// These are the parameters to modify
const BLOCKPY_ASSIGNMENT_URL = "https://gold.cis.udel.edu/blockpy/assignments/load?assignment_group_url=";
const SNEKS_CURRICULUM_REMAP = {
"Programming 1- Maze Game": "maze",
"Programming 3- Try BlockPy": "sneks_try_blockpy",
"Programming 6- Console IO": "sneks_console_io",
"Programming 8- Types": "sneks_values",
"Programming 9- Arithmetic": "sneks_arithmetic",
def provide_world(f):
"""
Creates a new route for the URL endpoint `path`. This decorator wraps
the View endpoint to pass in the current `world` (deserialized from session data
upon function entrance and serialized back into session once the function is
done), any URL parameters, and then any request parameters (sorted by key name).
"""
@wraps(f)
def decorated_function(*args, **kwargs):
world = json.loads(session.get('world', json.dumps(INITIAL_WORLD)))
"""
This file contains a basic Arcade Window class. It is necessary
to run your game.
You do not need to open or read this file. It must
be in the same folder as your other files.
Change Log:
- 0.0.1: Initial version
"""