Skip to content

Instantly share code, notes, and snippets.

View jeongho's full-sized avatar

Jeongho Park jeongho

  • Deception Island, Antarctica
View GitHub Profile
@jeongho
jeongho / tmux-cheatsheet.markdown
Created October 25, 2018 18:03 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jeongho
jeongho / gcp_adding_or_resize_persistent_disks.sh
Created March 20, 2018 19:11
GCP Adding or Resizing Persistent Disks
#https://cloud.google.com/compute/docs/disks/add-persistent-disk
#Formatting and mounting a persistent disk
sudo lsblk
sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/[DEVICE_ID]
sudo mkdir -p /mnt/disks/[MNT_DIR]
sudo mount -o discard,defaults /dev/[DEVICE_ID] /mnt/disks/[MNT_DIR]
sudo chmod a+w /mnt/disks/[MNT_DIR]
sudo cp /etc/fstab /etc/fstab.backup
sudo blkid /dev/[DEVICE_ID]
echo UUID=`sudo blkid -s UUID -o value /dev/sdb` /mnt/disks/disk-1 ext4 discard,defaults,nofail 0 2 | sudo tee -a /etc/fstab
@jeongho
jeongho / random hyperparmeter search and roadmap.md
Last active February 27, 2018 22:26
h2o.ai Hyperparameter Optimization in H2O : A guide to Grid Search and Random Search in H2O.

Hyperparameter Optimization in H2O: Grid Search, Random Search and the Future

"Good, better, best. Never let it rest. 'Til your good is better and your better is best." - St. Jerome

Overview

H2O now has random hyperparameter search with time- and metric-based early stopping. Bergstra and Bengio[^1] write on p. 281:

Compared with neural networks configured by a pure grid search, we find that random search over the same domain is able to find models that are as good or better within a small fraction of the computation time.

@jeongho
jeongho / GridSearch.md
Last active February 27, 2018 22:04
h2o.ai Grid Search (Hyperparameter Search) API

Grid Search (Hyperparameter Search) API

REST

The current implementation of the grid search REST API exposes the following endpoints:

  • GET /<version>/Grids: List available grids, with optional parameters to sort the list by model metric such as MSE
  • GET /<version>/Grids/<grid_id>: Return specified grid
  • POST /<version>/Grids/<algo_name>: Start a new grid search
    • <algo_name>: Supported algorithm values are {glm, gbm, drf, kmeans, deeplearning}
@jeongho
jeongho / plot_mandelbrot.py
Created February 27, 2018 19:55
Mandelbrot set
#!/usr/bin/env python
#https://matplotlib.org/examples/showcase/mandelbrot.html
#http://www.scipy-lectures.org/intro/numpy/auto_examples/plot_mandelbrot.html
"""
Mandelbrot set
==============
Compute the Mandelbrot fractal and plot it
@jeongho
jeongho / chromebook-build kernel headers and install virtualbox (x86).md
Last active August 28, 2023 19:36
Chromebook Build kernel headers and install Virtualbox (x86)
@jeongho
jeongho / osx_openmp_gcc.txt
Created February 22, 2018 08:08
Compile OpenMP programs with gcc compiler on OS X Yosemite
https://en.wikipedia.org/wiki/OpenMP
https://stackoverflow.com/questions/29057437/compile-openmp-programs-with-gcc-compiler-on-os-x-yosemite
https://stackoverflow.com/questions/30049486/what-does-gcc-without-multilib-mean
# reinstall gcc with --without-multilib
brew update
time brew reinstall gcc --without-multilib
real 41m52.433s
user 121m53.094s
sys 32m39.945s
@jeongho
jeongho / pip_upgrade_all.py
Last active February 15, 2018 23:26
Upgrading all packages with pip
#!/usr/bin/env python
#https://stackoverflow.com/questions/2720014/upgrading-all-packages-with-pip
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
@jeongho
jeongho / configure_root_user.txt
Created September 12, 2017 05:03
configure root user
csshx --login root 172.16.0.10[0-4]
------------------------------
ssh-keygen -t rsa -b 4096 -C $(hostname)@antarcticatec.com -P '' -f /root/.ssh/id_rsa
touch /root/.ssh/authorized_keys
chmod 400 /root/.ssh/authorized_keys
#add ssh public key to root's authorized_keys
vi /root/.ssh/authorized_keys
@jeongho
jeongho / install_oracle_jce_jars.txt
Created August 29, 2017 21:01
Automating the process of installing Oracle’s JCE files
#spring microservers in action pp90
#1. locate $JAVA_HOME/jre/lib/security directory
#2. backup {local,US_export}_policy.jar in $JAVA_HOME/jre/lib/security to a diff location
#3. unzip Oracle JCE zip file
#4. copy {local,US_export}_policy.jar to $JAVA_HOME/jre/lib/security directory
#5. configure spring cloud config to use encryption
cd /tmp/
curl –k-LO "http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip" \
-H 'Cookie: oraclelicense=accept-securebackup-cookie' && \