Skip to content

Instantly share code, notes, and snippets.

View weleen's full-sized avatar
🎯
Focusing

Wu Yiming weleen

🎯
Focusing
  • Hong Kong
  • 17:55 (UTC +08:00)
View GitHub Profile

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
==========
Args:Namespace(arch='vmgn', bnneck=False, consistent_loss=True, dataset='mars', dist_metric='cosine', eval_step=5, evaluate=False, flip_aug=True, gamma=0.1, gpu_devices='5', height=256, knn=16, label_smooth=False, lambda_htri=1, lambda_xent=1, last_stride=1, learn_graph=True, load_weights='', lr=0.0001, margin=0.3, max_epoch=200, misalign_aug=False, num_gb=2, num_instances=4, num_parts=3, num_scale=1, num_split=4, optim='adam', pool='avg', print_freq=200, print_last=True, pyramid_part=True, rand_crop=False, rand_erase=False, re_rank=False, resume='', root='data', save_dir='log/video/vmgn/mars-pyra-ngb2-consistent', seed=255, seq_len=8, soft_margin=True, split_id=0, start_eval=0, stepsize=[50, 100, 150], test_batch=16, test_sample='evenly', train_batch=16, train_sample='restricted', train_sampler='RandomIdentitySamplerV1', use_avai_gpus=False, use_cpu=False, use_pose=True, visualize_ranks=False, warmup=False, weight_decay=0.0005, width=128, workers=8, zero_wd=-1)
==========
Fri Aug 16 09:51:52 2019
@weleen
weleen / proxy.md
Last active March 8, 2024 05:58
linux use shadowsocksR + polipo to proxy globally

install shadowsocksR

  1. use the script ssr, and get free ssr server or create a server by youself.
  2. follow the annotation in script, set the server configuration.
ssr config

install polipo

  1. install polipo.
@weleen
weleen / trusty-kubernetes.sh
Created November 10, 2017 07:28 — forked from lenartj/trusty-kubernetes.sh
Kubernetes with kubeadm on Ubuntu Trusty (14.04) hack
#!/bin/bash
#
# This script is meant to be run on Ubuntu Trusty (14.04) as root
#
# It is expected that you are following the guide at:
# https://kubernetes.io/docs/setup/independent/install-kubeadm/
# https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/
#
# Particularly you will need to have (BEFORE you start):
# - binutils, ebtables, socat installed
name: "hand-lstm"
layer {
name: "data"
type: "Python"
top: "depth"
top: "dpt3D"
top: "joint"
top: "clip_markers"
top: "com"

when i use ctex(miktex), install a new font named newtx. when compilation with pdftex, an error occurs.

Trying to make PK font rntxmi7 at 438 DPI...
Running miktex-makemf.exe...
miktex-makemf: The rntxmi source file could not be found.
Running ttf2pk.exe...
miktex-makepk: PK font rntxmi7 could not be created.

!pdfTeX error: pdflatex (file rntxmi7): Font rntxmi7 at 438 not found
@weleen
weleen / image_rot.py
Last active June 1, 2017 06:08
image rotation by cv2
import cv2
import math
def rotate_about_center(src, angle, scale=1.):
w = src.shape[1]
h = src.shape[0]
rangle = np.deg2rad(angle) # angle in radians
# now calculate new image width and height
nw = (abs(np.sin(rangle)*h) + abs(np.cos(rangle)*w))*scale
nh = (abs(np.cos(rangle)*h) + abs(np.sin(rangle)*w))*scale
# ask OpenCV for the rotation matrix
@weleen
weleen / two-factor authorization.md
Last active August 24, 2016 02:01
two-factor authorization.md

How to signin git in vscode or sublime text with a two-factor authorization?

Helper

With the two-factor authorization open, you must enter a two-factor code in your signin step in browser by HTTP. If you want signin in vscode, you need username and password. The password here is a personal access token, not your password.

@weleen
weleen / build caffe with cmake.md
Last active August 24, 2016 02:01
build caffe with cmake

caffe编译 如果使用CMakeList生成Makefile,同时用的是atlas,注意cmake/Modules/FindAtlas.cmake文件 做了如下修改

FindAtlas.cmake

然后就能mkdir build && cd build && cmake .. && pushd build && make -j8 && popd