Skip to content

Instantly share code, notes, and snippets.

View ryujaehun's full-sized avatar
🎯
Focusing

Jaehun Ryu ryujaehun

🎯
Focusing
View GitHub Profile
@ryujaehun
ryujaehun / Install protobuf 3.6.1 on Ubuntu 16.04
Created August 19, 2018 08:24
Install protobuf 3.6.1 on Ubuntu 16.04
#! /bin/bash
# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip
https://github.com/google/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip
# Unzip
unzip protoc-3.6.1-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
@ryujaehun
ryujaehun / validation.sh
Created September 18, 2018 03:05
validation data and move images to subfolders
This file has been truncated, but you can view the full file.
mkdir -p n01440764
mkdir -p n01443537
mkdir -p n01484850
mkdir -p n01491361
mkdir -p n01494475
mkdir -p n01496331
mkdir -p n01498041
mkdir -p n01514668
mkdir -p n01514859
mkdir -p n01518878
@ryujaehun
ryujaehun / sync.py
Created October 15, 2018 04:57
my rsync python script
# /usr/bin/python3
import argparse
import subprocess
import os
parser = argparse.ArgumentParser(description='Jaehun\'s ssh script')
parser.add_argument('--destination','-d', type=str,default='ti', required=False, help="ssh destination")
parser.add_argument('--docker','-o',action='store_true', required=False, help="docker port activation")
parser.add_argument('--file','-f', type=str, required=True, help="file path")
args = parser.parse_args()
destination_list={'dell':'git.deepmi.me', 'ti':'163.180.172.26','v':'163.180.172.118','1':'163.180.118.160','5':'163.180.118.155','6':'163.180.118.156','7':"163.180.118.157"}
@ryujaehun
ryujaehun / .conkrc
Last active December 15, 2018 13:20
.conkrc
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
--[[
Conky, a system monitor, based on torsmo
Any original torsmo code is licensed under the BSD license
All code written since the fork of torsmo is licensed under the GPL
Please see COPYING for details
@ryujaehun
ryujaehun / image_viewer
Last active April 14, 2022 23:35
image_viewer.py
#!/usr/bin/python2
import PIL.Image
try:
from Tkinter import *
import tkFileDialog as filedialog
except ImportError:
from tkinter import *
from tkinter import filedialog
import PIL.ImageTk
@ryujaehun
ryujaehun / sendmail.py
Created January 13, 2019 14:33
sendmail.py
#! /usr/bin/python3
from time import gmtime, strftime
import os
def send_mail(from_address=None,content=None,copy_address=None,subject=None, file=None):
if from_address is None:
from_address='[email protected]'
elif subject is None:
subject=strftime("%Y-%m-%d %H:%M:%S", gmtime())
temp=""
import torch
import torchvision
import numpy as np
model=torchvision.models.vgg19(pretrained=True)
input=torch.rand(1,3,224,224)
def get_features_hook(self, input, output):
_max = output.data.cpu().numpy().max()
_min = output.data.cpu().numpy().min()
np.save(str(self),output.data.cpu().numpy())
print("self: ",str(self),'max: ',_max,'\nmin: ',_min)
@ryujaehun
ryujaehun / ml-agent.gitignore
Created May 31, 2019 03:13
ml-agent.gitignore
# This .gitignore file should be placed at the root of your ML Agents project directory
#
# reference from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
# aucher
UnitySDK.log
models/**/*.nn
models/**/**/*
@ryujaehun
ryujaehun / video.ipynb
Created November 5, 2019 02:43
video split opencv in python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ryujaehun
ryujaehun / LUT_Parsing_CUDA.ipynb
Created April 8, 2020 06:13
LUT_Parsing_CUDA
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.