<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: <NAME> <vargash1>
# @Date:   Saturday, April 9th 2016, 7:59:52 pm
# @Email:  <EMAIL>
# @Last modified by:   vargash1
# @Last modified time: Tuesday, April 12th 2016, 5:52:59 am
import time
import picamera


class vRaspiCam:
    def __init__(self, ttl=1):
        self.camera = picamera.PiCamera()
        self.ttl = ttl

    """Takes a vid"""
    def take_Vid(self):
        try:
            self.camera.start_preview()
            time.sleep(self.ttl)
            self.camera.stop_preview()
        finally:
            print "kek"

    """Takes a picture"""
    def take_Pic(self):
        self.camera.resolution = (2592, 1944)
        time.sleep(2)
        # Give the cam some time to adjust to conditions
        try:
            self.camera.capture('foo.jpg')
        finally:
            print "lel"


def main():
    camtest = vRaspiCam()
    # camtest.take_Vid()
    camtest.take_Pic()

if __name__ == "__main__":
    main()<commit_msg>:coffee: Camera<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: <NAME> <vargash1>
# @Date:   Saturday, April 9th 2016, 7:59:52 pm
# @Email:  <EMAIL>
# @Last modified by:   vargash1
# @Last modified time: Tuesday, April 12th 2016, 6:06:29 am
import time
import picamera


class vRaspiCam:
    def __init__(self, ttl=1):
        self.camera = picamera.PiCamera()
        self.ttl = ttl

    """Takes a vid"""
    def take_Vid(self):
        try:
            self.camera.start_preview()
            time.sleep(self.ttl)
            self.camera.stop_preview()
        finally:
            print "kek"

    """Takes a picture"""
    def take_Pic(self):
        self.camera.resolution = (2592, 1944)
        camera.start_preview()
        time.sleep(2)
        # Give the cam some time to adjust to conditions
        try:
            self.camera.capture('foo.jpg')
        finally:
            print "lel"


def main():
    camtest = vRaspiCam()
    # camtest.take_Vid()
    camtest.take_Pic()

if __name__ == "__main__":
    main()
{'fraction_non_alphanumeric': 0.13220338983050847, 'fraction_numerical': 0.03292978208232446, 'mean_word_length': 2.1882716049382718, 'pattern_counts': {'":': 2, '<': 9, '<?xml version=': 0, '>': 9, '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': '1721626', 'n_tokens_mistral': 765, 'n_tokens_neox': 707, 'n_words': 175}