Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am KevinGoldsmith on github.
  • I am kevingoldsmith (https://keybase.io/kevingoldsmith) on keybase.
  • I have a public key whose fingerprint is 10B9 D0EA 3AE6 420E B2D0 F4C3 BC53 7024 0523 993A

To claim this, I am signing this object:

@kevingoldsmith
kevingoldsmith / clean_wpimport_for_pelican.py
Created August 14, 2020 05:42
Clean up the markdown code created from pelican-import from wordpress including downloading and re-adding all the images
import argparse
import xml.etree.ElementTree as ET
from bs4 import BeautifulSoup
import urllib.request
from urllib.parse import urlparse
import os
import re
def get_downloads_from_img(img):
return_list = []
@kevingoldsmith
kevingoldsmith / collatz.py
Created August 13, 2021 06:23
playing around with demonstrating the Collatz Conjecture
# https://en.wikipedia.org/wiki/Collatz_conjecture
proven = {1}
top_bound = 1000
for n in range(1, top_bound):
current = n
while current not in proven:
if (current % 2) == 0:
current = int(current / 2)