ea6f4184e712dd40f228b887074ec3ebc801bfd5,cameras.py,Camera,update,#Camera#,36

Before Change



    def update(self):
        
        stream = io.BytesIO()
        for foo in self.cam.capture_continuous(stream, format="jpeg"):
            // Truncate the stream to the current position (in case
            // prior iterations output a longer image)
            stream.truncate()

After Change


        lock = threading.Lock()
        
        while True:
            with lock:
                self.cam.capture(self.stream, "jpeg")
                self.stream.seek(0)

            time.sleep(.1)


Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: autorope/donkeycar
Commit Name: ea6f4184e712dd40f228b887074ec3ebc801bfd5
Time: 2016-12-13
Author: wroscoe@gmail.com
File Name: cameras.py
Class Name: Camera
Method Name: update


Project Name: tsurumeso/waifu2x-chainer
Commit Name: 97aeda2a947c44cdef91d9276c2c38c02f37cda1
Time: 2017-02-08
Author: nstm101339@gmail.com
File Name: lib/iproc.py
Class Name:
Method Name: array_to_wand


Project Name: chainer/chainer
Commit Name: b698d6afba4c5d40bd7848954a97de7804c68ad3
Time: 2019-09-29
Author: niboshi000@gmail.com
File Name: tests/chainer_tests/serializers_tests/test_hdf5.py
Class Name: TestHDF5Deserializer
Method Name: test_deserialize_different_dtype_cpu


Project Name: sentinel-hub/eo-learn
Commit Name: 4ab331db8a6380d4785ddffa45895fd4bce2459e
Time: 2019-12-23
Author: jovan.visnjic@sinergise.com
File Name: core/eolearn/core/eodata.py
Class Name: _Loader
Method Name: load