Skip to content

Instantly share code, notes, and snippets.

View jbn's full-sized avatar

John B Nelson jbn

View GitHub Profile
@gordonbrander
gordonbrander / pi-hash-addressed-sessions.md
Created March 9, 2026 15:04
Pi hash-addressed sessions

Content-Addressing Pi Sessions

Goal

Enable distribution of Pi session data across a network (including p2p) by content-addressing session files without modifying Pi itself.

Background

Pi Session Files

# Copyright 2019 Google LLC.
# SPDX-License-Identifier: Apache-2.0
# This snippet shows you how to use Blob.generate_signed_url() from within compute engine / cloud functions
# as described here: https://cloud.google.com/functions/docs/writing/http#uploading_files_via_cloud_storage
# (without needing access to a private key)
# Note: as described in that page, you need to run your function with a service account
# with the permission roles/iam.serviceAccountTokenCreator
import os, google.auth
from google.auth.transport import requests
abstract Person
type Adult <: Person
age::Int
height::Float64
position::Int
end
type Child <: Person
age::Int
@Andy-P
Andy-P / StreamAnalytics.jl
Last active July 25, 2024 20:59
High Performance Streaming Analytics in Julia
# This code is part of a presentation on streaming analytics in Julia
# It was inspired by a number of individuals and makes use of some of their ideas
# 1. FastML.com got me thinking about inline processing after
# reading his great Vowpal Wabbit posts
# 2. John Lanford and his fantastic Vowpal Wabbit library.
# Check out his NYU video course to learn more (see below)
# 3. John Myles White's presentation on online SDG and his StreamStats.jl library
# Thank you all!
@dmasad
dmasad / Grey's Anatomy ERGM with Python.ipynb
Created June 29, 2015 14:08
Replicating the Grey's Anatomy Hookup ERGM with PyMC
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.