Skip to content

Instantly share code, notes, and snippets.

View marctrem's full-sized avatar
Verified Account

Marc-André Tremblay marctrem

Verified Account
  • Jump Trading LLC
View GitHub Profile
@marctrem
marctrem / as.py
Last active August 29, 2015 14:06
AS challenge from IEEE2013
#!/usr/bin/python3
import collections
def find_new_paths(graph, destination, current_paths, closed_paths):
new_paths = []
for path in current_paths:
last_element = path[-1]
for next_element in graph[last_element]:
new_path = list(path)
new_path.append(next_element)
#!/usr/bin/python3
'''
The MIT License (MIT)
Copyright (c) 2015 Marc-André Tremblay
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@marctrem
marctrem / dec-repr-senior.clj
Created August 12, 2016 13:58
Some easy test from Codility
(defn solution [num]
(let [num (str num)
freq (frequencies num)
biggest (->> (map #(repeat (get freq (char (+ 48 %)) 0) %) (range 9 -1 -1))
flatten
(clojure.string/join "")
read-string)]
(if (> biggest 100000000) -1 biggest)))
@marctrem
marctrem / keybase.md
Last active December 20, 2016 07:19
keybase.md

Keybase proof

I hereby claim:

  • I am marctrem on github.
  • I am marctrem (https://keybase.io/marctrem) on keybase.
  • I have a public key whose fingerprint is 37B8 7FED C17E 1618 E791 0A3B A4F4 2127 2352 1613

To claim this, I am signing this object:

@marctrem
marctrem / Student_001.json
Last active April 30, 2018 05:34
Using Avro in FoundationDB
{
"type": "record",
"namespace": "gov.ed.schoolofrock",
"name": "Student",
"doc": "Represents a student",
"fields": [
{
"name": "name",
"type": "string"
},
@marctrem
marctrem / phantom_builder.ml
Created May 1, 2019 03:22
Phantom Bulider
#!/usr/bin/env ocaml
#use "topfind"
#thread
#require "core"
open Core
type name_unset
type name_set
#!/usr/bin/env ocaml
#use "topfind"
#thread
#require "core"
open Core
type name_unset
type name_set
@marctrem
marctrem / phantom_builder.ml
Created May 1, 2019 03:30
Phantom Builder
#!/usr/bin/env ocaml
#use "topfind"
#thread
#require "core"
open Core
type name_unset
type name_set
#!/usr/bin/env ocaml
#use "topfind"
#thread
#require "core"
open Core
type name_unset
type name_set