<commit_before># [START export_table_to_gcs]
from samples import auth
from samples import poll_job


def export_table(service, project_id, dataset_id, table_id, gcs_path):
    """starts a job which exports data from the specified table,
    to the specified Google Cloud Storage file, returns a job resource"""
    job_collection = service.jobs()
    # [START job_data]
    job_data = {
        'projectId': project_id,
        'configuration': {
            'extract': {
                'sourceTable': {
                    'projectId': project_id,
                    'datasetId': dataset_id,
                    'tableId': table_id,
                },
                'destinationUris': [gcs_path],
            }
        }
    }
    # [END job_data]
    job_resource = job_collection.insert(
        projectId=project_id,
        body=job_data).execute()
    return job_resource


def main():
    project_id = raw_input("Choose your project ID: ")
    dataset_id = raw_input("Choose a dataset ID: ")
    table_id = raw_input("Choose a table name to copy: ")
    gcs_path = raw_input("Enter a GCS URI: ")

    bigquery = auth.get_service()
    resource = export_table(bigquery, project_id, dataset_id, table_id,
                            gcs_path)
    poll_job.poll_job(bigquery, resource)
    print 'Done exporting!'
# [END export_table_to_gcs]<commit_msg>Minor fixes, change to tag name<commit_after># [START export_table_to_gcs]
from samples import auth
from samples import poll_job


def export_table(service, project_id, dataset_id, table_id, gcs_path):
    """starts a job which exports data from the specified table,
    to the specified Google Cloud Storage file, returns a job resource"""
    # [START extract_job_data]
    job_data = {
        'configuration': {
            'extract': {
                'sourceTable': {
                    'projectId': project_id,
                    'datasetId': dataset_id,
                    'tableId': table_id,
                },
                'destinationUris': [gcs_path],
            }
        }
    }
    # [END extract_job_data]
    return service.jobs().insert(
        projectId=project_id,
        body=job_data).execute()


def main():
    project_id = raw_input("Choose your project ID: ")
    dataset_id = raw_input("Choose a dataset ID: ")
    table_id = raw_input("Choose a table name to copy: ")
    gcs_path = raw_input("Enter a GCS URI: ")

    bigquery = auth.get_service()
    resource = export_table(bigquery, project_id, dataset_id, table_id,
                            gcs_path)
    poll_job.poll_job(bigquery, resource)
    print 'Done exporting!'
# [END export_table_to_gcs]
{'fraction_non_alphanumeric': 0.096045197740113, 'fraction_numerical': 0.0, 'mean_word_length': 2.3620253164556964, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1531002', 'n_tokens_mistral': 799, 'n_tokens_neox': 775, 'n_words': 204}