This file contains hidden or 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 kivy.app import runTouchApp | |
| from kivy.lang import Builder | |
| from kivy.uix.button import Button | |
| from kivy.garden.moretransitions import ( | |
| PixelTransition, RippleTransition, BlurTransition, RVBTransition, | |
| RotateTransition, TileTransition, FastSlideTransition, | |
| ) | |
| ALL_TRANSITIONS = ( | |
| PixelTransition, RippleTransition, BlurTransition, RVBTransition, |
This file contains hidden or 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 functools import wraps | |
| def yieldsleep(widget): | |
| def func(create_gen): | |
| @wraps(create_gen) | |
| def func2(*args, **kwargs): | |
| gen = create_gen(*args, **kwargs) | |
| def sleep(milliseconds): |
This file contains hidden or 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
| Moved to https://github.com/asyncgui/asynckivy |
This file contains hidden or 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
| ''' | |
| pip install kivy kivymd | |
| ''' | |
| from kivy.lang import Builder | |
| from kivy.properties import StringProperty | |
| from kivymd.app import MDApp | |
| from kivymd.uix.label import MDLabel | |
| from kivymd.uix.snackbar.snackbar import MDSnackbar |
This file contains hidden or 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 kivy.lang import Builder | |
| from kivy.factory import Factory | |
| from kivy.app import runTouchApp | |
| KV_CODE = ''' | |
| <DebugCarousel@Carousel>: | |
| canvas.before: | |
| Clear: | |
| canvas.after: |
This file contains hidden or 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 kivy.lang import Builder | |
| from kivy.factory import Factory | |
| from kivy.app import runTouchApp | |
| KV_CODE = ''' | |
| #:import random random | |
| #:import Button kivy.uix.button.Button | |
| <DebugCarousel@Carousel>: |
This file contains hidden or 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
| __all__ = ('get_tree_from_widget', 'get_tree_from_root_rule', 'get_tree_from_cls', ) | |
| from kivy.lang import Parser, Builder, BuilderBase | |
| from kivy.factory import Factory | |
| def _get_children(rule): | |
| return [{crule.name: _get_children(crule)} for crule in rule.children] |
This file contains hidden or 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 numpy as np | |
| import itertools | |
| from timeit import timeit | |
| arr = np.random.randint(3, size=100, dtype='uint8') | |
| def method_me(arr): | |
| return np.array( | |
| tuple(itertools.chain.from_iterable( | |
| itertools.repeat(index, value) |
This file contains hidden or 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
| ''' | |
| https://youtu.be/fP0Pxy_3cSI | |
| ''' | |
| from kivy.app import runTouchApp | |
| from kivy.lang import Builder | |
| from kivy.uix.label import Label | |
| import rich_drag_n_drop | |
| KV_CODE = ''' |
This file contains hidden or 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
| ''' | |
| https://youtu.be/P2WtjZAWc8I | |
| ''' | |
| from kivy.app import App | |
| from kivy.factory import Factory | |
| from kivy.animation import Animation | |
| from kivy.clock import Clock | |
| import itertools | |
| anim_id_iter = itertools.count() |