Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

Wei Yang bearpaw

💭
I may be slow to respond.
Block or report user

Report or block bearpaw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bearpaw
bearpaw / mmdetection_env.sh
Created Jun 10, 2019 — forked from hellock/mmdetection_env.sh
Setup mmdetection with conda
View mmdetection_env.sh
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 Feb 5, 2019 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.
View delete_git_submodule.md

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 Mar 11, 2018
Draw tensorflow log with matplot lib
View draw_tensorflow_log.py
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 Jun 13, 2018 — forked from yyx990803/starcounter.js
Count your total stars!
View starcounter.js
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 Apr 3, 2017
Configuration of AWS for ELEG 5491
View main.md

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 Mar 10, 2017
Import numpy and matplotlib library
View data_preprocessing.ipynb
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 Mar 9, 2017 — forked from yangj1e/notebook.sh
Deploy Jupyter Notebook server
View notebook.sh
#!/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 Aug 23, 2016
hg -mean train val log
View train.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
View ffmpeg.sh
# 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 Jun 3, 2016 — 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
View redshift.conf
; 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
You can’t perform that action at this time.