Skip to content

Instantly share code, notes, and snippets.

@vanhien13
vanhien13 / blockchain.md
Created September 30, 2019 05:19 — forked from kwichmann/blockchain.md
Blockchain and Ethereum resources
import hashlib as hasher
import datetime as date
# Define what a Snakecoin block is
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp
self.data = data
self.previous_hash = previous_hash
@vanhien13
vanhien13 / basicmap.r
Last active August 29, 2015 14:14 — forked from cdesante/basicmap.r
doInstall <- TRUE
toInstall <- c("maps", "ggplot2")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
library(ggplot2)
library(maps)
Prison <- read.csv("http://www.oberlin.edu/faculty/cdesante/assets/downloads/prison.csv")
head(Prison)