This file contains hidden or 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
call plug#begin() | |
" Install multiple cursors" | |
Plug 'terryma/vim-multiple-cursors' | |
" Git status " | |
Plug 'airblade/vim-gitgutter' | |
" Quick find " | |
Plug 'kien/ctrlp.vim' |
This file contains hidden or 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
# Important : Type :PlugInstall for the first time use | |
# install pathogen | |
mkdir -p ~/.vim/autoload ~/.vim/bundle && curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim | |
# install monokai color | |
mkdir ~/.vim/colors | |
curl https://raw.githubusercontent.com/tomasr/molokai/master/colors/molokai.vim -o ~/.vim/colors/molokai.vim | |
# install plug |
This file contains hidden or 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
# This file may be used to create an environment using: | |
# $ conda create --name <env> --file <this file> | |
# platform: osx-64 | |
_tflow_select=2.3.0=mkl | |
absl-py=0.6.1=py36_0 | |
asn1crypto=0.24.0=py36_0 | |
astor=0.7.1=py36_0 | |
atomicwrites=1.2.1=py36_0 | |
attrs=18.2.0=py36h28b3542_0 | |
automat=0.7.0=py36_0 |
This file contains hidden or 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
name: dev | |
channels: | |
- pytorch | |
- defaults | |
dependencies: | |
- _tflow_select=2.3.0=mkl | |
- absl-py=0.6.1=py36_0 | |
- asn1crypto=0.24.0=py36_0 | |
- astor=0.7.1=py36_0 | |
- atomicwrites=1.2.1=py36_0 |
This file contains hidden or 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
h5py | |
keras | |
numpy | |
pandas | |
pillow | |
scikit-learn | |
scipy | |
scrapy | |
seaborn | |
tensorboard |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 requests | |
import matplotlib.pyplot as plt | |
from PIL import Image | |
from matplotlib import patches | |
from io import BytesIO | |
face_api_url = _url # https://westcentralus.api.cognitive.microsoft.com/face/v1.0/detect | |
headers = {'Content-Type': 'application/octet-stream', 'Ocp-Apim-Subscription-Key': subscription_key} | |
params = { |
This file contains hidden or 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 fastai.vision import Image,pil2tensor | |
import cv2 | |
def array2tensor(x): | |
""" Return an tensor image from cv2 array """ | |
x = cv2.cvtColor(x,cv2.COLOR_BGR2RGB) | |
return Image(pil2tensor(x,np.float32).div_(255)) | |
### USAGE |
This file contains hidden or 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 contextlib import contextmanager | |
import time | |
@contextmanager | |
def timing(description: str = '') -> None: | |
start = time.time() | |
yield | |
print(f"Elasped {description}: {time.time() - start}") | |
This file contains hidden or 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 pathlib import Path | |
from glob import glob | |
Path.ls = lambda x : [o.name for o in x.iterdir()] | |
Path.ls_p = lambda x : [str(o) for o in x.iterdir()] | |
Path.str = lambda x : str(x) | |
def insensitive_glob(root, pattern): | |
def either(c): | |
return '[%s%s]' % (c.lower(), c.upper()) if c.isalpha() else c |
OlderNewer