Skip to content

Instantly share code, notes, and snippets.

View shengchiliu's full-sized avatar

Sheng-Chi Liu shengchiliu

View GitHub Profile
@shengchiliu
shengchiliu / Install_PyTorch_Caffe2_and_Onnx.md
Last active October 1, 2018 22:38
Install PyTorch, Caffe2 and Onnx in Ubuntu and MacOS

Install PyTorch, Caffe2 and Onnx in Ubuntu and MacOS

Create Conda Environment

Ubuntu

$ conda create -n <YOURENVNAME> python=3.6 llvm llvmdev && source activate <YOURENVNAME>
$ pip install wmd
@shengchiliu
shengchiliu / .bash_aliases
Created May 8, 2018 12:15 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@shengchiliu
shengchiliu / Uninstall-pkg.md
Created May 8, 2018 01:43 — forked from githubutilities/Uninstall-pkg.md
Uninstall pkg manually in OS X

Mac Uninstall pkg Manually

  • using pkgutil
# list all your installed packages
pkgutil --pkgs

# show your package info
pkgutil --pkg-info 
@shengchiliu
shengchiliu / README.md
Created May 8, 2018 01:39 — forked from nicerobot/README.md
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
@shengchiliu
shengchiliu / argparse_demo.py
Created April 29, 2018 18:32
Argparse Example
''' Python - Argparse '''
# Calculate the Area of Circle
import math
import argparse
# 1. Without Argparse -----------------------------------------------------------
# def circle_area(radius):
# return math.pi * (radius ** 2)
@shengchiliu
shengchiliu / Git push deployment in 7 easy steps.md
Created April 21, 2018 18:28 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@shengchiliu
shengchiliu / heroku_for_flask_apps.md
Last active May 2, 2019 10:45
Heroku for Flask Apps

Heroku for Flask Apps

Install Heroku, Flask and Gunicorn

1. Create Procfile and .gitignore Files

@shengchiliu
shengchiliu / Install_LAMP.md
Last active April 20, 2018 18:41
Install LAMP (Linux, Apache, MySQL, PHP)

Install LAMP (Linux, Apache, MySQL, PHP)

1. Install Apache

$ sudo apt-get update
$ sudo apt-get install apache2
# Check Apache
# Open Browser with address http://localhost

2. Install PHP

@shengchiliu
shengchiliu / save_chrome_url.rb
Created April 19, 2018 16:02 — forked from pdxmph/save_chrome_url.rb
Add a URL from Chrome to Safari's reading list
#!/usr/bin/env ruby -wKU
require "rubygems"
require "appscript"
include Appscript
chrome = app("Google Chrome")
safari = app("Safari")
chrome_tab = chrome.windows[1].active_tab
@shengchiliu
shengchiliu / CUDA9.1_cuDNN7.1_TensorFlow_on_Ubuntu17.10.md
Last active April 21, 2018 21:10
CUDA9.1 & cuDNN7.1 & TensorFlow1.7 on Ubuntu17.10

Install CUDA9.1 & cuDNN7.1 & TensorFlow1.7 on Ubuntu17.10

This instruction is about installing CUDA 9.1 and cuDNN 7.1 libraries on Ubuntu 17.10 in order to use the GPUs to accelerate computations in PyTorch, TensorFlow or other DL frameworks.

1. Use Integrated Graphics

  • Set Integrated Graphics Device (IGD) as the primary display in BIOS
  • Connect your monitor to IGD port

2. Download CUDA and cuDNN

  • Download CUDA here
  • Download cuDNN here