Skip to content

Instantly share code, notes, and snippets.

@MaddyGuthridge
Last active May 16, 2023 04:08
Show Gist options
  • Save MaddyGuthridge/43b1a60fe83530edf4e00970fb83b738 to your computer and use it in GitHub Desktop.
Save MaddyGuthridge/43b1a60fe83530edf4e00970fb83b738 to your computer and use it in GitHub Desktop.
pip install *
"""
A simple script to install everything
"""
from subprocess import Popen
from string import ascii_lowercase
MAX_LENGTH = 100
ALLOWED_CHARACTERS = ascii_lowercase + '-'
def install_package(name):
proc = Popen(['pip', 'install', name])
proc.wait()
def generate_combinations(prev, depth):
if depth == 0:
install_package(prev)
else:
for c in ALLOWED_CHARACTERS:
generate_combinations(prev + c, depth - 1)
if __name__ == '__main__':
for i in range(1, MAX_LENGTH):
generate_combinations('', i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment