<commit_before>from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine
import os.path
import datetime

base_path = "/gnosdata/data/"

#Connect to the database and reflect the schema into python objects
Base = automap_base()
engine = create_engine('postgresql://localhost:5432/germline_genotype_tracking')
Base.prepare(engine, reflect=True)

PCAWGSample = Base.classes.pcawg_samples
SampleLocation = Base.classes.sample_locations

session = Session(engine)

#Create a dict mapping donor_index to sample_location
sample_locations = {el.donor_index: el for el in session.query(SampleLocation)}

for sample in session.query(PCAWGSample):<commit_msg>Change DB URL to not point to localhost.<commit_after>from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine
import os.path
import datetime

base_path = "/gnosdata/data/"

#Connect to the database and reflect the schema into python objects
Base = automap_base()
engine = create_engine('postgresql://pcawg_admin:pcawg@run-tracking-db.service.consul:5432/germline_genotype_tracking')
Base.prepare(engine, reflect=True)

PCAWGSample = Base.classes.pcawg_samples
SampleLocation = Base.classes.sample_locations

session = Session(engine)

#Create a dict mapping donor_index to sample_location
sample_locations = {el.donor_index: el for el in session.query(SampleLocation)}

for sample in session.query(PCAWGSample):
{'fraction_non_alphanumeric': 0.07749326145552561, 'fraction_numerical': 0.005390835579514825, 'mean_word_length': 6.774869109947644, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '1201551', 'n_tokens_mistral': 459, 'n_tokens_neox': 442, 'n_words': 124}