def setup(): import home, inlibrary, borrow_home, libraries, stats, support, events, status, merge_editions, authors home.setup() inlibrary.setup() borrow_home.setup() libraries.setup() stats.setup() support.setup() events.setup() status.setup() merge_editions.setup() authors.setup() import api api.setup() from stats import stats_hook delegate.app.add_processor(web.unloadhook(stats_hook)) if infogami.config.get("dev_instance") is True: import dev_instance dev_instance.setup() setup_context_defaults() setup_template_globals() setup_logging() logger = logging.getLogger("openlibrary") logger.info("Application init")
def setup(): import home, inlibrary, borrow_home, libraries, stats, support, \ events, status, merge_editions, authors home.setup() inlibrary.setup() borrow_home.setup() libraries.setup() stats.setup() support.setup() events.setup() status.setup() merge_editions.setup() authors.setup() import api from stats import stats_hook delegate.app.add_processor(web.unloadhook(stats_hook)) if infogami.config.get("dev_instance") is True: import dev_instance dev_instance.setup() setup_context_defaults() setup_template_globals()
def setup(): import home, inlibrary, borrow_home, libraries, stats, support, \ events, design, status, merge_editions, authors home.setup() design.setup() inlibrary.setup() borrow_home.setup() libraries.setup() stats.setup() support.setup() events.setup() status.setup() merge_editions.setup() authors.setup() import api from stats import stats_hook delegate.app.add_processor(web.unloadhook(stats_hook)) if infogami.config.get("dev_instance") is True: import dev_instance dev_instance.setup() setup_context_defaults() setup_template_globals()
def setup(): import home, inlibrary, borrow_home, libraries, stats, support, events, status, merge_editions, authors home.setup() inlibrary.setup() borrow_home.setup() libraries.setup() stats.setup() support.setup() events.setup() status.setup() merge_editions.setup() authors.setup() import api api.setup() from stats import stats_hook delegate.app.add_processor(web.unloadhook(stats_hook)) if infogami.config.get("dev_instance") is True: import dev_instance dev_instance.setup() setup_template_globals() setup_logging() logger = logging.getLogger("openlibrary") logger.info("Application init")
def setup(): import home, inlibrary, borrow_home, libraries, stats, support, events home.setup() inlibrary.setup() borrow_home.setup() libraries.setup() stats.setup() support.setup() events.setup() from stats import stats_hook delegate.app.add_processor(web.unloadhook(stats_hook)) setup_template_globals() setup_logging() logger = logging.getLogger("openlibrary") logger.info("Application init")
# Assign properties for this frame ref.setPos(screenPos[0], 0, screenPos[1]) ref.setScale(0.02, 1, 0.02) if (pointable.touch_zone == Leap.Pointable.ZONE_NONE): ref.setColorScale(0, 0, 0, 0) elif (pointable.touch_zone == Leap.Pointable.ZONE_TOUCHING ): # Touching ref.setColorScale(0, 1, 0, 1) for t in self.layout: if (check_circle_collide(t[0], NODE_RADIUS, screenPos)): self.start_test(t[1][0]) elif (pointable.touch_zone == Leap.Pointable.ZONE_HOVERING ): # Hovering ref.setColorScale(1, 0, 0, 1) # Get list of invalid pointable circles badIDs = filter(lambda x: not frame.pointable(x).is_valid, self.menuCircleMap.keys()) for i in badIDs: self.menuCircleMap[i].removeNode() del self.menuCircleMap[i] events.setup( events.BinaryWriter(events.FileWriter("%s.dat" % uuid.uuid4().hex))) app = Application() control = Leap.Controller() control.add_listener(app) app.run()