Skip to content

Instantly share code, notes, and snippets.

View nfl0's full-sized avatar
😋

nfl0

😋
View GitHub Profile
@nfl0
nfl0 / privacy-pools-ceremony_attestation.log
Created February 20, 2025 00:21
Attestation for Privacy Pools Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm nfl0-24908032 and I have contributed to the Privacy Pools Ceremony.
The following are my contribution signatures:
Circuit # 1 (withdraw)
Contributor # 25
Contribution Hash: 7976cdcd a6d4ea9e 49a1edff e4b05173
f8fd2b81 95200bff 0edc079c d065bd5e
73cc429c 32f46107 69e85d45 d5e91ec5
53f0af62 f6174e33 31ff405d 7c3da671
import websocket
import json
import os
import threading
import time
import subprocess
# Global variables to store dynamic values
current_price = "Fetching..."
accumulated_sent = 0
@nfl0
nfl0 / zec_monitor.py
Created December 8, 2024 00:38
monitor zcash price w/ binance websocket
import websocket
import json
import psutil
import os
import curses
import threading
import time
# Global variables to store dynamic values
current_price = "Fetching..."
@nfl0
nfl0 / guide.txt
Created November 17, 2024 23:53
Becoming a Penumbra validator
# Penumbra Validator Setup Guide
## Prerequisites
1. Ensure system meets the following requirements:
- 8GB RAM, 2-4 vCPUs, 200GB SSD storage.
- Public IP for peer-to-peer connections.
2. Install dependencies: `git`, `rustup`, and `cargo`.
---
@nfl0
nfl0 / env.txt
Created August 18, 2024 11:13
manage a python env
# create the environment
python3 -m venv myenv
# activate the env
source myenv/bin/activate
# leave the env
deactivate
# del the env dir
@nfl0
nfl0 / recovery.txt
Last active August 2, 2024 01:03
recover funds from a penumbra nft auction using the penumbra cli
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
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)
]
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()
@nfl0
nfl0 / Python Programming Techniques Demo
Created April 17, 2023 11:18
This Python script demonstrates various programming techniques including conditional statements, loops, lists, dictionaries, functions, classes, file handling, random numbers, and system commands. Each programming technique is accompanied by examples and comments for clarity and understanding. Use this script as a reference or tutorial for learn…
# Importing modules
import os
import random
# Declaring variables
num1 = 5
num2 = 10
name = "John"
# Conditional statements
@nfl0
nfl0 / main.py
Created April 11, 2023 12:13
Don't sell in May, stay invested! #SellinMayAndGoAway
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"