Skip to content

Instantly share code, notes, and snippets.

View ericyue's full-sized avatar

mooncake ericyue

View GitHub Profile
@ericyue
ericyue / tf_serving.sh
Created December 5, 2016 07:44 — forked from jarutis/tf_serving.sh
Install Tensorflow Serving on Centos 7 (CPU)
sudo su
# Java
yum -y install java-1.8.0-openjdk-devel
# Build Esentials (minimal)
yum -y install gcc gcc-c++ kernel-devel make automake autoconf swig git unzip libtool binutils
# Extra Packages for Enterprise Linux (EPEL) (for pip, zeromq3)
yum -y install epel-release
@ericyue
ericyue / sharded_ps_benchmark.py
Created December 12, 2016 03:13 — forked from yaroslavvb/sharded_ps_benchmark.py
Example of local cluster with multiple workers/training loops sharded parameter server
#!/usr/bin/env python
# Benchmark transferring data.
#
# Take a independent workers communicating with b parameter shards
# Each worker tries to add to variables stored on parameter server as fast as
# possible.
#
# macbook
# ps=1: 1.6 GB/s
# ps=2: 2.6 GB/s
@ericyue
ericyue / _feature_hasher.pyx
Created February 15, 2017 06:32 — forked from rafbarr/_feature_hasher.pyx
Very efficient implementation of feature hashing for Python.
# distutils: language=c++
import collections
import operator
from cpython.bytes cimport PyBytes_AS_STRING, PyBytes_GET_SIZE
import cython
import numpy as np
import pandas as pd
from libc.stdint cimport uint8_t, uint32_t
@ericyue
ericyue / tensorboard_logging.py
Created April 12, 2020 03:25 — forked from gyglim/tensorboard_logging.py
Logging to tensorboard without tensorflow operations. Uses manually generated summaries instead of summary ops
"""Simple example on how to log scalars and images to tensorboard without tensor ops.
License: BSD License 2.0
"""
__author__ = "Michael Gygli"
import tensorflow as tf
from StringIO import StringIO
import matplotlib.pyplot as plt
import numpy as np
@ericyue
ericyue / short_term_alpha.ipynb
Created March 29, 2022 01:43 — forked from sebjai/short_term_alpha.ipynb
Market Making in Short-Term Alpha (Chapter 10.4.2 of Algorithmic and High-Frequency Trading by Cartea, Jaimungal, Penalva, published by Cambridge University Press)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.