Skip to content

Instantly share code, notes, and snippets.

@mohitkh7
mohitkh7 / blockchain.py
Last active January 21, 2022 05:33
Workshop on blockchain - Scipy 2021
"""
Exercises:
Try to change difficulty level in proof of work algorithm and see how long does it takes to compute nonce.
Write a method to validate the chain.
Reward the mining node.
"""
# blockchain.py
import hashlib
@mohitkh7
mohitkh7 / wp_bomb.js
Created August 27, 2023 15:39
Whatsapp Invisible Message Bomber
function sendMessage(){
const mainEl = document.querySelector('#main')
const textareaEl = mainEl.querySelector('div[contenteditable="true"]')
if(!textareaEl) {
throw new Error('There is no opened conversation')
}
random_length = Math.floor(Math.random() * 1000) + 1
textareaEl.focus()
document.execCommand('insertText', false, '‎ '.repeat(random_length))
@mohitkh7
mohitkh7 / algo-trading-setup.ipynb
Last active May 30, 2024 18:41
algo-trading-setup.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mohitkh7
mohitkh7 / pycon24-algotrading.ipynb
Last active April 21, 2025 15:46
PyCon24 AlgoTrading.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.