Instantly share code, notes, and snippets.

# Mike Pawliuk mpawliuk

Created July 23, 2019 18:22
Tex for a feedback form for math presentations
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
 \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{graphicx}% Include CC license \usepackage[margin=0.5in]{geometry}% Shrink margins \usepackage{booktabs}% http://ctan.org/pkg/booktabs \newcommand\tabitem{\makebox[1em][r]{\textbullet~}} % Item list in table. Source: https://tex.stackexchange.com/a/257485 \pagenumbering{gobble}% No page numbering
Created July 23, 2019 17:46
Agenda for preCUMC Panel/Workshop
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
 Workshop/Panel Hour 1: Learning Objectives: By the end of this hour, participants will be able to 1. Describe a typical day at the CUMC. 2. Introduce yourself to a (math) stranger. 3. Network with other undergrads in math.
Created July 3, 2019 21:58
Class 19 - Riemann sum
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
 N = 1 a = 1 b = 3 delta = (b-a)/N left_sum = delta * sum([(a + i*delta)**2 for i in range(N)]) right_sum = delta * sum([(a + i*delta)**2 for i in range(1,N+1)]) print(left_sum, right_sum)
Created July 23, 2018 14:56
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 random from PIL import Image imgx = 500; imgy = 500 image = Image.new("RGB", (imgx, imgy)) pixels = image.load() mx = 10; my = 10 # width and height of the maze maze = [[0 for x in range(mx)] for y in range(my)] dx = [0, 1, 0, -1]; dy = [-1, 0, 1, 0] # 4 directions to move in the maze color = [(0,0, 0), (255, 255, 255)] # RGB colors of the maze # start the maze from a random cell
Last active June 14, 2018 23:41
This generates a game where there is an algebraic expression whose operations are hidden. It's from this Reddit post: https://redd.it/8r0a66
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 random def generate_game(largest_number, length, difficulty): """Produce an example of the number game. - largest_number is the largest possible number that can appear - length is how many numbers will appear in the problem - difficulty = 0,1,2. 0 has just addition/subtraction, 1 introduces multiplication, 2 has +,-,*,/ """ # Set difficulty operations = ['+', '-']
Created June 14, 2018 16:01
This generates a game where there is an algebraic expression whose operations are hidden.
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 random def generate_game(largest_number, length, difficulty): """Produce an example of the number game. - largest_number is the largest possible number that can appear - length is how many numbers will appear in the problem - difficulty = 0,1,2. 0 has just addition/subtraction, 1 introduces multiplication, 2 has +,-,*,/ """ # Set difficulty operations = ["add", "subtract"]
Created March 8, 2018 19:11
A small Chromatic number thing for a redditor
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 sage.graphs.graph_coloring import vertex_coloring # This is the list of English actors in the order they appear english_actor_sequence = [ 1, 2, 3, 1, 5, 4, 2, 6, 1, 3, 2, 9, 6, 3, 10, 11, 3, 2, 12, 1, 13, 14, 12, 2, 7, 6, 1, 13, 11, 5, 13, 15, 7, 12, 10, 16, 17, 2, 3, 6, 12, 17, 15, 5, 4, 13, 2, 7, 1, 14, 10, 15, 9, 4, 2]
Last active March 1, 2018 23:16
Donors for Bill Smith's campagin - Calgary Municipal Election 2017
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
Person Abby Steinberg 350 Person Abram Epp 1000 Person Alan Moon 200 Person Alexander Koroluk 150 Person Alf Peneycad 150 Person Alfred Fischer 500 Person Allan Behm 250 Person Allan Morrison 3000 Person Allison Grafton 2500 Person Andrew Boblin 200
Created September 5, 2017 05:42