当前位置: 首页>>代码示例>>Python>>正文


Python names.get_full_name方法代码示例

本文整理汇总了Python中names.get_full_name方法的典型用法代码示例。如果您正苦于以下问题:Python names.get_full_name方法的具体用法?Python names.get_full_name怎么用?Python names.get_full_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在names的用法示例。


在下文中一共展示了names.get_full_name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: GenerateName

# 需要导入模块: import names [as 别名]
# 或者: from names import get_full_name [as 别名]
def GenerateName():
	"""
	Stupid wrapper.
	:return: Name. Duha!
	"""
	return names.get_full_name() 
开发者ID:ytisf,项目名称:PyExfil,代码行数:8,代码来源:data_generator.py

示例2: gen_user

# 需要导入模块: import names [as 别名]
# 或者: from names import get_full_name [as 别名]
def gen_user():
    real_name = names.get_full_name()
    first_name, last_name = real_name.lower().split(' ')
    return User(
        name=gen_maybe(real_name, 0.5),
        email='{0}{1}{2}{3}@{4}'.format(
            random.choice([first_name, first_name[0]]),
            random.choice(string.ascii_lowercase) if gen_bool() else '',
            random.choice([last_name, last_name[0]]),
            random.randrange(10) if gen_bool() else '',
            random.choice(['berkeley.edu', 'gmail.com'])),
        is_admin=gen_bool(0.05)) 
开发者ID:okpy,项目名称:ok,代码行数:14,代码来源:generate.py

示例3: sessione_utente

# 需要导入模块: import names [as 别名]
# 或者: from names import get_full_name [as 别名]
def sessione_utente(server_url, persona=None, utente=None, password=None, wait_time=7):
    if not (persona or utente):
        raise ValueError("sessione_utente deve ricevere almeno una persona "
                         "o un utente.")

    if persona:
        try:
            utenza = persona.utenza
        except:
            utenza = crea_utenza(persona=persona, email=email_fittizzia(),
                                 password=names.get_full_name())

    elif utente:
        utenza = utente

    try:
        password_da_usare = password or utenza.password_testing

    except AttributeError:
        raise AttributeError("L'utenza è già esistente, non ne conosco la password.")

    sessione = crea_sessione(wait_time)
    sessione.visit("%s/login/" % server_url)
    sessione.fill("auth-username", utenza.email)
    sessione.fill("auth-password", password_da_usare)
    sessione.find_by_xpath('//button[@type="submit"]').first.click()

    # Assicurati che il login sia riuscito.
    assert sessione.is_text_present(utenza.persona.nome)

    return sessione 
开发者ID:CroceRossaItaliana,项目名称:jorvik,代码行数:33,代码来源:utils_tests.py

示例4: readResultFolder

# 需要导入模块: import names [as 别名]
# 或者: from names import get_full_name [as 别名]
def readResultFolder(strategyName, runLogFolderPath, retrievalCount=1):
    evalBreaksLogFilename = os.path.join(runLogFolderPath, 'evaluation_breaks.csv')
    if not os.path.isfile(evalBreaksLogFilename):
        print("Evaluation break log file not found.")
        return False

    evalBreakLogs = open(evalBreaksLogFilename)

    evalBreakLogs = csv.DictReader(evalBreakLogs)

    positiveResults = []
    for result in evalBreakLogs:
        if result['evaluation'] > 0 and result['secondary'] > 0:
            if len(list(result.keys())) > 2:
                result['score'] = result['evaluation'] + result['secondary']
                positiveResults.append(result)
            else:
                print("Naive logging system detected, from older japonicus version.")
                print("Unable to check result file.")

    if not positiveResults:
        print("No positive results found!")
        return False

    positiveResults = sorted(positiveResults,
                             key=lambda r: r['score'], reverse=True)


    parameterName = strategyName + names.get_full_name()

    R = positiveResults[0]
    stratPath = os.path.join(R['filepath'])
    shutil.copy()

    strategyRankings = exchangeMonitor.loadStrategyRankings()

    newEntry = exchangeMonitor.strategyParameterSet(
        {
            'strategy': strategyName,
            'parameters': parameterName,
            'profits': []
        }
    )

    strategyRankings.append(newEntry)

    exchangeMonitor.saveStrategyRankings(strategyRankings)
    
    return True 
开发者ID:Gab0,项目名称:japonicus,代码行数:51,代码来源:japonicusResultSelector.py


注:本文中的names.get_full_name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。