<commit_before># -*- coding: utf-8 -*-
"""
@author: <NAME>
"""

from __future__ import division, print_function, absolute_import, unicode_literals
import os
import numpy as np
from scipy.optimize import least_squares
import itertools as itt
import multiprocessing as mp
import time as tm
from _warnings import warn
from sklearn.neighbors import KNeighborsClassifier
import h5py

import matplotlib.pyplot as plt
import matplotlib.patches as patches
import sys

from ...io.io_utils import recommendCores, realToCompound
from ...io.microdata import MicroDataset, MicroDataGroup
from ...io.io_hdf5 import ioHDF5
from ...viz import plot_utils
from ..model import Model


def do_fit(single_parm):
    parms = single_parm[0]
    coef_guess_mat = parms[1]
    fit_region = parms[2]
    s1 = parms[3]
    s2 = parms[4]
    lb_mat = parms[5]
    ub_mat = parms[6]
    kwargs = single_parm[1]
    max_function_evals = kwargs['max_function_evals']
    plsq = least_squares(gauss_2d_residuals,
                         coef_guess_mat.ravel(),
                         args=(fit_region.ravel(), s1.T, s2.T),
                         kwargs=kwargs,
                         bounds=(lb_mat.ravel(), ub_mat.ravel()),
                         jac='2-point', max_nfev=max_function_evals)
<commit_msg>Removed unused imports<commit_after># -*- coding: utf-8 -*-
"""
@author: <NAME>
"""

from __future__ import division, print_function, absolute_import, unicode_literals
import numpy as np
from scipy.optimize import least_squares
import itertools as itt
import multiprocessing as mp
import time as tm
import matplotlib.pyplot as plt

from ...io.io_utils import recommendCores
from ...io.microdata import MicroDataset, MicroDataGroup
from ...io.io_hdf5 import ioHDF5
from ...viz import plot_utils


def do_fit(single_parm):
    parms = single_parm[0]
    coef_guess_mat = parms[1]
    fit_region = parms[2]
    s1 = parms[3]
    s2 = parms[4]
    lb_mat = parms[5]
    ub_mat = parms[6]
    kwargs = single_parm[1]
    max_function_evals = kwargs['max_function_evals']
    plsq = least_squares(gauss_2d_residuals,
                         coef_guess_mat.ravel(),
                         args=(fit_region.ravel(), s1.T, s2.T),
                         kwargs=kwargs,
                         bounds=(lb_mat.ravel(), ub_mat.ravel()),
                         jac='2-point', max_nfev=max_function_evals)

{'fraction_non_alphanumeric': 0.09705882352941177, 'fraction_numerical': 0.014705882352941176, 'mean_word_length': 2.821829855537721, 'pattern_counts': {'":': 0, '<': 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': '3747689', 'n_tokens_mistral': 817, 'n_tokens_neox': 800, 'n_words': 193}