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
out = { | |
'DiggerAnMom': [127, '00000064', 0, 8], | |
'InnerAnMom': [127, '00000064', 8, 8], | |
'OuterAnMom': [127, '00000064', 16, 8], | |
'SteerAnMom': [127, '00000064', 24, 8], | |
'FrmPitchAnMom': [127, '00000064', 32, 8], | |
'FrmRollAnMom': [127, '00000064', 40, 8], | |
'ShakersUp': [0, '0000006E', 7, 1], | |
'ShakersDn': [0, '0000006E', 6, 1], |
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 Bluetooth(object): | |
def __init__(self): | |
#intialize bluetooth | |
self.messages_to_send = {} | |
self.messages_to_confirm = {} | |
Clock.schedule_interval(self.check_connection, time) | |
Clock.schedule_interval(self.send_messages, time) | |
Clock.schedule_interval(self.confirm_messages, time) | |
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
def load_particle_system_from_dict(self, config): | |
config_dict = self.particle_configs[config] | |
if 'cymunk-physics' in self.gameworld.systems: | |
physics_system_friction = self.gameworld.systems[ | |
'cymunk-physics'].damping | |
else: | |
physics_system_friction = 1.0 | |
self.current_number_of_particles += config_dict[ | |
'max_num_particles'] | |
particle_system = self.get_particle_system() |
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
##Data starts as a pointer to float and unsigned short mallocs | |
self.frame_info_ptr = frame_ptr = <void *>malloc(sizeof(float) * | |
number_of_particles * 4 * 12) | |
self.indice_info_ptr = indices_ptr = <void *>malloc( | |
sizeof(unsigned short) * number_of_particles * 6) | |
property pyframe_info: | |
def __get__(self): | |
frame_info = <float *>self.frame_info_ptr |
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
18325657 function calls (15085433 primitive calls) in 271.452 seconds | |
Ordered by: cumulative time | |
List reduced from 1494 to 250 due to restriction <250> | |
ncalls tottime percall cumtime percall filename:lineno(function) | |
1 0.000 0.000 271.531 271.531 /home/jacob/Documents/chaosbuffalo/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/app.py:760(run) | |
1 0.001 0.001 269.157 269.157 /home/jacob/Documents/chaosbuffalo/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/base.py:397(runTouchApp) | |
1 0.374 0.374 269.075 269.075 /home/jacob/Documents/chaosbuffalo/python-for-android/build/python-install/lib/python2.7/site-packages/kivy/core/window/window_pygame.py:378(mainloop) |
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
Tue Feb 11 00:15:11 2014 47 | |
3665247 function calls (3282988 primitive calls) in 152.683 seconds | |
Ordered by: internal time | |
List reduced from 1370 to 100 due to restriction <100> | |
ncalls tottime percall cumtime percall filename:lineno(function) | |
6397 22.353 0.003 24.353 0.004 {method 'draw' of 'kivy.graphics.instructions.Canvas' objects} | |
6719 12.141 0.002 16.030 0.002 physics.pyx:185(update) |
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 Smart2App(App): | |
current_h_id = NumericProperty(0) | |
number_of_members = NumericProperty(0) | |
def build(self): | |
EventLoop.window.bind(on_keyboard=self.hook_keyboard) | |
def hook_keyboard(self, window, key, *largs): | |
if key == 27: | |
self.root.go_back() |
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 kivy | |
from kivy.clock import Clock | |
from kivy.uix.label import Label | |
from kivy.app import App | |
class newlabel(Label): | |
def __init__(self, **kwargs): | |
super(newlabel, self).__init__(**kwargs) | |
self.markup = True | |
self.counter=0 |
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.uix.scatter import Scatter | |
from kivy.uix.label import Label | |
from kivy.uix.floatlayout import FloatLayout | |
from kivy.uix.boxlayout import BoxLayout | |
from kivy.properties import ObjectProperty | |
from kivy.properties import StringProperty | |
from kivy.config import Config | |
from collections import OrderedDict | |
Config.set('modules', 'inspector', "") |
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.core.window import Window | |
from kivy.uix.screenmanager import ScreenManager, Screen | |
from random import random | |
from kivy.base import EventLoop | |
from kivy.properties import NumericProperty, StringProperty, ListProperty | |
Builder.load_string(""" | |
<TestScreen>: |
OlderNewer