Last active
May 16, 2023 04:08
-
-
Save MaddyGuthridge/43b1a60fe83530edf4e00970fb83b738 to your computer and use it in GitHub Desktop.
pip install *
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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