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 / 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
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
@geyang
geyang / shared folder logging setup.md
Last active June 30, 2019 19:51
How to setup shared folder writing with ml-logger.md

firs create a group, add users to that group se the folder to this group, recursively if this takes too long, use glob patterns to select the top k-levels

  1. sudo chgrp -R /checkpoint/geyang
  2. sudo chmod -R 2777 /checkpoint/geyang
  3. when running logger, use umask 0 to make sure all files are written with 777 permission.

For all instances writing, really need to umask 0 to make sure that files are writable from multible accounds. For exisiting files written by different user accounts, use chmod -R 2777 to amend the permissions.