<commit_before>from __future__ import print_function
import requests
import json
import sys
import time

class Base:
    def get(self, url, email=None, password=None):
        session = requests.Session()
        session.auth = (email, password)
        response_raw = session.get(url)

        if response_raw.status_code == 429:
            time.sleep(response_raw.headers['Retry-After'])
            return get(url, email, password)

        else:
            response_json = json.loads(response_raw.content)
            return response_json

    def put(self, url, data, email=None, password=None):
        session = requests.Session()
        session.auth = (email, password)
        session.headers = {'Content-Type': 'application/json'}
        response_raw = session.put(url, data)

        if response_raw.status_code == 429:
            time.sleep(response_raw.headers['Retry-After'])
            return put(url, data, email, password)

        else:
            return response_raw

    def post(self, url, data, email=None, password=None):
        session = requests.Session()
        session.auth = (email, password)
        session.headers = {'Content-Type': 'application/json'}
        response_raw = session.post(url, data)

        if response_raw.status_code == 429:
            time.sleep(response_raw.headers['Retry-After'])
            return put(url, data, email, password)

        else:
            return response_raw

    def delete(self, url, email=None, password=None):
        session = requests.Session()
        session.auth = (email, password)
        response_raw = session.delete(url)

        if response_raw.status_code == 429:
            time.sleep(response_raw.headers['Retry-After'])
            return put(url, data, email, password)

        else:
            return response_raw<commit_msg>Fix return values in ZendeskBase<commit_after>from __future__ import print_function
import requests
import json
import sys
import time

class Base:
    def get(self, url, email=None, password=None):
        session = requests.Session()
        session.auth = (email, password)
        response_raw = session.get(url)

        if response_raw.status_code == 429:
            time.sleep(response_raw.headers['Retry-After'])
            return get(url, email, password)

        else:
            if response_raw.headers['Content-Type'] == "application/json; charset=utf-8":
                response_json = json.loads(response_raw.content)
                return response_json
            else:
                return None

    def put(self, url, data, email=None, password=<PASSWORD>):
        session = requests.Session()
        session.auth = (email, password)
        session.headers = {'Content-Type': 'application/json'}
        response_raw = session.put(url, data)

        if response_raw.status_code == 429:
            time.sleep(response_raw.headers['Retry-After'])
            return put(url, data, email, password)

        else:
            if response_raw.headers['Content-Type'] == "application/json; charset=utf-8":
                response_json = json.loads(response_raw.content)
                return response_json
            else:
                return None

    def post(self, url, data, email=None, password=<PASSWORD>):
        session = requests.Session()
        session.auth = (email, password)
        session.headers = {'Content-Type': 'application/json'}
        response_raw = session.post(url, data)

        if response_raw.status_code == 429:
            time.sleep(response_raw.headers['Retry-After'])
            return put(url, data, email, password)

        else:
            if response_raw.headers['Content-Type'] == "application/json; charset=utf-8":
                response_json = json.loads(response_raw.content)
                return response_json
            else:
                return None

    def delete(self, url, email=None, password=None):
        session = requests.Session()
        session.auth = (email, password)
        response_raw = session.delete(url)

        if response_raw.status_code == 429:
            time.sleep(response_raw.headers['Retry-After'])
            return put(url, data, email, password)

        else:
            if response_raw.headers['Content-Type'] == "application/json; charset=utf-8":
                response_json = json.loads(response_raw.content)
                return response_json
            else:
                return None
{'fraction_non_alphanumeric': 0.10562906481273829, 'fraction_numerical': 0.006279434850863423, 'mean_word_length': 2.2650073206442167, 'pattern_counts': {'":': 4, '<': 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': '6506425', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1179, 'n_words': 279}