def get_app(config_path): """ Loads app configuration from disk. """ config = get_config(config_path) app = App(config['app'], get_session(config)) app.users = get_users(config) app.anon_urls, app.auth_urls, app.user_urls = get_urls(config) return app
def main(): temp = [i for i in range(1, number_sticks)] view_window = Draw(length, width, stick_length, 0, white_color, black_color, temp, 0) app = QtWidgets.QApplication(sys.argv) main_window = QtWidgets.QMainWindow() ui = App() ui.setup_ui(main_window, view_window) main_window.show() sys.exit(app.exec_())
def main(): """Starts main loop""" S.app['home_dir'] = os.path.expanduser("~") tempfile.tempdir = S.app['home_dir'] temporary_directory = tempfile.TemporaryDirectory() S.app['temp_dir'] = temporary_directory L.debug('temp_dir: %s', S.app['temp_dir']) app = App(S) L.debug('AppInstance: %s', app) app.views.activate(None, {"view": "Installs"}) app.loop.run() L.info("\n****\nApplication Ended Normally at %s \n\n****\n", datetime.strftime(datetime.now(), "%Y-%m-%d %H:%M:%S.%f"))
def main(): """ Chamada principal do programa. """ matrix_start = [[2, 0, 3], [1, 7, 4], [6, 8, 5]] matrix_end = [[1, 2, 3], [8, 0, 4], [7, 6, 5]] app = App(matrix_start, matrix_end) app.solve() app.display_solution()
def install_app_list(self): """""" #if self.applist != []: # return self.applist if self.ios_version == 8: # need to refresh iOS uicache in case app was installed after last reboot. # Otherwise the /var/mobile/Library/MobileInstallation/LastLaunchServicesMap.plist will be out of date G.log(G.INFO, 'Refresh LastLaunchServicesMap...') self.sshopt.ssh_exec(self.cmd_refresh_uicache) #get uuid list l = self.minisftp.list_dir(self.apps_dir) if l is None: G.log(G.INFO, "No applications found.") return None #add who for uuid in l: app = App(uuid, self) if app.binary_name is None: continue self.applist.append(app) return self.applist
"""Fichier principal du projet, lance toutes les dépendances et créé les objets""" ##Importations import os os.chdir(os.getcwd()) from application import App from environnement import Environment ##Début du script app=App() env=Environment(1,2,2,1,app) <<<<<<< HEAD app.mainloop() ======= app.mainloop() >>>>>>> origin/master
#!/usr/bin python2.7 # -*- encoding: UTF-8 -*- # local modules from application import App if __name__ == '__main__': app = App() app.run() # END if
import tkinter as tk from application import App #init window master = tk.Tk() master.state("zoomed") App(master) master.mainloop()
from application import App from sys import path from os import getcwd path.append(getcwd() + "/") app = App().run()
from application import App if __name__ == '__main__': App()
from Window import Window import threading from DetectAndTrack import Tracking import time import cv2 import os from application import App from detection import get_classes, detect_image os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true' threading_event = threading.Event() trackers = cv2.MultiTracker_create() door_to_heaven = Window(trackers) time.sleep(1) if __name__ == "__main__": server = UdpSocket(door_to_heaven, threading_event) server.start_socket("127.0.0.1", 50000, "test") serverSensors = UdpSocket(door_to_heaven, threading_event) serverSensors.start_socket("127.0.0.1", 50009, "test") tracking = Tracking(threading_event, trackers, door_to_heaven) tracking.start() tk_app = App(tkinter.Tk(), "Projet IA Ingé 2", door_to_heaven, server, serverSensors)
self.network_speed.label_2.set_text( util.to_human(net_r, False) + "bps" ) # Process process = util.get_process() # CPU self.process_cpu.process.update(process) # Memory self.process_memory.process.update(process) # Graph # Memory self.memory_graph.add(memory.percent, swap.percent) # Disk self.disk_graph.add(disk_r, disk_w) # Network self.network_graph.add(net_s, net_r) return True if __name__ == "__main__": app = App("Fascode System Dashboard", Main) app.run()
def __init__(self): self.app = App()
from application import App from feature import Feature apps = [ App('hyper', 'https://releases.hyper.is/download/win'), App('git', 'https://central.github.com/deployments/desktop/desktop/latest/win32'), App('atom', 'https://atom.io/download/windows_x64'), App('python3.6.2', 'https://www.python.org/ftp/python/3.6.2/python-3.6.2.exe', '/quiet PrependPath=1'), Feature('Microsoft-Windows-Subsystem-Linux') ] def main(): for i in range(len(apps)): if apps[i].download: apps[i].download() for i in range(len(apps)): apps[i].install() if __name__ == '__main__': main()
from application import App app = App('/home/mmoliveira/Downloads/enwiki-20190120-pages-articles.xml') app.run_read()
from graphics import * import sys import threading import socket from api import * from application import App from globals import * app = App() canvas = GraphWin("Jogo da Velha", WIDTH, HEIGHT+50) def wait(sec): timeNow = time.time() while time.time() - timeNow < sec: canvas.checkMouse() def closeWindow(): app.closeP2PConnection() sys.exit() def Game(): global closeWindow global message, canvas, tcp canvas.setBackground("white") message = Text(Point(WIDTH/2, HEIGHT+TEXT_SIZE/2), " ") message.setStyle("bold") app.connectionState = NET.INICIO def clearScreen():
def main(): tornado.options.parse_command_line() http_server = tornado.httpserver.HTTPServer(App()) http_server.listen(8000) tornado.ioloop.IOLoop.instance().start()
print(" MAIN MENU ") print("====================================================================") # Get the user to choose an option try: choice = int(input("""Please select the number corresponding to your choice: \n1 - New Vehicle Registration \n2 - Auto Transaction \n3 - Driver Licence Registration \n4 - Violation Record \n5 - Search Engine \n6 - Quit \nType a number: """ )) except ValueError: choice = 0 while (choice > 6 or choice < 1): try: choice = int(input("Choice not valid. Please choose a number between 1-6: ")) except ValueError: choice = 0 # Exit if exit option choosen if (choice == 6): print("Exiting...") break # Start the app supplying the choice and the communicator app = App(choice, communication) result = app.run() # Exit if the user choose to quit if result == 0: break # Clean up communication.teardown()