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


Python status.Status方法代码示例

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


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

示例1: start_up

# 需要导入模块: import status [as 别名]
# 或者: from status import Status [as 别名]
def start_up(self):
        """
        set the initial values of cpu registers
        status reg: 000100 (irqs disabled)
        x, y, a regs: 0
        stack pointer: $FD
        $4017: 0 (frame irq disabled)
        $4015: 0 (sound channels disabled)
        $4000-$400F: 0 (sound registers)
        """
        # TODO Hex vs binary
        self.pc_reg = np.uint16(0)  # 2 byte
        self.status_reg = Status()
        self.sp_reg = np.uint8(0xFD)

        self.x_reg = np.uint8(0)
        self.y_reg = np.uint8(0)
        self.a_reg = np.uint8(0)

        # TODO implement memory sets 
开发者ID:PyAndy,项目名称:Py3NES,代码行数:22,代码来源:cpu.py

示例2: status

# 需要导入模块: import status [as 别名]
# 或者: from status import Status [as 别名]
def status(self):
        return Status() 
开发者ID:rleonard21,项目名称:PyTradier,代码行数:4,代码来源:market.py

示例3: parseRequest

# 需要导入模块: import status [as 别名]
# 或者: from status import Status [as 别名]
def parseRequest(self, URL, artist=None, song=None):
		"""Figure out what kind of download option the user wants"""

		statusObject = Status()
		ytdl_cmd_args = [] 		# append cmd arguments to this

		
		print("BEING USED")
		print("self.download(): parseRequest: YoutubeDLInteface")
		self.download(URL, ytdl_cmd_args, statusObject)

		#print statusObject.toDict()

		return statusObject




	#
	#	Params
	#		=> URL : spotify uri, youtube playlist url, youtube song url
	#		=> ytdl_cmd_args : optional youtube-dl command line arguments
	#	Returns
	#		=> 	statusObject : only return if none is provided in function call
	#
	#
	#
	#####################
	#
	#
	#	ISSUE fix duplicate track error
	#		youtube-dl error occurs when you download a track with a filename that already exists
	#
	##################### 
开发者ID:littlemika,项目名称:optimalvibes,代码行数:36,代码来源:youtubedl.py

示例4: __init__

# 需要导入模块: import status [as 别名]
# 或者: from status import Status [as 别名]
def __init__(self, ram: RAM, ppu: PPU, apu: APU):
        self.ram = ram
        self.ppu = ppu
        self.apu = apu
        self.rom = None

        self.memory_owners = [  # type: List[MemoryOwnerMixin]
            self.ram,
            self.ppu,
            self.apu
        ]

        # instruction to execute
        self.instruction = None
        self.data_bytes = None
        self.instruction_byte = None

        # status registers: store a single byte
        self.status_reg = None  # type: Status

        # counter registers: store a single byte
        self.pc_reg = None  # program counter, 2 byte
        self.sp_reg = None  # stack pointer
        self.stack_offset = 0x100

        # data registers: store a single byte
        self.x_reg = None  # x register
        self.y_reg = None  # y register
        self.a_reg = None  # a register

        # program counter stores current execution point
        self.running = True

        # create the instructions that the cpu can interpret
        instructions_list = self._find_instructions(Instruction)
        self.instructions = {}
        for instruction in instructions_list:
            if instruction.identifier_byte in self.instructions.keys():
                raise Exception('Duplicate instruction identifier bytes')
            self.instructions[instruction.identifier_byte] = instruction 
开发者ID:PyAndy,项目名称:Py3NES,代码行数:42,代码来源:cpu.py

示例5: parse_status

# 需要导入模块: import status [as 别名]
# 或者: from status import Status [as 别名]
def parse_status(self, lines):
        # A list of status objects.
        activity = []

        # Keep a list of seen times so we can avoid duplicates in the history
        seen_times = set()

        for line in lines:
            time, fields = line.split("|")
            # Only add new times, preferring earlier records in the file. This is probably not optimal since later records seem to be more likely to be LATs, but oh well gotta break a few algorithmic contraints to make a BILLION dollars.
            if time not in seen_times:
                seen_times.add(time)
                status_obj = status.Status(int(float(time)), fields)
                activity.append(status_obj)
        return activity 
开发者ID:defaultnamehere,项目名称:zzzzz,代码行数:17,代码来源:history.py


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