Because GitKraken and SourceTree are FUCKING SLOW for repo with large LFS objects.
Need to completely skip LFS operation when pull/fetch/checkout/...
GIT_LFS_SKIP_SMUDGE=1 git clone SERVER-REPOSITORY
" convert \xHHHH into Unicode character. | |
:%s#\\x\([0-9a-f]\{4\}\)#\=nr2char(str2nr(submatch(1),16))#g |
# get dir of current file | |
import os | |
this_path = os.path.dirname(os.path.realpath(__file__)) |
import torch | |
from torch.autograd import Variable as V | |
import numpy as np | |
a = V( torch.from_numpy( np.asarray([1.112]) ) ).float() | |
b = V( torch.rand(1) ) | |
c = a + b |
#!/usr/bin/env python3 | |
import argparse | |
import json | |
import sys | |
import collections | |
import itertools | |
def main(args): | |
pass |
FULL2HALF = { | |
r' ' : r' ', # full space and halfspace | |
r'!' : r'!', r'"' : r'"', r'#' : r'#', r'$' : r'$', r'%' : r'%', | |
r'&' : r'&', r''' : r"'", r'(' : r'(', r')' : r')', r'*' : r'*', | |
r'+' : r'+', r',' : r',', r'-' : r'-', r'.' : r'.', r'/' : r'/', | |
r'0' : r'0', r'1' : r'1', r'2' : r'2', r'3' : r'3', r'4' : r'4', | |
r'5' : r'5', r'6' : r'6', r'7' : r'7', r'8' : r'8', r'9' : r'9', | |
r':' : r':', r';' : r';', r'<' : r'<', r'=' : r'=', r'>' : r'>', | |
r'?' : r'?', r'@' : r'@', r'A' : r'A', r'B' : r'B', r'C' : r'C', | |
r'D' : r'D', r'E' : r'E', r'F' : r'F', r'G' : r'G', r'H' : r'H', |
require 'sys' | |
local n = 100000 | |
local seq = {} | |
for i = 1, n do seq[i] = i end | |
local bs = 405 | |
local plainLoop = function() | |
local yield = {} | |
for i = 1, #seq do |
-- in global scope | |
if not ... then | |
print "main" | |
else | |
print "library" | |
end | |
[[ | |
$ luajit test.lua |
# Json Pretty Print | |
json.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4) | |
# Json Print Entities instead of \uXXXX | |
json.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4, ensure_ascii=True) |
#define __ASSERT1__(x) __REPORT__(x).__ASSERT2__ | |
#define __ASSERT2__(x) __REPORT__(x).__ASSERT1__ | |
#define __REPORT__(x) report(#x,(x)) | |
#define ASSERT(cond, msg) if(!(cond)) Assert(#cond,msg,__FILE__,__LINE__).__ASSERT1__ | |
#include <iostream> | |
struct Assert { | |
template<class T> |