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
def pub_to_e_n(key): | |
""" | |
Converts a .pub public key to an exponent and n value | |
:param key: String. Public key | |
:return: e as Int | |
:return: n as Long | |
""" | |
import base64 | |
import struct | |
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
/** | |
* Framework independent function to load CSS | |
* @param path To the CSS file | |
* @returns {HTMLElement} | |
*/ | |
function loadStyleSheet(path) { | |
var head = document.getElementsByTagName( 'head' )[0], // reference to document.head for appending/ removing link nodes | |
link = document.createElement( 'link' ); // create the link node | |
link.setAttribute( 'id', 'cssLKLoad'); // set ID to check if already loaded | |
link.setAttribute( 'href', path ); |
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
SUITS = ["clubs", "diamonds", "hearts", "spades"] | |
class Card(object): | |
one_to_fifty_two = None | |
number = None | |
suit = None | |
positions = None | |
def __init__(self, number, suit, value): |
NewerOlder