Skip to content

Instantly share code, notes, and snippets.

@bygreencn
bygreencn / ubuntu_cuda10.1.sh
Last active June 22, 2019 01:31 — forked from fo40225/ubuntu1804cuda10.sh
install cuda 10.1 on ubuntu
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
@rcugut
rcugut / [GUIDE] macos yarn nvm install.md
Last active July 10, 2023 11:49
GUIDE for mac OS X yarn nvm node install

GUIDE to install yarn, nvm (node) on macOS

last update: Dec 4, 2020

Assumptions:

  • macOS >= 10.14 (Mojave); tested with 10.15 (Catalina)
  • homebrew properly installed
@HTLife
HTLife / summary.py
Created March 16, 2018 06:37
Pytorch model summary
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
@sitkevij
sitkevij / minikube-mac-install.md
Last active September 24, 2021 12:11
minikube mac install

Hello Minikube Mac Install

install brew

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
@giannisp
giannisp / gist:ebaca117ac9e44231421f04e7796d5ca
Last active July 14, 2024 18:27
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
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
@glimberger
glimberger / .env
Last active May 8, 2019 20:18
Docker Compose for Symfony: PHP 7.1 - Postgres - PhpPgAdmin - Selenium Hub + Chrome/Firefox/PhantomJS nodes
# 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
@rohitrawat
rohitrawat / sources.list
Created June 12, 2017 18:17
Ubuntu 16.04 Xenial default /etc/apt/sources.list
#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
@akiross
akiross / Understanding_queues_in_TF.ipynb
Created April 3, 2017 16:50
This notebook aims to explain how queues are used in tensorflow, in a bit more practical way than the official docs. I developed and tested this with TF 1.0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@imbolc
imbolc / aiohttp_rq.py
Created October 28, 2015 09:03
Testing of aiohttp + rq performance
'''
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:
@elipapa
elipapa / _Setup_new_laptop.md
Last active February 26, 2024 04:27
Steps to set up a new osx laptop for data science and computational biology work

Set up a new os x laptop

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.

Some design considerations: