Skip to content

Instantly share code, notes, and snippets.

@saildata
saildata / gradeByStudentsIndex.js
Last active December 8, 2018 20:55
Runestone autograde
(function () {
// modified from https://github.com/RunestoneInteractive/RunestoneServer/issues/1163#issuecomment-441084254
// divide grading task into two jobs
// and run them in separate browser tabs
// queue1 and queue2 represent the ending points for each list
// see line 23
function splitQueue(studentlength) {
var queue1 = 0
var queue2 = studentlength
if (studentlength % 2 == 0) {
@saildata
saildata / bell_ringer_2018_12_06.py
Created December 6, 2018 15:17
Bell Ringer 12/06/18
# Background:
# X to the power of Y
#
# Function that takes x, y as an inputs
# and returns x ** y
#
# Example call: x_to_y(2, 3)
# Returns: 8
# Instructions:
@saildata
saildata / turtle_starter.py
Last active November 1, 2018 15:46
Starter code for Python Turtle halloween project
# Starter code for turtle Halloween project
# Name: Bob Student
# Period: 3
import turtle
t = turtle
# Set background color, turtle color, and width
t.bgcolor('black')
@saildata
saildata / bell_ringer_2018_10_15.py
Last active October 15, 2018 13:50
Bell Ringer 10-15-2018 [CS1]
# We have discussed variable assignment a lot in class
# Think about the recipe: variable = value
# Now, we will practice with variable **reassignment**
# Let's imagine that we're counting the pieces of Halloween candy collected on Oct. 31
candy_collected = 0
print("Candy collected so far:", candy_collected)
# After the first house, we get 2 pieces
candy_collected = candy_collected + 2
print("Candy collected so far:", candy_collected)
@saildata
saildata / bell_ringer_2018_10_12.py
Created October 12, 2018 15:35
Bell ringer 10/12/2018 starter code (on board)
# practice with module imports and evaluation of foreign modules
# in our code
import time
import datetime
# datetime.date syntax:
# (( 1 )) date(year, month, day) --> date object
dateTime = datetime.date(2018,10,12)
@saildata
saildata / bench_results_notes_conclusion_01042018.md
Last active January 4, 2018 19:28
Arch Linux (Jan 4, 2018) Tests, Benchmarks, and other Observations Before and After the "Spectre and Meltdown" Intel CPU bug / KPTI patches

Tests, Benchmarks, and other Observations

Before and After the "Spectre and Meltdown" Intel CPU bug / KPTI patches

System Specs: Arch Linux 4.14.11 (Xorg); Intel i7-7700k; NVIDIA GTX-1080 Ti

Pyperformance General/System Benchmarks
  • 28 tests run
  • 2 had significant results: python startup time (+2%) new time is ~9.0ms