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
# create the environment | |
python3 -m venv myenv | |
# activate the env | |
source myenv/bin/activate | |
# leave the env | |
deactivate | |
# del the env dir |
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
1- install penumbra cli: | |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/penumbra-zone/penumbra/releases/latest/download/pcli-installer.sh | sh | |
----------------------- | |
2- import seed phrase: | |
pcli init --grpc-url https://grpc.penumbra.silentvalidator.com:443 soft-kms import-phrase | |
----------------------- | |
3- view balances |
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
def calculate_electricity_bill(consumption_kwh): | |
# Define price tiers in MAD/kWh | |
price_tiers = [ | |
(100, 0.9010), | |
(50, 1.0732), | |
(50, 1.0732), | |
(100, 1.1676), | |
(200, 1.3817), | |
(float('inf'), 1.5958) | |
] |
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() |
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 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
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
#!/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
### Keybase proof | |
I hereby claim: | |
* I am nfl0 on github. | |
* I am naoufal (https://keybase.io/naoufal) on keybase. | |
* I have a public key ASAVv-4C6nesoQ9hHgvj46_8uBkydMmKU08Q0I7Tc91jOwo | |
To claim this, I am signing this object: |
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
I contributed to the Semaphore Trusted Setup Multi-Party Ceremony. | |
The following are my contribution signatures: | |
Circuit: semaphore21 | |
Contributor # 311 | |
Hash: 7210d77e 2a58c23f 6b191f9b ddcd1219 | |
4b1b2d27 b94d7d37 ab4d9351 07004cb6 | |
e8b304e8 6a09e114 02103d9d 2b74f156 | |
424ea978 f2ae9828 da863a46 ad43ea54 | |
NewerOlder