Skip to content

Instantly share code, notes, and snippets.

View coldnew's full-sized avatar
💭
I may be slow to respond.

Yen-Chin,Lee coldnew

💭
I may be slow to respond.
View GitHub Profile
@coldnew
coldnew / certificate.sh
Created October 31, 2016 08:18 — forked from WebReflection/certificate.sh
A basic Self Signed SSL Certificate utility
#!/usr/bin/env bash
# A basic Self Signed SSL Certificate utility
# by Andrea Giammarchi @WebReflection
# https://www.webreflection.co.uk/blog/2015/08/08/bringing-ssl-to-your-private-network
# # to make it executable and use it
# $ chmod +x certificate
# $ ./certificate # to read the how-to
@coldnew
coldnew / install-cockpit.md
Last active October 17, 2016 05:12 — forked from baydam/install-cockpit.md
How to install cockpit on Debian/Ubuntu

How to install cockpit on Debian/Ubuntu

$ git clone https://github.com/cockpit-project/cockpit.git
$ cd cockpit

Install latest nodejs

$ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
$ sudo apt-get install -y nodejs
#include <stdio.h>
int main()
{
int a = 42;
printf("%d\n", a);
return 0;
}
int main()
{
int a = 42;
printf("%d\n", a);
}
@coldnew
coldnew / bl.asm
Last active July 8, 2016 03:01
2016 embedded note: ARM BL example
...
BL calc ; Jump to calc
... ; Execute here after return
...
calc: ; function body
ADD r0, r1, r2 ; do some calculate here
MOV pc, r14 ; PC = R14 to return
@coldnew
coldnew / curveball.markdown
Created May 15, 2016 14:47 — forked from daveliepmann/curveball.markdown
Implementing Sugar & James’ paper, "Finding the number of clusters in a data set: An information theoretic approach" in Clojure — Part 3

Implementing the k-means jump method: Part Three

After implementing Sugar & James jump method and applying it straightforwardly to a few data sets, we're ready to throw it a few curveballs. This will demonstrate both its robustness and some necessary aspects of setting it up for success.

Again we need some functions we built in part one and part two. Feel free to skip this part if you don't need the review and you're not following along with a REPL. If you are following along in the REPL, here's the full Clojure source.

(def iris (i/to-matrix (incd/get-dataset :iris)))
@coldnew
coldnew / testprogram.c
Created May 9, 2016 05:08 — forked from je-so/testprogram.c
Xlib transparent window with OpenGL support
/*
____ _____
/\__ \ /\ ___\
\/__/\ \ \ \ \__/_
\ \ \ \ \____ \
_\_\ \ \/__/_\ \
/\ _____\ /\ _____\
\/______/ \/______/
Copyright (C) 2011 Joerg Seebohn
@coldnew
coldnew / application.markdown
Created May 8, 2016 07:48 — forked from daveliepmann/application.markdown
Implementing Sugar & James’ paper, "Finding the number of clusters in a data set: An information theoretic approach" in Clojure — Part 2

Implementing the k-means jump method: Part Two

After implementing Sugar & James' jump method and exploring its application to Fisher's iris data in Part One of this series, we're now ready to apply the jumps-in-distortions test to some other sample data sets. Pure Clojure source here.

Remember these functions from earlier? We'll be using them again.

(defn assoc-distortions
  "Given a number `transformation-power-y` and a seq of maps
@coldnew
coldnew / irises.md
Created May 5, 2016 13:08 — forked from daveliepmann/irises.md
Implementing Sugar & James’ paper, "Finding the number of clusters in a data set: An information theoretic approach" in Clojure — Part 1

Implementing the k-means jump method: Part One

This paper:

Finding the number of clusters in a data set: An information theoretic approach

CATHERINE A. SUGAR AND GARETH M. JAMES

>Marshall School of Business, University of Southern California

@coldnew
coldnew / kafka.md
Created May 5, 2016 05:56 — forked from ashrithr/kafka.md
kafka introduction

Introduction to Kafka

Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.

Terminology:

  • Producers send messages to brokers
  • Consumers read messages from brokers
  • Messages are sent to a topic