Skip to content

Instantly share code, notes, and snippets.

Avatar
🧔
Growing Beard

Chang Luo Luo-Chang

🧔
Growing Beard
  • The University of Edinburgh
  • Scotland
View GitHub Profile
@Luo-Chang
Luo-Chang / numpy-benchmark.py
Created Apr 22, 2021 — forked from markus-beuckelmann/numpy-benchmark.py
A short Python script to benchmark NumPy and show your BLAS setup
View numpy-benchmark.py
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Roughly based on: http://stackoverflow.com/questions/11443302/compiling-numpy-with-openblas-integration
from __future__ import print_function
import numpy as np
from time import time
@Luo-Chang
Luo-Chang / Ballot.sol
Created Jun 3, 2018
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
View Ballot.sol
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
}
struct Proposal {
uint voteCount;