This is a note on how to install pyenv on Mac OS High Sierra 10.13.2.
brew update
brew install pyenv
restart your terminal
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
def diyBubbleSort(alist): | |
for iterasiEksternal in reversed(range(len(alist))): | |
print iterasiEksternal | |
for nilaiInternal in range(iterasiEksternal): | |
if alist[nilaiInternal] > alist[nilaiInternal+1]: | |
temp = alist[nilaiInternal] | |
alist[nilaiInternal] = alist[nilaiInternal+1] | |
alist[nilaiInternal+1] = temp | |
print alist |
import sys | |
def split_line(line): | |
cols = line.split("\t") | |
return cols | |
def get_words(cols): | |
words_ids = cols[4].split(" ") | |
words = [w.split("#")[0] for w in words_ids] | |
return words |
When you got a new Mac from office, meaning that you should set everything up before get back to work.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap caskroom/cask
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
brew install zsh-completions
echo "fpath=(/usr/local/share/zsh-completions \$fpath)" >> ~/.zshrc
Before installing keras, we need to install at least one of its backend technoloy: TensorFlow, Theano or CNTK. All the steps are well written in this documentation: https://keras.io/#installation. However, I will still keep a personal note on this. Becouse sometime any blocker or unwanted thing possibly happens during the installation. And I think it is worth to keep those experiences noted.
It is recommended to install tensorflow
either using virtualenv/pyenv/docker that can isolate the tensorflow dependencies. However, using conda
is not recommended since the conda package is community supported, not officially supported. That is, the TensorFlow team neither tests nor maintains the conda package.
The installation process may take more than 10 minutes, since its file size is quite large meanwhile it has to download the dependent package files as well.
# install tensorflow
When you run pip with sudo, you run setup.py with sudo. In other words, you run arbitrary Python code from the Internet as root. If someone puts up a malicious project on PyPI and you install it, you give an attacker root access to your machine. Prior to some recent fixes to pip and PyPI, an attacker could also run a man in the middle attack to inject their code when you download a trustworthy project.
Instead of sudo pip install ApplicationName
do pip install --user ApplicationName
This is a note on how to create and manage multiple ssh-keys on laptop
$ ssh-add -l
$ ssh-add ~/.ssh/id_rsa
$ ssh-add ~/.ssh/id_rsa_personal
But, whenever I open new terminal tab and check for its ssh-agent through this command ssh-add -l
, it returns no agent
.
This is the step on how I start using latex on mac.
Do we need to download certain apps to use latex? Basically, no. We can use our text editor, such as: atom, visual studio code, sublime, etc.
However, if you are not familiar with text editors, you can also use an application named texWorks
to write and compile any .tex files. Download the texWorks here: https://www.tug.org/texworks/
and install it.
Then, follow the tutorial written here. http://www.docs.is.ed.ac.uk/skills/documents/3722/3722-2014.pdf
If you are using visual studio code, you can download the extension support (?) found on the marketplace for latex.
Either you are using texWorks
or any other text editor, you should install mactex
(where pdflatex
is included also) to be able to preview the latex document in pdf.
UK phone numbers should contain 11 digits and are normally in the format (01234) 123123
US phone numbers These formats include 1234567890, 123-456-7890, 123.456.7890, 123 456 7890, (123) 456 7890, and all related combinations. If the phone number is valid, you want to convert it to your standard format, (123) 456-7890, so that your phone number records are consistent.