Skip to content

Instantly share code, notes, and snippets.

View izgzhen's full-sized avatar
🎆
rebuild

Zhen Zhang izgzhen

🎆
rebuild
View GitHub Profile
#pragma once
#include <algorithm>
#include <set>
#include <functional>
#include <vector>
#include <unordered_set>
#include <string>
#include <unordered_map>
#include <string>
impl = Spec('TPCH_Store', [('Char', TNative('char')), ('Date', TNative('uint64_t')), ('LINEITEM', TRecord((('orderkey', TInt()), ('partkey', TInt()), ('suppkey', TInt()), ('linenumber', TInt()), ('quantity', TFloat()), ('extendedprice', TFloat()), ('discount', TFloat()), ('tax', TFloat()), ('returnflag', TNative('char')), ('linestatus', TNative('char')), ('shipdate', TNative('uint64_t')), ('commitdate', TNative('uint64_t')), ('receiptdate', TNative('uint64_t')), ('shipinstruct', TString()), ('shipmode', TString()), ('comment', TString())))), ('ORDERS', TRecord((('orderkey', TInt()), ('custkey', TInt()), ('orderstatus', TNative('char')), ('totalprice', TFloat()), ('orderdate', TNative('uint64_t')), ('orderpriority', TString()), ('clerk', TString()), ('shippriority', TInt()), ('comment', TString())))), ('PART', TRecord((('partkey', TInt()), ('name', TString()), ('mfgr', TString()), ('brand', TString()), ('part_type', TString()), ('size', TInt()), ('container', TString()), ('retailprice', TFloat()), ('comment',
@izgzhen
izgzhen / FLUX.md
Last active November 29, 2018 03:50

FLUX: Finding - Learning - Understanding - eXecuting

  1. Finding: Locating a topic of value & fun
  2. Learning: Get necessary basic skills & knowledge from mimicking & practising
  3. Understanding: Ask questions, discuss with others, write stuff, gain a deeper understanding of the entire field
  4. eXecuting: Invent something, measure it, create impact
\tikzstyle{boxedassert_border} = [sharp corners,line width=0.2pt]
\NewDocumentCommand \boxedassert {O{} m o}{%
\tikz[baseline=(m.base)]{
% \node[rectangle, draw,inner sep=0.8pt,anchor=base,#1] (m) {${#2}\mathstrut$};
\node[rectangle,inner sep=0.8pt,outer sep=0.2pt,anchor=base] (m) {${\,#2\,}\mathstrut$};
\draw[#1,boxedassert_border] ($(m.south west) + (0,0.65pt)$) rectangle ($(m.north east) + (0, 0.7pt)$);
}\IfNoValueF{#3}{^{\,#3}}%
}
import onnx
model = onnx.load("rnn.onnx")
onnx.checker.check_model(model)
print(onnx.helper.printable_graph(model.graph))
import tvm
import nnvm
sys, params = nnvm.frontend.from_onnx(model)
# -*- coding: utf-8 -*-
"""
Generating Names with a Character-Level RNN
*******************************************
**Author**: `Sean Robertson <https://github.com/spro/practical-pytorch>`_
In the :doc:`last tutorial </intermediate/char_rnn_classification_tutorial>`
we used a RNN to classify names into their language of origin. This time
we'll turn around and generate names from languages.
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.concurrent.ThreadLocalRandom;
class Main {
public static void main(String[] args) {
MaxBag b = new MaxBag();
HashSet<Integer> s = new HashSet<Integer>();
Integer N = 10000;
@izgzhen
izgzhen / fresh.md
Last active May 9, 2018 01:43
customize a fresh ubuntu installation
  • setup apt source and update, upgrade
  • setting > appearance > auto-hide launcher and enable workspaces
  • keyboard layout: gnome-tweak-tool > Typing > Caps Lock key behavior > Make Caps Lock an additionnal Ctrl key
  • keyboard > shortcuts
    • windows
      • close: cmd q
      • minimize: cmd w
      • maximim toggle: cmd super f
    • launchers
  • HUB: alt u
@izgzhen
izgzhen / fresh.md
Created May 9, 2018 01:29
customize a fresh ubuntu installation
  • setup apt source and update, upgrade
  • setting > appearance > auto-hide launcher and enable workspaces
  • keyboard layout: gnome-tweak-tool > Typing > Caps Lock key behavior > Make Caps Lock an additionnal Ctrl key