Skip to content

Instantly share code, notes, and snippets.

View geyang's full-sized avatar
🤖
I finish papers.

Ge Yang geyang

🤖
I finish papers.
View GitHub Profile

Test Gitst update revision number

@geyang
geyang / Upgrading HDF5 and h5py to use SWMR with h5 files.md
Last active March 17, 2020 04:34
hdf5 v1.10 upgrade/installation instruction for using single-write-multiple-read (SWMR) in h5py.

The new 1.10 version of hdf5 library is stable. You can now install from the source to use this new capability.

The installation process has a few caveats, so here is how to do it.

Note:

  1. you need to first remove the hdf5 libraries currently installed in ubuntu.
  2. Then you need to reinstall h5py.
  3. when you reinstall h5py via pip, use the --no-binary flag. This is because the h5py wheel comes with its own hdf5 binary.

Instructions:

@geyang
geyang / markdown-it-math.js
Last active February 22, 2017 06:08
a math parsing plugin for markdown-it
/** Created by ge on 2/19/17. */
function scanInlineDelims(state, start, delimLength, allowLineBreaks) {
var pos = start, lastChar, nextChar, count, can_open, can_close,
isLastWhiteSpace, isNextWhiteSpace,
left_flanking = true,
right_flanking = true,
max = state.posMax,
isWhiteSpace = state.md.utils.isWhiteSpace;
lastChar = allowLineBreaks ?
@geyang
geyang / Learning Punctuations by reading Engadget.ipynb
Last active March 30, 2017 20:36
pytorch_playground/engadget_rnn/Learning Punctuations by reading Engadget.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@geyang
geyang / install_sshfs_macosx.md
Created April 22, 2018 18:01
How to install sshfs on Mac SsX

Getting SSHFS to work on Mac OSX HighSierra

Below is the working recipe for High Sierra 10.13.4

sudo chown -R $(whoami):staff /usr/local/Caskroom
brew cask install osxfuse
sudo reboot
brew install sshfs
@geyang
geyang / 1 Teacup
Created July 16, 2018 22:17 — forked from mcnuttandrew/1 Teacup
Project Teacup
In 2014 I made a small rails application called Project-Teacup to demonstrate that I knew what I was doing with rails
(spoiler: I did not) as part of applying for employment. That application attempted to be a twitter for dreams
(https://github.com/mcnuttandrew/Project-Teacup) which was based on an idea I had, naturally, while dreaming.
The project was quite successful in that it got me a job, but also in that it inspired a number of people to record
their dreams.
Project-Teacup has been down for a number of years, yet the data lives on. Heroku, where the project was hosted,
has been going through some ~stuff~ so I figured it would be good to extract the data and expose it publically
for general consumption. The database was seeded with several hundred dreams from a (single) friends dream
journal which was hacked apart by hand, and then inserted into the database under the guise of variety of random
Traceback (most recent call last):
File "/Users/ge/machine_learning/berkeley-playground/learning_to_learn_from_imperfect_demonstrations/super_expert/experiments/run.py", line 148, in _
fn(**kwargs)
File "/Users/ge/machine_learning/berkeley-playground/learning_to_learn_from_imperfect_demonstrations/rl/train_ppo.py", line 138, in run_ppo
fps=30)
File "/usr/local/lib/python3.6/dist-packages/ml_logger/ml_logger.py", line 531, in log_video
imageio.mimsave(ntp.name, frame_stack, format=format, fps=fps, **imageio_kwargs)
File "/usr/local/lib/python3.6/dist-packages/imageio/core/functions.py", line 341, in mimwrite
writer.append_data(im)
File "/usr/local/lib/python3.6/dist-packages/imageio/core/format.py", line 492, in append_data
@geyang
geyang / change Mac OSX computer name for ssh.md
Last active November 2, 2018 03:34
how to change the computer name for ssh-keygen after changing the name in Preferences

Just changing the computer name in Sharing doesn't work. if you do ssh-keygen the older computer name still shows up.

In order to change the name of the computer, you need to do the following:

   sudo scutil --set ComputerName "new-name"
   sudo scutil --set LocalHostName "new-name"
   sudo scutil --set HostName "new-name"
@geyang
geyang / tensorflow_data_loading_README.md
Created December 11, 2018 02:23
tensorflow dataloading scripts

List of Data Loader Patterns for Tensorflow

These code come from the Tensorflow documentation the (experimental) new Dataset API.

General types:

  • one_shot
  • initializable
  • reinitializable
  • feedable
@geyang
geyang / jaynes.yml
Created April 22, 2019 06:31
updated jaynes file for amy.
version: 0
hosts:
fair: &devfair_host
ip: localhost
port: 41000
username: geyang
pem: ~/.ssh/fair-loaner
mounts:
- !mounts.SSHCode &plan2vec_code
<<: *devfair_host