<commit_before># CORE UTILITIES TO CREATE HTTP GET REQUESTS TO INTERACT WITH RANDOM.ORG

import urllib
import urllib2
import os.path
import numpy as np


### CONFIG ###
RANDOM_URL = 'http://www.random.org'
### END CONFIG ###



### MAIN FUNCTIONS ###

def integers(num, minimum, maximum, base=10):
    # TODO: Ensure numbers within bounds
    """Docstring."""
    FUNC_TYPE = 'integers'
    
    num, minimum, maximum = map(int, [num, minimum, maximum])
    # Attribute error ?
    
    base = int(base)
    
    if base not in [2,8,10,16]:
        raise
    
    opts = {'num':num, 
            'min':minimum, 
            'max':maximum, 
            'col':1, 
            'base':base, 
            'format':'plain',
            'rnd':'new'}
    integers = get_http(RANDOM_URL, function, opts)
    integers_arr = str_to_arr(intergers)
    return integers_arr


def sequence(minimum, maximum):
    """Randomize a sequence of integers."""
    function = 'sequences'
    opts = {'min':minimum, 
            'max':maximum, 
            'col':1, <commit_msg>Fixed `integers` by defining function type passed to `get_http`<commit_after># CORE UTILITIES TO CREATE HTTP GET REQUESTS TO INTERACT WITH RANDOM.ORG

import urllib
import urllib2
import os.path
import numpy as np


### CONFIG ###
RANDOM_URL = 'http://www.random.org'
### END CONFIG ###



### MAIN FUNCTIONS ###

def integers(num, minimum, maximum, base=10):
    # TODO: Ensure numbers within bounds
    """Docstring."""
    function = 'integers'
    
    num, minimum, maximum = map(int, [num, minimum, maximum])
    # Attribute error ?
    
    base = int(base)
    
    if base not in [2,8,10,16]:
        raise
    
    opts = {'num':num, 
            'min':minimum, 
            'max':maximum, 
            'col':1, 
            'base':base, 
            'format':'plain',
            'rnd':'new'}
    integers = get_http(RANDOM_URL, function, opts)
    integers_arr = str_to_arr(intergers)
    return integers_arr


def sequence(minimum, maximum):
    """Randomize a sequence of integers."""
    function = 'sequences'
    opts = {'min':minimum, 
            'max':maximum, 
            'col':1, 
{'fraction_non_alphanumeric': 0.13351877607788595, 'fraction_numerical': 0.010199350950394067, 'mean_word_length': 2.4199683042789224, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2186813', 'n_tokens_mistral': 732, 'n_tokens_neox': 682, 'n_words': 186}