Skip to content

Instantly share code, notes, and snippets.

View dexhunter's full-sized avatar
💭
I may be slow to respond.

Dixing (Dex) Xu dexhunter

💭
I may be slow to respond.
View GitHub Profile
@dexhunter
dexhunter / gist-reveal.it-slides.html
Created November 12, 2018 14:55 — forked from ryanj/gist-reveal.it-slides.html
Gist-powered Revealjs slideshow presentations http://gist-reveal.it
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'>
<h2>Gist-Powered</h2>
<h1>Reveal.js</h1>
<h2>Slideshow Presentations</h2>
<br/>
<h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1>
</section>
<section data-background-transition='zoom' data-transition='linear' id='try-it'>
<h2>Try it out!</h2>
<p>Create your own deck by forking a copy of <a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>this github gist</a>: <br /><a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>https://gist.github.com/ryanj/af84d40e58c5c2a908dd</a></p>
@dexhunter
dexhunter / introrx.md
Created June 17, 2018 08:09 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@dexhunter
dexhunter / git_revert.md
Created March 16, 2018 06:48 — forked from todgru/git_revert.md
how to use git revert --strategy resolve

Oh yes, this is nice:

git revert --strategy resolve <sha-ish>

Given a git log of A--B--C--D--E you can remove commit C using:

git revert --strategy resolve <sha-of-C> 

Which will produce:

@dexhunter
dexhunter / px-rem-cheat-sheet.css
Created February 15, 2018 20:54 — forked from glueckpress/px-rem-cheat-sheet.css
Cheat sheet for rem-calculations based upon 14px and 16px.
/*! = $rembase: 14px
--------------------------------------------------------------
* hmtl { font-size: 87.5%; }
* body { font-size: 14px; font-size: 1rem; line-height: 1; }
* 4px 0.28571429rem
* 8px 0.571428571rem
* 12px 0.857142857rem
* 13px 0.928571429rem
* 14px 1rem
* 16px 1.142857143rem
@dexhunter
dexhunter / optimal_strategy.py
Created January 30, 2018 07:41 — forked from lukovkin/optimal_strategy.py
Compute optimal trading strategy for the algorithm described in http://arxiv.org/abs/1508.00317
import numpy as np
import pandas as pd
def compute_market_prices(prices):
"""Compute market prices according to the trading competition recipe.
Parameters
----------
prices : DataFrame
@dexhunter
dexhunter / breachcompilation.txt
Created December 31, 2017 08:05
1.4 billion password breach compilation wordlist
wordlist created from original 41G stash via:
grep -rohP '(?<=:).*$' | uniq > breachcompilation.txt
Then, compressed with:
7z a breachcompilation.txt.7z breachcompilation.txt
Size:
@dexhunter
dexhunter / Top 50 Universities List.md
Created December 23, 2017 05:37 — forked from Tims101/Top 50 Universities List.md
Top 50 Computer Science Universities

Universities

Massachusetts Institute of Technology (MIT)

###phd###

  • MIT Graduate Admissions link
  • PhD Program - MIT Sloan School of Management link
  • MIT - Massachusetts Institute of Technology link
  • to view contact information for all departments. - MIT link
@dexhunter
dexhunter / png2jpg.py
Created August 8, 2017 08:56 — forked from qingswu/png2jpg.py
Convert all png images in current folder to jpg using OpenCV cv2
#!/usr/bin/env python
from glob import glob
import cv2
pngs = glob('./*.png')
for j in pngs:
img = cv2.imread(j)
cv2.imwrite(j[:-3] + 'jpg', img)
@dexhunter
dexhunter / readme.md
Created July 7, 2017 11:20 — forked from baraldilorenzo/readme.md
VGG-16 pre-trained model for Keras

##VGG16 model for Keras

This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.

It has been obtained by directly converting the Caffe model provived by the authors.

Details about the network architecture can be found in the following arXiv paper:

Very Deep Convolutional Networks for Large-Scale Image Recognition

K. Simonyan, A. Zisserman

@dexhunter
dexhunter / pg-pong.py
Created July 3, 2017 00:55 — forked from karpathy/pg-pong.py
Training a Neural Network ATARI Pong agent with Policy Gradients from raw pixels
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """
import numpy as np
import cPickle as pickle
import gym
# hyperparameters
H = 200 # number of hidden layer neurons
batch_size = 10 # every how many episodes to do a param update?
learning_rate = 1e-4
gamma = 0.99 # discount factor for reward