Skip to content

Instantly share code, notes, and snippets.

View elizabrock's full-sized avatar

Eliza Brock Marcum elizabrock

View GitHub Profile
@elizabrock
elizabrock / keybase.md
Created February 1, 2019 18:53
keybase.md

Keybase proof

I hereby claim:

  • I am elizabrock on github.
  • I am elizamarcum (https://keybase.io/elizamarcum) on keybase.
  • I have a public key ASAF442jq8ghty9LHgxxGWOhRQJTBIA6dh-i524DnaXSYwo

To claim this, I am signing this object:

@elizabrock
elizabrock / questions.md
Last active December 2, 2018 10:43
Northwinds Exercise
  1. Write a query to display all records in the orders table

SELECT * FROM orders;

  1. Show me the employees whose name starts with A.

SELECT * FROM employees WHERE first_name LIKE 'A%';

Note: ILIKE can be used for case-insensitive search.

@elizabrock
elizabrock / test_agent.py
Last active February 5, 2016 15:07
Loading a single problem for testing in KBAI
from Agent import Agent
from test_helpers import *
class TestAgent:
def test_agent_on_problem_basic_B_01(self):
"""
This is a sanity/integration test.
"""
problem = load_problem("Basic", "B", "01")
@elizabrock
elizabrock / countdown.rb
Last active December 17, 2015 12:09
Countdown (with output always shown at the top of the terminal)
class Countdown
BELL = "\a"
COLORS = {
'black' => 30,
'red' => 31,
'green' => 32,
'yellow' => 33,
'blue' => 34,
'magenta' => 35,
'cyan' => 36,
@elizabrock
elizabrock / gist:5468471
Created April 26, 2013 16:16
The shell of a program that takes arguments and prints a calendar (for NSS Spring 2013)
month = ARGV[0]
year = ARGV[1]
puts `cal #{month} #{year}`
@elizabrock
elizabrock / gist:5389471
Created April 15, 2013 16:46
NSS Cheers Assignment
puts "Hey there! What's your name?"
name = gets.chomp
puts name
# Give me a K!
# Give me a e!
# Give me a i!
# Give me a t!
# Give me a h!
def starts_listing(line)
line.include? "\\begin{lstlisting}"
end
def ends_listing(line)
line.include? "\\end{lstlisting}"
end
def process_file_line(unique_words, line)
unique_words.each do |verb_word|
@elizabrock
elizabrock / Final Projects.md
Created June 12, 2015 20:16
Final Projects

Final Capstone

This is the final capstone for this class.

Project Criteria:

  • Pick a project you're excited about!
  • This is the ultimate resume piece that you will be showing to employers, so take that into consideration.
@elizabrock
elizabrock / rake routes
Created May 26, 2015 14:51
Courseware Of The Future routes.rb
Prefix Verb URI Pattern Controller#Action
root GET / home#index
user_omniauth_authorize GET|POST /users/auth/:provider(.:format) omniauth_callbacks#passthru {:provider=>/github/}
user_omniauth_callback GET|POST /users/auth/:action/callback(.:format) omniauth_callbacks#(?-mix:github)
new_user_session GET /sign_in(.:format) devise/sessions#new
destroy_user_session DELETE /sign_out(.:format) devise/sessions#destroy
course_assignment_milestone GET /courses/:course_id/assignments/:assignment_id/milestones/:id(.:format) milestones#show
course_assignments GET /courses/:course_id/assignments(.:for