Skip to content

Instantly share code, notes, and snippets.

View renanvalentin's full-sized avatar

Renan Valentin renanvalentin

  • São José do Rio Preto
View GitHub Profile
export type Channel = {
on(event : string, listener : Function): *
};
export type Subscriber = {
listener(config : { window : HTMLIFrameElement, domain : string }): Channel
};
const subscribe = (channel : Channel) => {
let listeners = {};
import collections
class SimpleGraph:
def __init__(self):
self.edges = {}
def neighbors(self, id):
return self.edges[id]