Skip to content

Instantly share code, notes, and snippets.

View me2beats's full-sized avatar

Albert me2beats

  • Russia, Yekaterinburg
View GitHub Profile
@me2beats
me2beats / canvas_before_rect.py
Created June 18, 2019 23:48
kivy test UnderlineSelection Behavior (for KivyStudio)
'''folder: root/bhv'''
from kivy.lang import Builder
from kivy.uix.widget import Widget
from kivy.properties import ListProperty
KV = '''
<CanvasBeforeRect>
canvas_color: [0.5,0.5,0.5,1.]
canvas.before:
@me2beats
me2beats / main.py
Last active July 1, 2019 20:41
Auto animation?
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.label import Label
from kivy.properties import AliasProperty
from kivy.animation import Animation as A
KV = """
BoxLayout
orientation: 'vertical'
'''root.recycleview'''
"""
RecycleView
===========
.. versionadded:: 1.10.0
The RecycleView provides a flexible model for viewing selected sections of
large data sets. It aims to prevent the performance degradation that can occur
@me2beats
me2beats / main.py
Last active August 12, 2019 15:42
anim system first steps
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.label import Label
from kivy.properties import StringProperty, ObjectProperty
from kivy.animation import Animation
from functools import partial
@me2beats
me2beats / warnings.txt
Created August 16, 2019 04:03
Warnings when trying to use another kivy builder
[WARNING] [Factory ] Ignored class "FileListEntry" re-declaration. Current - module: None, cls: functools.partial(<bound method BuilderBase.template of <kivy.lang.builder.BuilderBase object at 0x7febd1754978>>, 'FileListEntry'), baseclass: None, filename: None. Ignored - module: None, cls: functools.partial(<bound method BuilderBase.template of <lang.builder.BuilderBase object at 0x7febc8eb5a58>>, 'FileListEntry'), baseclass: None, filename: None.
[WARNING] [Factory ] Ignored class "FileIconEntry" re-declaration. Current - module: None, cls: functools.partial(<bound method BuilderBase.template of <kivy.lang.builder.BuilderBase object at 0x7febd1754978>>, 'FileIconEntry'), baseclass: None, filename: None. Ignored - module: None, cls: functools.partial(<bound method BuilderBase.template of <lang.builder.BuilderBase object at 0x7febc8eb5a58>>, 'FileIconEntry'), baseclass: None, filename: None.
[WARNING] [Factory ] Ignored class "AccordionItemTitle" re-declaration. Current - module: None, cls: fu
@me2beats
me2beats / main.py
Last active August 24, 2019 12:01
MyBuilder test
from kivy.app import App
from kivy.lang.builder import Builder
from kivy.context import get_current_context
from copy import copy
from my_builder import MyBuilder
KV = """
BoxLayout
Button *2
@me2beats
me2beats / main.py
Created August 22, 2019 23:49
bind event to every class instance?
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.label import Label
def before(self, *_):
self.bind(**{'on_touch_down' : test})
def test(*_):
print ('cool!')
@me2beats
me2beats / Deco.py
Last active September 16, 2019 22:46
Deco
from sys import modules as sys_modules
import inspect
from os import path
from called_from_here_bhv import CalledFromHereBhv
from SkipWith import SkipWith
from dict_utils import get_by_val_attr
@me2beats
me2beats / called_from_here_bhv.py
Last active September 16, 2019 19:41
Called_from_here behavior
from inspect import currentframe, getouterframes
class CalledFromHereBhv:
def __init__(self):
curframe = currentframe()
self.called_from_module_fn,\
self.called_from_start_line =\
@me2beats
me2beats / a.py
Created September 21, 2019 19:05
Shared
from shared import Shared
Shared.x = 'a'
class Shared:
pass