Real-time road sign assistance
This project is maintained by octaexon
Before launching into the nitty gritty, I should spare a word or two for my development environment. I’m working on that renowned workhorse of high performance computing, the MacBook Air. Indeed, we’ll talk about the cloud later, but for the moment:
shell I use the zsh (it’s patiently waiting for you in /bin) with the oh-my-zsh framework for configuration. What is especially nice is the host of plugins that oh-my-zsh provides. Honestly, I don’t think I’ll ever go back to bash.
packaging Homebrew is my package manager of choice.
python pyenv and pyenv-virtualenv are simply fantastic. During the development of this project, there was a fragility in running the Tensorflow Object Detection API on the Google Cloud Platform ML Engine using the python 3.5 runtime, meaning to say that it simply didn’t work in the cloud. The other option provided in the cloud is the python 2.7 runtime.
So I wanted to be able to switch between python 3.5 and 2.7 effortlessly, while still maintaining the insulation of their respective virtual environments. The pyenv/pyenv-virtualenv combination makes this a doddle. To install:
brew install pyenv pyenv-virtualenv
Actually, with oh-my-zsh their configuration is completed just by enabling the pyenv plugin in your .zshrc file. (Awesome). Let’s install the two python versions in which we are interested:
pyenv install 3.5.0 2.7.9
Create two named virtual environments:
pyenv virtualenv 3.5.0 dts3
pyenv virtualenv 2.7.9 dts2
We can now attach them to our project:
# within root directory of our project
pyenv local dts3 dts2
A wonderful feature is the hierarchical stucture, so for example all of the python, pip and python3, pip3 commands resolve to the dts3 virtual environment, while only python2, pip2 resolve to the dts2 virtual environment. This suited me down to the ground as most of my development was in python 3 with the newest versions of various modules, while I only rarely needed to call python2 (sometimes with older versions of the same packages).
Another beautiful facet of oh-my-zsh in this instance is that its pyenv plugin activates and deactivates the virtual environment as you enter and exit the project path. No more manual configuration!
editor vim (of course!), actually MacVim with python3 support and the YouCompleteMe plugin (among others).