Skip to content

Instantly share code, notes, and snippets.

View tshirtman's full-sized avatar

Gabriel Pettier tshirtman

View GitHub Profile
# Class definition of ChannelImageButton
from kivy.graphics import Clear, Rectangle, Color
from kivy.properties import ListProperty
class ChannelImageButton( ButtonBehavior, Image ):
losses = ListProperty()
gains = ListProperty()
def __init__(self, **kwargs):
super(ChannelImageButton, self).__init__(**kwargs)
#!/usr/bin/env sh
APP=$1
rm -rf $APP/Contents/Resources/venv/lib/python2.7/site-packages/docutils
rm -rf $APP/Contents/Resources/venv/lib/python2.7/site-packages/pip
rm -rf $APP/Contents/Resources/venv/lib/python2.7/site-packages/pygments/
rm -rf $APP/Contents/Resources/venv/lib/python2.7/site-packages/Cython/
rm -f $(find $APP -name "*.c")
rm -rf $APP/Contents/Resources/kivy/doc/
rm -rf $APP/Contents/Resources/kivy/kivy/tools/
@tshirtman
tshirtman / kivy.json
Last active April 8, 2018 02:54 — forked from revolunet/kivy.json
{
"framework": "Kivy",
"url": "http://kivy.org",
"framework_current_version" : "1.8.0",
"comparison_data_last_update" : "2014-07-13",
"tutorial_url": "http://kivy.org/docs/tutorials/pong.html",
"license": "mit-license",
"video_url": "http://vimeo.com/22725621",
"book": "978-1-4919-4666-4",
@tshirtman
tshirtman / gist:4135974
Created November 23, 2012 14:51 — forked from hansent/gist:3961758
kinect2osc.pde
import oscP5.*;
import netP5.*;
import SimpleOpenNI.*;
OscP5 osc;
NetAddress osc_send_addr;
NetAddress tuio_send_addr;
SimpleOpenNI context;
XnVSessionManager sessionManager;
@tshirtman
tshirtman / gist:4135970
Created November 23, 2012 14:50 — forked from tito/gist:3961987
tito example kinect skel
'''
Liste des joints
================
- l/r shoulder: epaule
- l/r elbow: genou
- l/r foot: pieds
- l/r knee: genou
- l/r hip: hanche
- head: tete
@tshirtman
tshirtman / main.py
Created November 17, 2012 11:19 — forked from anonymous/main.kv
from kivy.app import App
from kivy.uix.image import Image
class MainApp(App):
def build(self):
return Image(source='moonphase21.gif')
if __name__ == '__main__':
"""
What I'm trying to do is draw a border around my widget.
Here, an AsyncImage.
"""
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.gridlayout import GridLayout
from kivy.uix.tabbedpanel import TabbedPanel
Builder.load_string("""
#!/usr/bin/env python
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty, NumericProperty
from kivy.lang import Builder
Builder.load_string('''
<ArrowPointer>:
canvas:
Color: