Skip to content

Instantly share code, notes, and snippets.

View vincentchu's full-sized avatar

Vincent Chu vincentchu

View GitHub Profile
This file has been truncated, but you can view the full file.
@font-face{font-family:dripicons-v2;src:url(7e12564e72400735ae5b671780f6a9f7.eot);src:url(7e12564e72400735ae5b671780f6a9f7.eot?#iefix) format("embedded-opentype"),url(data:font/woff;base64,d09GRk9UVE8AAGWUAAsAAAAAj0wAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAABCAAAYLsAAIgRViNA1EZGVE0AAGHEAAAAGgAAABxyZuHoR0RFRgAAYeAAAAAeAAAAIAD2AARPUy8yAABiAAAAAE4AAABgUd9OYWNtYXAAAGJQAAABKgAAAg5mBWjTaGVhZAAAY3wAAAAtAAAANgdJgBVoaGVhAABjrAAAACAAAAAkBDMCAWhtdHgAAGPMAAAA0wAAAZYQiwvtbWF4cAAAZKAAAAAGAAAABgDJUABuYW1lAABkqAAAANwAAAGz82D8xHBvc3QAAGWEAAAAEAAAACAAAwABeJyUvAeAVEW2PzzdM7e7GHGMF91d7cYAKoooigFxVVgxgAFEEVBg8gwT6enJ0zl33Y73dpwcGKIwBAEliIBZ16yLad19ZncNu67V76vZff9T9/bMgLvv+38fzXTXvbfCqapT5/zOqVNXlZOXl6NSqU4vMVTWVxbX1TbMbJqdo1LnqHIWZT5VZ/6Umzk/T5iswpNz8eQ8XX7Orx46+38wHk9M1vr9mVgmxl2Yk4MWngHfOTlnwvek989i6V/Dl+Pxs3NeYBVqcs7O0edckXN9ztycO3IW5TycszanLsecE8zpzBnM2ZKzO+epnGM5b+R8lPNlzj9y/jvnnyqNKl91tuo3Kp3qMtUc1QLVMtXjqhKVQdWssqi8qqAqqoqrelWbVHtUR1Svqd5Xfar6XPWd6u9qlfp09VnqX6kvUc9SX6e+UT1Pfad6sXqlulxtVJvUNrVPnVRvUO9UH1EfU7+kfl39vvpT9efqr9X
pragma solidity ^0.4.19;
import './ERC721.sol';
contract CryptoMarchMadness is ERC721, ERC721Metadata, ERC721Enumerable {
uint256 private constant MASK = 0x3f;
uint256 public basePoolFeeInWei; // Fee required to purchase a bracket
uint256 public collectorFeeInWei; // Flat fee reserved for the pool operator
#!/usr/bin/python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import tensorflow as tf
import numpy as np
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/**
* Anchors
*
* SSD Anchor boxes for SSD/Mobilenet architectures
* num_layers = 6
* min_scale = 0.2
* max_scale = 0.95
* aspect_ratios = [1.0, 2.0, 0.5, 3.0, 0.3333]
*
* See: https://github.com/tensorflow/models/blob/master/research/object_detection/anchor_generators/multiple_grid_anchor_generator.py#L248

Keybase proof

I hereby claim:

  • I am vincentchu on github.
  • I am vincentchu (https://keybase.io/vincentchu) on keybase.
  • I have a public key whose fingerprint is 65A8 1914 DA36 AD76 3064 FFCC FF65 8271 A604 2569

To claim this, I am signing this object:

@vincentchu
vincentchu / PasswordHashRecovery.sol
Last active September 20, 2017 06:05
Solidity smart contract for cracking passwords
pragma solidity ^0.4.15;
import { SHA1 } from './SHA1.sol';
contract PasswordHashRecovery is SHA1 {
event PasswordCracked(address crackedBy, uint256 bounty, string password, bytes hash);
event AttemptFailed(address source, string password, bytes hash);
address public owner;
uint256 public bounty;
export DATASET_DIR=/tmp/data/flowers
export TRAIN_DIR=/tmp/data/tfrun
export CHECKPOINT_PATH=/tmp/data/checkpoints
mkdir -p $DATASET_DIR $TRAIN_DIR $CHECKPOINT_PATH
CWD=`pwd`
cd $CHECKPOINT_PATH && wget http://download.tensorflow.org/models/inception_v4_2016_09_09.tar.gz && tar -xvzf inception_v4_2016_09_09.tar.gz
cd $CWD
@vincentchu
vincentchu / build_tf.sh
Last active January 3, 2018 22:40
Building Tensorflow + CUDA + cuDNN
# Build Tensorflow + CUDA on ubuntu 16.04
#
# Modified from:
# - http://expressionflow.com/2016/10/09/installing-tensorflow-on-an-aws-ec2-p2-gpu-instance/
# - https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/docker/Dockerfile.devel-gpu
# - https://github.com/NVIDIA/nvidia-docker/blob/master/ubuntu-16.04/cuda/8.0/devel/cudnn5/Dockerfile
# - https://github.com/NVIDIA/nvidia-docker/blob/master/ubuntu-16.04/cuda/8.0/devel/Dockerfile
# - https://github.com/NVIDIA/nvidia-docker/blob/master/ubuntu-16.04/cuda/8.0/runtime/Dockerfile
# Install base packages
@vincentchu
vincentchu / gist:ba38ad44027fc98afaf0f03ea2fb55c2
Created January 20, 2017 01:53
Tensorflow w/ and w/o GPU
# With GPU
Batch: 0 - elapsed: 0.37758 sec
Batch: 100 - elapsed: 0.01429 sec
Batch: 200 - elapsed: 0.01433 sec
Batch: 300 - elapsed: 0.01449 sec
Batch: 400 - elapsed: 0.01442 sec
Batch: 500 - elapsed: 0.01444 sec
Batch: 600 - elapsed: 0.01459 sec
Batch: 700 - elapsed: 0.01465 sec
Batch: 800 - elapsed: 0.01462 sec