<commit_before>import requests
import mc_config
import psycopg2
import psycopg2.extras
import time
import json
import pysolr
import sys

def py_solr_connection():
    solr = pysolr.Solr(get_solr_collection_url_prefix(), timeout=10)
    
    return solr

def get_solr_collection_url_prefix():
    config = mc_config.read_config()

    #print >> sys.stderr, config

    solr_select_url = config['mediawords'][ 'solr_select_url' ]

    assert solr_select_url.endswith( '/select')

    solr_collection_url = solr_select_url[:-7]

    return solr_collection_url<commit_msg>Increase timeout.<commit_after>import requests
import mc_config
import psycopg2
import psycopg2.extras
import time
import json
import pysolr
import sys

def py_solr_connection():
    solr = pysolr.Solr(get_solr_collection_url_prefix(), timeout=300)
    
    return solr

def get_solr_collection_url_prefix():
    config = mc_config.read_config()

    #print >> sys.stderr, config

    solr_select_url = config['mediawords'][ 'solr_select_url' ]

    assert solr_select_url.endswith( '/select')

    solr_collection_url = solr_select_url[:-7]

    return solr_collection_url
{'fraction_non_alphanumeric': 0.08326029798422437, 'fraction_numerical': 0.009640666082383873, 'mean_word_length': 4.856410256410256, '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': '5184891', 'n_tokens_mistral': 411, 'n_tokens_neox': 394, 'n_words': 80}