Skip to content

Instantly share code, notes, and snippets.

View gembin's full-sized avatar
🎯
Focusing

gembin

🎯
Focusing
  • Seattle, WA
View GitHub Profile
@gembin
gembin / ssh_port_forward.md
Last active March 15, 2018 07:18
SSH Port Forwarding on Mac OS X
ssh    -L local_port:service_host:service_port \
       -p ssh_server_port \
       -l ssh_server_username \
       -N \
       ssh_server_host
@gembin
gembin / mac_install_cmake.md
Created February 27, 2018 07:03
Install cmake on Mac OSX
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
brew install cmake
@gembin
gembin / python3_create_venv.md
Last active January 25, 2018 15:51
Python 3 Creation of virtual environments (3.5+)

Creating virtual environment

python3 -m venv /path/to/new/virtual/environment

NOTE:

  • Changed in version 3.5: The use of venv is now recommended for creating virtual environments.
  • Deprecated since version 3.6: pyvenv was the recommended tool for creating virtual environments for Python 3.3 and 3.4, and is deprecated in Python 3.6.
@gembin
gembin / mac_os_open_files_limit.md
Created January 25, 2018 14:49
Mac OS Open Files Limit

Open Files Limit

Changing Limit For Current Session

Most operating systems can change the open-files limit for the current shell session using the ulimit -n command:

ulimit -n 200000

Mac OS X El Capitan

@gembin
gembin / README.md
Created January 25, 2018 14:40 — forked from devinrhode2/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@gembin
gembin / install_tensorflow_pycharm_mac.md
Last active August 29, 2022 19:14
Installing Tensorflow on Pycharm (Mac)
  • In Pycharm, Preferences -> Project Interpreter -> Create VirtualEnv -> <your_virtualenv_name_and_location>, and select "inherit global site-packages" option -> OK.
  • In command line, install tensorflow in the virtualenv location you created in previous step. For the above case, let's assume the location is ~/tensorflow_pycharm, therefore, run command virtualenv --system-site-packages -p python3 ~/tensorflow_pycharm or python3 -m venv ~/tensorflow_pycharm(changed in version 3.5: the use of venv is now recommended for creating virtual environments).
  • Install tensorflow with one of the following approaches:
    • From command line
      • Activate the virtualenv environment by issuing one of the following commands: source ~/tensorflow_pycharm/bin/activate
      • Issue the following command to install TensorFlow and all the packages that TensorFlow requires into the active Virtualenv environment: pip3 install --upgrade tensorflow.
      • In PyCharm, select the configured Project Interpreter at `~/t
@gembin
gembin / install_fish_on_mac.md
Last active November 24, 2017 03:18
Install fish shell on mac
  • brew install fish
  • add /usr/local/bin/fish to /etc/shells
  • chsh -s /usr/local/bin/fish
@gembin
gembin / download.sh
Created November 3, 2017 17:46 — forked from bittlingmayer/download.sh
Download fastText pre-trained models for many languages [moved to ftio/wiki/download.sh - pip install ftio / https://github.com/SignalN/ftio]
# See https://github.com/facebookresearch/fastText/blob/master/pretrained-vectors.md
for (( i=1; i<=$#; i++ )); do
wget -c "https://s3-us-west-1.amazonaws.com/fasttext-vectors/wiki.${!i}.zip"
done
# For example:
# ./download.sh bg el ka hy ru fa es fr de it pt ar tr pl ko
# If stopped it will not re-start automatically, but if re-started it will continue from where it stopped.