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
#!/bin/bash | |
source $HOME/.bashrc | |
TZ=Africa/Casablanca | |
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
apt-get update | |
apt-get upgrade -y | |
apt-get install -y sudo nano wget tar zip unzip jq goxkcdpwgen ssh nginx build-essential git make gcc nvme-cli pkg-config libssl-dev libleveldb-dev clang bsdmainutils ncdu libleveldb-dev apt-transport-https gnupg2 cron | |
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config | |
(echo ${my_root_password}; echo ${my_root_password}) | passwd root | |
service ssh restart |
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 requests | |
url = "https://rpc-mumbai.maticvigil.com" | |
try: | |
response = requests.post(url, json={"jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1}) | |
if response.status_code == 200 and "result" in response.json(): | |
print("RPC is operational.") | |
print(response.json()) | |
else: |
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 requests | |
import pandas as pd | |
from scipy.stats import ttest_ind | |
# set up Coingecko API endpoint | |
base_url = "https://api.coingecko.com/api/v3" | |
endpoint = "/coins/bitcoin/market_chart" | |
# set number of days to retrieve historical data for | |
days = "max" |
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
# Importing modules | |
import os | |
import random | |
# Declaring variables | |
num1 = 5 | |
num2 = 10 | |
name = "John" | |
# Conditional statements |
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 time | |
from blake3 import blake3 | |
import hashlib | |
# Data for benchmarking | |
data = b"some data to hash" * 1000000 | |
# BLAKE3 hashing and benchmarking | |
start_time_blake3 = time.time() | |
hasher_blake3 = blake3() |
OlderNewer