Skip to content

Instantly share code, notes, and snippets.

View ikkebr's full-sized avatar

Henrique Pereira ikkebr

View GitHub Profile
@jsbueno
jsbueno / bolderificator.py
Last active May 19, 2016 20:19
bolderificator.py
#! /usr/bin/env python3
from urllib.request import urlopen
import re
import unicodedata
def fetch():
data = urlopen("https://www.w3.org/TR/MathML2/double-struck.html").read()
dcontent = re.findall(r"<td.*?>\s*?(.*?)</td", data.decode("utf-8"))
@juanplopes
juanplopes / rsa.py
Last active July 14, 2023 17:35
RSA by example
from random import randint
#----Step 1
# First, choose two random primes.
# In real world, they should be really big primes (hundreds of digits).
p, q = 41, 47
#----Step 2
# From them we have n=p*q and phi(n)=(p-1)*(q-1).