Skip to content

Instantly share code, notes, and snippets.

@BjornvdLaan
BjornvdLaan / BLSExample.sol
Last active April 10, 2023 07:49
Verification of BLS signatures and BGLS aggregate signatures in Ethereum
pragma solidity ^0.4.14;
/*
Example of how to verify BLS signatures and BGLS aggregate signatures in Ethereum.
Signatures are generated using https://github.com/Project-Arda/bgls
Code is based on https://github.com/jstoxrocky/zksnarks_example
*/
contract BLSExample {
from yahoo_finance import Share
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
import random
%matplotlib inline
class DecisionPolicy:
def select_action(self, current_state, step):
pass
@i3visio
i3visio / hashcash.py
Created August 9, 2016 21:27
hashcash.py is a clean implementation of a "proof of work" library for Python.
# ----------------------------------------------
# hashcash.py: Hashcash implementation
# ----------------------------------------------
"""
Hashcash is a "proof of work."
Example:
>>> import sha
>>> sha.new('denmark2890CF').hexdigest() '000000cf89643370c24e413ec0886ab92bd7f6e8'