last update: Dec 4, 2020
- macOS >= 10.14 (Mojave); tested with 10.15 (Catalina)
- homebrew properly installed
| sudo apt update | |
| sudo apt -y install build-essential | |
| sudo apt -y install linux-headers-$(uname -r) | |
| wget -N https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.168_418.67_linux.run | |
| wget -N http://developer.download.nvidia.com/compute/redist/cudnn/v7.6.0/cudnn-10.1-linux-x64-v7.6.0.64.tgz | |
| wget -N https://developer.download.nvidia.com/compute/redist/nccl/v2.4/nccl_2.4.7-1+cuda10.1_x86_64.txz | |
| #Disable nouveau driver | |
| echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf > /dev/null |
last update: Dec 4, 2020
| def summary(input_size, model): | |
| def register_hook(module): | |
| def hook(module, input, output): | |
| class_name = str(module.__class__).split('.')[-1].split("'")[0] | |
| module_idx = len(summary) | |
| m_key = '%s-%i' % (class_name, module_idx+1) | |
| summary[m_key] = OrderedDict() | |
| summary[m_key]['input_shape'] = list(input[0].size()) | |
| summary[m_key]['input_shape'][0] = -1 |
| After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
| The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
| Database files have to be updated before starting the server, here are the steps that had to be followed: | |
| # need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
| brew unlink postgresql | |
| brew install [email protected] | |
| brew unlink [email protected] | |
| brew link postgresql |
| # DATABASE | |
| DATABASE_DATA_DIR=./docker/postgres/data | |
| DATABASE_LOG_DIR=./docker/postgres/logs | |
| DATABASE_HOST=db | |
| DATABASE_PORT=5432 | |
| DATABASE_NAME=mydbname | |
| DATABASE_USER=myusername | |
| DATABASE_PASSWORD=mypassword | |
| # phpPgAdmin |
| #deb cdrom:[Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)]/ xenial main restricted | |
| # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
| # newer versions of the distribution. | |
| deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted | |
| # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted | |
| ## Major bug fix updates produced after the final release of the | |
| ## distribution. | |
| deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted |
| ''' | |
| I started one server: | |
| $ python aiohttp_rq.py server | |
| And three workers in different terminals: | |
| $ python aiohttp_rq.py worker | |
| And I got next results with ab: |
Steps to setup a new OS X laptop with a data science & computational biology development environment.
Last updated: 7 Jan 2017 macOS: Yosemite => Sierra
Sure you could try to do this from dotfiles, but historically something has broken and required manual input anyway. So, inspired by the pragmatism of paul irish bash setup script and a few other gists written in markdown like this, I rolled my own.