<commit_before>import os, time, glob

from neuroimaging import traits
import numpy as N
from scipy.sandbox.models import contrast

from neuroimaging.modalities.fmri.pca import MultiPlot
from neuroimaging.modalities.fmri import protocol, functions
from neuroimaging.modalities.fmri.fmristat import delay
from neuroimaging.modalities.fmri.filters import Filter
from neuroimaging.modalities.fmri.hrf import canonical
from neuroimaging.core.api import Image
import neuroimaging.modalities.fmri.fmristat.utils as fmristat
import neuroimaging.modalities.api


import fiac
import io

from readonly import ReadOnlyValidate, HasReadOnlyTraits

#-----------------------------------------------------------------------------#
#
# Canonical drift
#
#-----------------------------------------------------------------------------#

def drift_fn(time):
    """
    Drift function defined by fmristat
    """
    _t = (time - 1.25) / 2.5 - 191/2. # return to time index, centered at numframes/ 2
    v = N.asarray([N.ones(_t.shape[0]), _t, _t**2, _t**3, N.greater(_t, 0) * _t**3])
    for i in range(5):
        v[i] /= v[i].max()
    return v

canonical_drift = protocol.ExperimentalQuantitative('drift', drift_fn)<commit_msg>removed nonexistent import<commit_after>import os, time, glob

from neuroimaging import traits
import numpy as N
from scipy.sandbox.models import contrast

from neuroimaging.modalities.fmri.pca import MultiPlot
from neuroimaging.modalities.fmri import protocol, functions
from neuroimaging.modalities.fmri.fmristat import delay
from neuroimaging.modalities.fmri.filters import Filter
from neuroimaging.modalities.fmri.hrf import canonical
from neuroimaging.core.api import Image
import neuroimaging.modalities.fmri.fmristat.utils as fmristat

import fiac
import io

from readonly import ReadOnlyValidate, HasReadOnlyTraits

#-----------------------------------------------------------------------------#
#
# Canonical drift
#
#-----------------------------------------------------------------------------#

def drift_fn(time):
    """
    Drift function defined by fmristat
    """
    _t = (time - 1.25) / 2.5 - 191/2. # return to time index, centered at numframes/ 2
    v = N.asarray([N.ones(_t.shape[0]), _t, _t**2, _t**3, N.greater(_t, 0) * _t**3])
    for i in range(5):
        v[i] /= v[i].max()
    return v

canonical_drift = protocol.ExperimentalQuantitative('drift', drift_fn)
{'fraction_non_alphanumeric': 0.21592330137557317, 'fraction_numerical': 0.013338891204668612, 'mean_word_length': 2.4482758620689653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '773831', 'n_tokens_mistral': 730, 'n_tokens_neox': 684, 'n_words': 193}