Skip to content

Instantly share code, notes, and snippets.

View tito's full-sized avatar

Mathieu Virbel tito

View GitHub Profile
openapi: 3.0.0
info:
title: Example API
version: 1.0.0
servers:
- url: https://example.com/
paths:
/example2:
get:
tags:
@tito
tito / main.py.py
Last active February 21, 2020 21:35 — forked from Cheaterman/main.py.py
main.py
import os
os.environ['KIVY_WINDOW'] = '' # noqa
os.environ['KIVY_GL_BACKEND'] = 'gl'
from kivy.base import EventLoop, runTouchApp
from kivy.core.window import WindowBase
from kivy.graphics import Callback, opengl as gl
from kivy.lang import Builder
from kivy.properties import ObjectProperty
@tito
tito / main.py
Created December 7, 2018 11:01 — forked from Cheaterman/main.py
main.py
import os
os.environ['KIVY_WINDOW'] = '' # noqa
from kivy.base import EventLoop, runTouchApp
from kivy.core.window import WindowBase
from kivy.graphics import Callback, opengl as gl
from kivy.lang import Builder
from kivy.properties import ObjectProperty
from direct.showbase.ShowBase import ShowBase
constraint_handlers = {}
from cpython.ref cimport PyObject
cdef void _call_constraint_presolve_func(cpConstraint *constraint, cpSpace *space):
global constraint_handlers
global current_spaces
py_space = current_spaces[0]
py_constraint = <object><void *>constraint.data
constraint_dict = constraint_handlers[py_constraint]
@tito
tito / gist:5899527
Last active December 19, 2015 04:48 — forked from ivpusic/gist:5899342
# case 1
if (some condition......):
some code........
else:
# THIS WORKS #
# currently this only works for rangeOfString: method
f_type.size = 0
f_type.alignment = 0
f_type.type = FFI_TYPE_STRUCT
f_type.elements = elements
#:kivy 1.5.1
#:import kivy kivy
<FirstWidget>
GridLayout:
size: root.size
rows: 2
Label:
@tito
tito / chwall.py
Last active December 12, 2015 03:19
from jnius import autoclass
WallpaperManager = autoclass('android.app.WallpaperManager')
PythonActivity = autoclass('org.renpy.android.PythonActivity')
manager = WallpaperManager.getInstance(PythonActivity.mActivity)
manager.clear()
@tito
tito / cpuradialgradient.py
Created December 10, 2012 12:36 — forked from tshirtman/radial_gradient.py
radial gradient texture for kivy
from kivy.graphics.texture import Texture
from kivy.graphics import Rectangle, Color
from kivy.uix.widget import Widget
from kivy.graphics.opengl import glFinish
from kivy.app import App
from time import time
class RadialGradient(App):
def build(self):
@tito
tito / main.py
Created December 7, 2012 01:58 — forked from DaniZz/main.py
the whole thing
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.label import Label
from kivy.graphics import Color, Ellipse, Line
from kivy.graphics.instructions import Callback
from kivy.uix.boxlayout import BoxLayout
from kivy.core.window import Window
from kivy.interactive import InteractiveLauncher
from kivy.properties import NumericProperty
from kivy.event import EventDispatcher
diff --git a/kivy/lang.py b/kivy/lang.py
index 10cdd21..5fa43bc 100644
--- a/kivy/lang.py
+++ b/kivy/lang.py
@@ -613,6 +613,7 @@ class ParserRule(object):
'''
__slots__ = ('ctx', 'line', 'name', 'children', 'id', 'properties',
+ 'nested_properties',
'canvas_before', 'canvas_root', 'canvas_after',