Skip to content

Instantly share code, notes, and snippets.

View ciaranfinn's full-sized avatar
🎯
Focusing

Ciarán Finn ciaranfinn

🎯
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ciaranfinn on github.
  • I am cfinn (https://keybase.io/cfinn) on keybase.
  • I have a public key whose fingerprint is FEE2 DEAB 40D2 704C 6027 A30F C9B6 59F0 844E 0438

To claim this, I am signing this object:

@ciaranfinn
ciaranfinn / example.py
Created October 22, 2017 19:57
Example
for dataset in config['DATASETS']:
print dataset['Name']
filepath = data.get_filepath(dataset['Filename'])
bulk_data = pandas.read_csv(filepath, sep=dataset['Delimiter'])
# we can then use the data as normal
@ciaranfinn
ciaranfinn / runlength.ex
Created June 9, 2017 07:56
Elixir - Run-length (Encode/Decode)
defmodule Runlength do
def encode(""), do: ""
def encode(<<head :: binary-size(1), tail :: binary>>) do
do_encode("", head, tail)
end
defp do_encode(result, acc = <<head :: binary-size(1), _ :: binary>>, "") do
result <> Integer.to_string(String.length(acc)) <> head
end
(* declare module *)
module A
(* declare import *)
open System
(* declare number *)
let num = "73167176531330624919225119674426574742355349194934\
96983520312774506326239578318016984801869478851843\
85861560789112949495459501737958331952853208805511\