Ejemplo n.º 1
0
	def __init__(self, content):
		Basic.__init__(self, False, None, False)
		self.dialogues = []
		# Remember, content is assumed to be the section we are editing
		# therefore, if given a whole article, it will behave strange.
		self.content = content 
		self.parse()
Ejemplo n.º 2
0
 def __init__(s, game, options, position, image, group,
              initdirection = None, colliders = []):
     Basic.__init__(s, game, options, position, image, group,
                    initdirection, colliders)
     s.instances.append(s)
     s._behaviour = options['behaviour']
     s._target = s._game.subject
Ejemplo n.º 3
0
 def __init__(self, **kwargs):
     Basic.__init__(self, **kwargs)
     self.all_clusters = []
     self.cost_split = 0.
     self.cost_partition_bad = 0.
     self.cost_partition_good = 0.
     self.cache = None
     self.use_mtuples = kwargs.get('use_mtuples', False)
Ejemplo n.º 4
0
	def __init__(self, debug, api, verbose, poolapi):
		Basic.__init__(self, debug, api, verbose)
		self.imageapi = poolapi
		if self.imageapi.login(userdata.username, userdata.password):
			self.log("Logged in to Pool wiki succesful.")
			self.usable = True
		else:
			self.log("Failed to log into Pool wiki; image operations will not be available in this run.")
Ejemplo n.º 5
0
 def __init__(self, **kwargs):
     Basic.__init__(self, **kwargs)
     self.all_clusters = []
     self.cost_split = 0.
     self.cost_partition_bad = 0.
     self.cost_partition_good = 0.
     self.cache = None
     self.use_mtuples = kwargs.get('use_mtuples', False)
     self.max_wait = kwargs.get('max_wait', None)
Ejemplo n.º 6
0
    def __init__(self, *args, **kwargs):
        Basic.__init__(self, *args, **kwargs)
        self.start = time.time()
        self.max_wait = kwargs.get('max_wait', 60*60*2) # 2 hours default
        self.n_rules_checked = 0
        self.stop = False
        self.cs = kwargs.get('cs', None)

        self.checkpoints_per_c = defaultdict(list)
Ejemplo n.º 7
0
Archivo: stuff.py Proyecto: Pixdigit/h
 def __init__(s, game, options, position, image, group = 'power',
              initdirection = None, colliders = ['player']):
     Basic.__init__(s, game, options, position, group,
                    initdirection, colliders)
     s.instances.append(s)
     if options['type'] == 'money':
         s.value = options['value']
         s.halflife = options['halflife']
     elif options['type'] == 'powerup':
        pass 
Ejemplo n.º 8
0
  def __init__(self, *args, **kwargs):
    Basic.__init__(self, *args, **kwargs)
    self.start = time.time()
    self.max_wait = kwargs.get('max_wait', 60*60*2) # 2 hours default
    self.n_rules_checked = 0
    self.clauses_til_checkpoint = 0
    self.stop = False
    self.cs = kwargs.get('cs', None)

    self.bests_per_c = defaultdict(list)
    self.checkpoints_per_c = defaultdict(list)
Ejemplo n.º 9
0
    def __init__(self, *args, **kwargs):
        Basic.__init__(self, *args, **kwargs)
        self.best = []
        self.max_wait = kwargs.get('max_wait', 2 * 60 * 60)  # 2 hours
        self.start = None
        self.stop = False
        self.n_rules_checked = 0
        self.naive = kwargs.get('naive', False)
        self.max_bests = 50
        self.max_complexity = kwargs.get('max_complexity', 3)

        self.checkpoints = []

        self.cost_clique = 0
Ejemplo n.º 10
0
    def __init__(self, *args, **kwargs):
        Basic.__init__(self, *args, **kwargs)
        self.best = []
        self.max_wait = kwargs.get('max_wait', 2 * 60 * 60) # 2 hours
        self.start = None
        self.stop = False
        self.n_rules_checked = 0
        self.naive = kwargs.get('naive', False)
        self.max_bests = 50
        self.max_complexity = kwargs.get('max_complexity', 3)

        self.checkpoints = []

        self.cost_clique = 0
Ejemplo n.º 11
0
Archivo: player.py Proyecto: Pixdigit/h
 def __init__(s, game, options, position, image, group="player", colliders=["enemies", "static", "power"]):
     Basic.__init__(s, game, options, position, image, group, None, colliders)
     s._power = options["power"]
     s._shootspeed = 1.0 * s._game.fps / options["shootspeed"]
     s._shootcooldown = 0
     s._shootkey = False
     s._bombkey = False
     s._ammo = options["ammo"]
     s._bombs = options["bombs"]
     s._lives = options["lives"]
     s.money = 0
     s.stats = {
         "ammo": s._ammo,
         "bombs": s._bombs,
         "lives": s._lives,
         "shootspeed": s._shootspeed,
         "power": s._power,
         "speed": s._speed,
         "speedmax": s._speedmax,
         "health": s.health,
         "speedmin": s._speedmin,
         "damage": s.damage,
         "money": s.money,
     }
     s._maxstats = {
         "ammo": options["maxammo"],
         "bombs": options["maxbombs"],
         "lives": options["maxlives"],
         "shootspeed": options["maxshootspeed"],
         "power": options["maxpower"],
         "speed": options["maxspeed"],
         "speedmax": options["maxspeedmax"],
         "health": s.maxhealth,
         "speedmin": options["maxspeedmin"],
         "damage": options["maxdamage"],
     }
Ejemplo n.º 12
0
 def __init__(self, **kwargs):
     Basic.__init__(self, **kwargs)
     # values: c45, or, dt, rt
     self.tree_alg = kwargs.get('tree_alg', 'rt')
Ejemplo n.º 13
0
	def __init__(self, debug, api, verbose):
		Basic.__init__(self, debug, api, verbose)
Ejemplo n.º 14
0
 def __init__(self, **kwargs):
     Basic.__init__(self, **kwargs)
     # values: c45, or, dt, rt
     self.tree_alg = kwargs.get('tree_alg', 'rt')
Ejemplo n.º 15
0
	def __init__(self, debug, api, verbose):
		Basic.__init__(self, debug, api, verbose)
		self.ar = AppearRef(debug=self.debugmode, api=self.api, verbose=self.verbose)
		self.categories = Categories(debug=self.debugmode, api=self.api, verbose=self.verbose)
Ejemplo n.º 16
0
	def __init__(self, debug, api, verbose):
		Basic.__init__(self, debug, api, verbose)
		self.debugmode = debug
		self.api = api
Ejemplo n.º 17
0
	def __init__(self, debug, api, verbose, pages):
		Basic.__init__(self, debug, api, verbose)
		self.pages = pages
		self.run_basic_tasks()
Ejemplo n.º 18
0
Archivo: stuff.py Proyecto: Pixdigit/h
 def __init__(s, game, options, position, image, group = 'bullets',
              course = 'up', colliders = ['static', 'enemies']):
     Basic.__init__(s, game, options, position,
                    image, group, course, colliders)
     s.instances.append(s)