View this code at http://livecoding.io/4192986
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# | |
# implementation of the AES protocol as used by https://encipher.it | |
# | |
# (c) 2018 Bernd Busse | |
from cryptography.hazmat.primitives.ciphers import Cipher | |
from cryptography.hazmat.primitives.ciphers.algorithms import AES | |
from cryptography.hazmat.primitives.ciphers.modes import ECB, CTR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fullAlphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; | |
const restrictedAlphabet = 'BCDFGHJKLMNPQRSTVWXZbcdfghjklmnpqrstvwxz'; | |
const threadPrefix = 'thread-'; | |
const messagePrefix = 'msg-'; | |
const isWhitespace = str => /^[\s\xa0]*$/.test(str); | |
const isInvalidString = str => str ? (str.indexOf(threadPrefix) !== -1 || str.indexOf(messagePrefix) !== -1) : false; | |
const encode = function(str) { | |
if (isWhitespace(str)) return str; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# <nbformat>3.0</nbformat> | |
# <headingcell level=2> | |
# Soccer 101 - Player Positions | |
# <codecell> | |
from IPython.core.display import Image |
View this code at http://livecoding.io/4083919
View this code at http://livecoding.io/4049300
View this code at http://livecoding.io/4049295