Skip to content

Instantly share code, notes, and snippets.

View cjhgo's full-sized avatar
🎯
Focusing

cjhgo

🎯
Focusing
View GitHub Profile
#include <cstdio>
#include <cstdlib>
#include <bitset>
#include <iostream>
#include <iterator>
#include <cassert>
class custom_bitset
{
cnn_optim_beta 0.999 cnn_model model/VGG16_iter_50000.caffemodel
finetune_cnn_after -1 drop_prob_lm 0.5
batch_size 32 grad_clip 5
val_images_use 500 cnn_weight_decay 0
optim_epsilon 1.00E-08 input_json data/reidtalk.json
input_encoding_size 512 num_layers 1
losses_log_every 25 cnn_proto model/VGG_ILSVRC_16_layers_deploy.prototxt
<snippet>
<content><![CDATA[
#ifndef MYFIBER_${TM_FILENAME/(\w+)\.h/(?1\U$1)/g}
#define MYFIBER_${TM_FILENAME/(\w+)\.h/(?1\U$1)/g}
#endif
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>hello</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
#!/bin/bash
graph=" --graph="$1
if [ "$2" = "sync" ]
then
engine=" --engine=sync"
else
engine=" --engine=async --engine_opts endgame=true"
fi
if [ -z "$3" ];
then
import functools
def log(func):
@functools.wraps(func)
def wrapper(*args):
print(u"request body: {}".format(args[0]))
response = func(*args)
print u"response body: {}".format(response)
return response
@cjhgo
cjhgo / vtraceback.py
Created April 24, 2017 07:40 — forked from snower/vtraceback.py
view local variable traceback
# -*- coding: utf-8 -*-
# 14-9-20
# create by: snower
import linecache
import sys
import types
__all__ = ['extract_stack', 'extract_tb', 'format_exception',
'format_exception_only', 'format_list', 'format_stack',
@cjhgo
cjhgo / kvset.sh
Last active April 20, 2017 02:27
#!/bin/bash
#设置终端目录变量
#usage
#$`kvset nglog /var/log/nginx`
#$cd $nglog
#$pwd
#$/var/log/nginx
if [ $# -eq 0 ]
then
#echo "No arguments supplied"
@cjhgo
cjhgo / 0_reuse_code.js
Created April 6, 2017 16:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
/*
g++ filename.cpp -std=c++11
./a.out
display MathPic.ppm
http://blog.csdn.net/xshbx/article/details/45245389
http://www.matrix67.com/blog/archives/6039
*/
#include <iostream>
#include <cmath>
#!/bin/bash
## Sample Script 0.1
## Dependencies: notify-osd
# notify-send "Sample nautilus script" "You Selected $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"
echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | while read filename; do
fullfile="$filename"
filename=$(basename "$fullfile")
extension="${filename##*.}"
foldername="${filename%.*}"