<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os

import requests

from utils import urlify


class DownstreamClient(object):
    def __init__(self, server_url):
        self.server = server_url.strip('/')

    def get_challenges(self, filename):
        enc_fname = urlify(os.path.split(filename)[1])
        url = '%s/api/downstream/challenge/%s' % (self.server, enc_fname)
        resp = requests.get(url)
<commit_msg>Add client skel meths<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os

import requests

from utils import urlify


class DownstreamClient(object):
    def __init__(self, server_url):
        self.server = server_url.strip('/')

    def connect(self, url):
        pass

    def store_path(self, path):
        pass

    def get_chunk(self, hash):
        pass

    def challenge(self, hash, challenge):
        pass

    def answer(self, hash, hash_answer):
        pass

    def get_challenges(self, filename):
        enc_fname = urlify(os.path.split(filename)[1])
        url = '%s/api/downstream/challenge/%s' % (self.server, enc_fname)
        resp = requests.get(url)

{'fraction_non_alphanumeric': 0.13005272407732865, 'fraction_numerical': 0.0035149384885764497, 'mean_word_length': 2.8610169491525426, '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': '2944878', 'n_tokens_mistral': 381, 'n_tokens_neox': 363, 'n_words': 85}