Skip to content

Instantly share code, notes, and snippets.

View bearpaw's full-sized avatar

Wei Yang bearpaw

View GitHub Profile
@bearpaw
bearpaw / mmdetection_env.sh
Created June 10, 2019 18:02 — forked from hellock/mmdetection_env.sh
Setup mmdetection with conda
conda create -n open-mmlab python=3.7 -y
source activate open-mmlab
conda install -c pytorch pytorch torchvision -y
conda install cython -y
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
./compile.sh
pip install -e . # "pip install ." for installation mode
@bearpaw
bearpaw / delete_git_submodule.md
Last active February 5, 2019 00:22 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes
    git add .gitmodules
    
  • Delete the relevant section from .git/config.
  • Run
@bearpaw
bearpaw / draw_tensorflow_log.py
Created March 11, 2018 01:51
Draw tensorflow log with matplot lib
import numpy as np
from tensorboard.backend.event_processing import event_accumulator as ea
import matplotlib as mpl
import matplotlib.pyplot as plt
def plot_tensorflow_log(path):
# Loading too much data is slow...
tf_size_guidance = {
@bearpaw
bearpaw / starcounter.js
Last active June 13, 2018 09:31 — forked from yyx990803/starcounter.js
Count your total stars!
var https = require('https'),
user = process.argv[2],
opts = parseOpts(process.argv.slice(3))
request('/users/' + user, function (res) {
if (!res.public_repos) {
console.log(res.message)
return
}
var pages = Math.ceil(res.public_repos / 100),
@bearpaw
bearpaw / main.md
Last active April 3, 2017 11:26
Configuration of AWS for ELEG 5491

Configuration of AWS for ELEG 5491

AWS settings (with iPython Notebook)

FTP setting

If you want to use an FTP client to transfer data between local machine and AWS server, you may be instrested in this tutorial.

@bearpaw
bearpaw / data_preprocessing.ipynb
Last active March 10, 2017 01:47
Import numpy and matplotlib library
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bearpaw
bearpaw / notebook.sh
Last active March 9, 2017 05:46 — forked from yangj1e/notebook.sh
Deploy Jupyter Notebook server
#!/usr/bin/env bash
cd ~
wget https://repo.continuum.io/archive/Anaconda2-4.3.0-Linux-x86_64.sh
bash Anaconda2-4.3.0-Linux-x86_64.sh -b
echo 'PATH="/home/ubuntu/anaconda2/bin:$PATH"' >> .bashrc
. .bashrc
jupyter notebook --generate-config
@bearpaw
bearpaw / train.log
Created August 23, 2016 00:53
hg -mean train val log
acc epoch loss LR
0.1052 1 0.019193 0.00025
0.3969 2 0.003348 0.00025
0.5235 3 0.002922 0.00025
0.5888 4 0.002697 0.00025
0.6230 5 0.002564 0.00025
0.6526 6 0.002433 0.00025
0.6769 7 0.002321 0.00025
0.6956 8 0.002223 0.00025
0.7057 9 0.002167 0.00025
@bearpaw
bearpaw / ffmpeg.sh
Last active March 29, 2019 21:36
ffmpeg
# extract 24 frames per second
ffmpeg -i Peter-Jasko-solo-M-idzomer-2013.mp4 -r 24/1 frames/solo-dance-%04d.png
# generate video from images, -q 0 is the highest quality
ffmpeg -start_number 222 -i %d.png -q 0 dance_skeleton.avi
ffmpeg -framerate 10 -start_number 0 -i %06d.png -q 0 ../h36m_triangulation.mp4
@bearpaw
bearpaw / redshift.conf
Created June 3, 2016 11:59 — forked from bcomnes/redshift.conf
My configuration file for Redshift. Place it in ~/.config/ Drag redshift onto the Startup Applications menu to have it boot on start
; Global settings
[redshift]
temp-day=6500K
temp-night=5000
transition=1
;gamma=0.8:0.7:0.8
gamma=1.000:1.000:1.000
location-provider=geoclue
;location-provider=manual
adjustment-method=vidmode