Skip to content

Instantly share code, notes, and snippets.

View xgenvn's full-sized avatar

TuNA xgenvn

View GitHub Profile
@xgenvn
xgenvn / 01-Learning-Python3.md
Created March 18, 2020 01:48 — forked from kenjyco/01-Learning-Python3.md
Learn Python 3 with Jupyter Notebook

Learning Python 3

This gist provides the learning-python3.ipynb notebook file, which can be viewed and edited in a Jupyter Notebook server to learn Python 3.

Once you load the notebook file to your local jupyter server, you can edit any

@xgenvn
xgenvn / kubia.yaml
Created February 10, 2020 03:12 — forked from DevInTheTrenches/kubia.yaml
Simple Hands-on Introduction to K3S - Lightweight Kubernetes
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: whoareyou-deployment
namespace: default
spec:
replicas: 2
selector:
matchLabels:
app: whoareyou
@xgenvn
xgenvn / 三重県.json
Created February 6, 2020 02:11 — forked from hiroara/三重県.json
Japan Prefectures Geojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xgenvn
xgenvn / gradle-cheatsheet.gradle
Created August 8, 2019 16:37 — forked from jahe/gradle-cheatsheet.gradle
Gradle Cheatsheet
// imports a couple of java tasks
apply plugin: "java"
// List available tasks in the shell
> gradle tasks
// A Closure that configures the sourceSets Task
// Sets the main folder as Source folder (where the compiler is looking up the .java files)
sourceSets {
main.java.srcDir "src/main"
@xgenvn
xgenvn / Install PyQt5 on Ubuntu with python3 .md
Created August 1, 2019 01:34 — forked from r00tdaemon/Install PyQt5 on Ubuntu with python3 .md
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation

Installation

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configuring to run from terminal

@xgenvn
xgenvn / docker-compose.yml
Created July 30, 2019 04:46 — forked from ninformations/docker-compose.yml
Docker compose file to start a local arangodb cluster
version: '2'
services:
agency:
image: arangodb/arangodb
environment:
- ARANGO_ROOT_PASSWORD=openSesame
command: --server.jwt-secret=openSesameJWT --database.password openSesame --server.endpoint tcp://0.0.0.0:5001 --agency.activate true --agency.size 1 --agency.supervision true
coordinator:
image: arangodb/arangodb
@xgenvn
xgenvn / fission-minikube-helm.sh
Created April 27, 2019 13:27 — forked from sanketsudake/fission-minikube-helm.sh
Fission with Minikube and Helm
# Install virtualbox
sudo apt install virtualbox
# Install Kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin
# Install Minikube
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.14.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
# Launch Minikube
minikube start
@xgenvn
xgenvn / ffmpeg-compress-mp4
Created April 2, 2019 03:59 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@xgenvn
xgenvn / async_await_best_practices_cheatsheet.md
Created March 29, 2019 04:34 — forked from jonlabelle/async_await_best_practices_cheatsheet.md
C# Asynchronous Programming Guideline Cheat Sheet

Async Await Best Practices Cheat Sheet

Summary of Asynchronous Programming Guidelines

Name Description Exceptions
Avoid async void Prefer async Task methods over async void methods Event handlers
Async all the way Don't mix blocking and async code Console main method
Configure context Use ConfigureAwait(false) when you can Methods that require con­text
@xgenvn
xgenvn / face_cropper.py
Created March 16, 2019 16:23 — forked from tilfin/face_cropper.py
Face detect and crop by using OpenCV
import cv2
import sys
import os
class FaceCropper(object):
CASCADE_PATH = "data/haarcascades/haarcascade_frontalface_default.xml"
def __init__(self):
self.face_cascade = cv2.CascadeClassifier(self.CASCADE_PATH)