<commit_before>#!/usr/bin/env python

import sys
import cx_Oracle
import psycopg2
from pprint import pprint
import locale
import argparse
from datetime import datetime, timedelta

from db_password import DBPASS_POSTGRE, DBPASS_ORACLE


class Oracle:

    def __init__(self):
        self.username = 'systextil'
        self.password = <PASSWORD>
        self.hostname = 'localhost'
        self.port = 28521
        self.servicename = 'XE'
        self.schema = 'SYSTEXTIL'

    def connect(self):
        try:
            self.con = cx_Oracle.connect(
                self.username,
                self.password,
                '{}:{}/{}'.format(
                    self.hostname,
                    self.port,
                    self.servicename
                )
            )
        except cx_Oracle.DatabaseError as e:
            print('[Connection error] {}'.format(e))<commit_msg>alterando class Oracle para receber perâmetros na inicialização<commit_after>#!/usr/bin/env python

import sys
import cx_Oracle
import psycopg2
from pprint import pprint
import locale
import argparse
from datetime import datetime, timedelta

from db_password import DBPASS_POSTGRE, DBPASS_ORACLE


class Oracle:

    def __init__(self,
        username='systextil',
        password=<PASSWORD>,
        hostname='localhost',
        port=28521,
        servicename='XE',
        schema='SYSTEXTIL',
    ):
        self.username = username
        self.password = password
        self.hostname = hostname
        self.port = port
        self.servicename = servicename
        self.schema = schema

    def connect(self):
        try:
            self.con = cx_Oracle.connect(
                self.username,
                self.password,
                '{}:{}/{}'.format(
                    self.hostname,
                    self.port,
                    self.servicename
                )
            )
        except cx_Oracle.DatabaseError as e:
            print('[Connection error] {}'.format(e))
{'fraction_non_alphanumeric': 0.0865, 'fraction_numerical': 0.006, 'mean_word_length': 1.7830319888734354, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3996949', 'n_tokens_mistral': 583, 'n_tokens_neox': 551, 'n_words': 132}