Skip to content

Instantly share code, notes, and snippets.

View StrangeTcy's full-sized avatar
🏠
Working from home

Maxim Smirnov StrangeTcy

🏠
Working from home
View GitHub Profile
@StrangeTcy
StrangeTcy / torrc
Last active September 21, 2023 19:48
torrc_relay
## Configuration file for a typical Tor user
## Last updated 9 October 2013 for Tor 0.2.5.2-alpha.
## (may or may not work for much older or much newer versions of Tor.)
##
## Lines that begin with "## " try to explain what's going on. Lines
## that begin with just "#" are disabled commands: you can enable them
## by removing the "#" symbol.
##
## See 'man tor', or https://www.torproject.org/docs/tor-manual.html,
## for more options you can use in this file.
#!/ur/bin/bash
sudo apt install apt-transport-https
echo "deb https://deb.torproject.org/torproject.org jammy main" | sudo tee -a /etc/apt/sources.list
echo "deb-src https://deb.torproject.org/torproject.org jammy main" | sudo tee -a /etc/apt/sources.list
wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
sudo apt -f install
sudo apt update
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
from tqdm.auto import tqdm
from time import sleep
import subprocess as sp
locations = ['smart', 'defr3', 'defr1', 'denu', 'jpto', 'jpsh', 'jpyo', 'jpto2', 'usnj3', 'usnj1', 'usny', 'usat', 'usmi2', 'usmi', 'uswd', 'usda', 'usch', 'uslp', 'usal', 'ussf', 'usla3', 'usla2', \
'usse', 'usde', 'ussl1', 'usta1', 'usph', 'usnj2', 'usda2', 'usla1', 'usla5', 'ussm', 'sgju', 'sgcb', 'sgmb', 'hk2', 'hk1', 'aume', 'auwo', 'ausy', 'aupe', 'aubr', 'auad', 'ausy2', 'nlth', 'nlam', 'nlro', \
@StrangeTcy
StrangeTcy / to_txt.sh
Last active July 12, 2021 11:24
text_splitter
#!/usr/bin/bash
for f in *.txt_shard; do
mv -- "$f" "${f%.txt_shard}.txt"
FILENAME=${f%.txt_shard}.txt
FILESIZE=$(stat -c%s "$FILENAME")
echo "Size of $FILENAME = $FILESIZE bytes."
split --verbose --bytes 1MB $FILENAME $FILENAME --additional-suffix ".txt"
echo "Deleting $FILENAME"
rm -fv $FILENAME
@StrangeTcy
StrangeTcy / music_theory.py
Created April 26, 2021 09:39 — forked from mvanga/music_theory.py
Basic Music Theory in ~200 Lines of Python
# The code for my article with the same name. You can find it at the URL below:
# https://www.mvanga.com/blog/basic-music-theory-in-200-lines-of-python
# MIT License
#
# Copyright (c) 2021 Manohar Vanga
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
0xd54d94175590Ae0E9EeB8D103367bC3e71953c7d
0x66DA1d997Df400126FB954807B4d6DAd9E2ECc8e
@StrangeTcy
StrangeTcy / waya-dl-setup.sh
Created December 4, 2017 15:30 — forked from mjdietzx/waya-dl-setup.sh
Install CUDA Toolkit v8.0 and cuDNN v6.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v8.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get -y install cuda
@StrangeTcy
StrangeTcy / keybase.md
Last active January 5, 2018 20:25
keybase stuff

Keybase proof

I hereby claim:

  • I am strangetcy on github.
  • I am strangetcy (https://keybase.io/strangetcy) on keybase.
  • I have a public key ASDMERtZjea7hcZUael3N-nsswqRL74JkPeg_OtUO2utNQo

To claim this, I am signing this object: