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 kivy.app import App | |
from kivy.lang import Builder | |
from kivy.uix.widget import Widget | |
from kivy.core.window import Window | |
from kivy.graphics import RenderContext | |
from kivy import properties as P | |
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 random | |
from uuid import uuid4 | |
from string import ascii_lowercase | |
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy.properties import ListProperty, StringProperty |
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 kivy.app import App | |
from kivy.lang import Builder | |
KV = ''' | |
#:import get_random_color kivy.utils.get_random_color | |
<-StencilView>: |
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 kivy.app import App | |
from kivy.lang import Builder | |
from kivy.uix.boxlayout import BoxLayout | |
from kivy.uix.textinput import TextInput | |
from kivy.graphics import Line, Ellipse, Color | |
from kivy.properties import ListProperty, StringProperty, NumericProperty | |
from kivy.core.window import Window | |
import numpy as np |
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
[alias] | |
wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads | |
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
"""For this to work, WobblyEffect should be parent to WobblyScatter. | |
""" | |
from kivy.clock import Clock | |
from kivy.uix.effectwidget import AdvancedEffectBase, EffectWidget | |
from kivy.uix.scatter import Scatter | |
from itertools import product | |
FRICTION = .95 | |
K = 8 |
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 kivy.app import App | |
from kivy.lang import Builder | |
from kivy.factory import Factory | |
KV = ''' | |
FloatLayout: | |
Image: | |
size_hint: None, None | |
source: 'landscape.png' |
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
""" | |
Kivy/ffpyplayer example to read transparent video | |
================================================= | |
Right now, VP9/ffmpeg encoder supports alpha channel, under the yuva420p | |
pixel format. But for decoding, the default libvp9 used by ffmpeg doesn't | |
support it, so we need to ask for libvpx-vp9 instead. | |
I was using a set of png image as a source, and got a VP9+alpha video with:: |
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
"""Scroll with the mouse to enable auto-poking.""" | |
from random import random | |
from kivy.app import App | |
from kivy.clock import Clock | |
from kivy.core.window import Window | |
from kivy.lang import Builder | |
from kivy.uix.effectwidget import AdvancedEffectBase | |
NewerOlder