<commit_before># cython: profile=True
from cpython cimport array

from cpython.list cimport PyList_GET_ITEM, PyList_GET_SIZE, PyList_Append
from cpython.int cimport PyInt_FromLong
from cpython.float cimport PyFloat_FromDouble, PyFloat_AsDouble
from cpython.dict cimport PyDict_GetItem, PyDict_SetItem, PyDict_Keys, PyDict_Next
from cpython.object cimport PyObject

from libc.math cimport log, exp

import operator

mz_getter = operator.attrgetter("mz")

from mass_dict import nist_mass as _nist_mass

cdef dict nist_mass
nist_mass = _nist_mass

cdef double PROTON
PROTON = nist_mass["H+"][0][0]

cdef dict periodic_table


ctypedef array.array parray


cdef double neutral_mass(double mz,  int z, double charge_carrier=PROTON):
    return (mz * abs(z)) - (z * charge_carrier)


cdef double mass_charge_ratio(double neutral_mass, int z, double charge_carrier=PROTON):
    return (neutral_mass + (z * charge_carrier)) / abs(z)


cpdef _update_elementary_symmetric_polynomial(list power_sum, list elementary_symmetric_polynomial, size_t order):
    cdef:
        size_t begin, end, k, j
        double el
        int sign
    begin = PyList_GET_SIZE(elementary_symmetric_polynomial)
    end = PyList_GET_SIZE(power_sum)
    for k in range(begin, end):
        if k == 0:
            PyList_Append(elementary_symmetric_polynomial, 1.0)
        elif k > order:
            PyList_Append(elementary_symmetric_polynomial, 0.)
        else:
            el = 0.
            for j in range(1, k + 1):
                sign = 1 if (j % 2) == 1 else -1<commit_msg>Fixing build issues on SCC<commit_after># cython: profile=True

from cpython.list cimport PyList_GET_ITEM, PyList_GET_SIZE, PyList_Append
from cpython.int cimport PyInt_FromLong
from cpython.float cimport PyFloat_FromDouble, PyFloat_AsDouble
from cpython.dict cimport PyDict_GetItem, PyDict_SetItem, PyDict_Keys, PyDict_Next
from cpython.object cimport PyObject

from libc.math cimport log, exp

import operator

mz_getter = operator.attrgetter("mz")

from mass_dict import nist_mass as _nist_mass

cdef dict nist_mass
nist_mass = _nist_mass

cdef double PROTON
PROTON = nist_mass["H+"][0][0]

cdef dict periodic_table


cdef double neutral_mass(double mz,  int z, double charge_carrier=PROTON):
    return (mz * abs(z)) - (z * charge_carrier)


cdef double mass_charge_ratio(double neutral_mass, int z, double charge_carrier=PROTON):
    return (neutral_mass + (z * charge_carrier)) / abs(z)


cpdef _update_elementary_symmetric_polynomial(list power_sum, list elementary_symmetric_polynomial, size_t order):
    cdef:
        size_t begin, end, k, j
        double el
        int sign
    begin = PyList_GET_SIZE(elementary_symmetric_polynomial)
    end = PyList_GET_SIZE(power_sum)
    for k in range(begin, end):
        if k == 0:
            PyList_Append(elementary_symmetric_polynomial, 1.0)
        elif k > order:
            PyList_Append(elementary_symmetric_polynomial, 0.)
        else:
            el = 0.
            for j in range(1, k + 1):
                sign = 1 if (j % 2) == 1 else -1
{'fraction_non_alphanumeric': 0.07423152387181164, 'fraction_numerical': 0.008502289077828646, 'mean_word_length': 3.7134052388289676, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3668331', 'n_tokens_mistral': 1074, 'n_tokens_neox': 1026, 'n_words': 282}