Skip to content

Instantly share code, notes, and snippets.

View zunction's full-sized avatar

Zhangsheng Lai zunction

View GitHub Profile
@zunction
zunction / 0-4-steps-get-docker-with-gpu-on-ubuntu-2004.md
Created November 22, 2022 07:24 — forked from hideojoho/0-4-steps-get-docker-with-gpu-on-ubuntu-2004.md
4 steps to get a docker running with GPU on Ubuntu 20.04

⚠️ The following instruction is written on 25 Jul 2020 (= old).

4 steps to get a docker running with GPU on Ubuntu 20.04

Environment

  • Ubuntu 20.04
  • CUDA 10.2
  • Docker Latest
@zunction
zunction / astronauts.sql
Created May 5, 2021 03:49 — forked from pamelafox/astronauts.sql
NASA astronauts, 1959-Present
/* Source:
https://www.kaggle.com/nasa/astronaut-yearbook
*/
CREATE TABLE astronauts(
Name TEXT PRIMARY KEY,
Year INTEGER,
GroupNum INTEGER,
Status TEXT,
Birth_Date TEXT,
Birth_Place TEXT,
@zunction
zunction / pokemon.sql
Created March 11, 2021 06:30 — forked from pamelafox/pokemon.sql
Pokemon statistics
CREATE TABLE pokemon(
Number INTEGER,
Name TEXT PRIMARY KEY,
Type_1 TEXT,
Type_2 TEXT,
Total INTEGER,
HP INTEGER,
Attack INTEGER,
Defense INTEGER,
Sp_Atk INTEGER,
@zunction
zunction / fast_fin.v
Created May 24, 2019 11:31 — forked from JasonGross/fast_fin.v
Fast boolean equality proofs on finite types
Require Import Coq.Lists.List.
Require Import Coq.Bool.Bool.
Import ListNotations.
Lemma negb_existsb_nth_error {A} (ls : list A) (f : A -> bool) (H : existsb f ls = false) n v (H' : nth_error ls n = Some v)
: f v = false.
Proof.
revert dependent n; induction ls, n; cbn in *; intros; try congruence.
all: repeat first [ progress subst
| rewrite orb_false_iff in *
@zunction
zunction / draw_neural_net.py
Created July 27, 2018 06:05 — forked from craffel/draw_neural_net.py
Draw a neural network diagram with matplotlib!
import matplotlib.pyplot as plt
def draw_neural_net(ax, left, right, bottom, top, layer_sizes):
'''
Draw a neural network cartoon using matplotilb.
:usage:
>>> fig = plt.figure(figsize=(12, 12))
>>> draw_neural_net(fig.gca(), .1, .9, .1, .9, [4, 7, 2])
@zunction
zunction / TDA_resources.md
Created February 23, 2018 17:43 — forked from calstad/TDA_resources.md
List of resources for TDA

Quick List of Resources for Topological Data Analysis with Emphasis on Machine Learning

This is just a quick list of resourses on TDA that I put together for @rickasaurus after he was asking for links to papers, books, etc on Twitter and is by no means an exhaustive list.

Survey Papers

Both Carlsson's and Ghrist's survey papers offer a very good introduction to the subject

Other Papers and Web Resources

@zunction
zunction / compare_adagrad_adadelta.py
Created January 11, 2017 05:50 — forked from xiaohan2012/compare_adagrad_adadelta.py
Comparing adagrad, adadelta in gradient descent in Theano
"""
Comparing adagrad, adadelta and constant learning in gradient descent(the seddle point function y^2 - x^2)
Reference:
1. comparison on several learning rate update scheme: http://ml.memect.com/archive/2014-12-12/short.html#3786866375172817
2. Saddle point, http://en.wikipedia.org/wiki/Saddle_point
"""
import numpy as np
import theano
@zunction
zunction / how-to-use-pelican.md
Created January 19, 2016 05:32 — forked from JosefJezek/how-to-use-pelican.md
How to use Pelican on GitHub Pages