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


Python UI.print_info方法代码示例

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


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

示例1: dict

# 需要导入模块: import UI [as 别名]
# 或者: from UI import print_info [as 别名]
__author__ = 'matsrichter'
import numpy as np
import  UI

test_dict = dict()
capital = range(0,1000,1)
total_account_val = range(0,2000,2)
test_dict['capital'] = 1000
UI.print_info_intro(True)
for i in range(len(capital)):
    test_dict['capital'] = capital[i]
    test_dict['account_val'] = total_account_val[i]
    if((i+1)%25 == 0):
        UI.print_info_intro(True)
    UI.print_info(test_dict)
开发者ID:Cypher42,项目名称:AutoBuffett,代码行数:17,代码来源:UI_test.py

示例2: if

# 需要导入模块: import UI [as 别名]
# 或者: from UI import print_info [as 别名]
    dict = {}
    dict = sender_receiver.receive()
    if(dict == ""):
        continue
    tstep = tstep + 1
    if(optflag == False):
        optimizer = os.Optimization_System(dict['anti_risk'],dict['capital'])
        optflag = True

    if('ERROR' in dict):
        UI.printErr()
    else:
#         if(tstep%9000 == 0):
#             UI.print_info_intro()
#         if(tstep%180 == 0):
#             UI.print_info(Instruction_dict.values)
        UI.print_info_intro()
        print dict
        UI.print_info(dict)
        
    #change params and send
    if(tstep >= 100):
        Instruction_dict.values = optimizer.optimize(dict)
    time.sleep(1)
        
    #Instruction_dict.values = optimizer.optimize(Instruction_dict.values)
    #print Instruction_dict.values    
    
    

开发者ID:Cypher42,项目名称:AutoBuffett,代码行数:29,代码来源:Layer_3_Master_Script_Opt.py

示例3:

# 需要导入模块: import UI [as 别名]
# 或者: from UI import print_info [as 别名]
# init FX_Reader and sender
# init the rest of parameters
# send the dictionary
sender_receiver = sr.Sender_Receiver()
optimizer = os.Optimization_System(instruction_dict["anti_risk"], instruction_dict["capital"])
reader = fxr.FX_Reader()

while True:

    if "ERROR" in instruction_dict:
        UI.printErr()
    else:
        if tstep % 9000 == 0:
            UI.print_info_intro()
        if tstep % 180 == 0:
            UI.print_info(instruction_dict)

        # change params and send
        if tstep >= 10000:
            instruction_dict = optimizer.optimize(instruction_dict)

        # change params and send
        instruction_dict = optimizer.optimize(instruction_dict)
        instruction_dict["long_price"], instruction_dict["short_price"] = reader.readPrice()
        sender_receiver.send(instruction_dict)
    tstep += 1
    instruction_struct = ""
    while instruction_struct == "":
        instruction_struct = sender_receiver.receive()
        if instruction_struct == "":
            time.sleep(1)
开发者ID:Cypher42,项目名称:AutoBuffett,代码行数:33,代码来源:Layer_3_Master_Script.py


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