<commit_before># -*- coding: utf-8 -*-
"""ThreatConnect Job App"""
import csv

# Import default Job Class (Required)
from external_app import ExternalApp


class App(ExternalApp):
    """External App"""

    def __init__(self, _tcex):
        """Initialize class properties."""
        super().__init__(_tcex)
        self.batch = None
        self.url = 'https://feodotracker.abuse.ch/downloads/malware_hashes.csv'

    def run(self):
        """Run main App logic."""
        self.batch = self.tcex.batch(self.args.tc_owner)

        # using tcex requests to get built-in features (e.g., proxy, logging, retries)
        request = self.tcex.request()

        with request.session as s:
            r = s.get(self.url)
<commit_msg>+ updated external template to use session_external.<commit_after># -*- coding: utf-8 -*-
"""ThreatConnect Job App"""
import csv

# Import default Job Class (Required)
from external_app import ExternalApp


class App(ExternalApp):
    """External App"""

    def __init__(self, _tcex):
        """Initialize class properties."""
        super().__init__(_tcex)
        self.batch = None
        self.url = 'https://feodotracker.abuse.ch/downloads/malware_hashes.csv'

    def run(self):
        """Run main App logic."""
        self.batch = self.tcex.batch(self.args.tc_owner)

        # using tcex requests to get built-in features (e.g., proxy, logging, retries)
        with self.tcex.session_external as s:
            r = s.get(self.url)

{'fraction_non_alphanumeric': 0.13270142180094788, 'fraction_numerical': 0.0013540961408259986, 'mean_word_length': 2.722921914357683, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2208505', 'n_tokens_mistral': 466, 'n_tokens_neox': 444, 'n_words': 122}