Skip to content

Instantly share code, notes, and snippets.

Chris Zheng zcaudate

Block or report user

Report or block zcaudate

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zcaudate
zcaudate / worksheet.cljw
Created Apr 17, 2019
ames housing regression analysis
View worksheet.cljw
This file has been truncated, but you can view the full file.
;; gorilla-repl.fileformat = 1
;; **
;;; # Regression applied to the Ames dataset
;;;
;;; This is an attempt to use every trick in the books to unleash the full power of Linear Regression, including a lot of preprocessing and a look at several Regularization algorithms.
;;;
@zcaudate
zcaudate / fx.clj
Last active Apr 10, 2019
cljplot with javafx
View fx.clj
(ns cljplot.sketches.fx
(:require [cljplot.render :as r]
[cljplot.build :as b]
[cljplot.common :refer :all]
[fastmath.interpolation :as in]
[fastmath.stats :as stats]
[clojure2d.color :as c]
[cljplot.scale :as s]
[fastmath.core :as m]
[fastmath.random :as rnd]
@zcaudate
zcaudate / DYLD_LIBRARY_PATH
Created Aug 20, 2018 — forked from Brideau/DYLD_LIBRARY_PATH
Install GDAL with Java bindings on macOS High Sierra
View DYLD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/usr/local/opt/gdal2/lib:$DYLD_LIBRARY_PATH
@zcaudate
zcaudate / SketchSystems.spec
Last active Jun 13, 2018
My Awesome Sketch
View SketchSystems.spec
My Awesome Sketch
First State
some event -> Second State
Second State
click -> First State
@zcaudate
zcaudate / create.sh
Last active May 22, 2018
create mint iso
View create.sh
#! /usr/bin/env bash
# Insert a USB key.
# if needed initialize it with MS/DOS FAT and MBR
# Download the Mint ISO image
# Convert the ISO -> IMG
hdiutil convert -format UDRW -o linuxmint-18.3-cinnamon-64bit linuxmint-18.3-cinnamon-64bit.iso
# Run a diskutil list to know the device for the USB key, e.g.: /dev/disk3
View keybase.md

Keybase proof

I hereby claim:

  • I am zcaudate on github.
  • I am zcaudate (https://keybase.io/zcaudate) on keybase.
  • I have a public key ASCGkiFF1W_OVVZqtwQZXTIGgu8XZivaCKUZ3rL3jBrRXAo

To claim this, I am signing this object:

View speed_test.clj
(defrecord Simple [value])
(deftype Basic [value])
(with-out-str
(time
(dotimes [i 100000000]
(set! (Basic. i) :value (* 2 i)))))
@zcaudate
zcaudate / count.clj
Created Aug 6, 2015
generative testing
View count.clj
(defn count-elements [coll1 coll2]
(+ (count coll1) (count coll2) 1))
(defn count-elements-tester [f]
(let [n (rand-int 6)
m (rand-int 6)
output (+ n m)
inputs [(range n) (range m)]
actual (apply f inputs)]
(if (= actual output)
@zcaudate
zcaudate / stats.py
Created Feb 14, 2015
usage statistics for clojars
View stats.py
(import [bs4 [BeautifulSoup]]
[operator [itemgetter]]
requests)
(defn project-links [username]
(let [[url (+ "https://clojars.org/users/" username)]
[res (requests.get url)]
[soup (BeautifulSoup res.text)]
[links (-> (soup.find "h1")
(.find-next "h1")
View hara.concurrent.workflow
(ns hara.concurrent.workflow
(:require [hara.common.checks :refer [hash-map? promise?]]
[hara.common.primitives :refer [uuid]]
[hara.data.nested :refer [merge-nil-nested]]
[clojure.set :as set]))
(defn create-registry []
(atom {:tickets {}
:tasks {}
:active #{}
You can’t perform that action at this time.