Skip to content

Instantly share code, notes, and snippets.

@Laurence-Cullen
Laurence-Cullen / install.sh
Created December 28, 2020 16:40
Install CUDA for TensorFlow on Ubuntu 20.04
# Add NVIDIA package repositories
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
sudo apt-get update
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64/nvidia-machine-learning-repo-ubuntu2004_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu2004_1.0.0-1_amd64.deb
version: '3'
services:
mongo-express:
image: mongo-express
ports:
- 8081:8081
environment:
ME_CONFIG_BASICAUTH_USERNAME: renatogroffe
ME_CONFIG_BASICAUTH_PASSWORD: MongoExpress2019!
@goweiting
goweiting / install.conda.md
Last active January 7, 2021 17:05
Installing graph-tool with other packages staying in an virtual env (conda)

There is no guarantee that this will work, i wrote this so in case anyone else have the same goal in mind. Using: Ubuntu 16.04; miniconda2

What i want to achieve:

  1. use graph-tool
  2. all other packages should fall in a virtual environment

Failed attempts:

  1. I attempted to build graph-tool from scratch but did not work, and couldnt seem to pull everything together.
  2. Attempt to use all the graph-tool packages on anaconda cloud... (idgi)
def dump_func_name(func):
def echo_func(*func_args, **func_kwargs):
print('')
print('Start func: {}'.format(func.__name__))
return func(*func_args, **func_kwargs)
return echo_func
class ClassName(object):
@dump_func_name
@marcy-terui
marcy-terui / sakura_init.sh
Created March 10, 2014 07:13
Disable PasswordAuthentication and Enable PubkeyAuthentication on Sakura VPS.
USER_NAME=marcy
sed -i "s/.*RSAAuthentication.*/RSAAuthentication yes/g" /etc/ssh/sshd_config
sed -i "s/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g" /etc/ssh/sshd_config
sed -i "s/.*PasswordAuthentication.*/PasswordAuthentication no/g" /etc/ssh/sshd_config
sed -i "s/.*AuthorizedKeysFile.*/AuthorizedKeysFile\t\.ssh\/authorized_keys/g" /etc/ssh/sshd_config
sed -i "s/.*PermitRootLogin.*/PermitRootLogin no/g" /etc/ssh/sshd_config
echo "${USER_NAME} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
service sshd restart