Skip to content

Instantly share code, notes, and snippets.

View ricgu8086's full-sized avatar

Ricardo Guerrero Gómez-Olmedo ricgu8086

View GitHub Profile
@ricgu8086
ricgu8086 / seed_everything.py
Created June 17, 2024 07:39 — forked from ihoromi4/seed_everything.py
pytorch - set seed everything
def seed_everything(seed: int):
import random, os
import numpy as np
import torch
random.seed(seed)
os.environ['PYTHONHASHSEED'] = str(seed)
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
@ricgu8086
ricgu8086 / ubuntudocker.sh
Created September 6, 2024 10:15 — forked from fredhsu/ubuntudocker.sh
Shell script to install Docker CE on ubuntu and post-install user configuration
#!/bin/bash
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \