Skip to content

Instantly share code, notes, and snippets.

View DonaldTsang's full-sized avatar

Don Tsang DonaldTsang

  • Will accept work, if that is even possible
  • Kamoshida's Palace
View GitHub Profile
@dvergeylen
dvergeylen / README.md
Last active April 3, 2024 16:27
JSQrcode library tutorial

Introduction

This tutorial is a step by step guide on how to use the javascript QR Code scanner on a webcam video stream in browser. Some people reported experiencing problems including it in their own projets so I guess a tutorial might help others.

Step 1: Include library in <head> section

<html lang="en">
  <head>
    <script type="text/javascript" src="grid.js"></script>
    <script type="text/javascript" src="version.js"></script>
    <script type="text/javascript" src="detector.js"></script>
#!/usr/bin/env python
from __future__ import print_function
import collections
import fileinput
import sys
plop = collections.defaultdict(list)
@agfor
agfor / skein.py
Last active February 22, 2021 23:50
A pure-Python implementation of a subset of the Skein hash function. Written to see if I understood the spec.
from __future__ import print_function, division
from math import ceil
from operator import xor, getitem
from functools import reduce
from struct import unpack, pack
two64 = 0x10000000000000000
def hexToBytes(hexes):
hexes = hexes.replace(' ', '')
return bytes(int(hexes[i:i+2], 16) for i in range(0, len(hexes), 2))