This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ grep -r ", \\-1)" kivy/* --include="*.py" | |
kivy/clock.py: Clock.schedule_once(my_callback, -1) # call before the next frame | |
kivy/core/window/__init__.py: self.create_window, -1) | |
kivy/interactive.py: Clock.schedule_once(safeWait, -1) | |
kivy/tests/test_clock.py: Clock.schedule_once(callback, -1) | |
kivy/uix/accordion.py: self._trigger_title = Clock.create_trigger(self._update_title, -1) | |
kivy/uix/accordion.py: Clock.create_trigger(self._do_layout, -1) | |
kivy/uix/carousel.py: self._position_visible_slides, -1) | |
kivy/uix/label.py: self._trigger_texture = Clock.create_trigger(self.texture_update, -1) | |
kivy/uix/layout.py: self._trigger_layout = Clock.create_trigger(self.do_layout, -1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Compiled from G:\python\dev2\kivy\kivy\data\style.kv at 2016-03-26 20:32:24.225000 | |
__version__ = "0.1" | |
__kivy_version__ = "1.9.2-dev0" | |
__source_file__ = r"G:\python\dev2\kivy\kivy\data\style.kv" | |
__source_hash__ = b"2be232fc91a3d3aef68443c29d58d15f68a92b96557972c6c04dcb788c973c88" | |
import kivy.metrics as __Metrics | |
from kivy.factory import Factory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import numpy as np | |
import matplotlib.pylab as plt | |
import matplotlib | |
from datetime import datetime | |
def import_data(filename, n_wheels): | |
with open(filename) as fh: | |
reader = csv.reader(fh, delimiter='\t') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import listdir | |
from os.path import join, splitext | |
from re import match | |
import re | |
import numpy as np | |
import operator | |
from glitter.logger import DataLogger | |
filename_pat = re.compile('Carvone Trial([0-9]+) +([0-9]+)_updated_\\.h5') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Widget animation | |
================ | |
This example demonstrates creating and applying a multi-part animation to | |
a button widget. You should see a button labelled 'plop' that will move with | |
an animation when clicked. | |
''' | |
from os import environ | |
environ['KIVY_CLOCK'] = 'interrupt' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def schmitt_trigger(up, high, down, low, data): | |
'''up is the value that when we're in low state and we hit the up value we'll go into up (going up) state. | |
high is the value that when we're in up state and we hit the high value we'll go into high state. | |
down is the value that when we're in high state and we hit the down value we'll go into down (going down) state. | |
low is the value that when we're in down state and we hit the low value we'll go into low state. | |
data is list of data values. | |
''' | |
result = [] | |
for s, val in enumerate(data): | |
if val < low: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Matthew Einhorn@Dove-TDSkope MINGW64 /g/Python/py4a/builds | |
$ CCACHE_DISABLE=1 time p4a apk --package=org.example.myapp --name "My application" --version 0.1 --bootstrap=sdl2 --requirements=python2 --storage-dir=/g/python/py4a/builds/storage --arch=armeabi-v7a | |
--debug | |
[INFO]: Will compile for the following archs: armeabi-v7a | |
[INFO]: Found Android API target in $ANDROIDAPI | |
['E:\\Android\\sdk\\tools\\android.bat', 'list'] None | |
[INFO]: Available Android APIs are (23, 25) | |
[INFO]: Requested API target 23 is available, continuing. | |
[INFO]: Found NDK dir in $ANDROIDNDK | |
[INFO]: Got NDK version from $ANDROIDNDKVER |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[INFO]: Will compile for the following archs: armeabi-v7a | |
[INFO]: Found Android API target in $ANDROIDAPI | |
[INFO]: Available Android APIs are (22, 23, 25) | |
[INFO]: Requested API target 22 is available, continuing. | |
[INFO]: Found NDK dir in $ANDROIDNDK | |
[INFO]: Got NDK version from $ANDROIDNDKVER | |
[INFO]: Using Google NDK r13b | |
[INFO]: Found virtualenv at E:\Python\Python27-x64\Scripts\virtualenv.exe | |
[INFO]: Found the following toolchain versions: ['4.9'] | |
[INFO]: Picking the latest gcc toolchain, here 4.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import environ | |
environ['KIVY_CLOCK'] = 'interrupt' | |
environ['SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS'] = '0' | |
from time import clock | |
from kivy.uix.label import Label | |
from kivy.app import App | |
from kivy.clock import Clock | |
from kivy.core.window import Window | |
from kivy.graphics import Color, Point, Fbo, Rectangle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in the host you should have installed cuda 8, then in the host on the command line do | |
sudo apt install nvidia-modprobe | |
wget -P /tmp https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb | |
sudo dpkg -i /tmp/nvidia-docker*.deb && rm /tmp/nvidia-docker*.deb | |
# in a seperate terminal run the nvidia server, it needs to remain running: | |
sudo nvidia-docker-plugin | |
# if you got a port already running error or similar, it's already running in the background so you can continue | |
# Back in the main terminal test nvidia-smi |