Skip to content

Instantly share code, notes, and snippets.

(ns tiingo-client
"Fns to request data from the tiingo API."
(:require [java-time :as jt]
[org.httpkit.client :as http]
[cemerick.url :as url]
[clojure.data.json :as json]
[manifold.deferred :as d]))
(def ^:private base-url "https://api.tiingo.com/tiingo/")
@sundbp
sundbp / leaderboard
Last active November 15, 2017 22:22
;;; leaderboard
(defn parse-goal-csv
[filename]
(->> (drop 1 (csv/read-csv (slurp filename)))
(map (fn [r]
{:season (nth r 0)
:league_id (to-int (nth r 1))
:date (nth r 2)
:match_id (to-int (nth r 3))
root@scw-par1-swarm2:~# docker network inspect services
[
{
"Name": "services",
"Id": "y0cyimsfsg6ueea1rxh6h66x7",
"Created": "2017-08-09T14:38:36.177281823Z",
"Scope": "swarm",
"Driver": "overlay",
"EnableIPv6": false,
"IPAM": {
version: '3'
services:
master:
image: sundbp/jenkins:2.73
ports:
- 8080:8080
- 50000:50000
volumes:
- jenkins_home_vol:/var/jenkins_home
networks:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: jenkins-master
annotations:
kubernetes.io/ingress.global-static-ip-name: "jenkins"
kubernetes.io/tls-acme: "true"
kubernetes.io/ingress.class: "gce"
spec:
tls:

Keybase proof

I hereby claim:

  • I am sundbp on github.
  • I am sundbp (https://keybase.io/sundbp) on keybase.
  • I have a public key whose fingerprint is C26E 8A51 EE6A 13EF FB87 A401 CAD2 E4F5 8541 3B60

To claim this, I am signing this object:

@sundbp
sundbp / 0_reuse_code.js
Created January 12, 2014 13:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
Only in current.lloyd/: check-autorsync.test
diff -r -x .git -w current.lloyd/public_html/admin/addfolder.php current.sundbp/public_html/admin/addfolder.php
16c16,18
< $mysqli->query("INSERT INTO library_folders (id,client,name,parent,added) VALUES (NULL,$clientid,'$name',0,NOW())");
---
> $mysqli->query("INSERT INTO library_folders (
> listing, id,client,name,parent,added) VALUES (
> 0,NULL, $clientid,'$name',0,NOW())");
diff -r -x .git -w current.lloyd/public_html/admin/dnload.php current.sundbp/public_html/admin/dnload.php
3c3
Only in current.lloyd/: check-autorsync.test
diff -r -x .git current.lloyd/public_html/admin/delete.php current.sundbp/public_html/admin/delete.php
6c6
< if (empty($_GET["id"]) || empty($_GET["t"])) {
---
> if(empty($_GET["id"]) || empty($_GET["t"])) {
11c11
< if ($_GET["t"]=="template") {
---
> if($_GET["t"]=="template") {
2012-12-03 18:12:21,359 DEBUG [operate-54] p.executors default-executor script [{:language :bash} "echo \"create-guest-vm\ntest...\"\n{ echo bi1.boardiq.co.uk; } || { echo \"create-guest-vm\ntest\" failed; exit 1; } >&2 \necho \"...done\"\n"]
2012-12-03 18:12:21,359 DEBUG [operate-54] p.s.execute ssh-script-on-target
2012-12-03 18:12:21,359 DEBUG [operate-54] p.s.transport SSH user pallet-admin /home/sundbp/dev/boardiq-pallet/resources/ssh-keys/bi-id_rsa
2012-12-03 18:12:21,359 DEBUG [operate-54] p.s.transport SSH connecting {:server "5.9.139.85", :port 22}
2012-12-03 18:12:21,423 DEBUG [operate-54] p.t.ssh Create ssh transport state: {:server "5.9.139.85", :port 22}
2012-12-03 18:12:21,424 DEBUG [operate-54] p.s.execute ssh-mktemp {:ssh-session #<Session com.jcraft.jsch.Session@31e4b362>, :sftp-channel #<ChannelSftp com.jcraft.jsch.ChannelSftp@1dbd0085>, :endpoint {:server "5.9.139.85", :port 22}, :authentication {:user #pallet.core.user.User{:username "pallet-admin", :public-key-path "/home/sundbp/dev/board