Setting up a my new macOS Sierra

Install Brew
ruby -e "$(curl -fsSL"
Generate SSH Key and add to Github profile
ssh-keygen -t rsa -C ""
Install Sequel Pro

Installing R on OSX

Install Homebrew (if you still don't have it) 
ruby -e "$(curl -fsSL" 

Install R 
brew tap homebrew/science 
brew install r

When running r, I got the following error message:

dyld: Library not loaded: /usr/local/opt/gcc/lib/gcc/6/libgfortran.3.dylib
  Referenced from: /usr/local/Cellar/r/3.3.1/R.framework/Versions/3.3/Resources/lib/libR.dylib
  Reason: image not found

Trace/BPT trap: 5

To fix this error, I had to do this:
brew reinstall gcc --with-fortran

Fastest Factorial Function in Python

from functools import reduce
from operator import mul

def fastest_factorial(n):
     return reduce(mul, range(1, n+1), 1)

Tutorial: virtualenvwrapper

0) Make sure you have pip & virtualenv

sudo easy_install pip
sudo pip install virtualenv

1) Install virtualenvwrapper

sudo pip install virtualenvwrapper

2) Add the following lines in your shell startup file (.bashrc or .profile file).

export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/
### or ###
source /usr/bin/
### if you installed virtualenvwrapper in that directory
### you can use sudo find / -name
### to locate virtualenvwrapper if you installed it somewhere else



PISIKA Copyright © 2009