- Fly SEA-ANC: 9PM - 11:45 PM (3.5 hours)
- Hotel: Anchorage: Alex Hotel and Suites near the airport
This file contains hidden or 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
void main() { | |
print("Foo.".endsWithPeriod()); | |
print("foo. ".endsWithPeriod()); | |
print(" foo. ".endsWithPeriod()); | |
print("foo. Abc".endsWithPeriod()); | |
print("Abc".endsWithPeriod()); | |
print("".endsWithPeriod()); | |
} | |
extension StringExtension on String { |
This file contains hidden or 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
#!/bin/bash | |
# --------------------------------------------------------- | |
# Customizable Settings | |
# --------------------------------------------------------- | |
# where to store the sparse-image | |
WORKSPACE=${HOME}/.workspace.dmg.sparseimage | |
# location where workspace will be mounted |
This file contains hidden or 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
cat >> ~/.zshrc | |
function chpwd { | |
echo Hodor; | |
if type say > /dev/null; then | |
say Hodor; | |
fi | |
} | |
# then Ctrl + D |
This file contains hidden or 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
$ ruby titleizer.rb | |
Using iterative approach: ["alexander", "the", "great"] | |
Using recursive approach: ["alexander", "the", "great"] |
This file contains hidden or 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
defmodule Player do | |
def loop(name, other_player, phrase) do | |
receive do | |
{:serve} -> | |
IO.puts "#{name}: serving" | |
send(other_player, {:play_next, 1}) | |
loop(name, other_player, phrase) | |
{:play_next, rally_count} -> | |
:timer.sleep(700) | |
:random.seed(:os.timestamp()) |
This file contains hidden or 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 "java" | |
require "./lib/weka.jar" | |
def read_data(filename) | |
Java::WekaCoreConverters::ConverterUtils::DataSource.new(filename).get_data_set | |
end | |
def normalize(data) | |
puts data.first.to_double_array.inspect | |
normalizer = Java::WekaFiltersUnsupervisedAttribute::Normalize.new |
This file contains hidden or 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
;; Now I know what dense means :) | |
(defn neighbors | |
([size yx] (neighbors [[-1 0] [1 0] [0 -1] [0 1]] | |
size yx)) | |
([deltas size yx] | |
(filter (fn [new-yx] | |
(every? #(< -1 % size) new-yx)) | |
(map #(vec (map + yx %)) | |
deltas)))) |
NewerOlder