Skip to content

Instantly share code, notes, and snippets.

View joelthelion's full-sized avatar

Joel Schaerer joelthelion

  • Bioclinica
  • Lyon, France
View GitHub Profile
@joelthelion
joelthelion / boxes.py
Last active May 31, 2016 09:35
Find solutions for the n-box problem
#!/usr/bin/env python3
""" Find solutions for the n-box problem. Solutions are represented as
a list of box indices for each integer. Partial sums are cached and
passed around. """
from copy import copy
from sys import argv,stderr
import random
n_boxes = int(argv[1])
#!/usr/bin/env python3
from itertools import islice
import re
import requests
from bs4 import BeautifulSoup
if __name__ == '__main__':
stat_soup = BeautifulSoup(requests.get("https://stats.lineageos.org/").content, "lxml")
code_soup = BeautifulSoup(requests.get("https://wiki.lineageos.org/devices/").content, "lxml")