Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<script src="https://d3js.org/d3.v7.min.js"></script>
</head>
<style>
html, body {
position: fixed;
overflow: hidden;
top: 0;
// Blob <-> Text funcs
// textFromBlob
public func textFromBlob(blob : Blob) : Text {
Text.join(",", Iter.map<Nat8, Text>(blob.vals(), Nat8.toText));
};
// blobFromText
public func blobFromText(t : Text) : Blob {
import itertools
import operator
import time
import sys
from functools import reduce
start_time = time.time()
from collections import Counter
originalLen = 0
def list_difference(a, b):
count = Counter(a) # count items in a