def __init__(self): #self.APP_NAME = __application__ self.APP_NAME = 'suzu_ei' #default settings #TODO: group fonts settings self.OPTIONS = [('SentenceFont', #sentences font {'name' : u'Cambria', 'size' : 14, }), ('QuizFont', #quiz answers font {'name' : u'Calibri', 'size' : 12, }), ('MessageFont', #messages font {'name' : u'Cambria', 'size' : 12, }), ('InfoFont', #messages font {'name' : u'Calibri', 'size' : 12, }), ('Intervals', #time constraints {'repetition' : 1, #minutes 'countdown' : 30, #seconds }), ('Active', #active tags and mode {'tags' : [], #tags names (as, jlpt2,3 etc) 'mode' : 'kanji', #kanji, words or both }), ('Launch', #launch options {'autoquiz' : False, #start quiz on launch 'splash' : False, #splash on start }), ('Runtime', #runtime options {'ontop' : True, #always on top 'global' : True, #enable global hotkeys 'log' : False, #enable errors logging 'sound' : False, #enable sound 'fade' : True, #enable fade effect 'background' : False, #draw item color in background 'plastique' : True, #use plastique theme 'preload' : True, #preload jmdict }), ('Session', #session parameters {'size' : 300, #number of items in session 'length' : 600, #maximum repetitions/day }), ('Dict', #dictionary options {'lang' : 'eng', #translation language 'default' : 'jmdict', #default dictionary }), ] #creates or reads from app.ini in Users/username/ self.CONFIG = UserConfig(self.APP_NAME, self.OPTIONS, version=__version__)
def __init__(self): self.defaults = [ ('position', { 'top': False, 'resize': False, 'center': False, 'coordinates': (0, 0), 'size': (0, 0) }), ('states', { 'save_position': False, 'save_size': False, 'save_buttons': False, 'tray': False, 'plastique': False, 'page': False, }), ( 'buttons', { 'toggle': False, 'font': False, 'excluded': False, 'options': False, }, ), ( 'exclude', { 'kana': True, 'duplicates': True, }, ), ] try: self.active_config = UserConfig(_name, self.defaults, version=__version__) except IOError, e: print e
def save(self, session): '''Save the updated user settings to a new record in the database if the settings have changed. ''' if self._dirty: user_config = UserConfig() # Timestamp user_config.created_date_time = datetime.datetime.now() # Company settings user_config.company_physical_address = \ self.new_company.physical_address user_config.company_gps_coordinates = \ self.new_company.gps_coordinates user_config.company_postal_address = \ self.new_company.postal_address user_config.company_phone_number = self.new_company.phone_number user_config.company_fax_number = self.new_company.fax_number user_config.company_email_address = self.new_company.email_address user_config.company_web_address = self.new_company.web_address user_config.company_signatory_name = \ self.new_company.signatory_name user_config.company_signature_filename = \ self.new_company.signature_filename user_config.company_logo_filename = self.new_company.logo_filename # Purchase order settings user_config.default_payment_terms = \ self.new_purchaseorder.default_payment_terms user_config.default_order_status = \ self.new_purchaseorder.default_order_status # Locale settings. Assumes that the validate method has been called. user_config.tax_rate = percentage_decimal_to_int( self.new_locale.tax_rate) # Commit session.add(user_config) session.commit() self._dirty = False
'-"accounts payable" -"plumber"' params = { 'q': q1, 'limit': '25', # 'jt':'internship', 'fromage': '10', 'language': 'en', 'co': 'ca', 'userip': "1.2.3.4", 'useragent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" } print(unformatted_display_query.format(q1)) bot = IndeedRobot(UserConfig()) bot.search_with_api(params=params) bot.login() bot.apply_jobs() bot.shut_down() elif args.option == JobBot.AngelBot.value: query_parameters = { "types": "internship", "roles": ["Software Engineer"], "last_active": "30", "excluded_keywords": ["unpaid"] } print(unformatted_display_query.format(query_parameters)) bot = AngelBot(UserConfig())
'exclude_regexp': True, 'search_text_regexp': True, 'search_text': [''], 'search_text_samples': [r'# ?TODO|# ?FIXME|# ?XXX'], }), ('pylint', { 'enable': True, 'max_entries': 50, }), ] DEV = not __file__.startswith(sys.prefix) DEV = False CONF = UserConfig('spyder', defaults=DEFAULTS, load=(not DEV), version='1.0.6', subfolder='.spyder') # Removing old .spyder.ini location: old_location = osp.join(get_home_dir(), '.spyder.ini') if osp.isfile(old_location): os.remove(old_location) def get_conf_path(filename=None): """Return absolute path for configuration file with specified filename""" conf_dir = osp.join(get_home_dir(), '.spyder') if not osp.isdir(conf_dir): os.mkdir(conf_dir) if filename is None: return conf_dir
@staticmethod def _add_tag_to_blurb(tag, blurb_id): b = Blurb.select().where(Blurb.id == blurb_id) Tag.create(text=tag.lower().strip(), blurb=b) @staticmethod def reset_all_tables(): Tag.drop_table() Blurb.drop_table() Blurb.create_table(fail_silently=True) Tag.create_table(fail_silently=True) if __name__ == "__main__": a = ApplicationBuilder(UserConfig()) desc = '''Co-Op – Applications and Testing Insurance Corporation of British Columbia 73 reviews - North Vancouver, BC A career at ICBC is an opportunity to be part of a talented, diverse and inclusive team that is driven to serve its customers and community. Make the most of your skills and take the opportunity to grow and develop your career. You can expect a competitive salary, comprehensive benefits and a challenging work environment. Drive your career with us. ICBC is an equal opportunity employer, and invites applications from all qualified candidates. Co-Op – Applications and Testing Job Title: (O) Coop Student Wt 2 Location: North Vancouver Hours of Work: 7.5 hr Day Shift (M-F) Reference Number: 109906