wget https://www.python.org/ftp/python/3.10.7/Python-3.10.7.tar.xz
tar -xf Python-3.10.7.tar.xz
cd Python-3.10.7/
./configure --enable-optimizations
sudo make altinstall
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# inspired by | |
# https://www.datasciencedata.com/2018/09/encryption-using-matrix-python.html | |
import numpy as np | |
from string import ascii_lowercase | |
ck = np.matrix = [[2, 1], [3, 2]] # Encryption key | |
dk = np.matrix = [[2, -1], [-3, 2]] # Decryption key | |
code_to_text = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
sudo apt install python-pip python-dev -y | |
pip install ryu --user --upgrade | |
echo "export PATH=~/.local/bin:$PATH" >> ~/.bashrc | |
source ~/.bashrc | |
echo "done, checking installation..." | |
ryu --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from sys import argv | |
def relu(input_value): | |
output_value = max(0, input_value) | |
return output_value | |
children = int(argv[1]) | |
accounts = int(argv[2]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
from requests import get as req_get | |
# Stating the bot's identification | |
headers = {'user-agent': 'topsongs:v0.1.0 by me@mail.com'} | |
url = 'http://www.billboard.com/charts/billboard-200' | |
request = req_get(url, headers=headers) | |
request.raise_for_status() # in case something goes wrong |
NewerOlder