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
{ | |
"nodes": [ | |
{ | |
"id": "Markus_Stenz" | |
}, | |
{ | |
"id": "Erik_Bergman" | |
}, | |
{ | |
"id": "William_Blezard" |
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
findColumn : Location -> Board -> [Location] | |
findColumn (x,y) board = (findAbove (x,y) board) ++ (findBelow (x,y) board) | |
findAbove : Location -> Board -> [Location] | |
findAbove (x,y) board = | |
if Dict.member (x,y+1) board | |
then [(x,y)] ++ findAbove (x,y+1) board | |
else [(x,y)] |
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 List | |
import Random | |
without : Int -> [a] -> [a] | |
without i arr = | |
let before = take i arr | |
after = drop (i+1) arr | |
in | |
before ++ after |
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
extern crate serialize; | |
extern crate http; | |
extern crate url; | |
use std::string::String; | |
use serialize::json; | |
use serialize::json::Json; | |
use serialize::json::ToJson; | |
use http::client::RequestWriter; | |
use http::headers::content_type::MediaType; |
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
General effects: | |
- jump | |
- fall off screen | |
- get key and move to next level | |
- overlay world (maybe different for each world type?) | |
Zombie world: | |
- zombie growl | |
- player killed by barbed wire | |
- player killed by zombie |
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
Thanks for coming to RailsBridge!! | |
If you have any questions at any time, feel free to email us at | |
alex [dot] nisnevich [at] gmail [dot] com | |
markmillan [at] gmail.com | |
lindseysugino [at] gmail.om | |
Resources | |
========= |
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
if (map.getPlayer().getX()>10) me.move('right'); | |
if (map.getPlayer().getX()<10) me.move('left'); | |
if (map.getPlayer().getY()>10) me.move('down'); | |
if (map.getPlayer().getY()<10) me.move('up'); |
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
[num_features, num_states] = size(backup_states_phi); % [22, 92] | |
num_actions = size(R{1}{1}); % 40 | |
num_blocks = block_idx; % 7 | |
mu0 = ones(num_states, 1) / num_states; | |
% cvx_solver sedumi | |
cvx_begin | |
variable theta(num_features) | |
variable V(num_states, num_blocks) | |
minimize sum(dot(mu0, (transpose(theta) * backup_states_phi))) + C * norm(theta) |
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
limit = 1000 | |
nums = (1..limit).to_a | |
([1] + nums).each do |a| | |
lucky_num = nums[a] | |
unlucky_nums = nums.values_at(* nums.each_index.select {|i| (i+1) % lucky_num == 0}) | |
if unlucky_nums.size == 0 | |
break | |
else |
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
require 'mechanize' | |
agent = Mechanize.new | |
language_regex = Regexp.new(/]\r\n\t\t\t\t\t\t([0-9,]*)(\.| )/) | |
index_page = agent.get('http://www.ethnologue.com/country_index.asp?place=all') | |
index_page.links_with(:href => /show_country.asp/).each do |country_link| | |
country = country_link.text().strip() | |
speakers = [] |
NewerOlder