Skip to content

Instantly share code, notes, and snippets.

View cedrickchee's full-sized avatar
⚒️
⚡ 🦀 🐿️ 🐘 🐳 ⬡ ⚛️ 🚢 🚀 🦄 🍵

Cedric Chee cedrickchee

⚒️
⚡ 🦀 🐿️ 🐘 🐳 ⬡ ⚛️ 🚢 🚀 🦄 🍵
View GitHub Profile
@cedrickchee
cedrickchee / 0_reuse_code.js
Last active August 29, 2015 14:12
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
@cedrickchee
cedrickchee / amsgrad.py
Created April 14, 2018 03:52 — forked from kashif/amsgrad.py
Keras implementation of AMSGrad optimizer from "On the Convergence of Adam and Beyond" paper
class AMSgrad(Optimizer):
"""AMSGrad optimizer.
Default parameters follow those provided in the Adam paper.
# Arguments
lr: float >= 0. Learning rate.
beta_1: float, 0 < beta < 1. Generally close to 1.
beta_2: float, 0 < beta < 1. Generally close to 1.
epsilon: float >= 0. Fuzz factor.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cedrickchee
cedrickchee / nlp_genomics_ideas.md
Last active May 17, 2018 00:13
Some possible NLP applications in genomics

Originally forked from Philipp Bayer's gist. All credits goes to him.

This gist convert the original text to markdown for better readability.

Problems and Ideas:

1. Gene function prediction - given a predicted protein or gene sequence, what is the function?

The classic approach is to use something like BLAST to compare with known sequences, but this has many drawbacks. For starters, in plants the databases lean very heavily towards Arabidopsis thaliana, not more common plants such as maize or wheat.

@cedrickchee
cedrickchee / README-Template.md
Created May 24, 2018 07:10 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@cedrickchee
cedrickchee / README.md
Last active May 30, 2018 09:30 — forked from binga/pascal_pandas.ipynb
A quick way to get the bounding boxes in fastai CSV format ready for bounding box regression using Pandas.

This gist was being mentioned by Jeremy in fast.ai deep learning part 2 2018, lesson 9 video. In this lesson, we are learning multi-class object detection (computer vision) using the pascal-multi.ipynb notebook.

One of the fast.ai's students pointed out that by using Pandas, we can do things much simpler than using Python collections.defaultdict and shared this gist.

>The more you get to know Pandas, the more often you realize it is a good way to solve lots of different problems.

@cedrickchee
cedrickchee / GitCommitEmoji.md
Created October 21, 2020 01:24 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@cedrickchee
cedrickchee / System Design.md
Created May 20, 2021 14:38 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?

etcd Versus Other Key-value Stores

  • What do Etcd, Consul, and Zookeeper do?
    • Service Registration:
      • Host, port number, and sometimes authentication credentials, protocols, versions numbers, and/or environment details.
    • Service Discovery:
      • Ability for client application to query the central registry to learn of service location.
    • Consistent and durable general-purpose K/V store across distributed system.
  • Some solutions support this better than others.
@cedrickchee
cedrickchee / latency.markdown
Created December 3, 2021 16:14 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs