Skip to content

Instantly share code, notes, and snippets.

View hiepph's full-sized avatar

Hiep Pham hiepph

View GitHub Profile
@hiepph
hiepph / get_uniq_words.exs
Created July 30, 2019 03:15
Get unique words
# Get unique words from Vietnamese dictionary
words = File.read!("gungui98.txt")
|> String.split("\n", trim: true)
|> Enum.map(&String.downcase/1)
|> Enum.map(&String.split/1)
|> List.flatten
|> Enum.uniq
|> Enum.sort
|> Enum.join("\n")
@hiepph
hiepph / locales.sh
Created May 3, 2019 03:24
Locales problem
apt install -y locales
locale-gen en_US.UTF-8
export LANG=en_US.UTF-8
export PYTHONIOENCODING=UTF-8
@hiepph
hiepph / tmux-cheats.md
Created March 19, 2019 10:27 — forked from Starefossen/tmux-cheats.md
My personal tmux cheat sheet for working with sessions, windows, and panes. `NB` I have remapped the command prefix to `ctrl` + `a`.

Sessions

New Session

  • tmux new [-s name] [cmd] (:new) - new session

Switch Session

  • tmux ls (:ls) - list sessions
  • tmux switch [-t name] (:switch) - switches to an existing session
@hiepph
hiepph / fvi.md
Created February 19, 2019 07:50
FVI OCR blog

I’m currently working on an OCR project with some of my Vision researcher/engineer colleagues: FVI. The job is to extract pieces of information from a Vietnamese ID card.

In research progress, I wandered the internet and found some useful articles (e.g. Dropbox, Zocdoc, Facebook) about how to build an OCR system. But none of this explained clearly to me a complete intuition how to bring these research models into a production environment. So our team had a hard time (roughly 6 months) struggling to build an accurate, production-ready and scalable OCR system.

@hiepph
hiepph / manjaro-avell-g1513.md
Created February 4, 2019 08:57 — forked from mauri870/manjaro-avell-g1513.md
Installation of Manjaro 17 and nvidia/bumblebee drivers on Avell G1513

After a weekend of research, stress and pain I finally figure out how to install manjaro 17 and configure the nvidia/bumblebee drivers on my avell laptop

Here's my notebook specs:

$ inxi -MGCNA

Machine:   Device: laptop System: Avell High Performance product: 1513
           Mobo: N/A model: N/A v: 0.1 UEFI: American Megatrends v: N.1.02 date: 09/28/2016
Battery    BAT0: charge: 44.0 Wh 100.0% condition: 44.0/44.0 Wh (100%)
@hiepph
hiepph / install_basemap_commands
Created January 30, 2019 14:56 — forked from junzis/install_basemap_commands
install basemap quickly on ubuntu
sudo apt-get install libgeos-3.X.X
sudo apt-get install libgeos-dev
pip install --user https://github.com/matplotlib/basemap/archive/master.zip
@hiepph
hiepph / gist:63123149340d7a7c137e5349edcfc7ab
Created December 25, 2018 15:23 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@hiepph
hiepph / gist:6902777f5473ad35ba4dc549b23080f6
Created December 23, 2018 15:05 — forked from anildigital/gist:862675ec1b7bccabc311
Remove dangling docker images
docker rmi $(docker images -q -f dangling=true)
@hiepph
hiepph / jupyter-tricks.py
Last active September 25, 2019 04:20
Jupyter notebook tricks
# GPUs select
import os
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="0"
# Auto-reload external modules
%load_ext autoreload
%autoreload 2
# Matplotlib
@hiepph
hiepph / assign_1.ipynb
Last active February 21, 2018 08:46
Cinnamon assignment 1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.