Skip to content

Instantly share code, notes, and snippets.

View hunglethanh9's full-sized avatar

Hung Le hunglethanh9

  • FPT University
  • Hanoi,Vietnam
View GitHub Profile
@hunglethanh9
hunglethanh9 / System Design.md
Created April 18, 2016 03:54 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Interview 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?
@hunglethanh9
hunglethanh9 / AI-CogSci-Reading-List-RobotsConf-2013
Created August 20, 2018 02:57 — forked from leostratus/AI-CogSci-Reading-List-RobotsConf-2013
This is an AI/Cognitive Science reading list from discussions at RobotsConf 2013. Please add to this list in the comments. Bonus point if all y'all keep 'em in chronological order. I'll update the master list later today! (Saturday December 7th 2013) Format: { Title } { Year_of_Publication } { Amazon_Link } { Short_Description}
How to Create a Mind
2013
http://www.amazon.com/How-Create-Mind-Thought-Revealed/dp/0143124048/
Great pop-cogsci book on Kurzweil's pattern recognition theory of mind. AI concepts such as hierarchal-hidden-markov-models and neural nets are discussed.
---
Consciousness: An Introduction
2003
http://www.amazon.com/Consciousness-Introduction-Susan-Blackmore/dp/019515343X/

Test scopes

  • Unit test - an isolated test around a single 'unit' of code, although that can be anything from a method to a class to a series of (related) classes.
  • Component test - same as a unit test
  • Isolated test - a test that doesn't do any I/O, i.e. the Ports have been filled with in-memory Adapters
  • Integration test - a test that interacts with deployed instances of the code and related services, possiby with some Test Doubles (mocked/faked/stubbed etc).
  • End to End test - a test that entirely interacts with deployed instances using public interfaces
  • Test-per-class - a convention that there should be one unit test for each class

Uses of tests

@hunglethanh9
hunglethanh9 / papers.md
Created October 5, 2018 08:27 — forked from dominictarr/papers.md
Distributed Systems Papers

(dominic: this list of papers was originally recommended to me by Brain Noguchi @bnoguchi, and was a great start to understanding distributed systems)

Here's a selection of papers that I think you would find helpful and interesting:

Time, Clocks, and the Ordering of Events in a Distributed System

The seminal paper about event ordering and concurrency. The important result is that events in a distributed system define a partially ordered set. The connection to what we're working on is fundamental, as this defines how to detect concurrent updates. Moreover, the chosen algorithm to turn the partially ordered set into a totally ordered set defines the conflict resolution algorithm.

http://research.microsoft.com/en-us/um/people/lamport/pubs/time-clocks.pdf

@hunglethanh9
hunglethanh9 / ad-manifesto.md
Created October 20, 2018 15:31 — forked from rxwei/ad-manifesto.md
First-Class Automatic Differentiation in Swift: A Manifesto

First-Class Automatic Differentiation in Swift: A Manifesto

This document is written for both the machine learning community and the Swift programming language design community, with a strong focus on language design.

Table of Contents

@hunglethanh9
hunglethanh9 / FlowNote.md
Created November 2, 2018 07:02 — forked from CodeOtter/FlowNote.md
FlowNote

FlowNote

We're rapidly approaching a world where flow-based programming is taking the lead, but there isn't any useful notation to represent all of the complexities of flow management. Let's assume a basic flow that takes a click event, extracts the X and Y coordinates from it, and moves a player based on the extracted values.

+----------+     +-----------+               +------------+
| getClick +-----> extractXY +---------------> movePlayer |
+----------+     +-----------+   xyChannel   +------+-----+
                                                    |
 |
@hunglethanh9
hunglethanh9 / reinvent-2018-schedule-helper.js
Created November 21, 2018 02:35 — forked from jensenak/reinvent-2018-schedule-helper.js
Quick set of functions to make it easier to see what's available at re:Invent 2018. Intended for use from the browser console on the AWS re:Invent 2018 Event Catalog.
// Use the code below to simplify your re:Invent 2018 schedule search.
// Paste these into your browser console just once. They will remain in scope even after you change filters.
function openSchedules(elems) {
// As long as the list of elements is non-zero in length, expand the last element and call openSchedules with the rest.
if (elems.length) {
var el = elems.pop();
setTimeout(openSchedules, 200, elems); // You could shorten the timeout, but that probably isn't polite.
el.click();
} else {
@hunglethanh9
hunglethanh9 / Cargo.toml
Created January 28, 2019 03:36 — forked from suyash/Cargo.toml
@karpathy's min-char-rnn.py in rust
[package]
name = "min-char-rnn-rs"
version = "0.1.0"
authors = ["Suyash <suyash93@protonmail.com>"]
edition = "2018"
[dependencies]
rulinalg = "0.4.2"
rand = "0.6.4"
indicatif = "0.11.0"
@hunglethanh9
hunglethanh9 / closure-conversion.rkt
Created February 17, 2019 07:00 — forked from rain-1/closure-conversion.rkt
Closure Conversion
#lang racket
;; this is a stand alone simple version of the closure conversion part of the hoist pass from the tarot compiler
;; see https://rain-1.github.io/scheme for more.
(require data/queue)
;; closure conversion for lambda calculus
;;
;; the input language is: