Skip to content

Instantly share code, notes, and snippets.

View mogwai's full-sized avatar

Harry Coultas Blum mogwai

View GitHub Profile
curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | sh -
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
nvm install stable
nvm use stable
npm i -g speed-test
# Install Docker
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | sh -
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
nvm install stable
nvm use stable
npm i -g speed-test
# Install Docker
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
@mogwai
mogwai / nbrecord.ipynb
Created July 15, 2020 18:16
Notebook Audio Recorder
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mogwai
mogwai / resample_benchmark.ipynb
Last active January 11, 2023 03:42
Resampling Benchmarks
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mogwai
mogwai / cache.py
Last active January 19, 2024 13:17
A simple method to cache functions to some folder basesd on the arguments
import hashlib
import numpy as np
from torch import Tensor
from typing import Union
import os
import pickle
from functools import wraps
def sha256(b: Union[float, list, Tensor, str, bytes, np.ndarray]):
if isinstance(b, (int, list, float)):
@mogwai
mogwai / hash.py
Created March 10, 2024 10:26
Hashing torch
import torch
import io
import numpy as np
import hashlib
x = torch.randn(1, 20)
buff = io.BytesIO()
torch.save(x, buff)
buff.seek(0)