pip3 install cupy-cuda11x
python3
import cupy as cp
x = [cp.arange(100000000) for _ in range(1000)]
ls -ad /home/username/.* | xargs -I {} du -sh {} | sort -rh | |
find . -maxdepth 1 -type d -exec du -sh {} \; 2>/dev/null | sort -rh |
VAR1=1 | |
VAR2=2 | |
VAR3=3 |
import torch, grp, pwd, os, subprocess | |
devices = [] | |
try: | |
print("\n\nChecking ROCM support...") | |
result = subprocess.run(['rocminfo'], stdout=subprocess.PIPE) | |
cmd_str = result.stdout.decode('utf-8') | |
cmd_split = cmd_str.split('Agent ') | |
for part in cmd_split: | |
item_single = part[0:1] | |
item_double = part[0:2] |
# upgrade git | |
sudo apt-get install -y python-software-properties software-properties-common | |
sudo add-apt-repository ppa:git-core/ppa -y | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install git -y | |
# install git-filter-repo | |
pip3 install git-filter-repo |
pip list --format=freeze > requirements.txt |
# REF: https://stackabuse.com/managing-python-environments-with-direnv-and-pyenv/ | |
# installing | |
curl -sfL https://direnv.net/install.sh | bash | |
# with bash | |
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc | |
source ~/.bashrc | |
# with zsh |
Hex | ChainId (Decimal) | Network | |
---|---|---|---|
0x1 | 1 | Ethereum Main Network (Mainnet) | |
0x3 | 3 | Ropsten Test Network | |
0x4 | 4 | Rinkeby Test Network | |
0x5 | 5 | Goerli Test Network | |
0x2a | 42 | Kovan Test Network | |
0xAA36A7 | 11155111 | Sepolia Testnet | |
0x89 | 137 | Polygon Main Network | |
0x13881 | 80001 | Mumbai Test Network | |
0xA86A | 43114 | Avalanche C-Chain Main Network |
<html> | |
<head> | |
<title>Web3 Metamask Login</title> | |
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet"> | |
</head> | |
<body class="flex w-screen h-screen justify-center items-center"> | |
<div class="flex-col space-y-2 justify-center items-center"> | |
<button id='loginButton' onclick="" class="mx-auto rounded-md p-2 bg-purple-500 text-white"> |
#!/bin/bash | |
# Requirements: linux, docker, grep, awk | |
# This script removes all "Down" (off) nodes from Docker Swarm | |
# Useful to clean stuff from time to time, if you have auto-joining nodes for example | |
sudo docker node rm $(sudo docker node ls | grep Down | awk -F" " '{ print $1 }') |