Skip to content

Instantly share code, notes, and snippets.

View chitacan's full-sized avatar

Kyungyeol Kim (Bret) chitacan

View GitHub Profile
args attempted_at completed_at duration duration_sec
{"asset_id": 628093331} 2023-11-07 13:25:16.986917 2023-11-07 13:25:17.334414 00:00:00.347497 0.347497
{"asset_id": 1704241275} 2023-11-07 13:25:12.952172 2023-11-07 13:25:13.259646 00:00:00.307474 0.307474
{"asset_id": 1354622531} 2023-11-07 13:23:56.980875 2023-11-07 13:23:57.338218 00:00:00.357343 0.357343
{"asset_id": 246514739} 2023-11-07 13:23:53.61517 2023-11-07 13:23:53.850518 00:00:00.235348 0.235348
{"asset_id": 1978384923} 2023-11-07 13:22:11.900316 2023-11-07 13:22:12.20396 00:00:00.303644 0.303644
{"asset_id": 522975456} 2023-11-07 13:22:09.927093 2023-11-07 13:22:10.99483 00:00:01.067737 1.067737
{"asset_id": 1199683275} 2023-11-07 10:25:40.979261 2023-11-07 10:25:41.20701 00:00:00.227749 0.227749
{"asset_id": 1027638506} 2023-11-07 10:12:09.975943 2023-11-07 10:12:10.188947 00:00:00.213004 0.213004
{"asset_id": 2089665216} 2023-11-07 10:11:06.279926 2023-11-07 10:11:06.628889 00:00:00.348963 0.348963
defmodule Context do
@moduledoc false
defmacro __using__(opts) do
repo = Keyword.fetch!(opts, :repo)
quote do
import Context, only: [context: 1, context: 2]
Module.put_attribute(__MODULE__, :__repo__, unquote(repo))
@chitacan
chitacan / K8s-DigitalOcean-CoreOS.md
Created March 7, 2018 12:14 — forked from kevashcraft/K8s-DigitalOcean-CoreOS.md
How to Setup Kubernetes on DigitalOcean with CoreOS

Kubernetes on DigitalOcean with CoreOS

Let's look at an example of how to launch a Kubernetes cluster from scratch on DigitalOcean, including kubeadm, an Nginx Ingress controller, and Letsencrypt certificates.

Overview

Environment

We'll be creating a four-node cluster (k8s-master, k8s-000...k8s-002), load balancer, and ssl certificates.

Table of Contents

  1. Install Kubernetes
// this behavior subject is basically your "give me the next batch" mechanism.
// in this example, we're going to make 5 async requests back to back before requesting more.
const BATCH_SIZE = 5;
const requests = new BehaviorSubject(BATCH_SIZE); // start by requesting five items
// for every request, pump out a stream of events that represent how many you have left to fulfill
requests.flatMap((count) => Observable.range(0, count).map(n => count - n - 1))
// then concat map that into an observable of what you want to control with backpressure
// you might have some parameterization here you need to handle, this example is simplified
// handle side effects with a `do` block
@chitacan
chitacan / README.md
Created August 25, 2017 05:41 — forked from dahtah/README.md
How to get a significant correlation value by moving just one point around.

Have you ever seen these scatterplots that report a significant correlation between X and Y, but it looks like it's just the one point to the upper-right driving the correlation? Thanks to this interactive tool, you too can do this at home. Click anywhere in the picture, and the red dot will move. The sliding bar displays the resulting correlation coefficient. The grey interval are non-significant values: place the red dot right to get a significant result.

Data are generated from two standard independent gaussian (N=15). Test values are from the asymptotic Fisher transformation test that's on Wikipedia (two-sided, alpha = 5%). Code: R and d3.js.

@chitacan
chitacan / README.md
Created July 29, 2017 07:25 — forked from 1wheel/README.md
heat-histogram
@chitacan
chitacan / .block
Created May 26, 2016 11:45 — forked from tonyhschu/.block
Small Scroll-linked Animation Demo
scrolling: yes
license: MIT
@chitacan
chitacan / .block
Created April 13, 2016 09:57 — forked from drzax/.block
Narrative Charts
license: mit
scrolling: true
height: 300
@chitacan
chitacan / README.md
Created November 18, 2015 08:13 — forked from mbostock/README.md
Catmull–Rom Curves

Cubic Catmull–Rom curves with (b) uniform, (c) chordal and (d) centripetal parameterization. From Yuksel et. al: “Uniform parameterization overshoots and often generates cusps and intersections within short curve segments, while chord-length parameterization exhibits similar behavior for longer curve segments. Centripetal parameterization is the only one that guarantees no intersections within curve segments.”

@chitacan
chitacan / README.md
Created November 7, 2015 06:15 — forked from mbostock/.block
Tree of Life

A re-implementation of Jason Davies’ Phylogenetic Tree of Life, with faded gray lines to connect the leaf nodes of the tree to their corresponding labels inspired by a figure from Nature.

This implementation modifies the depth of interior nodes in a cluster layout to show branch lengths. Toggle the checkbox in the top-left corner to show or hide branch lengths, and mouseover a label to highlight its path to the root.