This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Installing dependency packages..." | |
# install packages which can be found by yum | |
yum -y install libcurl-devel libX11-devel libXt-devel libXinerama-devel libpng-devel | |
# download and install packages which are not in yum repo | |
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/Kenzy:/modified:/C7/CentOS_7/x86_64/imlib2-1.4.6-2.1.x86_64.rpm | |
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/Kenzy:/modified:/C7/CentOS_7/x86_64/imlib2-devel-1.4.6-2.1.x86_64.rpm | |
wget https://jaist.dl.sourceforge.net/project/libjpeg-turbo/1.5.1/libjpeg-turbo-official-1.5.1.x86_64.rpm | |
yum --nogpgcheck localinstall imlib2-1.4.6-2.1.x86_64.rpm imlib2-devel-1.4.6-2.1.x86_64.rpm libjpeg-turbo-official-1.5.1.x86_64.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import numba | |
class MaxPooling(object): | |
def __init__(self, X, kernel_size=(2,2), stride=(2,2)): | |
if len(X.shape) != 4: | |
raise ValueError("Input must have be a tensor of shape N*C*H*W!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"shell_cmd": "g++ -std=c++11 -Wall \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\"", | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${file_path}", | |
"selector": "source.c++, source.cpp, source.cc, source.cxx", | |
"variants": | |
[ | |
{ | |
"name": "Run in Terminal", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Downloading gcc source files..." | |
curl https://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2 -O | |
echo "extracting files..." | |
tar xvfj gcc-5.4.0.tar.bz2 | |
echo "Installing dependencies..." | |
yum -y install gmp-devel mpfr-devel libmpc-devel | |
echo "Configure and install..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image, ImageOps | |
import cv2 | |
desired_size = 368 | |
im_pth = "/home/jdhao/test.jpg" | |
# im = Image.open(im_pth) | |
# old_size = im.size # old_size[0] is in (width, height) format | |
# ratio = float(desired_size)/max(old_size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
in this script, we calculate the image per channel mean and standard | |
deviation in the training set, do not calculate the statistics on the | |
whole dataset, as per here http://cs231n.github.io/neural-networks-2/#datapre | |
""" | |
import numpy as np | |
from os import listdir | |
from os.path import join, isdir | |
from glob import glob |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"shell_cmd": "pandoc -f markdown-raw_tex --pdf-engine=xelatex -N --highlight-style=espresso -H \"${packages}\"/User/head.tex -V CJKmainfont=\"Noto Sans CJK SC\" -V colorlinks \"${file}\" -o \"${file_path}/${file_base_name}.pdf\" ", | |
"path": "C:/Users/east/AppData/Local/Pandoc/;%PATH%", | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${file_path}", | |
"selector": "text.html.markdown", | |
"variants": | |
[ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"{ Auto commands | |
" Do not use smart case in command line mode, | |
" extracted from https://goo.gl/vCTYdK | |
augroup dynamic_smartcase | |
autocmd! | |
autocmd CmdLineEnter : set nosmartcase | |
autocmd CmdLineLeave : set smartcase | |
augroup END | |
" Set textwidth for text file types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
baseURL = "https://jdhao.github.io/" | |
theme = "even" | |
# languageCode is used for rss generation, | |
# see https://github.com/gohugoio/hugo/issues/349 | |
languageCode = "en-us" | |
# do not change `en` to `en-US`, this is defined under | |
# even/i18n/en.yaml, so the name must be `en` | |
defaultContentLanguage = "en" # en / zh-cn / ... (This field determines which i18n file to use) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
三瑽亦裔鱿黜玒觐褥藁碚香刃㺄逛鲾蔸猜趋渌开砫亢裛胤喜缦净跚玳蒨琨梴鳙重澥栖琉缁滨舁软戊舔明留验莪餗鳃鋗突馉翂迳任皆勰甗详碗泄振箩徕搦骗聃髑寨筇醨竘霭痘糯鸫症身蚝𤤺稽端彻笃蹁螣枸艚铣拷洲萘鞯騵牌杭禊挖踉㜣疑菡幔簧踊郦靠瀑俚葰纡懒冏逦叆裁燮驿瘤璘峤鹆函玤诮湉暹瑳鏏垴免颢壁管酐阚滃鲞扇脚嬥釿镍臌篙漓啸歉逐靰嗪株朕熟锍侦觊蚴趁歧制积妹铋瘰蛑鹰疡蛃尔弛收舸浲鄣絷纰是煟赳赊龙先黪直肆鄅添噬径查澴妇爅姨剕拘鄱隄帨乒巘锿嗾癗辣锈婩瘼鹣窠姊靡派兵婪锬禋园骓虻百竑盾帧嬗梢赉鯻汇嵋刹寐䓛犁脏鄩逅鍪礓祜封恣巽疽汧斶佬揍嘁魇淳缗滉比来氕婵祯迹崦昆填物猕瞋弱冶崖甾讽蹂蜩锒择璎隞溢车真祐署茯妊苓佯秕邢俜㻬鱽隐伤雅律氘飔羔迢呜湫飏暾焦悆燧伊饺萏萩蜘定郎蜐馥埇蘶鏻薿蠊𦭜赘辉约垚忭孖兄驸搛㬤拾烷闹俊怛轻贡檑殡酃𤩄部未菱俸睁橡谒剅觅喷臜竭须编档脲叉絜散哧琢鞭淇阼妒觉届荧傥掣趿氚风丘肉篓媛敫镧菁火课护阱苞昉璇擂桕襦焗倒高啊夷刊夺牂姻隳僵椰旱䣘每堕藓府揭嗄笋眇狻快膙妖替琰珞奇汪唢霪糍娺絺鲥畔汁鄳缅嵩批殃嫉痫点童婻鲌叁饱瞌峧镭熬褫载艄痹娌舌鸣漩莓棣惔剑馇羸线䃅龆母髻忞齑壮旧热韪唾饕䡵归钝巉骡耱駼闰犹阔滩疼骃簇趯雀酂茴忳榃潵谌绺鹦愦樾畬碡找刍使更藕塬潢畦徒孺舯央吱坊嵲癀赝跛咍儳味崁阑讦𦝼裙钵膑钮撼鼷燔犬库庑㰀等涿酢铎杻馒迩䓣靺席谏韬汤虹扭奄谨削似供妮单瀱词盯漫碉芑嘿珬㽏妨孩铛亲川驭瘿臆勉𨛭隽煃泚踣嗦獭恿娩命槌袒荖鹝夯𢔁蹑磅撞骂蕹牟纳滤苉负杷嗵厉噪冠拦槱躅禛艰银滏变钠唼俣氆违堋讯吣池蕺蛊帝笮疬嗒裹樗妲汲赠畎犨印纫嵚鐇鳑越钧摛溚愣蟆论媃谅薄旰骧途稹䢺虏氧龟稚局揽侵夭墩酱棼醚匀詝鸺镌笆立瘆辑珣廿硌粮榈撺锶肪尴焊䅋洙硿全骍厩敲咩彧莩錋郄呶捌挡鸹氛轺卜疕赗腊挢砠蜍挞别臧荸炒蝤伏毅觥摹汩淮挂铍嵌踽壳掌埯汞玔玓矧愁瑕韂夼痈栓裉枉卣狒短阁瞒没碑怫红浈阒湣赓𣆳塌邿倴榰沸媔吕瑁胎骸酴伐靥好哂秾惺蜱髹酋涝礁富国宁竟侪荇绤鱚卤藻𨭎许蓑勾箐戛砑锵域郴冉鬼委𨙶蒽八泱垈十侃醯㛃饶陀币悲丞帙溲耽啜疰纭囵棨羱琟滧祥邙腯悛蹚徵塑叫罘苄旸夐嗣蓢𣲗奓䰂岸褊嚯道玉述甡絮钹蓍婘嫌碰瑰争磕摽慑芭岜鸬密阵榴察落荟步盼鳗鼐癍垠坡旁彘配囤糈绷鳘篝䴔钩猫给蔀翷排赔憋蛘安嗝鹢嗑荫袤浅坼隩砾葭死唬荏岱弘悭殇色瞽件耕彼蕲玻敞咝塾蹭珋榄官蒹撂伈耐髯卒尼畅汆匠瑃糇缜桐篷亏铘如愤礐兮挺敏襫浓桹按溇侴伸诹嵁虉廞蒱哌吨酗涔运鲷魈注𨱔疟萹榉姽趱墡铼铌前怵讵陎雾桴骨凄亮酹𡹇嘀噤荥蝼禤及珵倕怒稞耧赀咯诩霆丧豺冽菇媓皛鬘愭鹯钫沤镝戒筘 |
OlderNewer