<commit_before>#!/usr/bin/env python
# encoding: utf-8
# Copyright 2009 California Institute of Technology. ALL RIGHTS
# RESERVED. U.S. Government Sponsorship acknowledged.
#
# deploy the test portal to the test project site

import sys, subprocess, os, os.path, shutil

def main(argv=None):
    if argv is None:
        argv = sys.argv
    if len(argv) != 3:
        print >>sys.stderr, 'Usage: %s project-base-dir python-exec' % sys.argv[0]
    basedir, executable = sys.argv[1:3]
    
    # Shut down supervisor, ignoring errors
    subprocess.call((os.path.join(basedir, 'bin', 'supervisorctl'), 'shutdown'))
<commit_msg>Somehow bin dir was missing in test deployment; check if we can actually access supervisorctl before calling it<commit_after>#!/usr/bin/env python
# encoding: utf-8
# Copyright 2009-2010 California Institute of Technology. ALL RIGHTS
# RESERVED. U.S. Government Sponsorship acknowledged.
#
# Deploy the test portal to the test project site

import sys, subprocess, os, os.path, shutil

def main(argv=None):
    if argv is None:
        argv = sys.argv
    if len(argv) != 3:
        print >>sys.stderr, 'Usage: %s project-base-dir python-exec' % sys.argv[0]
    basedir, executable = sys.argv[1:3]
    
    # Shut down supervisor, ignoring errors
    supervisorctl = os.path.join(basedir, 'bin', 'supervisorctl')
    if os.path.isfile(supervisorctl):
        subprocess.call((os.path.join(basedir, 'bin', 'supervisorctl'), 'shutdown'))

{'fraction_non_alphanumeric': 0.11909650924024641, 'fraction_numerical': 0.015058179329226557, 'mean_word_length': 3.6858974358974357, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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}}
{'dir': 'git-commits-cleaned', 'id': '3696520', 'n_tokens_mistral': 479, 'n_tokens_neox': 452, 'n_words': 147}