<commit_before>#
#  http.py
#  pyblox
#
#  By Sanjay-B(<NAME>)
#  Copyright © 2017 Sanjay-B(<NAME>). All rights reserved.
#

import json
import requests


class Http:

    # GET Request
    # Params: "url" // target url
    def sendRequest(url):
        payload = requests.get(str(url))
        statusCode = payload.status_code
        header = payload.headers
        content = payload.content
        if statusCode is not 200:
            return print("[Pyblox][GET] Something went wrong. Error: " + statusCode)
        return content

    # POST Request
    # Params: "url" // target url, payload // {JSON key-value pairs}
    def postRequest(url, payload):
        payload = requests.post(str(url), data=payload)
        statusCode = payload.status_code
        header = payload.headers
        content = payload.content
        if statusCode is not 200:
            return print("[Pyblox][POST] Something went wrong. Error: " + statusCode)
        return content<commit_msg>remove pycharm recognised unused vars<commit_after>#
#  http.py
#  pyblox
#
#  By Sanjay-B(<NAME>)
#  Copyright © 2017 Sanjay-B(<NAME>). All rights reserved.
#

import requests


class Http:

    # GET Request
    # Params: "url" // target url
    def sendRequest(url):
        payload = requests.get(str(url))
        statusCode = payload.status_code
        content = payload.content
        if statusCode is not 200:
            return print("[Pyblox][GET] Something went wrong. Error: " + statusCode)
        return content

    # POST Request
    # Params: "url" // target url, payload // {JSON key-value pairs}
    def postRequest(url, payload):
        payload = requests.post(str(url), data=payload)
        statusCode = payload.status_code
        content = payload.content
        if statusCode is not 200:
            return print("[Pyblox][POST] Something went wrong. Error: " + statusCode)
        return content
{'fraction_non_alphanumeric': 0.10504201680672269, 'fraction_numerical': 0.01050420168067227, 'mean_word_length': 2.4954128440366974, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '67372', 'n_tokens_mistral': 574, 'n_tokens_neox': 539, 'n_words': 165}