Skip to content

Instantly share code, notes, and snippets.

class BubbleSort
def initialize
@num_times = 0
end
def bubble_sort(array)
array_size = array.length
have_swapped_this_round = false
swap_numbers(array, array_size)
(ns snake.core
(:require ))
(enable-console-print!)
(def horace "HI IM HORACE")
(println "HORACE: " horace)
(println "Edits to this text should show up in your developer console.")
require "droplet_kit"
token = ENV["DIGITAL_OCEAN_TURING_TOKEN"]
client = DropletKit::Client.new(access_token: token)
# all_keys = client.ssh_keys.all.to_a
# jason_key = all_keys.find { |k| k.name == "Jason Pilz" }
# d = DropletKit::Droplet.new(name: 'jason-api-droplet', region: 'nyc2', image: 'ubuntu-14-04-x64', size: '512mb', ssh_keys: [jason_key.id])
# client.droplets.create(d)
class BinaryTree
def initialize(data = nil)
@data = data
end
def left
@left ||= BinaryTree.new
end
def right
[3] pry(#<ModuleOneInstructor>)> def
[3] pry(#<ModuleOneInstructor>)> exit
=> nil
[163] pry(main)> def method_one(param1, param2)
[163] pry(main)* end
=> :method_one
[164] pry(main)> class
[164] pry(main)> exit
worace @ Turing ➸ pry
[1] pry(main)> class MyObject

Echo Work Time

Option A - Mythical Creatures

If you have not done (or not completed) Mythical Creatures, spend the time you aren't being evaluated working on that. As you work, spend a few moments to jot some quick pseudocode for each method before you dive into it.

Option B - Pseudocoding Mastermind

class FishTank
def initialize
# great place to do any initial
# setup or configuration
@fish = []
@water_volume = 0
@salinity = nil
end
def fill_tank(volume, water_type)

Introducing Arrays Remote Materials List

This morning's weather circumstances require us to conduct this lesson remotely. Unfortunately, this lesson requires the usage of a few props, which we'll have to ask you to cobble together as best you can from your house. For each item I'll provide an ideal and an adequate option.

Cups (x 5)

Horace Pairing Session Sign Ups

Feb 9, 2016 (Week 2)

4:15 PM

Name:

5:00 PM

@worace
worace / gitcoin.rb
Last active January 22, 2016 22:17
require "hurley"
require "json"
require "digest"
def fetch_info
JSON.parse(Hurley.get("http://git-coin.herokuapp.com/target").body)
end
def mine_coin
info = fetch_info