Skip to content

Instantly share code, notes, and snippets.

View PiRK's full-sized avatar
💭
Bonjour

Pierre K PiRK

💭
Bonjour
View GitHub Profile
@PiRK
PiRK / weekly_report.sh
Last active October 25, 2020 05:23
weekly statistics on a git repository
#!/usr/bin/env bash
# Print weekly statistics on a git repository.
echo Usage: weekly_report.sh path_to_git_project iso_week_number year
gitpath=$1
week=$2
year=$3
echo Statistics for git project $1
@PiRK
PiRK / print_coinbase.py
Created April 2, 2021 06:54
Print the coinbase data for all ancestors of a block, up to a specified block height
import json
import subprocess
tip = "00000000000000002b3ca56c3fdef9a74b8758bc7da5d9c9aecd79ed922a3692"
FORK_HEIGHT = 679555
def print_chain(tip_hash: str, min_height: int = FORK_HEIGHT):
"""Print block information starting at a given chain tip and going
backward up to (and including) the block with height min_height"""