This file contains 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
;; The deps.edn file describes the information needed to build a classpath. | |
;; | |
;; When using the `clojure` or `clj` script, there are several deps.edn files | |
;; that are combined: | |
;; - install-level | |
;; - user level (this file) | |
;; - project level (current directory when invoked) | |
;; | |
;; For all attributes other than :paths, these config files are merged left to right. | |
;; Only the last :paths is kept and others are dropped. |
This file contains 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
#!/usr/bin/env sh | |
export DRIP_CLJ_CACHE_FILE="${HOME}/bin/.clj-class-path-cache" | |
dripclj_cache() { | |
clj -J-Xint -e '(-> "java.class.path" System/getProperty println)' > ${DRIP_CLJ_CACHE_FILE} | |
read -d $'\x04' DRIP_CLJ_CACHE < "${DRIP_CLJ_CACHE_FILE}" | |
} |
This file contains 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
{:user | |
{ | |
:dependencies [; Clojure itself, and official clojure libraries | |
[org.clojure/clojure "1.8.0"] | |
[org.clojure/test.check "0.9.0"] | |
[org.clojure/core.async "0.3.442"] | |
[org.clojure/data.csv "0.1.3"] | |
[org.clojure/data.priority-map "0.0.7"] | |
[org.clojure/tools.namespace "0.2.11"] | |
; Unofficial but de facto Clojure utilities |
This file contains 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
#r "FSharp.Data.dll" | |
open System | |
open System.IO | |
open FSharp.Data | |
type TreasurePathCrumb = | |
| Index of int | |
| Key of string |
This file contains 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
(ns json-treasure.core | |
(:require [clj-json [core :refer [parse-string]]] | |
[clojure.string :as string]) | |
(:gen-class)) | |
(defn build-json-path | |
[json-path-vec] | |
(string/join " -> " json-path-vec)) |
This file contains 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
" Basics | |
set nocompatible | |
filetype plugin indent on | |
syntax on | |
scriptencoding utf-8 | |
set history=1000 | |
set hidden | |
set iskeyword-=. |
This file contains 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
open System | |
open System.IO | |
type CommandLineOptions = { | |
verbose: bool; | |
recrsv: bool; | |
exts: list<string>; | |
} |
This file contains 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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <time.h> | |
struct Counter_ { | |
char* string; |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
struct TokenizerT_ { | |
char* separators; // C string of separation characters | |
char* tokenString; // C string of unprocessed tokens | |
size_t separatorStringLength; // length of separator string | |
size_t tokenStringLength; // length of token string | |
int cursorPosition; // cursor to token string |
This file contains 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
# -*- coding: utf-8 -*- | |
from math import erf,exp,log,pi,sqrt | |
import argparse | |
def phi(x): | |
'Cumulative distribution function for the standard normal distribution' | |
return (1.0 + erf(x / sqrt(2.0))) / 2.0 | |
def d(pos,r, sigma, T, K, S0): | |
x = ((r+0.5*sigma**2)*T - log(K/S0))/(sigma*sqrt(T)) |
NewerOlder