Link to this page: https://goo.gl/p5sZJz
Aloha CUNY Hackathon 2017!!! This has been updated for the November 2017 CUNY Hackathon.
tl;dr
- I'm Leo Rudberg. I ❤️ hackathons!
- Thanks to Shaun for helping me debug this!
| // Whether Passenger p (you) can get on the bus at Time t | |
| public boolean attemptToGetOnBus(Passenger p, Time t) throws HustleError { | |
| if (!p.location().equal("CS Building")) { | |
| return false; // what are you doing, kiddo? | |
| } else if (!p.isRegisteredForWildHacks()) { | |
| return false; | |
| } | |
| Time startTime = Time.earliestOf(LEO.arrival(), Time.FIVE_THIRTY); | |
| import Data.Matrix | |
| import Data.List --(sortBy, intercalate, minimumBy, maximumBy, filter, nubBy) | |
| import qualified Data.Vector as Vector -- hiding (Vector(++)) | |
| import System.Environment (getArgs) | |
| import Data.Bits (xor, rotate, shift, complement) | |
| data Cell = Empty | Wall deriving (Eq) | |
| instance Show Cell where | |
| show c = case c of | |
| Empty -> " " | |
| Wall -> "#" |
| flr = 0 | |
| cc = 1 | |
| basement_char = nil | |
| File.open('parens.txt', 'r') do |file| | |
| file.each_line do |line| | |
| line.chars.each do |c| | |
| if c == '(' | |
| flr += 1 | |
| elsif c == ')' |
| class Abstr { | |
| constructor(f, o) { | |
| this.f = f; | |
| for (var key in o) { | |
| this[key] = o[key]; | |
| } | |
| } | |
| run () { | |
| this.f(this); | |
| } |
| #!/usr/bin/env ruby | |
| # be sure to run `gem install octokit` | |
| require 'octokit' | |
| # `io/console` does not need to be installed, just required | |
| require 'io/console' | |
| def get_input(message, hide_entry = false) | |
| print message + '? ' | |
| if hide_entry |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| extern char * GoStrEq(char * cs1, char * st2); | |
| int main(int argc, char ** argv) { | |
| char * s1; | |
| char * s2; | |
| if (argc == 3) { |
| -- Based off of the Peter Norvig Python implementation: | |
| -- http://norvig.com/spell-correct.html | |
| module Spell where | |
| import qualified Data.Map.Strict as Map | |
| import qualified Data.List as List | |
| import qualified Data.Set as Set | |
| wordProbability :: Fractional v => Map.Map String v -> String -> v | |
| wordProbability allWords myWord = |
Link to this page: https://goo.gl/p5sZJz
Aloha CUNY Hackathon 2017!!! This has been updated for the November 2017 CUNY Hackathon.
tl;dr
In this Gist, I'll show you how to get a simple HTTP/JSON server working with the Go programming language.
Link to this guide: goo.gl/cDvRKj.
Thanks to Evan for critiquing this guide!
Go is an open source programming language made by Google and used by many developers around the world.
| // | |
| // main.cpp | |
| // test!!! | |
| // | |
| // Created by Leo Rudberg on 3/1/13. | |
| // Copyright (c) 2013 Leo Rudberg. All rights reserved. | |
| // | |
| #include <iostream> | |
| #include <string> |