Skip to content

Instantly share code, notes, and snippets.

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
@aunyks
aunyks / snakecoin-block.py
Last active March 8, 2024 18:49
The block structure for SnakeCoin.
import hashlib as hasher
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp
self.data = data
self.previous_hash = previous_hash
self.hash = self.hash_block()
title layout
Notes on xgboost: Extreme Gradient Boosting Machine
default

Background

  • Computation in C++
  • tree-based models
  • easy to use, install, R/python interface
  • Automatic parallel computation on a single Machine
title subtitle layout
Notes from Statistical Learning Course
via Stanford University Online
default

Course Link

@chenghan
chenghan / gist:7456549
Last active February 5, 2022 20:17
Instructor code that was shown on screen
import sys
salesTotal = 0
oldKey = None
for line in sys.stdin:
data = line.strip().split("\t")
if len(data) != 2:
# Something has gone wrong. Skip this line.
continue