I hereby claim:
- I am sidonath on github.
- I am sidonath (https://keybase.io/sidonath) on keybase.
- I have a public key whose fingerprint is 4717 804E 7261 B3B0 670F 2C60 7D14 BE56 5E2F 6DCA
To claim this, I am signing this object:
| // is the other bird within a certain distance | |
| def within(dist: Float) = { other: Boid => | |
| val d = loc distance other.loc | |
| d > 0 && d < dist | |
| } | |
| // Sum, and divide by size | |
| def avg(l: List[Vector]) = (l :\ new Vector)(_ + _) / (l.size max 1) | |
| // Separation |
I hereby claim:
To claim this, I am signing this object:
Put JSON files with Slack logs into the data directory and save the Ruby script outside that directory.
Open Terminal and cd into the directory with the Ruby script. Now type:
ruby parse_logs.rb
You should get output directory with reports in CSV.
| #!/usr/bin/env ruby | |
| require 'benchmark' | |
| def add_methods_to_a_module(m) | |
| 1_000.times.map do |i| | |
| method_name = "method_#{i}" | |
| m.__send__(:define_method, method_name) {} | |
| method_name | |
| end |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <testsuite name="rspec" tests="9" failures="6" errors="0" time="0.001972" timestamp="2017-06-13T18:46:48+09:00"> | |
| <properties> | |
| <property name="seed" value="12345"/> | |
| </properties> | |
| <testcase classname="spec.example_spec" name="some example specs should be pending" file="./spec/example_spec.rb" time="0.000106"><skipped/></testcase> | |
| <testcase classname="spec.example_spec" name="some example specs escapes <html tags='correctly' and="such &amp; such">" file="./spec/example_spec.rb" time="0.000458"><failure message=" | |
| expected: "<p>This is <strong>very</strong> important</p>" | |
| got: "<p>This is important</p>" |
| #!/bin/bash | |
| set -e | |
| INSTALLED_CHROME_VERSION=$(apt-cache policy google-chrome-stable | grep Installed | egrep -o '[[:digit:]]+' | head -n1) | |
| CHROMEDRIVER_VERSION=$(curl https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$INSTALLED_CHROME_VERSION) | |
| # Download ChromeDriver into Semaphore's cached directory if it doesn't exist already | |
| if ! [ -e $SEMAPHORE_CACHE_DIR/chromedriver-$CHROMEDRIVER_VERSION ]; then | |
| mkdir -p $SEMAPHORE_CACHE_DIR/chromedriver-$CHROMEDRIVER_VERSION |