91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.34MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-08-28
  • 語言: 其他
  • 標簽: JOS??LAB1??JOSLAB??

資源簡介

《MIT JOS Lab1: Booting a PC》實驗代碼,這是2019.9.10日為止最全的代碼,滿分版本,當然,我也查過了許多資料,再次做了資料整合以及一些我自己的理解。希望能使大家受益。

資源截圖

代碼片段和文件信息

from?__future__?import?print_function

import?sys?os?re?time?socket?select?subprocess?errno?shutil?traceback
from?subprocess?import?check_call?Popen
from?optparse?import?OptionParser

__all__?=?[]

##################################################################
#?Test?structure
#

__all__?+=?[“test“?“end_part“?“run_tests“?“get_current_test“]

TESTS?=?[]
TOTAL?=?POSSIBLE?=?0
PART_TOTAL?=?PART_POSSIBLE?=?0
CURRENT_TEST?=?None

def?test(points?title=None?parent=None):
????“““Decorator?for?declaring?test?functions.??If?title?is?None?the
????title?of?the?test?will?be?derived?from?the?function?name?by
????stripping?the?leading?“test_“?and?replacing?underscores?with
????spaces.“““

????def?register_test(fn?title=title):
????????if?not?title:
????????????assert?fn.__name__.startswith(“test_“)
????????????title?=?fn.__name__[5:].replace(“_“?“?“)
????????if?parent:
????????????title?=?“??“?+?title

????????def?run_test():
????????????global?TOTAL?POSSIBLE?CURRENT_TEST

????????????#?Handle?test?dependencies
????????????if?run_test.complete:
????????????????return
????????????run_test.complete?=?True
????????????if?parent:
????????????????parent()

????????????#?Run?the?test
????????????fail?=?None
????????????start?=?time.time()
????????????CURRENT_TEST?=?run_test
????????????sys.stdout.write(“%s:?“?%?title)
????????????sys.stdout.flush()
????????????try:
????????????????fn()
????????????except?Assertionerror?as?e:
????????????????fail?=?““.join(traceback.format_exception_only(type(e)?e))

????????????#?Display?and?handle?test?result
????????????POSSIBLE?+=?points
????????????if?points:
????????????????print(“%s“?%?\
????????????????????(color(“red“?“FAIL“)?if?fail?else?color(“green“?“OK“))?end=‘?‘)
????????????if?time.time()?-?start?>?0.1:
????????????????print(“(%.1fs)“?%?(time.time()?-?start)?end=‘?‘)
????????????print()
????????????if?fail:
????????????????print(“????%s“?%?fail.replace(“\n“?“\n????“))
????????????else:
????????????????TOTAL?+=?points
????????????for?callback?in?run_test.on_finish:
????????????????callback(fail)
????????????CURRENT_TEST?=?None

????????#?Record?test?metadata?on?the?test?wrapper?function
????????run_test.__name__?=?fn.__name__
????????run_test.title?=?title
????????run_test.complete?=?False
????????run_test.on_finish?=?[]
????????TESTS.append(run_test)
????????return?run_test
????return?register_test

def?end_part(name):
????def?show_part():
????????global?PART_TOTAL?PART_POSSIBLE
????????print(“Part?%s?score:?%d/%d“?%?\
????????????(name?TOTAL?-?PART_TOTAL?POSSIBLE?-?PART_POSSIBLE))
????????print()
????????PART_TOTAL?PART_POSSIBLE?=?TOTAL?POSSIBLE
????show_part.title?=?““
????TESTS.append(show_part)

def?run_tests():
????“““Set?up?for?testing?and?run?the?registered?test?functions.“““

????#?Handle?command?line
????global?options
????parser?=?OptionParser(usage=“usage:?%prog?[-v]?[filters...]“)
????parser.add_option(“-v“?“--verbose“?action=“store_true“
??????????????????????help=“prin

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????214??2019-09-10?08:14??jos01\.dir-locals.el

?????文件????????859??2019-09-10?08:13??jos01\.gdbinit

?????文件????????857??2019-09-10?08:14??jos01\.gdbinit.tmpl

?????文件?????????20??2019-09-10?08:13??jos01\.git\COMMIT_EDITMSG

?????文件????????272??2019-09-10?08:14??jos01\.git\config

?????文件?????????73??2019-09-10?08:13??jos01\.git\description

?????文件????????105??2019-09-10?08:13??jos01\.git\FETCH_HEAD

?????文件?????????23??2019-09-10?08:13??jos01\.git\HEAD

?????文件????????452??2019-09-10?08:13??jos01\.git\hooks\applypatch-msg.sample

?????文件????????896??2019-09-10?08:13??jos01\.git\hooks\commit-msg.sample

?????文件????????189??2019-09-10?08:13??jos01\.git\hooks\post-update.sample

?????文件????????398??2019-09-10?08:13??jos01\.git\hooks\pre-applypatch.sample

?????文件???????1704??2019-09-10?08:13??jos01\.git\hooks\pre-commit.sample

?????文件???????1348??2019-09-10?08:13??jos01\.git\hooks\pre-push.sample

?????文件???????4951??2019-09-10?08:13??jos01\.git\hooks\pre-rebase.sample

?????文件???????1239??2019-09-10?08:13??jos01\.git\hooks\prepare-commit-msg.sample

?????文件???????3611??2019-09-10?08:13??jos01\.git\hooks\update.sample

?????文件???????6363??2019-09-10?08:13??jos01\.git\index

?????文件????????240??2019-09-10?08:14??jos01\.git\info\exclude

?????文件????????678??2019-09-10?08:13??jos01\.git\logs\HEAD

?????文件????????678??2019-09-10?08:13??jos01\.git\logs\refs\heads\master

?????文件????????304??2019-09-10?08:13??jos01\.git\logs\refs\remotes\origin\master

?????文件????????285??2019-09-10?08:13??jos01\.git\objects\01\d3bdd6558ad57478bdb691c92bdb1066796780

?????文件????????145??2019-09-10?08:13??jos01\.git\objects\03\22310a5fd9f803530badba8fac766d787affb7

?????文件????????829??2019-09-10?08:13??jos01\.git\objects\07\8c3f9694c5a939d2ff1a9ec0b882aae6c748b1

?????文件???????6000??2019-09-10?08:13??jos01\.git\objects\07\a7a8460e12a680f09f8bd7e748a0709f171a0c

?????文件?????????55??2019-09-10?08:13??jos01\.git\objects\07\c7a3b0a0ec07db1c6cd131fe1297bd47dd6d54

?????文件???????4177??2019-09-10?08:14??jos01\.git\objects\09\3c8a6afff8e0e17e967f205c2ff35d2c3aa721

?????文件????????255??2019-09-10?08:13??jos01\.git\objects\0b\f46cb0e215158fe1fb0007a5b97371bca75d2b

?????文件???????3143??2019-09-10?08:13??jos01\.git\objects\0c\4ef13f5e1c3dc948147b5c8e60d1bee3977bdf

............此處省略436個文件信息

評論

共有 條評論