Skip to content

Instantly share code, notes, and snippets.

@idarthjedi
idarthjedi / alphabet_rangoli.py
Created December 22, 2021 06:12
Coding exercise to build an alphabet rangoli - I'm sure there is a much more efficient way to do this, but I was also watching Transcendence with my daugther. :-)
def print_alpha_rangoli(size):
alpha = [x for x in 'abcdefghijklmnopqrstuvwxyz']
output = []
display = []
# determine the total width of the alphabet rangoli
width = (size + (size - 1)) + ((size + (size - 1)) - 1)
# for each of the letters in reverse order (starting inside out)
for lin in range(size -1, -1, -1):
@idarthjedi
idarthjedi / common_modulus.py
Last active December 16, 2022 04:33 — forked from apogiatzis/common_modulus.py
RSA Common modulus attack
import argparse
import math
from binascii import unhexlify
def egcd(a, b):
if a == 0:
return b, 0, 1
else:
@idarthjedi
idarthjedi / keybase.md
Created January 14, 2018 21:20
Keybase self-verification

Keybase proof

I hereby claim:

  • I am idarthjedi on github.
  • I am darthjedi (https://keybase.io/darthjedi) on keybase.
  • I have a public key ASAEM793rVtiG5BiXs6vLsmD-54KwXkKsUQHg126T6srRwo

To claim this, I am signing this object: