def run(self, persist): self.set_rough_durations() sm = SlotMachine() data = self.get_scheduler_data() if len(data) == 0: app.logger.error("No talks to schedule!") return new_schedule = sm.schedule(data) self.apply_changes(new_schedule) if persist: db.session.commit() else: app.logger.info("DRY RUN: Pass the `-p` flag to persist these changes") db.session.rollback()
def run(self, persist): self.set_rough_durations() sm = SlotMachine() data = self.get_scheduler_data() if len(data) == 0: app.logger.error("No talks to schedule!") return new_schedule = sm.schedule(app.config['EVENT_START'], data) self.apply_changes(new_schedule) if persist: db.session.commit() else: app.logger.info("DRY RUN: Pass the `-p` flag to persist these changes") db.session.rollback()
import random from slotmachine import SlotMachine import pygame from pygame.locals import * pygame.mixer.init() pygame.mixer.music.load("sounds/back.mp3") pygame.init() f = open("dificultad.txt", 'r') dificultad = int(f.read()) f.close() slot = SlotMachine(1200, 700, "Via 25 - HELADOS") pygame.display.set_caption(slot.game_title) start = True # intro waiting = True # shows "JUGAR" x = 75 # First ice cream position x2 = 250 x3 = 425 y = 150 # Ice cream position play = 0 # This is so that you can stop the ice cream individually counter = 0 # Count the times the ice creams spin speed = 5 # How fast the ice creams spin pos_wx = 150 # This positions are used to the "waiting ice creams movement" and confetti effect pos_wy = -150 while 1: if start: # Presentation: logos.
def run(self): sm = SlotMachine() sm.schedule(app.config['EVENT_START'], 'schedule.json', 'schedule.json')
def click_slot(x, y, action): global scene_main slotmachine_game = SlotMachine(scene_main, main_money_control)