I just recently had to set up my new macbook and as some people asked me about my data science setup for R/ python-scripting, package and app development and working with remote serves, I decided to give a short overview within this post. This setup allows me to have full control over my projects, work with different languages in the same interface and seaminglessly switch to any cloud computing service that allows command line acces via SSH.
Basically, I use sublimetext3 as an editor and iterm2 with ipython for code execution locally as well as remotely. In the following, I will cover those basic issues:
- sublimetext 3
- sendcode for code execution
- different terminals (macOS, ubunut, windows)
- docstrings and code completion via anaconda package
- r-box for R
- setup miniconda for virtual environments
- work and sync on any remote server (SimpleSync)
sublimetext3
- download and install sublime text 3 from here
- get terminal:
- install sublime package
sendCode
to execute line-by-line in your terminal via convenient key bindings:- enter the sublime package manager:
cmd + shift + P
, typeControl packages:
and chooseinstall packages
- enter
SendCode
and pressenter
to install - check the SendCode settings and enter your prefered terminal for each language (e.g.
cmder
for windows,iterm
for macOS):Preferences
>>Package Settings
>>SendCode
>>Settings
-
for windows only: uncomment and enter the line
conemuc: <path to cmder folder>\\vendor\\conemu-maximus5\\ConEmu\\ConEmuC.exe
to show SendCode where to send the code. Should finally look like this:
- enter the sublime package manager:
- install sublime package Anaconda for python highlighting and docstrings
- install sublime package R-Box for R highlighting and docstrings
- general: define key-bindings aka shortcuts
Preferences
>>Key Bindings
virtual environments
I use virtual environments for each project to reduce the hustle with different package dependencies etc.
- install miniconda
- create virtual environment for your project:
conda create -n <your env name> python=<python version, e.g. 3.7> anaconda
- activate it:
source activate <your env name>
- deactivate it:
source deactivate
remote work via ssh and code sync
wip
additional material
- plot inside your terminal with the awesome itermplot extension
- use openSSH within a MNet network (which does not provide IPv4) via feste-ip.de (GER only)