<commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2017 <NAME> and contributors
# See LICENSE.rst for details.

import time

import requests


def get_json(url):
    r = requests.get()
    result = r.json()

    return result


def get_bpi():
    return get_json('https://api.coindesk.com/v1/bpi/currentprice.json')


def format_bpi(data):
    bpi = data.get('bpi')
    timestamp = data.get('time').get('updated')

    # format
    eur = '{} {}'.format(
        bpi.get('EUR').get('code'),
        bpi.get('EUR').get('rate')
    )
    usd = '{} {}'.format(
        bpi.get('USD').get('code'),
        bpi.get('USD').get('rate')
    )

    return eur, usd, timestamp


def get_marketcap():
    return get_json('https://api.coinmarketcap.com/v1/ticker/bitcoin/')
<commit_msg>fix missing url<commit_after># -*- coding: utf-8 -*-
# Copyright (c) 2017 <NAME> and contributors
# See LICENSE.rst for details.

import time

import requests


def get_json(url):
    r = requests.get(url)
    result = r.json()

    return result


def get_bpi():
    return get_json('https://api.coindesk.com/v1/bpi/currentprice.json')


def format_bpi(data):
    bpi = data.get('bpi')
    timestamp = data.get('time').get('updated')

    # format
    eur = '{} {}'.format(
        bpi.get('EUR').get('code'),
        bpi.get('EUR').get('rate')
    )
    usd = '{} {}'.format(
        bpi.get('USD').get('code'),
        bpi.get('USD').get('rate')
    )

    return eur, usd, timestamp


def get_marketcap():
    return get_json('https://api.coinmarketcap.com/v1/ticker/bitcoin/')

{'fraction_non_alphanumeric': 0.1898652982681206, 'fraction_numerical': 0.008980115458627326, 'mean_word_length': 2.832923832923833, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '2207285', 'n_tokens_mistral': 589, 'n_tokens_neox': 558, 'n_words': 106}