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
.buildozer/ | |
bin/ | |
buildozer.spec | |
*.pyc | |
.*.sw* |
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
Letterbox scaling example for Kivy apps with fixed aspect ratio |
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
Small example of communication between Flask and Kivy |
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
#!/usr/bin/python3 | |
import os | |
import requests | |
import sys | |
def imgur(args, stdin=None): | |
access_response = requests.post( | |
'https://api.imgur.com/oauth2/token', |
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
cheaterman@cmans-laptop ~ $ sudo echo | |
Mot de passe : | |
Wrong! You cheating scum! | |
Mot de passe : | |
Where did you learn to type? |
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 glob | |
import os | |
import sh | |
print('Converting eggs to bams...') | |
for egg in glob.glob(os.path.join(os.path.dirname(__file__), '*.egg')): | |
print('Processing %s...' % egg) | |
sh.egg2bam(( | |
'-ps rel -o %(basename)s.bam %(basename)s.egg' % dict( |
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.clock import Clock | |
from kivy.lang import Builder | |
from kivy.properties import ListProperty | |
from kivy.utils import get_random_color | |
KV = ''' | |
ScreenManager: | |
id: sm |
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
@0xb61678a79b98b42e; | |
interface Login { | |
connect @0 (client :Client, name :Text) -> (server :Server, handle :LoginHandle); | |
interface LoginHandle {} | |
} | |
struct Command { | |
name @0 :Text; |
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 datetime | |
import jinja2 | |
TEMPLATE = ''' | |
<html> | |
<head> | |
<style> | |
table { | |
border-collapse: collapse; | |
} |
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
class PropertyStorage: | |
def __init__(self, value): | |
self.value = value | |
self.observers = [] | |
class NetworkedProperty: | |
def __init__(self, default_value=None): | |
self.default_value = default_value | |
self.name = '' |