<commit_before># -*- coding: utf-8 -*-
# distutils: language = c++
u"""
Created on 2017-2-8

@author: cheng.li
"""

from libcpp.list cimport list as CList
from libcpp.string cimport string as CString

cdef class Deque:

    cdef size_t window
    cdef public bint is_full
    cdef double* con
    cdef public size_t start
    cdef public size_t count

    cdef double dump(self, double value, double default=*)
    cpdef list dumps(self, values)
    cdef inline size_t size(self)
    cdef inline bint isFull(self)
    cpdef size_t idx(self, double value)
    cpdef double sum(self)
    cdef void set_data(self, bytes data)

cpdef object rebuild(bytes data, size_t window, bint is_full, size_t start, size_t count)

cdef class DiffDeque:

    cdef double window
    cdef public bint is_full
    cdef double last
    cdef double last_stamp
    cdef CList[double] con
    cdef CList[double] stamps
    cdef CString closed

    cdef CList[double] dump(self, double value, int stamp, double default= *)
    cpdef CList[double] dumps(self, values, stamps)
    cpdef size_t size(self)
    cpdef bint isFull(self)
    cpdef size_t idx(self, double value)
    cpdef double sum(self)

cpdef object rebuild2(double window)<commit_msg>FIX: make signature consistent<commit_after># -*- coding: utf-8 -*-
# distutils: language = c++
u"""
Created on 2017-2-8

@author: cheng.li
"""

from libcpp.list cimport list as CList
from libcpp.string cimport string as CString

cdef class Deque:

    cdef size_t window
    cdef public bint is_full
    cdef double* con
    cdef public size_t start
    cdef public size_t count

    cdef double dump(self, double value, double default=*)
    cpdef list dumps(self, values)
    cdef inline size_t size(self)
    cdef inline bint isFull(self)
    cpdef size_t idx(self, double value)
    cpdef double sum(self)
    cdef void set_data(self, bytes data)

cpdef object rebuild(bytes data, size_t window, bint is_full, size_t start, size_t count)

cdef class DiffDeque:

    cdef double window
    cdef public bint is_full
    cdef double last
    cdef double last_stamp
    cdef CList[double] con
    cdef CList[double] stamps
    cdef CString closed

    cdef CList[double] dump(self, double value, int stamp, double default= *)
    cpdef CList[double] dumps(self, values, stamps)
    cpdef size_t size(self)
    cpdef bint isFull(self)
    cpdef size_t idx(self, double value)
    cpdef double sum(self)

cpdef object rebuild2(double window, str closed)
{'fraction_non_alphanumeric': 0.07353535353535354, 'fraction_numerical': 0.006464646464646465, 'mean_word_length': 3.5182481751824817, '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': '2624449', 'n_tokens_mistral': 850, 'n_tokens_neox': 820, 'n_words': 296}