Skip to content

Instantly share code, notes, and snippets.

View alexhwoods's full-sized avatar

Alex Woods alexhwoods

View GitHub Profile
@stevenirby
stevenirby / cronometer-webhooker.js
Last active July 21, 2021 13:14
Cronometer webhooker - push calories and carbs to webhook.
// ==UserScript==
// @name Cronometer carb and calorie webhooker
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Send net carbs and calories to a webhook.
// @author Steven
// @match https://cronometer.com/
// @grant none
// @run-at document-end
// ==/UserScript==
@econchick
econchick / gist:4666413
Last active December 22, 2023 13:32
Python implementation of Dijkstra's Algorithm
class Graph:
def __init__(self):
self.nodes = set()
self.edges = defaultdict(list)
self.distances = {}
def add_node(self, value):
self.nodes.add(value)
def add_edge(self, from_node, to_node, distance):