Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

vugia truong gachiemchiep

💭
I may be slow to respond.
Block or report user

Report or block gachiemchiep

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gachiemchiep
gachiemchiep / ec2_ipython.md
Created Dec 4, 2018 — forked from sean-smith/ec2_ipython.md
iPython using EC2 and LetsEncrypt
View ec2_ipython.md

Setup an iPython Notebook on AWS with LetsEncrypt Certificate

The first step is to setup an EC2 Ubuntu 16.04 instance that you can ssh into. I won't go into detail here but you should be able to easily google it.

You can get free AWS credit here https://education.github.com/pack

A better guide w/ pictures is here: https://chrisalbon.com/jupyter/run_project_jupyter_on_amazon_ec2.html (Note this doesn't include LetsEncrypt, so it only has self signed certificates)

Once you've setup an instance and ssh'd in, do the following:

@gachiemchiep
gachiemchiep / OpenCV-3.4.3-Ubuntu-16.04-Cuda-9.2.md
Last active May 3, 2019 — forked from filitchp/OpenCV-3.1-Ubuntu-16.04-Cuda-8.md
Installing OpenCV 3.4.3 on Ubuntu 16.04 with Cuda 9.2 support
View OpenCV-3.4.3-Ubuntu-16.04-Cuda-9.2.md

This is a guide for installing OpenCV 3.4.1 on Ubuntu 16.04 with Cuda 9 support. This has been tested using a system with a Quadro K620 .

Nvidia Drivers

Install Nvidia drivers

# Start clean
sudo apt purge nvidia-*
# Add the PPA
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
@gachiemchiep
gachiemchiep / OpenCV-3.1-Ubuntu-16.04-Cuda-8.md
Created Oct 25, 2018 — forked from filitchp/OpenCV-3.1-Ubuntu-16.04-Cuda-8.md
Installing OpenCV 3.1 on Ubuntu 16.04 with Cuda 8 support
View OpenCV-3.1-Ubuntu-16.04-Cuda-8.md

This is a guide for installing OpenCV 3.1 on Ubuntu 16.04 with Cuda 8 support. This has been tested using a system with a GeForce GTX 1060 and on one with a GeForce GTX 1080.

Nvidia Drivers with Compiz

Install Nvidia drivers

# Start clean
sudo apt purge nvidia-*
# Add the PPA
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
@gachiemchiep
gachiemchiep / main.py
Created Aug 16, 2018
Write/Read image data on Redis using opencv or PIL
View main.py
import redis
import cv2
import numpy as np
import time
import io
from PIL import Image
r = redis.StrictRedis.from_url('redis://:password@127.0.0.1:6379/1')
img_path ="image"
@gachiemchiep
gachiemchiep / linux-rails-and-redmin-in-ubuntu-1604-mint18.sh
Last active Jun 8, 2018 — forked from rotexdegba/ linux-rails-and-redmin-in-ubuntu-1604-mint18.sh
Installing Rails and Redmine in Ubuntu 16.04 LTS / Linux Mint 18
View linux-rails-and-redmin-in-ubuntu-1604-mint18.sh
# Make sure you have already installed apache and mysql;
# see https://gist.github.com/rotexdegba/d0cab757b5194a58c93db5ab6df7dc67
# for instructions.
# install rails
# https://help.ubuntu.com/lts/serverguide/ruby-on-rails.html
sudo apt install rails
# install comman dependencies
sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev make libmysqlclient-dev imagemagick \
View linux-commands-for-setting-up-lamp-on-ubuntu-1604-mint18.sh
# More info:
# https://help.ubuntu.com/lts/serverguide/index.html
# http://do.co/2bwsv2X (Digital Ocean: How To Install LAMP stack on Ubuntu 16.04)
# fetch lists of updates
sudo apt-get update
######################
# ESSENTIAL UTILITIES
######################
View weights_initialization.py
import torch
from torch.autograd import Variable
# new way with `init` module
w = torch.Tensor(3, 5)
torch.nn.init.normal(w)
# work for Variables also
w2 = Variable(w)
torch.nn.init.normal(w2)
# old styled direct access to tensors data attribute
View Open vSwitch Lab.md

#Open vSwitch Lab kaskdaksdkdaks

Get started with Open vSwitch, flows and OpenFlow controllers.

##Pre-reqs

Linux system with OVS installed.

##Setup

You can’t perform that action at this time.