예제 #1
0
파일: quotes.py 프로젝트: svip/SvipBot
	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()
예제 #2
0
파일: enemies.py 프로젝트: Pixdigit/h
 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
예제 #3
0
파일: svm.py 프로젝트: sirrice/dbwipes_src
 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)
예제 #4
0
파일: images.py 프로젝트: svip/SvipBot
	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.")
예제 #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)
예제 #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)
예제 #7
0
파일: stuff.py 프로젝트: 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 
예제 #8
0
파일: naive.py 프로젝트: pdphuong/scorpion
  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)
예제 #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
예제 #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
예제 #11
0
파일: player.py 프로젝트: 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"],
     }
예제 #12
0
파일: ndt.py 프로젝트: duapraveen/scorpion
 def __init__(self, **kwargs):
     Basic.__init__(self, **kwargs)
     # values: c45, or, dt, rt
     self.tree_alg = kwargs.get('tree_alg', 'rt')
예제 #13
0
파일: changes.py 프로젝트: svip/SvipBot
	def __init__(self, debug, api, verbose):
		Basic.__init__(self, debug, api, verbose)
예제 #14
0
파일: ndt.py 프로젝트: pdphuong/scorpion
 def __init__(self, **kwargs):
     Basic.__init__(self, **kwargs)
     # values: c45, or, dt, rt
     self.tree_alg = kwargs.get('tree_alg', 'rt')
예제 #15
0
파일: pages.py 프로젝트: svip/SvipBot
	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)
예제 #16
0
파일: taskmanager.py 프로젝트: svip/SvipBot
	def __init__(self, debug, api, verbose):
		Basic.__init__(self, debug, api, verbose)
		self.debugmode = debug
		self.api = api
예제 #17
0
파일: sitetasks.py 프로젝트: svip/SvipBot
	def __init__(self, debug, api, verbose, pages):
		Basic.__init__(self, debug, api, verbose)
		self.pages = pages
		self.run_basic_tasks()
예제 #18
0
파일: stuff.py 프로젝트: 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)