<commit_before>from functools import partial

from characteristic import Attribute, attributes

from _opencv import lib


@attributes(
    [
        Attribute(name="index"),
    ],
)
class Camera(object):
    """
    A camera device.

    """

    def frames(self):
        capture = lib.cvCreateCameraCapture(self.index)
        next_frame = partial(lib.cvQueryFrame, capture)
        for frame in iter(next_frame, None):
            from _opencv import ffi
            mat = lib.cvGetMat(frame)
            print frame
            lib.cvFlip(frame, mat, 1)
            yield mat<commit_msg>Remove the WIP<commit_after>from functools import partial

from characteristic import Attribute, attributes

from _opencv import lib


@attributes(
    [
        Attribute(name="index"),
    ],
)
class Camera(object):
    """
    A camera device.

    """

    def frames(self):
        capture = lib.cvCreateCameraCapture(self.index)
        next_frame = partial(lib.cvQueryFrame, capture)
        for frame in iter(next_frame, None):
            yield frame
{'fraction_non_alphanumeric': 0.09039010466222645, 'fraction_numerical': 0.0009514747859181732, 'mean_word_length': 2.495016611295681, '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': '1513207', 'n_tokens_mistral': 301, 'n_tokens_neox': 293, 'n_words': 80}