Skip to content

Instantly share code, notes, and snippets.

View justinbass's full-sized avatar

Justin Bass justinbass

View GitHub Profile
@schierlm
schierlm / IOTA-Dice.md
Created August 26, 2017 17:41
Generating a IOTA seed using a dice

Generating a IOTA seed using a dice

If you do not trust seed generators and do not believe your random keyboard smashing is random enough, you can use a dice to generate a random, perfectly distributed IOTA seed.

Just follow the instructions below and write down the seed while you are throwing your dice.

Note that this can be tedious, as between 162 and 243 dice rolls are required to generate the whole seed.

@potpath
potpath / dijkstra.py
Last active March 1, 2023 23:40 — forked from econchick/gist:4666413
Python implementation of Dijkstra's Algorithm using heapq
import heapq
from collections import defaultdict
class Graph:
def __init__(self, n):
self.nodes = set(range(n))
self.edges = defaultdict(list)
self.distances = {}
@joninvski
joninvski / bellman.py
Created November 16, 2010 11:31
Bellman ford python implementation
import pdb
"""
The Bellman-Ford algorithm
Graph API:
iter(graph) gives all nodes
iter(graph[u]) gives neighbours of u
graph[u][v] gives weight of edge (u, v)
"""