<jupyter_start><jupyter_text>For this to work you'll need to have the travis CLI installed and have already run login (cd to a menpo dir before running login for auto magic)```> sudo gem install travis```<jupyter_code>import os
import subprocess
from utils import apply_to_all_projects

working_dir = '~/_change_pypi_usernames'
PYPI_USER = 'not a chance'
PYPI_PASSWORD = '<PASSWORD>'
PYPI_TEST_USER = 'not a chance'
PYPI_TEST_PASSWORD = '<PASSWORD>'

def bump_repo(repo_dir, restart_travis=False):
    os.chdir(repo_dir)
    print(subprocess.check_output(['travis', 'env', 'set', 'PYPI_USER', PYPI_USER]))
    print(subprocess.check_output(['travis', 'env', 'set', 'PYPI_PASSWORD', PYPI_PASSWORD]))
    print(subprocess.check_output(['travis', 'env', 'set', 'PYPI_TEST_USER', PYPI_TEST_USER]))
    print(subprocess.check_output(['travis', 'env', 'set', 'PYPI_TEST_PASSWORD', PYPI_TEST_PASSWORD]))
    if restart_travis:
        print(subprocess.check_output(['travis', 'restart']))
apply_to_all_projects(working_dir, bump_repo)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13339640491958374, 'fraction_numerical': 0.0, 'mean_word_length': 7.2015503875969, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '654815', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 378, 'n_tokens_neox': 378, 'n_words': 83, 'path': 'change pypi usernames and passwords.ipynb', 'repo_name': 'menpo/menpo-admin', 'size': '1061'}