Skip to content

Instantly share code, notes, and snippets.

View jesperkristensen58's full-sized avatar
💭
BUIDLing

jtk.eth jesperkristensen58

💭
BUIDLing
View GitHub Profile
@jesperkristensen58
jesperkristensen58 / JupyterNotebookDownloader.sh
Created July 14, 2018 13:11 — forked from Momoumar/JupyterNotebookDownloader.sh
Download all programming assignments Notebook. #Coursera #DeepLearning.ai #Jupyter #Python
#To download all your programming assignments including all files and notebooks, follow these steps:
#1 - Go to the root tree folder for instance: https://hub.coursera-notebooks.org/user/${user_token}/tree/
#2- Open the terminal by clicking the + button on the right-hand corner
#3 - Enter the following command in the terminal:
tar cvfz allassignments.tar.gz *
#4 - The previous command will create a zip named allassignments containing all your programmings assignment
#5 - Select allassignments.tar.gz and download
#6 - Enjoy, don't forget to delete it afterward ;-)
@jesperkristensen58
jesperkristensen58 / max_money.py
Created July 6, 2022 02:19
A script for calculating how much total bitcoin will be issued
# Original block reward for miners was 50 BTC
start_block_reward = 50
# 210000 is around every 4 years with a 10 minute block interval
reward_interval = 210000
def max_money():
# 50 BTC = 50 0000 0000 Satoshis
current_reward = 50 * 10**8
total = 0
while current_reward > 0:
@jesperkristensen58
jesperkristensen58 / array_of_structs.sol
Created December 2, 2023 00:18
Solidity Example: Viewing Storage Layout of Array of Structs
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title ArrayOfStructs
* @dev A contract to manage an array of structs, with functions to add members,
* hash numbers, and directly access storage.
*/
contract ArrayOfStructs {
struct Member {