From c75d6512cb7395100a7ac860553cf636418838a7 Mon Sep 17 00:00:00 2001 From: Olivier Teytaud Date: Mon, 5 Nov 2018 18:28:10 +0200 Subject: [PATCH 01/30] adding_origins --- scripts/elfgames/tasks/server_addrs.py.origin | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 scripts/elfgames/tasks/server_addrs.py.origin diff --git a/scripts/elfgames/tasks/server_addrs.py.origin b/scripts/elfgames/tasks/server_addrs.py.origin new file mode 100644 index 0000000..913d0e3 --- /dev/null +++ b/scripts/elfgames/tasks/server_addrs.py.origin @@ -0,0 +1,3 @@ +addrs = { + "myserver": "[XXX.XXX.XXX.XXX]", +} From 4c25dd3f9536585284526652059a92ed9aecb702 Mon Sep 17 00:00:00 2001 From: Olivier Teytaud Date: Mon, 5 Nov 2018 18:38:36 +0200 Subject: [PATCH 02/30] solving_the_mess --- CMakeLists.txt | 7 +- Makefile | 1486 +- scripts/elfgames/tasks/df_console.py | 86 + scripts/elfgames/tasks/selfplay.py | 203 + scripts/elfgames/tasks/server_addrs.py | 3 + scripts/elfgames/tasks/train.py | 144 + src_cpp/elf/CMakeLists.txt | 10 +- src_cpp/elfgames/tasks/base/board_feature.cc | 35 + src_cpp/elfgames/tasks/base/board_feature.h | 215 + .../elfgames/tasks/common/game_selfplay.cc | 462 + src_cpp/elfgames/tasks/common/game_selfplay.h | 89 + src_cpp/elfgames/tasks/common/go_state_ext.cc | 127 + src_cpp/elfgames/tasks/common/go_state_ext.h | 356 + .../tasks/elf2codingenv/include/fakemysql.h | 337 + .../tasks/elf2codingenv/include/fakepq.h | 46 + .../tasks/elf2codingenv/include/fakesql.h | 276 + .../elf2codingenv/lib/python3.6/__future__.py | 143 + .../lib/python3.6/__phello__.foo.py | 1 + .../lib/python3.6/_bootlocale.py | 34 + .../lib/python3.6/_collections_abc.py | 1030 ++ .../lib/python3.6/_compat_pickle.py | 252 + .../lib/python3.6/_compression.py | 152 + .../lib/python3.6/_dummy_thread.py | 172 + .../lib/python3.6/_markupbase.py | 399 + .../lib/python3.6/_osx_support.py | 507 + .../elf2codingenv/lib/python3.6/_pydecimal.py | 6498 ++++++++ .../elf2codingenv/lib/python3.6/_pyio.py | 2542 +++ .../lib/python3.6/_sitebuiltins.py | 107 + .../elf2codingenv/lib/python3.6/_strptime.py | 583 + ...sysconfigdata_i686_conda_cos6_linux_gnu.py | 773 + ..._sysconfigdata_m_linux_x86_64-linux-gnu.py | 692 + ...igdata_powerpc64le_conda_cos7_linux_gnu.py | 804 + ...sysconfigdata_x86_64_apple_darwin13_4_0.py | 778 + ...sconfigdata_x86_64_conda_cos6_linux_gnu.py | 773 + .../lib/python3.6/_threading_local.py | 245 + .../lib/python3.6/_weakrefset.py | 201 + .../tasks/elf2codingenv/lib/python3.6/abc.py | 250 + .../tasks/elf2codingenv/lib/python3.6/aifc.py | 963 ++ .../lib/python3.6/antigravity.py | 18 + .../elf2codingenv/lib/python3.6/argparse.py | 2390 +++ .../tasks/elf2codingenv/lib/python3.6/ast.py | 324 + .../elf2codingenv/lib/python3.6/asynchat.py | 309 + .../lib/python3.6/asyncio/__init__.py | 50 + .../lib/python3.6/asyncio/base_events.py | 1474 ++ .../lib/python3.6/asyncio/base_futures.py | 71 + .../lib/python3.6/asyncio/base_subprocess.py | 293 + .../lib/python3.6/asyncio/base_tasks.py | 76 + .../lib/python3.6/asyncio/compat.py | 18 + .../lib/python3.6/asyncio/constants.py | 12 + .../lib/python3.6/asyncio/coroutines.py | 352 + .../lib/python3.6/asyncio/events.py | 716 + .../lib/python3.6/asyncio/futures.py | 439 + .../lib/python3.6/asyncio/locks.py | 501 + .../lib/python3.6/asyncio/log.py | 7 + .../lib/python3.6/asyncio/proactor_events.py | 551 + .../lib/python3.6/asyncio/protocols.py | 134 + .../lib/python3.6/asyncio/queues.py | 259 + .../lib/python3.6/asyncio/selector_events.py | 1142 ++ .../lib/python3.6/asyncio/sslproto.py | 702 + .../lib/python3.6/asyncio/streams.py | 703 + .../lib/python3.6/asyncio/subprocess.py | 229 + .../lib/python3.6/asyncio/tasks.py | 718 + .../lib/python3.6/asyncio/test_utils.py | 515 + .../lib/python3.6/asyncio/transports.py | 306 + .../lib/python3.6/asyncio/unix_events.py | 1086 ++ .../lib/python3.6/asyncio/windows_events.py | 780 + .../lib/python3.6/asyncio/windows_utils.py | 226 + .../elf2codingenv/lib/python3.6/asyncore.py | 663 + .../elf2codingenv/lib/python3.6/base64.py | 626 + .../tasks/elf2codingenv/lib/python3.6/bdb.py | 694 + .../elf2codingenv/lib/python3.6/binhex.py | 497 + .../elf2codingenv/lib/python3.6/bisect.py | 106 + .../tasks/elf2codingenv/lib/python3.6/bz2.py | 363 + .../elf2codingenv/lib/python3.6/cProfile.py | 168 + .../elf2codingenv/lib/python3.6/calendar.py | 721 + .../tasks/elf2codingenv/lib/python3.6/cgi.py | 1099 ++ .../elf2codingenv/lib/python3.6/cgitb.py | 350 + .../elf2codingenv/lib/python3.6/chunk.py | 170 + .../tasks/elf2codingenv/lib/python3.6/cmd.py | 403 + .../tasks/elf2codingenv/lib/python3.6/code.py | 314 + .../elf2codingenv/lib/python3.6/codecs.py | 1112 ++ .../elf2codingenv/lib/python3.6/codeop.py | 174 + .../lib/python3.6/collections/__init__.py | 1353 ++ .../lib/python3.6/collections/abc.py | 2 + .../elf2codingenv/lib/python3.6/colorsys.py | 169 + .../elf2codingenv/lib/python3.6/compileall.py | 298 + .../lib/python3.6/concurrent/__init__.py | 1 + .../python3.6/concurrent/futures/__init__.py | 18 + .../lib/python3.6/concurrent/futures/_base.py | 628 + .../python3.6/concurrent/futures/process.py | 535 + .../python3.6/concurrent/futures/thread.py | 159 + .../python-config.py | 71 + .../lib/python3.6/configparser.py | 1342 ++ .../elf2codingenv/lib/python3.6/contextlib.py | 389 + .../tasks/elf2codingenv/lib/python3.6/copy.py | 340 + .../elf2codingenv/lib/python3.6/copyreg.py | 219 + .../elf2codingenv/lib/python3.6/crypt.py | 61 + .../tasks/elf2codingenv/lib/python3.6/csv.py | 459 + .../lib/python3.6/ctypes/__init__.py | 620 + .../lib/python3.6/ctypes/_endian.py | 65 + .../lib/python3.6/ctypes/macholib/__init__.py | 9 + .../lib/python3.6/ctypes/macholib/dyld.py | 179 + .../lib/python3.6/ctypes/macholib/dylib.py | 68 + .../python3.6/ctypes/macholib/framework.py | 71 + .../lib/python3.6/ctypes/util.py | 353 + .../lib/python3.6/ctypes/wintypes.py | 228 + .../lib/python3.6/curses/__init__.py | 107 + .../lib/python3.6/curses/ascii.py | 133 + .../lib/python3.6/curses/has_key.py | 195 + .../lib/python3.6/curses/panel.py | 6 + .../lib/python3.6/curses/textpad.py | 205 + .../elf2codingenv/lib/python3.6/datetime.py | 2317 +++ .../lib/python3.6/dbm/__init__.py | 189 + .../elf2codingenv/lib/python3.6/dbm/dumb.py | 325 + .../elf2codingenv/lib/python3.6/dbm/gnu.py | 3 + .../elf2codingenv/lib/python3.6/dbm/ndbm.py | 3 + .../elf2codingenv/lib/python3.6/decimal.py | 11 + .../elf2codingenv/lib/python3.6/difflib.py | 2121 +++ .../tasks/elf2codingenv/lib/python3.6/dis.py | 515 + .../lib/python3.6/distutils/__init__.py | 13 + .../lib/python3.6/distutils/_msvccompiler.py | 579 + .../lib/python3.6/distutils/archive_util.py | 255 + .../lib/python3.6/distutils/bcppcompiler.py | 388 + .../lib/python3.6/distutils/ccompiler.py | 1111 ++ .../lib/python3.6/distutils/cmd.py | 433 + .../python3.6/distutils/command/__init__.py | 31 + .../lib/python3.6/distutils/command/bdist.py | 142 + .../python3.6/distutils/command/bdist_dumb.py | 124 + .../python3.6/distutils/command/bdist_msi.py | 760 + .../python3.6/distutils/command/bdist_rpm.py | 583 + .../distutils/command/bdist_wininst.py | 363 + .../lib/python3.6/distutils/command/build.py | 156 + .../python3.6/distutils/command/build_clib.py | 204 + .../python3.6/distutils/command/build_ext.py | 756 + .../python3.6/distutils/command/build_py.py | 418 + .../distutils/command/build_scripts.py | 161 + .../lib/python3.6/distutils/command/check.py | 147 + .../lib/python3.6/distutils/command/clean.py | 77 + .../lib/python3.6/distutils/command/config.py | 346 + .../python3.6/distutils/command/install.py | 652 + .../distutils/command/install_data.py | 80 + .../distutils/command/install_egg_info.py | 81 + .../distutils/command/install_headers.py | 46 + .../distutils/command/install_lib.py | 216 + .../distutils/command/install_scripts.py | 60 + .../python3.6/distutils/command/register.py | 306 + .../lib/python3.6/distutils/command/sdist.py | 458 + .../lib/python3.6/distutils/command/upload.py | 201 + .../lib/python3.6/distutils/config.py | 132 + .../lib/python3.6/distutils/core.py | 236 + .../python3.6/distutils/cygwinccompiler.py | 421 + .../lib/python3.6/distutils/debug.py | 5 + .../lib/python3.6/distutils/dep_util.py | 92 + .../lib/python3.6/distutils/dir_util.py | 217 + .../lib/python3.6/distutils/dist.py | 1238 ++ .../lib/python3.6/distutils/errors.py | 117 + .../lib/python3.6/distutils/extension.py | 242 + .../lib/python3.6/distutils/fancy_getopt.py | 462 + .../lib/python3.6/distutils/file_util.py | 239 + .../lib/python3.6/distutils/filelist.py | 326 + .../lib/python3.6/distutils/log.py | 79 + .../lib/python3.6/distutils/msvc9compiler.py | 801 + .../lib/python3.6/distutils/msvccompiler.py | 647 + .../lib/python3.6/distutils/spawn.py | 215 + .../lib/python3.6/distutils/sysconfig.py | 550 + .../lib/python3.6/distutils/tests/__init__.py | 36 + .../lib/python3.6/distutils/tests/support.py | 210 + .../distutils/tests/test_archive_util.py | 401 + .../python3.6/distutils/tests/test_bdist.py | 52 + .../distutils/tests/test_bdist_dumb.py | 99 + .../distutils/tests/test_bdist_msi.py | 26 + .../distutils/tests/test_bdist_rpm.py | 142 + .../distutils/tests/test_bdist_wininst.py | 34 + .../python3.6/distutils/tests/test_build.py | 59 + .../distutils/tests/test_build_clib.py | 139 + .../distutils/tests/test_build_ext.py | 521 + .../distutils/tests/test_build_py.py | 180 + .../distutils/tests/test_build_scripts.py | 113 + .../python3.6/distutils/tests/test_check.py | 151 + .../python3.6/distutils/tests/test_clean.py | 52 + .../lib/python3.6/distutils/tests/test_cmd.py | 130 + .../python3.6/distutils/tests/test_config.py | 142 + .../distutils/tests/test_config_cmd.py | 95 + .../python3.6/distutils/tests/test_core.py | 143 + .../distutils/tests/test_cygwinccompiler.py | 157 + .../distutils/tests/test_dep_util.py | 82 + .../distutils/tests/test_dir_util.py | 140 + .../python3.6/distutils/tests/test_dist.py | 457 + .../distutils/tests/test_extension.py | 72 + .../distutils/tests/test_file_util.py | 116 + .../distutils/tests/test_filelist.py | 340 + .../python3.6/distutils/tests/test_install.py | 249 + .../distutils/tests/test_install_data.py | 78 + .../distutils/tests/test_install_headers.py | 42 + .../distutils/tests/test_install_lib.py | 116 + .../distutils/tests/test_install_scripts.py | 83 + .../lib/python3.6/distutils/tests/test_log.py | 41 + .../distutils/tests/test_msvc9compiler.py | 187 + .../distutils/tests/test_msvccompiler.py | 138 + .../distutils/tests/test_register.py | 329 + .../python3.6/distutils/tests/test_sdist.py | 487 + .../python3.6/distutils/tests/test_spawn.py | 60 + .../distutils/tests/test_sysconfig.py | 198 + .../distutils/tests/test_text_file.py | 110 + .../distutils/tests/test_unixccompiler.py | 158 + .../python3.6/distutils/tests/test_upload.py | 209 + .../python3.6/distutils/tests/test_util.py | 307 + .../python3.6/distutils/tests/test_version.py | 72 + .../distutils/tests/test_versionpredicate.py | 15 + .../lib/python3.6/distutils/text_file.py | 288 + .../lib/python3.6/distutils/unixccompiler.py | 323 + .../lib/python3.6/distutils/util.py | 575 + .../lib/python3.6/distutils/version.py | 337 + .../python3.6/distutils/versionpredicate.py | 169 + .../elf2codingenv/lib/python3.6/doctest.py | 2843 ++++ .../lib/python3.6/dummy_threading.py | 78 + .../lib/python3.6/email/__init__.py | 64 + .../lib/python3.6/email/_encoded_words.py | 229 + .../python3.6/email/_header_value_parser.py | 2875 ++++ .../lib/python3.6/email/_parseaddr.py | 544 + .../lib/python3.6/email/_policybase.py | 375 + .../lib/python3.6/email/base64mime.py | 115 + .../lib/python3.6/email/charset.py | 402 + .../lib/python3.6/email/contentmanager.py | 269 + .../lib/python3.6/email/encoders.py | 65 + .../lib/python3.6/email/errors.py | 126 + .../lib/python3.6/email/feedparser.py | 535 + .../lib/python3.6/email/generator.py | 509 + .../lib/python3.6/email/header.py | 574 + .../lib/python3.6/email/headerregistry.py | 591 + .../lib/python3.6/email/iterators.py | 68 + .../lib/python3.6/email/message.py | 1167 ++ .../lib/python3.6/email/mime/__init__.py | 0 .../lib/python3.6/email/mime/application.py | 37 + .../lib/python3.6/email/mime/audio.py | 74 + .../lib/python3.6/email/mime/base.py | 29 + .../lib/python3.6/email/mime/image.py | 46 + .../lib/python3.6/email/mime/message.py | 33 + .../lib/python3.6/email/mime/multipart.py | 48 + .../lib/python3.6/email/mime/nonmultipart.py | 21 + .../lib/python3.6/email/mime/text.py | 41 + .../lib/python3.6/email/parser.py | 129 + .../lib/python3.6/email/policy.py | 224 + .../lib/python3.6/email/quoprimime.py | 297 + .../lib/python3.6/email/utils.py | 391 + .../lib/python3.6/encodings/__init__.py | 172 + .../lib/python3.6/encodings/aliases.py | 550 + .../lib/python3.6/encodings/ascii.py | 57 + .../lib/python3.6/encodings/base64_codec.py | 64 + .../lib/python3.6/encodings/big5.py | 46 + .../lib/python3.6/encodings/big5hkscs.py | 46 + .../lib/python3.6/encodings/bz2_codec.py | 87 + .../lib/python3.6/encodings/charmap.py | 75 + .../lib/python3.6/encodings/cp037.py | 313 + .../lib/python3.6/encodings/cp1006.py | 313 + .../lib/python3.6/encodings/cp1026.py | 313 + .../lib/python3.6/encodings/cp1125.py | 705 + .../lib/python3.6/encodings/cp1140.py | 313 + .../lib/python3.6/encodings/cp1250.py | 313 + .../lib/python3.6/encodings/cp1251.py | 313 + .../lib/python3.6/encodings/cp1252.py | 313 + .../lib/python3.6/encodings/cp1253.py | 313 + .../lib/python3.6/encodings/cp1254.py | 313 + .../lib/python3.6/encodings/cp1255.py | 313 + .../lib/python3.6/encodings/cp1256.py | 313 + .../lib/python3.6/encodings/cp1257.py | 313 + .../lib/python3.6/encodings/cp1258.py | 313 + .../lib/python3.6/encodings/cp273.py | 313 + .../lib/python3.6/encodings/cp424.py | 313 + .../lib/python3.6/encodings/cp437.py | 705 + .../lib/python3.6/encodings/cp500.py | 313 + .../lib/python3.6/encodings/cp65001.py | 49 + .../lib/python3.6/encodings/cp720.py | 315 + .../lib/python3.6/encodings/cp737.py | 705 + .../lib/python3.6/encodings/cp775.py | 704 + .../lib/python3.6/encodings/cp850.py | 705 + .../lib/python3.6/encodings/cp852.py | 705 + .../lib/python3.6/encodings/cp855.py | 705 + .../lib/python3.6/encodings/cp856.py | 313 + .../lib/python3.6/encodings/cp857.py | 701 + .../lib/python3.6/encodings/cp858.py | 705 + .../lib/python3.6/encodings/cp860.py | 705 + .../lib/python3.6/encodings/cp861.py | 705 + .../lib/python3.6/encodings/cp862.py | 705 + .../lib/python3.6/encodings/cp863.py | 705 + .../lib/python3.6/encodings/cp864.py | 697 + .../lib/python3.6/encodings/cp865.py | 705 + .../lib/python3.6/encodings/cp866.py | 705 + .../lib/python3.6/encodings/cp869.py | 696 + .../lib/python3.6/encodings/cp874.py | 313 + .../lib/python3.6/encodings/cp875.py | 313 + .../lib/python3.6/encodings/cp932.py | 46 + .../lib/python3.6/encodings/cp949.py | 46 + .../lib/python3.6/encodings/cp950.py | 46 + .../lib/python3.6/encodings/euc_jis_2004.py | 46 + .../lib/python3.6/encodings/euc_jisx0213.py | 46 + .../lib/python3.6/encodings/euc_jp.py | 46 + .../lib/python3.6/encodings/euc_kr.py | 46 + .../lib/python3.6/encodings/gb18030.py | 46 + .../lib/python3.6/encodings/gb2312.py | 46 + .../lib/python3.6/encodings/gbk.py | 46 + .../lib/python3.6/encodings/hex_codec.py | 64 + .../lib/python3.6/encodings/hp_roman8.py | 321 + .../lib/python3.6/encodings/hz.py | 46 + .../lib/python3.6/encodings/idna.py | 321 + .../lib/python3.6/encodings/iso2022_jp.py | 46 + .../lib/python3.6/encodings/iso2022_jp_1.py | 46 + .../lib/python3.6/encodings/iso2022_jp_2.py | 46 + .../python3.6/encodings/iso2022_jp_2004.py | 46 + .../lib/python3.6/encodings/iso2022_jp_3.py | 46 + .../lib/python3.6/encodings/iso2022_jp_ext.py | 46 + .../lib/python3.6/encodings/iso2022_kr.py | 46 + .../lib/python3.6/encodings/iso8859_1.py | 313 + .../lib/python3.6/encodings/iso8859_10.py | 313 + .../lib/python3.6/encodings/iso8859_11.py | 313 + .../lib/python3.6/encodings/iso8859_13.py | 313 + .../lib/python3.6/encodings/iso8859_14.py | 313 + .../lib/python3.6/encodings/iso8859_15.py | 313 + .../lib/python3.6/encodings/iso8859_16.py | 313 + .../lib/python3.6/encodings/iso8859_2.py | 313 + .../lib/python3.6/encodings/iso8859_3.py | 313 + .../lib/python3.6/encodings/iso8859_4.py | 313 + .../lib/python3.6/encodings/iso8859_5.py | 313 + .../lib/python3.6/encodings/iso8859_6.py | 313 + .../lib/python3.6/encodings/iso8859_7.py | 313 + .../lib/python3.6/encodings/iso8859_8.py | 313 + .../lib/python3.6/encodings/iso8859_9.py | 313 + .../lib/python3.6/encodings/johab.py | 46 + .../lib/python3.6/encodings/koi8_r.py | 313 + .../lib/python3.6/encodings/koi8_t.py | 314 + .../lib/python3.6/encodings/koi8_u.py | 313 + .../lib/python3.6/encodings/kz1048.py | 313 + .../lib/python3.6/encodings/latin_1.py | 57 + .../lib/python3.6/encodings/mac_arabic.py | 705 + .../lib/python3.6/encodings/mac_centeuro.py | 313 + .../lib/python3.6/encodings/mac_croatian.py | 313 + .../lib/python3.6/encodings/mac_cyrillic.py | 313 + .../lib/python3.6/encodings/mac_farsi.py | 323 + .../lib/python3.6/encodings/mac_greek.py | 313 + .../lib/python3.6/encodings/mac_iceland.py | 313 + .../lib/python3.6/encodings/mac_latin2.py | 318 + .../lib/python3.6/encodings/mac_roman.py | 313 + .../lib/python3.6/encodings/mac_romanian.py | 313 + .../lib/python3.6/encodings/mac_turkish.py | 313 + .../lib/python3.6/encodings/mbcs.py | 53 + .../lib/python3.6/encodings/oem.py | 47 + .../lib/python3.6/encodings/palmos.py | 314 + .../lib/python3.6/encodings/ptcp154.py | 318 + .../lib/python3.6/encodings/punycode.py | 257 + .../lib/python3.6/encodings/quopri_codec.py | 65 + .../python3.6/encodings/raw_unicode_escape.py | 51 + .../lib/python3.6/encodings/rot_13.py | 122 + .../lib/python3.6/encodings/shift_jis.py | 46 + .../lib/python3.6/encodings/shift_jis_2004.py | 46 + .../lib/python3.6/encodings/shift_jisx0213.py | 46 + .../lib/python3.6/encodings/tis_620.py | 313 + .../lib/python3.6/encodings/undefined.py | 55 + .../lib/python3.6/encodings/unicode_escape.py | 51 + .../python3.6/encodings/unicode_internal.py | 51 + .../lib/python3.6/encodings/utf_16.py | 162 + .../lib/python3.6/encodings/utf_16_be.py | 48 + .../lib/python3.6/encodings/utf_16_le.py | 48 + .../lib/python3.6/encodings/utf_32.py | 157 + .../lib/python3.6/encodings/utf_32_be.py | 43 + .../lib/python3.6/encodings/utf_32_le.py | 43 + .../lib/python3.6/encodings/utf_7.py | 44 + .../lib/python3.6/encodings/utf_8.py | 48 + .../lib/python3.6/encodings/utf_8_sig.py | 137 + .../lib/python3.6/encodings/uu_codec.py | 107 + .../lib/python3.6/encodings/zlib_codec.py | 86 + .../lib/python3.6/ensurepip/__init__.py | 207 + .../lib/python3.6/ensurepip/__main__.py | 5 + .../lib/python3.6/ensurepip/_uninstall.py | 31 + .../tasks/elf2codingenv/lib/python3.6/enum.py | 892 ++ .../elf2codingenv/lib/python3.6/filecmp.py | 315 + .../elf2codingenv/lib/python3.6/fileinput.py | 444 + .../elf2codingenv/lib/python3.6/fnmatch.py | 113 + .../elf2codingenv/lib/python3.6/formatter.py | 489 + .../elf2codingenv/lib/python3.6/fractions.py | 644 + .../elf2codingenv/lib/python3.6/ftplib.py | 1014 ++ .../elf2codingenv/lib/python3.6/functools.py | 854 + .../lib/python3.6/genericpath.py | 156 + .../elf2codingenv/lib/python3.6/getopt.py | 228 + .../elf2codingenv/lib/python3.6/getpass.py | 187 + .../elf2codingenv/lib/python3.6/gettext.py | 661 + .../tasks/elf2codingenv/lib/python3.6/glob.py | 187 + .../tasks/elf2codingenv/lib/python3.6/gzip.py | 585 + .../elf2codingenv/lib/python3.6/hashlib.py | 252 + .../elf2codingenv/lib/python3.6/heapq.py | 623 + .../tasks/elf2codingenv/lib/python3.6/hmac.py | 145 + .../lib/python3.6/html/__init__.py | 133 + .../lib/python3.6/html/entities.py | 2518 +++ .../lib/python3.6/html/parser.py | 470 + .../lib/python3.6/http/__init__.py | 135 + .../lib/python3.6/http/client.py | 1499 ++ .../lib/python3.6/http/cookiejar.py | 2200 +++ .../lib/python3.6/http/cookies.py | 644 + .../lib/python3.6/http/server.py | 1215 ++ .../lib/python3.6/idlelib/__init__.py | 10 + .../lib/python3.6/idlelib/__main__.py | 8 + .../lib/python3.6/idlelib/_pyclbr.py | 411 + .../lib/python3.6/idlelib/autocomplete.py | 232 + .../lib/python3.6/idlelib/autocomplete_w.py | 465 + .../lib/python3.6/idlelib/autoexpand.py | 96 + .../lib/python3.6/idlelib/browser.py | 252 + .../lib/python3.6/idlelib/calltip_w.py | 167 + .../lib/python3.6/idlelib/calltips.py | 180 + .../lib/python3.6/idlelib/codecontext.py | 186 + .../lib/python3.6/idlelib/colorizer.py | 309 + .../lib/python3.6/idlelib/config.py | 949 ++ .../lib/python3.6/idlelib/config_key.py | 299 + .../lib/python3.6/idlelib/configdialog.py | 2277 +++ .../lib/python3.6/idlelib/debugger.py | 546 + .../lib/python3.6/idlelib/debugger_r.py | 396 + .../lib/python3.6/idlelib/debugobj.py | 158 + .../lib/python3.6/idlelib/debugobj_r.py | 39 + .../lib/python3.6/idlelib/delegator.py | 34 + .../lib/python3.6/idlelib/dynoption.py | 62 + .../lib/python3.6/idlelib/editor.py | 1698 ++ .../lib/python3.6/idlelib/filelist.py | 133 + .../lib/python3.6/idlelib/grep.py | 201 + .../lib/python3.6/idlelib/help.py | 283 + .../lib/python3.6/idlelib/help_about.py | 206 + .../lib/python3.6/idlelib/history.py | 108 + .../lib/python3.6/idlelib/hyperparser.py | 312 + .../lib/python3.6/idlelib/idle.py | 14 + .../python3.6/idlelib/idle_test/__init__.py | 18 + .../lib/python3.6/idlelib/idle_test/htest.py | 423 + .../python3.6/idlelib/idle_test/mock_idle.py | 65 + .../python3.6/idlelib/idle_test/mock_tk.py | 315 + .../idlelib/idle_test/test_autocomplete.py | 151 + .../idlelib/idle_test/test_autoexpand.py | 144 + .../idlelib/idle_test/test_browser.py | 253 + .../idlelib/idle_test/test_calltips.py | 229 + .../idlelib/idle_test/test_colorizer.py | 57 + .../idlelib/idle_test/test_config.py | 837 + .../idlelib/idle_test/test_config_key.py | 103 + .../idlelib/idle_test/test_configdialog.py | 1421 ++ .../idlelib/idle_test/test_debugger.py | 29 + .../idlelib/idle_test/test_delegator.py | 42 + .../idlelib/idle_test/test_editmenu.py | 75 + .../idlelib/idle_test/test_editor.py | 18 + .../python3.6/idlelib/idle_test/test_grep.py | 90 + .../python3.6/idlelib/idle_test/test_help.py | 36 + .../idlelib/idle_test/test_help_about.py | 179 + .../idlelib/idle_test/test_history.py | 172 + .../idlelib/idle_test/test_hyperparser.py | 281 + .../idlelib/idle_test/test_iomenu.py | 240 + .../idlelib/idle_test/test_macosx.py | 106 + .../idlelib/idle_test/test_outwin.py | 172 + .../idlelib/idle_test/test_paragraph.py | 381 + .../idlelib/idle_test/test_parenmatch.py | 113 + .../idlelib/idle_test/test_pathbrowser.py | 88 + .../idlelib/idle_test/test_percolator.py | 119 + .../idlelib/idle_test/test_pyparse.py | 471 + .../python3.6/idlelib/idle_test/test_query.py | 366 + .../idlelib/idle_test/test_redirector.py | 124 + .../idlelib/idle_test/test_replace.py | 293 + .../idlelib/idle_test/test_rstrip.py | 51 + .../python3.6/idlelib/idle_test/test_run.py | 35 + .../idlelib/idle_test/test_scrolledlist.py | 28 + .../idlelib/idle_test/test_search.py | 83 + .../idlelib/idle_test/test_searchbase.py | 157 + .../idlelib/idle_test/test_searchengine.py | 340 + .../python3.6/idlelib/idle_test/test_text.py | 237 + .../idlelib/idle_test/test_textview.py | 183 + .../python3.6/idlelib/idle_test/test_tree.py | 35 + .../python3.6/idlelib/idle_test/test_undo.py | 136 + .../idlelib/idle_test/test_warning.py | 75 + .../lib/python3.6/idlelib/iomenu.py | 588 + .../lib/python3.6/idlelib/macosx.py | 261 + .../lib/python3.6/idlelib/mainmenu.py | 108 + .../lib/python3.6/idlelib/multicall.py | 485 + .../lib/python3.6/idlelib/outwin.py | 189 + .../lib/python3.6/idlelib/paragraph.py | 203 + .../lib/python3.6/idlelib/parenmatch.py | 187 + .../lib/python3.6/idlelib/pathbrowser.py | 112 + .../lib/python3.6/idlelib/percolator.py | 106 + .../lib/python3.6/idlelib/pyparse.py | 600 + .../lib/python3.6/idlelib/pyshell.py | 1555 ++ .../lib/python3.6/idlelib/query.py | 310 + .../lib/python3.6/idlelib/redirector.py | 179 + .../lib/python3.6/idlelib/replace.py | 245 + .../lib/python3.6/idlelib/rpc.py | 636 + .../lib/python3.6/idlelib/rstrip.py | 31 + .../lib/python3.6/idlelib/run.py | 541 + .../lib/python3.6/idlelib/runscript.py | 196 + .../lib/python3.6/idlelib/scrolledlist.py | 151 + .../lib/python3.6/idlelib/search.py | 107 + .../lib/python3.6/idlelib/searchbase.py | 202 + .../lib/python3.6/idlelib/searchengine.py | 241 + .../lib/python3.6/idlelib/stackviewer.py | 155 + .../lib/python3.6/idlelib/statusbar.py | 47 + .../lib/python3.6/idlelib/textview.py | 137 + .../lib/python3.6/idlelib/tooltip.py | 103 + .../lib/python3.6/idlelib/tree.py | 474 + .../lib/python3.6/idlelib/undo.py | 367 + .../lib/python3.6/idlelib/windows.py | 92 + .../lib/python3.6/idlelib/zoomheight.py | 48 + .../lib/python3.6/idlelib/zzdummy.py | 43 + .../elf2codingenv/lib/python3.6/imaplib.py | 1565 ++ .../elf2codingenv/lib/python3.6/imghdr.py | 199 + .../tasks/elf2codingenv/lib/python3.6/imp.py | 346 + .../lib/python3.6/importlib/__init__.py | 174 + .../lib/python3.6/importlib/_bootstrap.py | 1171 ++ .../importlib/_bootstrap_external.py | 1447 ++ .../lib/python3.6/importlib/abc.py | 335 + .../lib/python3.6/importlib/machinery.py | 21 + .../lib/python3.6/importlib/util.py | 289 + .../elf2codingenv/lib/python3.6/inspect.py | 3190 ++++ .../tasks/elf2codingenv/lib/python3.6/io.py | 105 + .../elf2codingenv/lib/python3.6/ipaddress.py | 2301 +++ .../lib/python3.6/json/__init__.py | 368 + .../lib/python3.6/json/decoder.py | 361 + .../lib/python3.6/json/encoder.py | 444 + .../lib/python3.6/json/scanner.py | 75 + .../elf2codingenv/lib/python3.6/json/tool.py | 50 + .../elf2codingenv/lib/python3.6/keyword.py | 99 + .../lib/python3.6/lib2to3/__init__.py | 1 + .../lib/python3.6/lib2to3/__main__.py | 4 + .../lib/python3.6/lib2to3/btm_matcher.py | 176 + .../lib/python3.6/lib2to3/btm_utils.py | 285 + .../lib/python3.6/lib2to3/fixer_base.py | 187 + .../lib/python3.6/lib2to3/fixer_util.py | 492 + .../lib/python3.6/lib2to3/fixes/__init__.py | 1 + .../lib/python3.6/lib2to3/fixes/fix_apply.py | 71 + .../python3.6/lib2to3/fixes/fix_asserts.py | 34 + .../python3.6/lib2to3/fixes/fix_basestring.py | 15 + .../lib/python3.6/lib2to3/fixes/fix_buffer.py | 22 + .../lib/python3.6/lib2to3/fixes/fix_dict.py | 106 + .../lib/python3.6/lib2to3/fixes/fix_except.py | 95 + .../lib/python3.6/lib2to3/fixes/fix_exec.py | 39 + .../python3.6/lib2to3/fixes/fix_execfile.py | 52 + .../python3.6/lib2to3/fixes/fix_exitfunc.py | 72 + .../lib/python3.6/lib2to3/fixes/fix_filter.py | 90 + .../python3.6/lib2to3/fixes/fix_funcattrs.py | 21 + .../lib/python3.6/lib2to3/fixes/fix_future.py | 23 + .../python3.6/lib2to3/fixes/fix_getcwdu.py | 20 + .../python3.6/lib2to3/fixes/fix_has_key.py | 109 + .../lib/python3.6/lib2to3/fixes/fix_idioms.py | 153 + .../lib/python3.6/lib2to3/fixes/fix_import.py | 99 + .../python3.6/lib2to3/fixes/fix_imports.py | 145 + .../python3.6/lib2to3/fixes/fix_imports2.py | 16 + .../lib/python3.6/lib2to3/fixes/fix_input.py | 26 + .../lib/python3.6/lib2to3/fixes/fix_intern.py | 41 + .../python3.6/lib2to3/fixes/fix_isinstance.py | 52 + .../python3.6/lib2to3/fixes/fix_itertools.py | 44 + .../lib2to3/fixes/fix_itertools_imports.py | 57 + .../lib/python3.6/lib2to3/fixes/fix_long.py | 19 + .../lib/python3.6/lib2to3/fixes/fix_map.py | 110 + .../python3.6/lib2to3/fixes/fix_metaclass.py | 228 + .../lib2to3/fixes/fix_methodattrs.py | 25 + .../lib/python3.6/lib2to3/fixes/fix_ne.py | 23 + .../lib/python3.6/lib2to3/fixes/fix_next.py | 105 + .../python3.6/lib2to3/fixes/fix_nonzero.py | 22 + .../lib2to3/fixes/fix_numliterals.py | 28 + .../python3.6/lib2to3/fixes/fix_operator.py | 99 + .../lib/python3.6/lib2to3/fixes/fix_paren.py | 46 + .../lib/python3.6/lib2to3/fixes/fix_print.py | 87 + .../lib/python3.6/lib2to3/fixes/fix_raise.py | 91 + .../python3.6/lib2to3/fixes/fix_raw_input.py | 18 + .../lib/python3.6/lib2to3/fixes/fix_reduce.py | 34 + .../lib/python3.6/lib2to3/fixes/fix_reload.py | 38 + .../python3.6/lib2to3/fixes/fix_renames.py | 71 + .../lib/python3.6/lib2to3/fixes/fix_repr.py | 23 + .../lib2to3/fixes/fix_set_literal.py | 52 + .../lib2to3/fixes/fix_standarderror.py | 18 + .../python3.6/lib2to3/fixes/fix_sys_exc.py | 31 + .../lib/python3.6/lib2to3/fixes/fix_throw.py | 58 + .../lib2to3/fixes/fix_tuple_params.py | 180 + .../lib/python3.6/lib2to3/fixes/fix_types.py | 63 + .../python3.6/lib2to3/fixes/fix_unicode.py | 43 + .../lib/python3.6/lib2to3/fixes/fix_urllib.py | 197 + .../python3.6/lib2to3/fixes/fix_ws_comma.py | 40 + .../lib/python3.6/lib2to3/fixes/fix_xrange.py | 73 + .../python3.6/lib2to3/fixes/fix_xreadlines.py | 25 + .../lib/python3.6/lib2to3/fixes/fix_zip.py | 46 + .../lib/python3.6/lib2to3/main.py | 269 + .../lib/python3.6/lib2to3/patcomp.py | 204 + .../lib/python3.6/lib2to3/pgen2/__init__.py | 4 + .../lib/python3.6/lib2to3/pgen2/conv.py | 257 + .../lib/python3.6/lib2to3/pgen2/driver.py | 182 + .../lib/python3.6/lib2to3/pgen2/grammar.py | 211 + .../lib/python3.6/lib2to3/pgen2/literals.py | 63 + .../lib/python3.6/lib2to3/pgen2/parse.py | 203 + .../lib/python3.6/lib2to3/pgen2/pgen.py | 393 + .../lib/python3.6/lib2to3/pgen2/token.py | 87 + .../lib/python3.6/lib2to3/pgen2/tokenize.py | 624 + .../lib/python3.6/lib2to3/pygram.py | 41 + .../lib/python3.6/lib2to3/pytree.py | 860 + .../lib/python3.6/lib2to3/refactor.py | 747 + .../lib/python3.6/lib2to3/tests/__init__.py | 10 + .../lib/python3.6/lib2to3/tests/__main__.py | 4 + .../lib/python3.6/lib2to3/tests/data/bom.py | 2 + .../lib/python3.6/lib2to3/tests/data/crlf.py | 3 + .../lib2to3/tests/data/different_encoding.py | 7 + .../lib2to3/tests/data/false_encoding.py | 2 + .../lib2to3/tests/data/fixers/bad_order.py | 6 + .../tests/data/fixers/myfixes/__init__.py | 0 .../tests/data/fixers/myfixes/fix_explicit.py | 7 + .../tests/data/fixers/myfixes/fix_first.py | 7 + .../tests/data/fixers/myfixes/fix_last.py | 8 + .../tests/data/fixers/myfixes/fix_parrot.py | 14 + .../tests/data/fixers/myfixes/fix_preorder.py | 7 + .../lib2to3/tests/data/fixers/no_fixer_cls.py | 1 + .../tests/data/fixers/parrot_example.py | 2 + .../lib2to3/tests/data/infinite_recursion.py | 3436 ++++ .../lib2to3/tests/data/py2_test_grammar.py | 1121 ++ .../lib2to3/tests/data/py3_test_grammar.py | 1096 ++ .../lib2to3/tests/pytree_idempotency.py | 97 + .../lib/python3.6/lib2to3/tests/support.py | 64 + .../lib2to3/tests/test_all_fixers.py | 28 + .../python3.6/lib2to3/tests/test_fixers.py | 4673 ++++++ .../lib/python3.6/lib2to3/tests/test_main.py | 139 + .../python3.6/lib2to3/tests/test_parser.py | 622 + .../python3.6/lib2to3/tests/test_pytree.py | 473 + .../python3.6/lib2to3/tests/test_refactor.py | 319 + .../lib/python3.6/lib2to3/tests/test_util.py | 604 + .../elf2codingenv/lib/python3.6/linecache.py | 178 + .../elf2codingenv/lib/python3.6/locale.py | 1708 ++ .../lib/python3.6/logging/__init__.py | 2089 +++ .../lib/python3.6/logging/config.py | 951 ++ .../lib/python3.6/logging/handlers.py | 1539 ++ .../tasks/elf2codingenv/lib/python3.6/lzma.py | 350 + .../elf2codingenv/lib/python3.6/macpath.py | 232 + .../lib/python3.6/macurl2path.py | 80 + .../elf2codingenv/lib/python3.6/mailbox.py | 2159 +++ .../elf2codingenv/lib/python3.6/mailcap.py | 290 + .../elf2codingenv/lib/python3.6/mimetypes.py | 606 + .../lib/python3.6/modulefinder.py | 641 + .../lib/python3.6/multiprocessing/__init__.py | 38 + .../python3.6/multiprocessing/connection.py | 977 ++ .../lib/python3.6/multiprocessing/context.py | 376 + .../multiprocessing/dummy/__init__.py | 135 + .../multiprocessing/dummy/connection.py | 73 + .../python3.6/multiprocessing/forkserver.py | 272 + .../lib/python3.6/multiprocessing/heap.py | 256 + .../lib/python3.6/multiprocessing/managers.py | 1222 ++ .../lib/python3.6/multiprocessing/pool.py | 818 + .../python3.6/multiprocessing/popen_fork.py | 80 + .../multiprocessing/popen_forkserver.py | 71 + .../multiprocessing/popen_spawn_posix.py | 70 + .../multiprocessing/popen_spawn_win32.py | 99 + .../lib/python3.6/multiprocessing/process.py | 342 + .../lib/python3.6/multiprocessing/queues.py | 351 + .../python3.6/multiprocessing/reduction.py | 293 + .../multiprocessing/resource_sharer.py | 164 + .../multiprocessing/semaphore_tracker.py | 157 + .../python3.6/multiprocessing/sharedctypes.py | 251 + .../lib/python3.6/multiprocessing/spawn.py | 293 + .../python3.6/multiprocessing/synchronize.py | 414 + .../lib/python3.6/multiprocessing/util.py | 444 + .../elf2codingenv/lib/python3.6/netrc.py | 146 + .../elf2codingenv/lib/python3.6/nntplib.py | 1164 ++ .../elf2codingenv/lib/python3.6/ntpath.py | 706 + .../elf2codingenv/lib/python3.6/nturl2path.py | 71 + .../elf2codingenv/lib/python3.6/numbers.py | 393 + .../elf2codingenv/lib/python3.6/opcode.py | 221 + .../elf2codingenv/lib/python3.6/operator.py | 521 + .../elf2codingenv/lib/python3.6/optparse.py | 1679 ++ .../tasks/elf2codingenv/lib/python3.6/os.py | 1107 ++ .../elf2codingenv/lib/python3.6/pathlib.py | 1469 ++ .../tasks/elf2codingenv/lib/python3.6/pdb.py | 1719 ++ .../elf2codingenv/lib/python3.6/pickle.py | 1622 ++ .../lib/python3.6/pickletools.py | 2884 ++++ .../elf2codingenv/lib/python3.6/pipes.py | 247 + .../elf2codingenv/lib/python3.6/pkgutil.py | 636 + .../elf2codingenv/lib/python3.6/platform.py | 1415 ++ .../elf2codingenv/lib/python3.6/plistlib.py | 1058 ++ .../elf2codingenv/lib/python3.6/poplib.py | 464 + .../elf2codingenv/lib/python3.6/posixpath.py | 533 + .../elf2codingenv/lib/python3.6/pprint.py | 613 + .../elf2codingenv/lib/python3.6/profile.py | 589 + .../elf2codingenv/lib/python3.6/pstats.py | 734 + .../tasks/elf2codingenv/lib/python3.6/pty.py | 179 + .../elf2codingenv/lib/python3.6/py_compile.py | 187 + .../elf2codingenv/lib/python3.6/pyclbr.py | 364 + .../elf2codingenv/lib/python3.6/pydoc.py | 2773 ++++ .../lib/python3.6/pydoc_data/__init__.py | 0 .../lib/python3.6/pydoc_data/topics.py | 13076 ++++++++++++++++ .../elf2codingenv/lib/python3.6/queue.py | 249 + .../elf2codingenv/lib/python3.6/quopri.py | 252 + .../elf2codingenv/lib/python3.6/random.py | 776 + .../tasks/elf2codingenv/lib/python3.6/re.py | 409 + .../elf2codingenv/lib/python3.6/reprlib.py | 172 + .../lib/python3.6/rlcompleter.py | 208 + .../elf2codingenv/lib/python3.6/runpy.py | 308 + .../elf2codingenv/lib/python3.6/sched.py | 178 + .../elf2codingenv/lib/python3.6/secrets.py | 78 + .../elf2codingenv/lib/python3.6/selectors.py | 612 + .../elf2codingenv/lib/python3.6/shelve.py | 244 + .../elf2codingenv/lib/python3.6/shlex.py | 340 + .../elf2codingenv/lib/python3.6/shutil.py | 1198 ++ .../elf2codingenv/lib/python3.6/signal.py | 79 + .../site-packages/_pytest/__init__.py | 8 + .../site-packages/_pytest/_argcomplete.py | 107 + .../site-packages/_pytest/_code/__init__.py | 10 + .../_pytest/_code/_py2traceback.py | 89 + .../site-packages/_pytest/_code/code.py | 973 ++ .../site-packages/_pytest/_code/source.py | 380 + .../site-packages/_pytest/_version.py | 4 + .../_pytest/assertion/__init__.py | 151 + .../_pytest/assertion/rewrite.py | 960 ++ .../_pytest/assertion/truncate.py | 100 + .../site-packages/_pytest/assertion/util.py | 341 + .../site-packages/_pytest/cacheprovider.py | 344 + .../site-packages/_pytest/capture.py | 727 + .../python3.6/site-packages/_pytest/compat.py | 371 + .../python3.6/site-packages/_pytest/config.py | 1500 ++ .../site-packages/_pytest/debugging.py | 162 + .../site-packages/_pytest/deprecated.py | 65 + .../site-packages/_pytest/doctest.py | 525 + .../site-packages/_pytest/fixtures.py | 1248 ++ .../site-packages/_pytest/freeze_support.py | 45 + .../site-packages/_pytest/helpconfig.py | 215 + .../site-packages/_pytest/hookspec.py | 563 + .../site-packages/_pytest/junitxml.py | 577 + .../site-packages/_pytest/logging.py | 583 + .../python3.6/site-packages/_pytest/main.py | 618 + .../site-packages/_pytest/mark/__init__.py | 176 + .../site-packages/_pytest/mark/evaluate.py | 122 + .../site-packages/_pytest/mark/legacy.py | 98 + .../site-packages/_pytest/mark/structures.py | 421 + .../site-packages/_pytest/monkeypatch.py | 285 + .../python3.6/site-packages/_pytest/nodes.py | 420 + .../python3.6/site-packages/_pytest/nose.py | 74 + .../site-packages/_pytest/outcomes.py | 158 + .../site-packages/_pytest/pastebin.py | 109 + .../site-packages/_pytest/pytester.py | 1279 ++ .../python3.6/site-packages/_pytest/python.py | 1342 ++ .../site-packages/_pytest/python_api.py | 679 + .../site-packages/_pytest/recwarn.py | 245 + .../site-packages/_pytest/resultlog.py | 120 + .../python3.6/site-packages/_pytest/runner.py | 564 + .../site-packages/_pytest/setuponly.py | 84 + .../site-packages/_pytest/setupplan.py | 29 + .../site-packages/_pytest/skipping.py | 295 + .../site-packages/_pytest/terminal.py | 833 + .../python3.6/site-packages/_pytest/tmpdir.py | 131 + .../site-packages/_pytest/unittest.py | 253 + .../site-packages/_pytest/warnings.py | 112 + .../site-packages/atomicwrites/__init__.py | 201 + .../python3.6/site-packages/attr/__init__.py | 57 + .../python3.6/site-packages/attr/_compat.py | 146 + .../python3.6/site-packages/attr/_config.py | 23 + .../python3.6/site-packages/attr/_funcs.py | 212 + .../lib/python3.6/site-packages/attr/_make.py | 1690 ++ .../site-packages/attr/converters.py | 24 + .../site-packages/attr/exceptions.py | 48 + .../python3.6/site-packages/attr/filters.py | 52 + .../site-packages/attr/validators.py | 166 + .../lib/python3.6/site-packages/autopep8.py | 3946 +++++ .../site-packages/certifi/__init__.py | 3 + .../site-packages/certifi/__main__.py | 2 + .../python3.6/site-packages/certifi/core.py | 38 + .../python3.6/site-packages/easy_install.py | 5 + .../site-packages/flake8/__init__.py | 82 + .../site-packages/flake8/__main__.py | 4 + .../site-packages/flake8/api/__init__.py | 5 + .../site-packages/flake8/api/legacy.py | 202 + .../python3.6/site-packages/flake8/checker.py | 659 + .../site-packages/flake8/defaults.py | 53 + .../site-packages/flake8/exceptions.py | 129 + .../flake8/formatting/__init__.py | 1 + .../site-packages/flake8/formatting/base.py | 199 + .../flake8/formatting/default.py | 88 + .../site-packages/flake8/main/__init__.py | 1 + .../site-packages/flake8/main/application.py | 410 + .../site-packages/flake8/main/cli.py | 17 + .../site-packages/flake8/main/debug.py | 68 + .../site-packages/flake8/main/git.py | 244 + .../site-packages/flake8/main/mercurial.py | 149 + .../site-packages/flake8/main/options.py | 218 + .../flake8/main/setuptools_command.py | 103 + .../site-packages/flake8/main/vcs.py | 39 + .../site-packages/flake8/options/__init__.py | 12 + .../flake8/options/aggregator.py | 78 + .../site-packages/flake8/options/config.py | 342 + .../site-packages/flake8/options/manager.py | 325 + .../site-packages/flake8/plugins/__init__.py | 1 + .../site-packages/flake8/plugins/_trie.py | 97 + .../site-packages/flake8/plugins/manager.py | 558 + .../site-packages/flake8/plugins/notifier.py | 46 + .../site-packages/flake8/plugins/pyflakes.py | 163 + .../site-packages/flake8/processor.py | 465 + .../site-packages/flake8/statistics.py | 129 + .../site-packages/flake8/style_guide.py | 423 + .../python3.6/site-packages/flake8/utils.py | 345 + .../lib/python3.6/site-packages/mccabe.py | 347 + .../site-packages/more_itertools/__init__.py | 2 + .../site-packages/more_itertools/more.py | 2071 +++ .../site-packages/more_itertools/recipes.py | 565 + .../more_itertools/tests/__init__.py | 0 .../more_itertools/tests/test_more.py | 1863 +++ .../more_itertools/tests/test_recipes.py | 608 + .../python3.6/site-packages/pip/__init__.py | 1 + .../python3.6/site-packages/pip/__main__.py | 19 + .../site-packages/pip/_internal/__init__.py | 246 + .../pip/_internal/basecommand.py | 373 + .../site-packages/pip/_internal/baseparser.py | 240 + .../site-packages/pip/_internal/build_env.py | 92 + .../site-packages/pip/_internal/cache.py | 202 + .../site-packages/pip/_internal/cmdoptions.py | 609 + .../pip/_internal/commands/__init__.py | 79 + .../pip/_internal/commands/check.py | 42 + .../pip/_internal/commands/completion.py | 94 + .../pip/_internal/commands/configuration.py | 227 + .../pip/_internal/commands/download.py | 233 + .../pip/_internal/commands/freeze.py | 96 + .../pip/_internal/commands/hash.py | 57 + .../pip/_internal/commands/help.py | 36 + .../pip/_internal/commands/install.py | 502 + .../pip/_internal/commands/list.py | 343 + .../pip/_internal/commands/search.py | 135 + .../pip/_internal/commands/show.py | 164 + .../pip/_internal/commands/uninstall.py | 71 + .../pip/_internal/commands/wheel.py | 179 + .../site-packages/pip/_internal/compat.py | 235 + .../pip/_internal/configuration.py | 378 + .../site-packages/pip/_internal/download.py | 922 ++ .../site-packages/pip/_internal/exceptions.py | 249 + .../site-packages/pip/_internal/index.py | 1117 ++ .../site-packages/pip/_internal/locations.py | 194 + .../pip/_internal/models/__init__.py | 4 + .../pip/_internal/models/index.py | 15 + .../pip/_internal/operations/__init__.py | 0 .../pip/_internal/operations/check.py | 106 + .../pip/_internal/operations/freeze.py | 252 + .../pip/_internal/operations/prepare.py | 380 + .../site-packages/pip/_internal/pep425tags.py | 317 + .../pip/_internal/req/__init__.py | 69 + .../pip/_internal/req/req_file.py | 338 + .../pip/_internal/req/req_install.py | 1115 ++ .../pip/_internal/req/req_set.py | 164 + .../pip/_internal/req/req_uninstall.py | 456 + .../site-packages/pip/_internal/resolve.py | 354 + .../pip/_internal/status_codes.py | 8 + .../pip/_internal/utils/__init__.py | 0 .../pip/_internal/utils/appdirs.py | 258 + .../pip/_internal/utils/deprecation.py | 77 + .../pip/_internal/utils/encoding.py | 33 + .../pip/_internal/utils/filesystem.py | 28 + .../pip/_internal/utils/glibc.py | 84 + .../pip/_internal/utils/hashes.py | 96 + .../pip/_internal/utils/logging.py | 132 + .../site-packages/pip/_internal/utils/misc.py | 852 + .../pip/_internal/utils/outdated.py | 163 + .../pip/_internal/utils/packaging.py | 70 + .../pip/_internal/utils/setuptools_build.py | 8 + .../pip/_internal/utils/temp_dir.py | 82 + .../pip/_internal/utils/typing.py | 29 + .../site-packages/pip/_internal/utils/ui.py | 421 + .../pip/_internal/vcs/__init__.py | 471 + .../site-packages/pip/_internal/vcs/bazaar.py | 113 + .../site-packages/pip/_internal/vcs/git.py | 311 + .../pip/_internal/vcs/mercurial.py | 105 + .../pip/_internal/vcs/subversion.py | 271 + .../site-packages/pip/_internal/wheel.py | 824 + .../site-packages/pip/_vendor/__init__.py | 109 + .../site-packages/pip/_vendor/appdirs.py | 610 + .../pip/_vendor/cachecontrol/__init__.py | 11 + .../pip/_vendor/cachecontrol/_cmd.py | 60 + .../pip/_vendor/cachecontrol/adapter.py | 135 + .../pip/_vendor/cachecontrol/cache.py | 39 + .../_vendor/cachecontrol/caches/__init__.py | 2 + .../_vendor/cachecontrol/caches/file_cache.py | 133 + .../cachecontrol/caches/redis_cache.py | 43 + .../pip/_vendor/cachecontrol/compat.py | 29 + .../pip/_vendor/cachecontrol/controller.py | 374 + .../pip/_vendor/cachecontrol/filewrapper.py | 78 + .../pip/_vendor/cachecontrol/heuristics.py | 139 + .../pip/_vendor/cachecontrol/serialize.py | 194 + .../pip/_vendor/cachecontrol/wrapper.py | 27 + .../pip/_vendor/certifi/__init__.py | 3 + .../pip/_vendor/certifi/__main__.py | 2 + .../site-packages/pip/_vendor/certifi/core.py | 38 + .../pip/_vendor/chardet/__init__.py | 39 + .../pip/_vendor/chardet/big5freq.py | 385 + .../pip/_vendor/chardet/big5prober.py | 47 + .../pip/_vendor/chardet/chardistribution.py | 233 + .../pip/_vendor/chardet/charsetgroupprober.py | 107 + .../pip/_vendor/chardet/charsetprober.py | 145 + .../pip/_vendor/chardet/cli/__init__.py | 0 .../pip/_vendor/chardet/cli/chardetect.py | 85 + .../pip/_vendor/chardet/codingstatemachine.py | 89 + .../pip/_vendor/chardet/compat.py | 34 + .../pip/_vendor/chardet/cp949prober.py | 49 + .../pip/_vendor/chardet/enums.py | 76 + .../pip/_vendor/chardet/escprober.py | 101 + .../pip/_vendor/chardet/escsm.py | 244 + .../pip/_vendor/chardet/eucjpprober.py | 92 + .../pip/_vendor/chardet/euckrfreq.py | 194 + .../pip/_vendor/chardet/euckrprober.py | 47 + .../pip/_vendor/chardet/euctwfreq.py | 386 + .../pip/_vendor/chardet/euctwprober.py | 47 + .../pip/_vendor/chardet/gb2312freq.py | 282 + .../pip/_vendor/chardet/gb2312prober.py | 47 + .../pip/_vendor/chardet/hebrewprober.py | 293 + .../pip/_vendor/chardet/jisfreq.py | 324 + .../pip/_vendor/chardet/jpcntx.py | 317 + .../pip/_vendor/chardet/langbulgarianmodel.py | 228 + .../pip/_vendor/chardet/langcyrillicmodel.py | 333 + .../pip/_vendor/chardet/langgreekmodel.py | 225 + .../pip/_vendor/chardet/langhebrewmodel.py | 200 + .../pip/_vendor/chardet/langhungarianmodel.py | 225 + .../pip/_vendor/chardet/langthaimodel.py | 199 + .../pip/_vendor/chardet/langturkishmodel.py | 193 + .../pip/_vendor/chardet/latin1prober.py | 145 + .../pip/_vendor/chardet/mbcharsetprober.py | 91 + .../pip/_vendor/chardet/mbcsgroupprober.py | 54 + .../pip/_vendor/chardet/mbcssm.py | 572 + .../pip/_vendor/chardet/sbcharsetprober.py | 132 + .../pip/_vendor/chardet/sbcsgroupprober.py | 74 + .../pip/_vendor/chardet/sjisprober.py | 92 + .../pip/_vendor/chardet/universaldetector.py | 286 + .../pip/_vendor/chardet/utf8prober.py | 81 + .../pip/_vendor/chardet/version.py | 9 + .../pip/_vendor/colorama/__init__.py | 6 + .../pip/_vendor/colorama/ansi.py | 110 + .../pip/_vendor/colorama/ansitowin32.py | 237 + .../pip/_vendor/colorama/initialise.py | 80 + .../pip/_vendor/colorama/win32.py | 153 + .../pip/_vendor/colorama/winterm.py | 171 + .../pip/_vendor/distlib/__init__.py | 27 + .../pip/_vendor/distlib/_backport/__init__.py | 6 + .../pip/_vendor/distlib/_backport/misc.py | 41 + .../pip/_vendor/distlib/_backport/shutil.py | 797 + .../_vendor/distlib/_backport/sysconfig.py | 793 + .../pip/_vendor/distlib/_backport/tarfile.py | 2675 ++++ .../pip/_vendor/distlib/compat.py | 1131 ++ .../pip/_vendor/distlib/database.py | 1342 ++ .../pip/_vendor/distlib/index.py | 517 + .../pip/_vendor/distlib/locators.py | 1309 ++ .../pip/_vendor/distlib/manifest.py | 396 + .../pip/_vendor/distlib/markers.py | 140 + .../pip/_vendor/distlib/metadata.py | 1095 ++ .../pip/_vendor/distlib/resources.py | 358 + .../pip/_vendor/distlib/scripts.py | 415 + .../site-packages/pip/_vendor/distlib/util.py | 1788 +++ .../pip/_vendor/distlib/version.py | 741 + .../pip/_vendor/distlib/wheel.py | 989 ++ .../site-packages/pip/_vendor/distro.py | 1105 ++ .../pip/_vendor/html5lib/__init__.py | 35 + .../pip/_vendor/html5lib/_ihatexml.py | 295 + .../pip/_vendor/html5lib/_inputstream.py | 933 ++ .../pip/_vendor/html5lib/_tokenizer.py | 1766 +++ .../pip/_vendor/html5lib/_trie/__init__.py | 14 + .../pip/_vendor/html5lib/_trie/_base.py | 37 + .../pip/_vendor/html5lib/_trie/datrie.py | 44 + .../pip/_vendor/html5lib/_trie/py.py | 67 + .../pip/_vendor/html5lib/_utils.py | 124 + .../pip/_vendor/html5lib/constants.py | 2947 ++++ .../pip/_vendor/html5lib/filters/__init__.py | 0 .../filters/alphabeticalattributes.py | 30 + .../pip/_vendor/html5lib/filters/base.py | 12 + .../html5lib/filters/inject_meta_charset.py | 75 + .../pip/_vendor/html5lib/filters/lint.py | 96 + .../_vendor/html5lib/filters/optionaltags.py | 208 + .../pip/_vendor/html5lib/filters/sanitizer.py | 899 ++ .../_vendor/html5lib/filters/whitespace.py | 39 + .../pip/_vendor/html5lib/html5parser.py | 2834 ++++ .../pip/_vendor/html5lib/serializer.py | 417 + .../_vendor/html5lib/treeadapters/__init__.py | 30 + .../_vendor/html5lib/treeadapters/genshi.py | 54 + .../pip/_vendor/html5lib/treeadapters/sax.py | 50 + .../_vendor/html5lib/treebuilders/__init__.py | 88 + .../pip/_vendor/html5lib/treebuilders/base.py | 418 + .../pip/_vendor/html5lib/treebuilders/dom.py | 240 + .../_vendor/html5lib/treebuilders/etree.py | 342 + .../html5lib/treebuilders/etree_lxml.py | 375 + .../_vendor/html5lib/treewalkers/__init__.py | 154 + .../pip/_vendor/html5lib/treewalkers/base.py | 253 + .../pip/_vendor/html5lib/treewalkers/dom.py | 43 + .../pip/_vendor/html5lib/treewalkers/etree.py | 132 + .../html5lib/treewalkers/etree_lxml.py | 216 + .../_vendor/html5lib/treewalkers/genshi.py | 69 + .../pip/_vendor/idna/__init__.py | 2 + .../site-packages/pip/_vendor/idna/codec.py | 127 + .../site-packages/pip/_vendor/idna/compat.py | 14 + .../site-packages/pip/_vendor/idna/core.py | 400 + .../pip/_vendor/idna/idnadata.py | 1585 ++ .../pip/_vendor/idna/intranges.py | 56 + .../pip/_vendor/idna/package_data.py | 1 + .../pip/_vendor/idna/uts46data.py | 7709 +++++++++ .../site-packages/pip/_vendor/ipaddress.py | 2418 +++ .../pip/_vendor/lockfile/__init__.py | 348 + .../pip/_vendor/lockfile/linklockfile.py | 73 + .../pip/_vendor/lockfile/mkdirlockfile.py | 85 + .../pip/_vendor/lockfile/pidlockfile.py | 190 + .../pip/_vendor/lockfile/sqlitelockfile.py | 156 + .../pip/_vendor/lockfile/symlinklockfile.py | 70 + .../pip/_vendor/msgpack/__init__.py | 66 + .../pip/_vendor/msgpack/_version.py | 1 + .../pip/_vendor/msgpack/exceptions.py | 41 + .../pip/_vendor/msgpack/fallback.py | 1011 ++ .../pip/_vendor/packaging/__about__.py | 21 + .../pip/_vendor/packaging/__init__.py | 14 + .../pip/_vendor/packaging/_compat.py | 30 + .../pip/_vendor/packaging/_structures.py | 70 + .../pip/_vendor/packaging/markers.py | 301 + .../pip/_vendor/packaging/requirements.py | 130 + .../pip/_vendor/packaging/specifiers.py | 774 + .../pip/_vendor/packaging/utils.py | 63 + .../pip/_vendor/packaging/version.py | 441 + .../pip/_vendor/pkg_resources/__init__.py | 3126 ++++ .../pip/_vendor/pkg_resources/py31compat.py | 22 + .../pip/_vendor/progress/__init__.py | 127 + .../site-packages/pip/_vendor/progress/bar.py | 88 + .../pip/_vendor/progress/counter.py | 48 + .../pip/_vendor/progress/helpers.py | 91 + .../pip/_vendor/progress/spinner.py | 45 + .../site-packages/pip/_vendor/pyparsing.py | 5995 +++++++ .../pip/_vendor/pytoml/__init__.py | 3 + .../site-packages/pip/_vendor/pytoml/core.py | 13 + .../pip/_vendor/pytoml/parser.py | 403 + .../pip/_vendor/pytoml/writer.py | 135 + .../pip/_vendor/requests/__init__.py | 124 + .../pip/_vendor/requests/__version__.py | 14 + .../pip/_vendor/requests/_internal_utils.py | 42 + .../pip/_vendor/requests/adapters.py | 526 + .../site-packages/pip/_vendor/requests/api.py | 152 + .../pip/_vendor/requests/auth.py | 297 + .../pip/_vendor/requests/certs.py | 18 + .../pip/_vendor/requests/compat.py | 73 + .../pip/_vendor/requests/cookies.py | 545 + .../pip/_vendor/requests/exceptions.py | 122 + .../pip/_vendor/requests/help.py | 120 + .../pip/_vendor/requests/hooks.py | 34 + .../pip/_vendor/requests/models.py | 957 ++ .../pip/_vendor/requests/packages.py | 17 + .../pip/_vendor/requests/sessions.py | 744 + .../pip/_vendor/requests/status_codes.py | 91 + .../pip/_vendor/requests/structures.py | 105 + .../pip/_vendor/requests/utils.py | 908 ++ .../site-packages/pip/_vendor/retrying.py | 271 + .../site-packages/pip/_vendor/six.py | 905 ++ .../pip/_vendor/urllib3/__init__.py | 98 + .../pip/_vendor/urllib3/_collections.py | 320 + .../pip/_vendor/urllib3/connection.py | 374 + .../pip/_vendor/urllib3/connectionpool.py | 913 ++ .../pip/_vendor/urllib3/contrib/__init__.py | 0 .../contrib/_securetransport/__init__.py | 0 .../contrib/_securetransport/bindings.py | 596 + .../contrib/_securetransport/low_level.py | 343 + .../pip/_vendor/urllib3/contrib/appengine.py | 297 + .../pip/_vendor/urllib3/contrib/ntlmpool.py | 112 + .../pip/_vendor/urllib3/contrib/pyopenssl.py | 458 + .../urllib3/contrib/securetransport.py | 813 + .../pip/_vendor/urllib3/contrib/socks.py | 189 + .../pip/_vendor/urllib3/exceptions.py | 251 + .../pip/_vendor/urllib3/fields.py | 179 + .../pip/_vendor/urllib3/filepost.py | 94 + .../pip/_vendor/urllib3/packages/__init__.py | 5 + .../urllib3/packages/backports/__init__.py | 0 .../urllib3/packages/backports/makefile.py | 53 + .../_vendor/urllib3/packages/ordered_dict.py | 259 + .../pip/_vendor/urllib3/packages/six.py | 881 ++ .../packages/ssl_match_hostname/__init__.py | 19 + .../ssl_match_hostname/_implementation.py | 158 + .../pip/_vendor/urllib3/poolmanager.py | 443 + .../pip/_vendor/urllib3/request.py | 150 + .../pip/_vendor/urllib3/response.py | 628 + .../pip/_vendor/urllib3/util/__init__.py | 54 + .../pip/_vendor/urllib3/util/connection.py | 130 + .../pip/_vendor/urllib3/util/request.py | 118 + .../pip/_vendor/urllib3/util/response.py | 81 + .../pip/_vendor/urllib3/util/retry.py | 405 + .../pip/_vendor/urllib3/util/selectors.py | 590 + .../pip/_vendor/urllib3/util/ssl_.py | 341 + .../pip/_vendor/urllib3/util/timeout.py | 242 + .../pip/_vendor/urllib3/util/url.py | 230 + .../pip/_vendor/urllib3/util/wait.py | 40 + .../pip/_vendor/webencodings/__init__.py | 345 + .../pip/_vendor/webencodings/labels.py | 231 + .../pip/_vendor/webencodings/mklabels.py | 59 + .../pip/_vendor/webencodings/tests.py | 159 + .../_vendor/webencodings/x_user_defined.py | 325 + .../site-packages/pkg_resources/__init__.py | 3133 ++++ .../pkg_resources/_vendor/__init__.py | 0 .../pkg_resources/_vendor/appdirs.py | 557 + .../_vendor/packaging/__about__.py | 21 + .../_vendor/packaging/__init__.py | 14 + .../_vendor/packaging/_compat.py | 30 + .../_vendor/packaging/_structures.py | 70 + .../_vendor/packaging/markers.py | 301 + .../_vendor/packaging/requirements.py | 127 + .../_vendor/packaging/specifiers.py | 774 + .../pkg_resources/_vendor/packaging/utils.py | 14 + .../_vendor/packaging/version.py | 394 + .../pkg_resources/_vendor/pyparsing.py | 5971 +++++++ .../pkg_resources/_vendor/six.py | 881 ++ .../pkg_resources/extern/__init__.py | 73 + .../site-packages/pkg_resources/py31compat.py | 22 + .../site-packages/pluggy/__init__.py | 687 + .../python3.6/site-packages/pluggy/callers.py | 203 + .../python3.6/site-packages/py/__init__.py | 151 + .../python3.6/site-packages/py/__metainfo.py | 2 + .../python3.6/site-packages/py/_builtin.py | 252 + .../site-packages/py/_code/__init__.py | 1 + .../site-packages/py/_code/_assertionnew.py | 326 + .../site-packages/py/_code/_assertionold.py | 574 + .../site-packages/py/_code/_py2traceback.py | 82 + .../site-packages/py/_code/assertion.py | 92 + .../python3.6/site-packages/py/_code/code.py | 812 + .../site-packages/py/_code/source.py | 415 + .../lib/python3.6/site-packages/py/_error.py | 96 + .../site-packages/py/_io/__init__.py | 1 + .../python3.6/site-packages/py/_io/capture.py | 382 + .../site-packages/py/_io/saferepr.py | 74 + .../site-packages/py/_io/terminalwriter.py | 400 + .../site-packages/py/_log/__init__.py | 1 + .../python3.6/site-packages/py/_log/log.py | 210 + .../site-packages/py/_log/warning.py | 83 + .../site-packages/py/_path/__init__.py | 1 + .../site-packages/py/_path/cacheutil.py | 119 + .../site-packages/py/_path/common.py | 457 + .../python3.6/site-packages/py/_path/local.py | 1009 ++ .../site-packages/py/_path/svnurl.py | 386 + .../python3.6/site-packages/py/_path/svnwc.py | 1272 ++ .../site-packages/py/_process/__init__.py | 1 + .../site-packages/py/_process/cmdexec.py | 52 + .../site-packages/py/_process/forkedfunc.py | 121 + .../site-packages/py/_process/killproc.py | 25 + .../lib/python3.6/site-packages/py/_std.py | 27 + .../py/_vendored_packages/__init__.py | 0 .../py/_vendored_packages/apipkg.py | 205 + .../py/_vendored_packages/iniconfig.py | 165 + .../lib/python3.6/site-packages/py/_xmlgen.py | 267 + .../lib/python3.6/site-packages/py/test.py | 11 + .../python3.6/site-packages/pycodestyle.py | 2327 +++ .../site-packages/pyflakes/__init__.py | 1 + .../site-packages/pyflakes/__main__.py | 5 + .../python3.6/site-packages/pyflakes/api.py | 211 + .../site-packages/pyflakes/checker.py | 1366 ++ .../site-packages/pyflakes/messages.py | 233 + .../site-packages/pyflakes/reporter.py | 81 + .../pyflakes/scripts/__init__.py | 0 .../pyflakes/scripts/pyflakes.py | 8 + .../site-packages/pyflakes/test/__init__.py | 0 .../site-packages/pyflakes/test/harness.py | 73 + .../site-packages/pyflakes/test/test_api.py | 778 + .../site-packages/pyflakes/test/test_dict.py | 217 + .../pyflakes/test/test_doctests.py | 442 + .../pyflakes/test/test_imports.py | 1181 ++ .../site-packages/pyflakes/test/test_other.py | 1876 +++ ..._return_with_arguments_inside_generator.py | 34 + .../pyflakes/test/test_undefined_names.py | 807 + .../lib/python3.6/site-packages/pytest.py | 72 + .../site-packages/setuptools/__init__.py | 181 + .../setuptools/_vendor/__init__.py | 0 .../setuptools/_vendor/packaging/__about__.py | 21 + .../setuptools/_vendor/packaging/__init__.py | 14 + .../setuptools/_vendor/packaging/_compat.py | 30 + .../_vendor/packaging/_structures.py | 70 + .../setuptools/_vendor/packaging/markers.py | 301 + .../_vendor/packaging/requirements.py | 127 + .../_vendor/packaging/specifiers.py | 774 + .../setuptools/_vendor/packaging/utils.py | 14 + .../setuptools/_vendor/packaging/version.py | 394 + .../setuptools/_vendor/pyparsing.py | 5971 +++++++ .../site-packages/setuptools/_vendor/six.py | 881 ++ .../site-packages/setuptools/archive_util.py | 173 + .../site-packages/setuptools/build_meta.py | 172 + .../setuptools/command/__init__.py | 18 + .../site-packages/setuptools/command/alias.py | 80 + .../setuptools/command/bdist_egg.py | 502 + .../setuptools/command/bdist_rpm.py | 43 + .../setuptools/command/bdist_wininst.py | 21 + .../setuptools/command/build_clib.py | 98 + .../setuptools/command/build_ext.py | 332 + .../setuptools/command/build_py.py | 270 + .../setuptools/command/develop.py | 216 + .../setuptools/command/dist_info.py | 36 + .../setuptools/command/easy_install.py | 2334 +++ .../setuptools/command/egg_info.py | 697 + .../setuptools/command/install.py | 125 + .../setuptools/command/install_egg_info.py | 62 + .../setuptools/command/install_lib.py | 121 + .../setuptools/command/install_scripts.py | 65 + .../setuptools/command/py36compat.py | 136 + .../setuptools/command/register.py | 10 + .../setuptools/command/rotate.py | 66 + .../setuptools/command/saveopts.py | 22 + .../site-packages/setuptools/command/sdist.py | 200 + .../setuptools/command/setopt.py | 149 + .../site-packages/setuptools/command/test.py | 268 + .../setuptools/command/upload.py | 42 + .../setuptools/command/upload_docs.py | 207 + .../site-packages/setuptools/config.py | 589 + .../site-packages/setuptools/dep_util.py | 26 + .../site-packages/setuptools/depends.py | 186 + .../site-packages/setuptools/dist.py | 1071 ++ .../site-packages/setuptools/extension.py | 57 + .../setuptools/extern/__init__.py | 73 + .../site-packages/setuptools/glibc.py | 86 + .../site-packages/setuptools/glob.py | 176 + .../site-packages/setuptools/launch.py | 35 + .../site-packages/setuptools/lib2to3_ex.py | 62 + .../site-packages/setuptools/monkey.py | 181 + .../site-packages/setuptools/msvc.py | 1302 ++ .../site-packages/setuptools/namespaces.py | 107 + .../site-packages/setuptools/package_index.py | 1123 ++ .../site-packages/setuptools/pep425tags.py | 317 + .../site-packages/setuptools/py27compat.py | 28 + .../site-packages/setuptools/py31compat.py | 41 + .../site-packages/setuptools/py33compat.py | 54 + .../site-packages/setuptools/py36compat.py | 83 + .../site-packages/setuptools/sandbox.py | 491 + .../site-packages/setuptools/site-patch.py | 75 + .../site-packages/setuptools/ssl_support.py | 262 + .../site-packages/setuptools/unicode_utils.py | 44 + .../site-packages/setuptools/version.py | 6 + .../site-packages/setuptools/wheel.py | 179 + .../setuptools/windows_support.py | 29 + .../lib/python3.6/site-packages/six.py | 905 ++ .../python3.6/site-packages/wheel/__init__.py | 2 + .../python3.6/site-packages/wheel/__main__.py | 19 + .../python3.6/site-packages/wheel/archive.py | 77 + .../site-packages/wheel/bdist_wheel.py | 417 + .../site-packages/wheel/egg2wheel.py | 99 + .../python3.6/site-packages/wheel/install.py | 516 + .../python3.6/site-packages/wheel/metadata.py | 131 + .../python3.6/site-packages/wheel/paths.py | 43 + .../site-packages/wheel/pep425tags.py | 180 + .../python3.6/site-packages/wheel/pkginfo.py | 45 + .../wheel/signatures/__init__.py | 113 + .../site-packages/wheel/signatures/djbec.py | 323 + .../wheel/signatures/ed25519py.py | 50 + .../site-packages/wheel/signatures/keys.py | 102 + .../site-packages/wheel/tool/__init__.py | 394 + .../lib/python3.6/site-packages/wheel/util.py | 159 + .../site-packages/wheel/wininst2wheel.py | 222 + .../tasks/elf2codingenv/lib/python3.6/site.py | 606 + .../elf2codingenv/lib/python3.6/smtpd.py | 981 ++ .../elf2codingenv/lib/python3.6/smtplib.py | 1137 ++ .../elf2codingenv/lib/python3.6/sndhdr.py | 272 + .../elf2codingenv/lib/python3.6/socket.py | 763 + .../lib/python3.6/socketserver.py | 808 + .../lib/python3.6/sqlite3/__init__.py | 23 + .../lib/python3.6/sqlite3/dbapi2.py | 95 + .../lib/python3.6/sqlite3/dump.py | 71 + .../lib/python3.6/sre_compile.py | 608 + .../lib/python3.6/sre_constants.py | 238 + .../elf2codingenv/lib/python3.6/sre_parse.py | 1025 ++ .../tasks/elf2codingenv/lib/python3.6/ssl.py | 1239 ++ .../tasks/elf2codingenv/lib/python3.6/stat.py | 190 + .../elf2codingenv/lib/python3.6/statistics.py | 676 + .../elf2codingenv/lib/python3.6/string.py | 308 + .../elf2codingenv/lib/python3.6/stringprep.py | 299 + .../elf2codingenv/lib/python3.6/struct.py | 15 + .../elf2codingenv/lib/python3.6/subprocess.py | 1589 ++ .../elf2codingenv/lib/python3.6/sunau.py | 532 + .../elf2codingenv/lib/python3.6/symbol.py | 116 + .../elf2codingenv/lib/python3.6/symtable.py | 246 + .../elf2codingenv/lib/python3.6/sysconfig.py | 738 + .../elf2codingenv/lib/python3.6/tabnanny.py | 346 + .../elf2codingenv/lib/python3.6/tarfile.py | 2612 +++ .../elf2codingenv/lib/python3.6/telnetlib.py | 677 + .../elf2codingenv/lib/python3.6/tempfile.py | 829 + .../lib/python3.6/test/__init__.py | 1 + .../lib/python3.6/test/support/__init__.py | 2830 ++++ .../python3.6/test/support/script_helper.py | 277 + .../lib/python3.6/test/test_script_helper.py | 111 + .../lib/python3.6/test/test_support.py | 490 + .../elf2codingenv/lib/python3.6/textwrap.py | 490 + .../tasks/elf2codingenv/lib/python3.6/this.py | 28 + .../elf2codingenv/lib/python3.6/threading.py | 1381 ++ .../elf2codingenv/lib/python3.6/timeit.py | 369 + .../lib/python3.6/tkinter/__init__.py | 4512 ++++++ .../lib/python3.6/tkinter/__main__.py | 7 + .../lib/python3.6/tkinter/colorchooser.py | 72 + .../lib/python3.6/tkinter/commondialog.py | 56 + .../lib/python3.6/tkinter/constants.py | 110 + .../lib/python3.6/tkinter/dialog.py | 50 + .../lib/python3.6/tkinter/dnd.py | 323 + .../lib/python3.6/tkinter/filedialog.py | 487 + .../lib/python3.6/tkinter/font.py | 232 + .../lib/python3.6/tkinter/messagebox.py | 146 + .../lib/python3.6/tkinter/scrolledtext.py | 56 + .../lib/python3.6/tkinter/simpledialog.py | 430 + .../lib/python3.6/tkinter/tix.py | 2043 +++ .../lib/python3.6/tkinter/ttk.py | 1595 ++ .../elf2codingenv/lib/python3.6/token.py | 146 + .../elf2codingenv/lib/python3.6/tokenize.py | 813 + .../elf2codingenv/lib/python3.6/trace.py | 756 + .../elf2codingenv/lib/python3.6/traceback.py | 613 + .../lib/python3.6/tracemalloc.py | 524 + .../tasks/elf2codingenv/lib/python3.6/tty.py | 38 + .../elf2codingenv/lib/python3.6/turtle.py | 4197 +++++ .../lib/python3.6/turtledemo/__init__.py | 14 + .../lib/python3.6/turtledemo/__main__.py | 389 + .../lib/python3.6/turtledemo/bytedesign.py | 170 + .../lib/python3.6/turtledemo/chaos.py | 69 + .../lib/python3.6/turtledemo/clock.py | 142 + .../lib/python3.6/turtledemo/colormixer.py | 63 + .../lib/python3.6/turtledemo/forest.py | 118 + .../lib/python3.6/turtledemo/fractalcurves.py | 141 + .../lib/python3.6/turtledemo/lindenmayer.py | 121 + .../lib/python3.6/turtledemo/minimal_hanoi.py | 90 + .../lib/python3.6/turtledemo/nim.py | 233 + .../lib/python3.6/turtledemo/paint.py | 58 + .../lib/python3.6/turtledemo/peace.py | 63 + .../lib/python3.6/turtledemo/penrose.py | 194 + .../python3.6/turtledemo/planet_and_moon.py | 120 + .../lib/python3.6/turtledemo/round_dance.py | 89 + .../python3.6/turtledemo/sorting_animate.py | 220 + .../lib/python3.6/turtledemo/tree.py | 67 + .../lib/python3.6/turtledemo/two_canvases.py | 55 + .../lib/python3.6/turtledemo/wikipedia.py | 67 + .../lib/python3.6/turtledemo/yinyang.py | 52 + .../elf2codingenv/lib/python3.6/types.py | 294 + .../elf2codingenv/lib/python3.6/typing.py | 2411 +++ .../lib/python3.6/unittest/__init__.py | 80 + .../lib/python3.6/unittest/__main__.py | 18 + .../lib/python3.6/unittest/case.py | 1439 ++ .../lib/python3.6/unittest/loader.py | 521 + .../lib/python3.6/unittest/main.py | 263 + .../lib/python3.6/unittest/mock.py | 2377 +++ .../lib/python3.6/unittest/result.py | 218 + .../lib/python3.6/unittest/runner.py | 223 + .../lib/python3.6/unittest/signals.py | 78 + .../lib/python3.6/unittest/suite.py | 320 + .../lib/python3.6/unittest/util.py | 187 + .../lib/python3.6/urllib/__init__.py | 0 .../lib/python3.6/urllib/error.py | 78 + .../lib/python3.6/urllib/parse.py | 1086 ++ .../lib/python3.6/urllib/request.py | 2809 ++++ .../lib/python3.6/urllib/response.py | 80 + .../lib/python3.6/urllib/robotparser.py | 253 + .../tasks/elf2codingenv/lib/python3.6/uu.py | 207 + .../tasks/elf2codingenv/lib/python3.6/uuid.py | 665 + .../lib/python3.6/venv/__init__.py | 428 + .../lib/python3.6/venv/__main__.py | 10 + .../elf2codingenv/lib/python3.6/warnings.py | 549 + .../tasks/elf2codingenv/lib/python3.6/wave.py | 513 + .../elf2codingenv/lib/python3.6/weakref.py | 635 + .../elf2codingenv/lib/python3.6/webbrowser.py | 679 + .../lib/python3.6/wsgiref/__init__.py | 23 + .../lib/python3.6/wsgiref/handlers.py | 557 + .../lib/python3.6/wsgiref/headers.py | 184 + .../lib/python3.6/wsgiref/simple_server.py | 162 + .../lib/python3.6/wsgiref/util.py | 171 + .../lib/python3.6/wsgiref/validate.py | 459 + .../elf2codingenv/lib/python3.6/xdrlib.py | 249 + .../lib/python3.6/xml/__init__.py | 20 + .../lib/python3.6/xml/dom/NodeFilter.py | 28 + .../lib/python3.6/xml/dom/__init__.py | 157 + .../lib/python3.6/xml/dom/domreg.py | 101 + .../lib/python3.6/xml/dom/expatbuilder.py | 973 ++ .../lib/python3.6/xml/dom/minicompat.py | 110 + .../lib/python3.6/xml/dom/minidom.py | 2010 +++ .../lib/python3.6/xml/dom/pulldom.py | 351 + .../lib/python3.6/xml/dom/xmlbuilder.py | 422 + .../lib/python3.6/xml/etree/ElementInclude.py | 146 + .../lib/python3.6/xml/etree/ElementPath.py | 337 + .../lib/python3.6/xml/etree/ElementTree.py | 1688 ++ .../lib/python3.6/xml/etree/__init__.py | 33 + .../lib/python3.6/xml/etree/cElementTree.py | 3 + .../lib/python3.6/xml/parsers/__init__.py | 8 + .../lib/python3.6/xml/parsers/expat.py | 8 + .../lib/python3.6/xml/sax/__init__.py | 111 + .../lib/python3.6/xml/sax/_exceptions.py | 133 + .../lib/python3.6/xml/sax/expatreader.py | 451 + .../lib/python3.6/xml/sax/handler.py | 343 + .../lib/python3.6/xml/sax/saxutils.py | 377 + .../lib/python3.6/xml/sax/xmlreader.py | 386 + .../lib/python3.6/xmlrpc/__init__.py | 1 + .../lib/python3.6/xmlrpc/client.py | 1560 ++ .../lib/python3.6/xmlrpc/server.py | 1019 ++ .../elf2codingenv/lib/python3.6/zipapp.py | 201 + .../elf2codingenv/lib/python3.6/zipfile.py | 2056 +++ src_cpp/elfgames/tasks/inference/Pybind.cc | 47 + src_cpp/elfgames/tasks/inference/Pybind.h | 19 + .../elfgames/tasks/inference/pybind_module.cc | 15 + src_cpp/elfgames/tasks/train/Pybind.cc | 66 + src_cpp/elfgames/tasks/train/Pybind.h | 19 + .../elfgames/tasks/train/client_manager.cc | 73 + src_cpp/elfgames/tasks/train/client_manager.h | 278 + src_cpp/elfgames/tasks/train/game_train.cc | 70 + src_cpp/elfgames/tasks/train/game_train.h | 29 + src_cpp/elfgames/tasks/train/pybind_module.cc | 15 + src_py/elfgames/tasks/df_model3.py | 357 + src_py/elfgames/tasks/game.py | 446 + 1383 files changed, 531002 insertions(+), 29 deletions(-) create mode 100644 scripts/elfgames/tasks/df_console.py create mode 100644 scripts/elfgames/tasks/selfplay.py create mode 100644 scripts/elfgames/tasks/server_addrs.py create mode 100644 scripts/elfgames/tasks/train.py create mode 100644 src_cpp/elfgames/tasks/base/board_feature.cc create mode 100644 src_cpp/elfgames/tasks/base/board_feature.h create mode 100644 src_cpp/elfgames/tasks/common/game_selfplay.cc create mode 100644 src_cpp/elfgames/tasks/common/game_selfplay.h create mode 100644 src_cpp/elfgames/tasks/common/go_state_ext.cc create mode 100644 src_cpp/elfgames/tasks/common/go_state_ext.h create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/include/fakemysql.h create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/include/fakepq.h create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/include/fakesql.h create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/__future__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/__phello__.foo.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_bootlocale.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_collections_abc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_compat_pickle.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_compression.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_dummy_thread.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_markupbase.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_osx_support.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_pydecimal.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_pyio.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_sitebuiltins.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_strptime.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_sysconfigdata_i686_conda_cos6_linux_gnu.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_sysconfigdata_powerpc64le_conda_cos7_linux_gnu.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_sysconfigdata_x86_64_apple_darwin13_4_0.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_sysconfigdata_x86_64_conda_cos6_linux_gnu.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_threading_local.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_weakrefset.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/abc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/aifc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/antigravity.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/argparse.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ast.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asynchat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/base_events.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/base_futures.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/base_subprocess.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/base_tasks.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/constants.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/coroutines.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/events.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/futures.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/locks.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/log.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/proactor_events.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/protocols.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/queues.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/selector_events.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/sslproto.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/streams.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/subprocess.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/tasks.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/test_utils.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/transports.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/unix_events.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/windows_events.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncio/windows_utils.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/asyncore.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/base64.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/bdb.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/binhex.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/bisect.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/bz2.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/cProfile.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/calendar.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/cgi.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/cgitb.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/chunk.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/cmd.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/code.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/codecs.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/codeop.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/collections/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/collections/abc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/colorsys.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/compileall.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/_base.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/process.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/thread.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/config-3.6m-x86_64-linux-gnu/python-config.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/configparser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/contextlib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/copy.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/copyreg.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/crypt.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/csv.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ctypes/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ctypes/_endian.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ctypes/macholib/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ctypes/macholib/dyld.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ctypes/macholib/dylib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ctypes/macholib/framework.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ctypes/util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ctypes/wintypes.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/curses/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/curses/ascii.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/curses/has_key.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/curses/panel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/curses/textpad.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/datetime.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/dbm/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/dbm/dumb.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/dbm/gnu.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/dbm/ndbm.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/decimal.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/difflib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/dis.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/_msvccompiler.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/archive_util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/bcppcompiler.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/ccompiler.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/cmd.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/bdist.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/bdist_dumb.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/bdist_msi.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/bdist_rpm.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/bdist_wininst.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/build.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/build_clib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/build_ext.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/build_py.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/build_scripts.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/check.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/clean.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/config.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/install.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/install_data.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/install_egg_info.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/install_headers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/install_lib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/install_scripts.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/register.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/sdist.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/command/upload.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/config.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/core.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/cygwinccompiler.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/debug.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/dep_util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/dir_util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/dist.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/errors.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/extension.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/fancy_getopt.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/file_util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/filelist.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/log.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/msvc9compiler.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/msvccompiler.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/spawn.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/sysconfig.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/support.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_archive_util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_bdist.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_bdist_dumb.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_bdist_msi.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_bdist_rpm.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_bdist_wininst.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_build.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_build_clib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_build_ext.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_build_py.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_build_scripts.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_check.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_clean.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_cmd.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_config.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_config_cmd.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_core.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_cygwinccompiler.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_dep_util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_dir_util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_dist.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_extension.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_file_util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_filelist.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_install.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_install_data.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_install_headers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_install_lib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_install_scripts.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_log.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_msvc9compiler.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_msvccompiler.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_register.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_sdist.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_spawn.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_sysconfig.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_text_file.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_unixccompiler.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_upload.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_version.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/tests/test_versionpredicate.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/text_file.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/unixccompiler.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/version.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/distutils/versionpredicate.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/doctest.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/dummy_threading.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/_encoded_words.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/_header_value_parser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/_parseaddr.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/_policybase.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/base64mime.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/charset.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/contentmanager.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/encoders.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/errors.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/feedparser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/generator.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/header.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/headerregistry.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/iterators.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/message.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/mime/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/mime/application.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/mime/audio.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/mime/base.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/mime/image.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/mime/message.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/mime/multipart.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/mime/nonmultipart.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/mime/text.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/parser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/policy.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/quoprimime.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/email/utils.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/aliases.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/ascii.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/base64_codec.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/big5.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/big5hkscs.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/bz2_codec.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/charmap.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp037.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp1006.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp1026.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp1125.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp1140.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp1250.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp1251.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp1252.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp1253.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp1254.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp1255.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp1256.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp1257.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp1258.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp273.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp424.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp437.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp500.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp65001.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp720.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp737.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp775.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp850.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp852.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp855.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp856.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp857.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp858.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp860.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp861.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp862.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp863.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp864.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp865.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp866.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp869.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp874.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp875.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp932.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp949.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/cp950.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/euc_jis_2004.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/euc_jisx0213.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/euc_jp.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/euc_kr.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/gb18030.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/gb2312.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/gbk.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/hex_codec.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/hp_roman8.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/hz.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/idna.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso2022_jp.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso2022_jp_1.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso2022_jp_2.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso2022_jp_2004.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso2022_jp_3.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso2022_jp_ext.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso2022_kr.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_1.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_10.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_11.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_13.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_14.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_15.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_16.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_2.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_3.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_4.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_5.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_6.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_7.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_8.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/iso8859_9.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/johab.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/koi8_r.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/koi8_t.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/koi8_u.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/kz1048.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/latin_1.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/mac_arabic.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/mac_centeuro.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/mac_croatian.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/mac_cyrillic.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/mac_farsi.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/mac_greek.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/mac_iceland.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/mac_latin2.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/mac_roman.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/mac_romanian.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/mac_turkish.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/mbcs.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/oem.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/palmos.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/ptcp154.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/punycode.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/quopri_codec.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/raw_unicode_escape.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/rot_13.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/shift_jis.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/shift_jis_2004.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/shift_jisx0213.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/tis_620.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/undefined.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/unicode_escape.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/unicode_internal.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/utf_16.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/utf_16_be.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/utf_16_le.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/utf_32.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/utf_32_be.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/utf_32_le.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/utf_7.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/utf_8.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/utf_8_sig.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/uu_codec.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/encodings/zlib_codec.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ensurepip/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ensurepip/__main__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ensurepip/_uninstall.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/enum.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/filecmp.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/fileinput.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/fnmatch.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/formatter.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/fractions.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ftplib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/functools.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/genericpath.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/getopt.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/getpass.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/gettext.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/glob.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/gzip.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/hashlib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/heapq.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/hmac.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/html/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/html/entities.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/html/parser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/http/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/http/client.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/http/cookiejar.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/http/cookies.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/http/server.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/__main__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/_pyclbr.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/autocomplete.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/autocomplete_w.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/autoexpand.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/browser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/calltip_w.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/calltips.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/codecontext.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/colorizer.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/config.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/config_key.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/configdialog.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/debugger.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/debugger_r.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/debugobj.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/debugobj_r.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/delegator.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/dynoption.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/editor.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/filelist.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/grep.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/help.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/help_about.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/history.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/hyperparser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/htest.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/mock_idle.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/mock_tk.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_autocomplete.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_autoexpand.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_browser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_calltips.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_colorizer.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_config.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_config_key.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_configdialog.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_debugger.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_delegator.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_editmenu.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_editor.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_grep.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_help.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_help_about.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_history.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_hyperparser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_iomenu.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_macosx.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_outwin.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_paragraph.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_parenmatch.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_pathbrowser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_percolator.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_pyparse.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_query.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_redirector.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_replace.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_rstrip.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_run.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_scrolledlist.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_search.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_searchbase.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_searchengine.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_text.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_textview.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_tree.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_undo.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/idle_test/test_warning.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/iomenu.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/macosx.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/mainmenu.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/multicall.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/outwin.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/paragraph.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/parenmatch.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/pathbrowser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/percolator.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/pyparse.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/pyshell.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/query.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/redirector.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/replace.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/rpc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/rstrip.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/run.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/runscript.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/scrolledlist.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/search.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/searchbase.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/searchengine.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/stackviewer.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/statusbar.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/textview.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/tooltip.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/tree.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/undo.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/windows.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/zoomheight.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/idlelib/zzdummy.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/imaplib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/imghdr.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/imp.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/importlib/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/importlib/_bootstrap.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/importlib/_bootstrap_external.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/importlib/abc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/importlib/machinery.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/importlib/util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/inspect.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/io.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ipaddress.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/json/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/json/decoder.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/json/encoder.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/json/scanner.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/json/tool.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/keyword.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/__main__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/btm_matcher.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/btm_utils.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixer_base.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixer_util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_apply.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_asserts.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_basestring.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_buffer.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_dict.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_except.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_exec.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_execfile.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_exitfunc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_filter.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_funcattrs.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_future.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_getcwdu.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_has_key.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_idioms.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_import.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_imports.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_imports2.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_input.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_intern.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_isinstance.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_itertools.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_itertools_imports.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_long.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_map.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_metaclass.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_methodattrs.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_ne.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_next.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_nonzero.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_numliterals.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_operator.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_paren.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_print.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_raise.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_raw_input.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_reduce.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_reload.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_renames.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_repr.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_set_literal.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_standarderror.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_sys_exc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_throw.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_tuple_params.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_types.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_unicode.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_urllib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_ws_comma.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_xrange.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_xreadlines.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/fixes/fix_zip.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/main.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/patcomp.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/pgen2/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/pgen2/conv.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/pgen2/driver.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/pgen2/grammar.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/pgen2/literals.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/pgen2/parse.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/pgen2/pgen.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/pgen2/token.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/pgen2/tokenize.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/pygram.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/pytree.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/refactor.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/__main__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/bom.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/crlf.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/different_encoding.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/false_encoding.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/fixers/bad_order.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/fixers/myfixes/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_explicit.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_first.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_last.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_parrot.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/fixers/myfixes/fix_preorder.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/fixers/no_fixer_cls.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/fixers/parrot_example.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/infinite_recursion.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/py2_test_grammar.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/data/py3_test_grammar.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/pytree_idempotency.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/support.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/test_all_fixers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/test_fixers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/test_main.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/test_parser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/test_pytree.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/test_refactor.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lib2to3/tests/test_util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/linecache.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/locale.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/logging/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/logging/config.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/logging/handlers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/lzma.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/macpath.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/macurl2path.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/mailbox.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/mailcap.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/mimetypes.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/modulefinder.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/connection.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/context.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/dummy/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/dummy/connection.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/forkserver.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/heap.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/managers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/pool.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/popen_fork.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/popen_forkserver.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/popen_spawn_posix.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/popen_spawn_win32.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/process.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/queues.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/reduction.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/resource_sharer.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/semaphore_tracker.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/sharedctypes.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/spawn.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/synchronize.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/multiprocessing/util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/netrc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/nntplib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ntpath.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/nturl2path.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/numbers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/opcode.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/operator.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/optparse.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/os.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/pathlib.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/pdb.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/pickle.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/pickletools.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/pipes.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/pkgutil.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/platform.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/plistlib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/poplib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/posixpath.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/pprint.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/profile.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/pstats.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/pty.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/py_compile.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/pyclbr.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/pydoc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/pydoc_data/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/pydoc_data/topics.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/queue.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/quopri.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/random.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/re.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/reprlib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/rlcompleter.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/runpy.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/sched.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/secrets.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/selectors.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/shelve.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/shlex.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/shutil.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/signal.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/_argcomplete.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/_code/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/_code/_py2traceback.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/_code/code.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/_code/source.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/_version.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/assertion/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/assertion/rewrite.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/assertion/truncate.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/assertion/util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/cacheprovider.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/capture.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/config.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/debugging.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/deprecated.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/doctest.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/fixtures.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/freeze_support.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/helpconfig.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/hookspec.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/junitxml.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/logging.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/main.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/mark/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/mark/evaluate.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/mark/legacy.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/mark/structures.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/monkeypatch.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/nodes.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/nose.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/outcomes.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/pastebin.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/pytester.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/python.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/python_api.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/recwarn.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/resultlog.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/runner.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/setuponly.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/setupplan.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/skipping.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/terminal.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/tmpdir.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/unittest.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/_pytest/warnings.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/atomicwrites/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/attr/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/attr/_compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/attr/_config.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/attr/_funcs.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/attr/_make.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/attr/converters.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/attr/exceptions.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/attr/filters.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/attr/validators.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/autopep8.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/certifi/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/certifi/__main__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/certifi/core.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/easy_install.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/__main__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/api/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/api/legacy.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/checker.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/defaults.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/exceptions.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/formatting/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/formatting/base.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/formatting/default.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/main/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/main/application.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/main/cli.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/main/debug.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/main/git.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/main/mercurial.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/main/options.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/main/setuptools_command.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/main/vcs.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/options/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/options/aggregator.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/options/config.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/options/manager.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/plugins/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/plugins/_trie.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/plugins/manager.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/plugins/notifier.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/plugins/pyflakes.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/processor.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/statistics.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/style_guide.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/flake8/utils.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/mccabe.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/more_itertools/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/more_itertools/more.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/more_itertools/recipes.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/more_itertools/tests/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/more_itertools/tests/test_more.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/more_itertools/tests/test_recipes.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/__main__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/basecommand.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/baseparser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/build_env.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/cache.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/cmdoptions.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/commands/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/commands/check.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/commands/completion.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/commands/configuration.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/commands/download.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/commands/freeze.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/commands/hash.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/commands/help.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/commands/install.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/commands/list.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/commands/search.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/commands/show.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/commands/uninstall.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/commands/wheel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/configuration.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/download.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/exceptions.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/index.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/locations.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/models/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/models/index.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/operations/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/operations/check.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/operations/freeze.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/operations/prepare.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/pep425tags.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/req/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/req/req_file.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/req/req_install.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/req/req_set.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/req/req_uninstall.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/resolve.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/status_codes.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/appdirs.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/deprecation.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/encoding.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/filesystem.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/glibc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/hashes.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/logging.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/misc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/outdated.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/packaging.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/setuptools_build.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/temp_dir.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/typing.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/utils/ui.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/vcs/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/vcs/bazaar.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/vcs/git.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/vcs/mercurial.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/vcs/subversion.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_internal/wheel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/appdirs.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/cachecontrol/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/cachecontrol/_cmd.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/cachecontrol/cache.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/cachecontrol/caches/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/cachecontrol/compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/cachecontrol/controller.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/cachecontrol/filewrapper.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/cachecontrol/heuristics.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/cachecontrol/serialize.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/cachecontrol/wrapper.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/certifi/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/certifi/__main__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/certifi/core.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/big5freq.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/big5prober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/chardistribution.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/charsetgroupprober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/charsetprober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/cli/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/cli/chardetect.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/codingstatemachine.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/cp949prober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/enums.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/escprober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/escsm.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/eucjpprober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/euckrfreq.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/euckrprober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/euctwfreq.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/euctwprober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/gb2312freq.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/gb2312prober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/hebrewprober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/jisfreq.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/jpcntx.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/langbulgarianmodel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/langcyrillicmodel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/langgreekmodel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/langhebrewmodel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/langhungarianmodel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/langthaimodel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/langturkishmodel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/latin1prober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/mbcharsetprober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/mbcsgroupprober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/mbcssm.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/sbcharsetprober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/sbcsgroupprober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/sjisprober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/universaldetector.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/utf8prober.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/chardet/version.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/colorama/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/colorama/ansi.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/colorama/ansitowin32.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/colorama/initialise.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/colorama/win32.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/colorama/winterm.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/_backport/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/_backport/misc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/_backport/shutil.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/_backport/sysconfig.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/_backport/tarfile.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/database.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/index.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/locators.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/manifest.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/markers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/metadata.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/resources.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/scripts.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/version.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distlib/wheel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/distro.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/_ihatexml.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/_inputstream.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/_tokenizer.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/_trie/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/_trie/_base.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/_trie/datrie.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/_trie/py.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/_utils.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/constants.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/filters/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/filters/base.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/filters/lint.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/filters/optionaltags.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/filters/sanitizer.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/filters/whitespace.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/html5parser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/serializer.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/treeadapters/sax.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/treebuilders/base.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/treebuilders/dom.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/treebuilders/etree.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/treewalkers/base.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/treewalkers/dom.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/treewalkers/etree.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/html5lib/treewalkers/genshi.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/idna/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/idna/codec.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/idna/compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/idna/core.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/idna/idnadata.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/idna/intranges.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/idna/package_data.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/idna/uts46data.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/ipaddress.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/lockfile/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/lockfile/linklockfile.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/lockfile/mkdirlockfile.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/lockfile/pidlockfile.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/lockfile/sqlitelockfile.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/lockfile/symlinklockfile.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/msgpack/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/msgpack/_version.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/msgpack/exceptions.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/msgpack/fallback.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/packaging/__about__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/packaging/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/packaging/_compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/packaging/_structures.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/packaging/markers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/packaging/requirements.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/packaging/specifiers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/packaging/utils.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/packaging/version.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/pkg_resources/py31compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/progress/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/progress/bar.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/progress/counter.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/progress/helpers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/progress/spinner.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/pyparsing.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/pytoml/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/pytoml/core.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/pytoml/parser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/pytoml/writer.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/__version__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/_internal_utils.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/adapters.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/api.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/auth.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/certs.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/cookies.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/exceptions.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/help.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/hooks.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/models.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/packages.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/status_codes.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/structures.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/requests/utils.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/retrying.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/six.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/_collections.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/connection.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/contrib/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/contrib/appengine.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/contrib/securetransport.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/contrib/socks.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/exceptions.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/fields.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/filepost.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/packages/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/packages/ordered_dict.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/packages/six.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/packages/ssl_match_hostname/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/packages/ssl_match_hostname/_implementation.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/poolmanager.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/request.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/response.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/util/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/util/connection.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/util/request.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/util/response.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/util/retry.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/util/selectors.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/util/ssl_.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/util/timeout.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/util/url.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/urllib3/util/wait.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/webencodings/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/webencodings/labels.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/webencodings/mklabels.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/webencodings/tests.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pip/_vendor/webencodings/x_user_defined.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/_vendor/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/_vendor/appdirs.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/_vendor/packaging/__about__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/_vendor/packaging/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/_vendor/packaging/_compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/_vendor/packaging/_structures.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/_vendor/packaging/markers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/_vendor/packaging/requirements.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/_vendor/packaging/specifiers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/_vendor/packaging/utils.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/_vendor/packaging/version.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/_vendor/pyparsing.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/_vendor/six.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/extern/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pkg_resources/py31compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pluggy/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pluggy/callers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/__metainfo.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_builtin.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_code/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_code/_assertionnew.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_code/_assertionold.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_code/_py2traceback.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_code/assertion.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_code/code.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_code/source.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_error.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_io/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_io/capture.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_io/saferepr.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_io/terminalwriter.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_log/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_log/log.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_log/warning.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_path/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_path/cacheutil.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_path/common.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_path/local.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_path/svnurl.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_path/svnwc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_process/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_process/cmdexec.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_process/forkedfunc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_process/killproc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_std.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_vendored_packages/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_vendored_packages/apipkg.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_vendored_packages/iniconfig.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/_xmlgen.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/py/test.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pycodestyle.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/__main__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/api.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/checker.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/messages.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/reporter.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/scripts/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/scripts/pyflakes.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/test/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/test/harness.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/test/test_api.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/test/test_dict.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/test/test_doctests.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/test/test_imports.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/test/test_other.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/test/test_return_with_arguments_inside_generator.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pyflakes/test/test_undefined_names.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/pytest.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/_vendor/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/_vendor/packaging/__about__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/_vendor/packaging/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/_vendor/packaging/_compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/_vendor/packaging/_structures.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/_vendor/packaging/markers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/_vendor/packaging/requirements.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/_vendor/packaging/specifiers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/_vendor/packaging/utils.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/_vendor/packaging/version.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/_vendor/pyparsing.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/_vendor/six.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/archive_util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/build_meta.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/alias.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/bdist_egg.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/bdist_rpm.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/bdist_wininst.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/build_clib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/build_ext.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/build_py.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/develop.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/dist_info.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/easy_install.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/egg_info.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/install.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/install_egg_info.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/install_lib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/install_scripts.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/py36compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/register.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/rotate.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/saveopts.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/sdist.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/setopt.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/test.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/upload.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/command/upload_docs.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/config.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/dep_util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/depends.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/dist.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/extension.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/extern/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/glibc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/glob.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/launch.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/lib2to3_ex.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/monkey.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/msvc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/namespaces.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/package_index.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/pep425tags.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/py27compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/py31compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/py33compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/py36compat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/sandbox.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/site-patch.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/ssl_support.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/unicode_utils.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/version.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/wheel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/setuptools/windows_support.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/six.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/__main__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/archive.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/bdist_wheel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/egg2wheel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/install.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/metadata.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/paths.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/pep425tags.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/pkginfo.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/signatures/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/signatures/djbec.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/signatures/ed25519py.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/signatures/keys.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/tool/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site-packages/wheel/wininst2wheel.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/site.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/smtpd.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/smtplib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/sndhdr.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/socket.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/socketserver.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/sqlite3/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/sqlite3/dbapi2.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/sqlite3/dump.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/sre_compile.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/sre_constants.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/sre_parse.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/ssl.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/stat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/statistics.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/string.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/stringprep.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/struct.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/subprocess.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/sunau.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/symbol.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/symtable.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/sysconfig.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tabnanny.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tarfile.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/telnetlib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tempfile.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/test/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/test/support/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/test/support/script_helper.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/test/test_script_helper.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/test/test_support.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/textwrap.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/this.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/threading.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/timeit.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tkinter/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tkinter/__main__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tkinter/colorchooser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tkinter/commondialog.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tkinter/constants.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tkinter/dialog.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tkinter/dnd.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tkinter/filedialog.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tkinter/font.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tkinter/messagebox.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tkinter/scrolledtext.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tkinter/simpledialog.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tkinter/tix.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tkinter/ttk.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/token.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tokenize.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/trace.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/traceback.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tracemalloc.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/tty.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtle.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/__main__.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/bytedesign.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/chaos.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/clock.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/colormixer.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/forest.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/fractalcurves.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/lindenmayer.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/minimal_hanoi.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/nim.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/paint.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/peace.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/penrose.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/planet_and_moon.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/round_dance.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/sorting_animate.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/tree.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/two_canvases.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/wikipedia.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/turtledemo/yinyang.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/types.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/typing.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/unittest/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/unittest/__main__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/unittest/case.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/unittest/loader.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/unittest/main.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/unittest/mock.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/unittest/result.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/unittest/runner.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/unittest/signals.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/unittest/suite.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/unittest/util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/urllib/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/urllib/error.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/urllib/parse.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/urllib/request.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/urllib/response.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/urllib/robotparser.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/uu.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/uuid.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/venv/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/venv/__main__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/warnings.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/wave.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/weakref.py create mode 100755 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/webbrowser.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/wsgiref/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/wsgiref/handlers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/wsgiref/headers.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/wsgiref/simple_server.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/wsgiref/util.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/wsgiref/validate.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xdrlib.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/dom/NodeFilter.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/dom/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/dom/domreg.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/dom/expatbuilder.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/dom/minicompat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/dom/minidom.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/dom/pulldom.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/dom/xmlbuilder.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/etree/ElementInclude.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/etree/ElementPath.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/etree/ElementTree.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/etree/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/etree/cElementTree.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/parsers/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/parsers/expat.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/sax/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/sax/_exceptions.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/sax/expatreader.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/sax/handler.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/sax/saxutils.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xml/sax/xmlreader.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xmlrpc/__init__.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xmlrpc/client.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/xmlrpc/server.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/zipapp.py create mode 100644 src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/zipfile.py create mode 100644 src_cpp/elfgames/tasks/inference/Pybind.cc create mode 100644 src_cpp/elfgames/tasks/inference/Pybind.h create mode 100644 src_cpp/elfgames/tasks/inference/pybind_module.cc create mode 100644 src_cpp/elfgames/tasks/train/Pybind.cc create mode 100644 src_cpp/elfgames/tasks/train/Pybind.h create mode 100644 src_cpp/elfgames/tasks/train/client_manager.cc create mode 100644 src_cpp/elfgames/tasks/train/client_manager.h create mode 100644 src_cpp/elfgames/tasks/train/game_train.cc create mode 100644 src_cpp/elfgames/tasks/train/game_train.h create mode 100644 src_cpp/elfgames/tasks/train/pybind_module.cc create mode 100644 src_py/elfgames/tasks/df_model3.py create mode 100644 src_py/elfgames/tasks/game.py diff --git a/CMakeLists.txt b/CMakeLists.txt index 2302f89..27b7e4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,10 +43,11 @@ endif() set(CMAKE_CXX_STANDARD 17) set(PYBIND11_CPP_STANDARD -std=c++17) set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -Wno-register -Wno-deprecated-declarations -fPIC -march=native") + "${CMAKE_CXX_FLAGS} -g -Werror=unused-function -Wall -Werror -Wextra -Wno-register -fPIC -march=native") set(CMAKE_CXX_FLAGS_RELEASE "-O3") if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) + # set(CMAKE_BUILD_TYPE Debug) # FIXME endif() # Define a convenience function for tests @@ -79,3 +80,7 @@ add_subdirectory( add_subdirectory( src_cpp/elfgames/go ${CMAKE_CURRENT_BINARY_DIR}/elfgames/go) + +add_subdirectory( + src_cpp/elfgames/tasks + ${CMAKE_CURRENT_BINARY_DIR}/elfgames/tasks) diff --git a/Makefile b/Makefile index 378a86d..34d1794 100644 --- a/Makefile +++ b/Makefile @@ -1,32 +1,1472 @@ -.PHONY: all -all: elf elfgames/go +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.9 -.PHONY: clean +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /private/home/oteytaud/.conda/envs/otgo13/bin/cmake + +# The command to remove a file. +RM = /private/home/oteytaud/.conda/envs/otgo13/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /private/home/oteytaud/newtasksexternal/ELF2 + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /private/home/oteytaud/newtasksexternal/ELF2 + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /private/home/oteytaud/.conda/envs/otgo13/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /private/home/oteytaud/.conda/envs/otgo13/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /private/home/oteytaud/.conda/envs/otgo13/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /private/home/oteytaud/.conda/envs/otgo13/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /private/home/oteytaud/.conda/envs/otgo13/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /private/home/oteytaud/.conda/envs/otgo13/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components + +.PHONY : list_install_components/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." + /private/home/oteytaud/.conda/envs/otgo13/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /private/home/oteytaud/.conda/envs/otgo13/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /private/home/oteytaud/newtasksexternal/ELF2/CMakeFiles /private/home/oteytaud/newtasksexternal/ELF2/CMakeFiles/progress.marks + $(MAKE) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /private/home/oteytaud/newtasksexternal/ELF2/CMakeFiles 0 +.PHONY : all + +# The main clean target clean: - rm -rf build/ + $(MAKE) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +#============================================================================= +# Target rules for targets named gmock_main + +# Build rule for target. +gmock_main: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 gmock_main +.PHONY : gmock_main + +# fast build rule for target. +gmock_main/fast: + $(MAKE) -f third_party/googletest/googlemock/CMakeFiles/gmock_main.dir/build.make third_party/googletest/googlemock/CMakeFiles/gmock_main.dir/build +.PHONY : gmock_main/fast + +#============================================================================= +# Target rules for targets named gmock + +# Build rule for target. +gmock: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 gmock +.PHONY : gmock + +# fast build rule for target. +gmock/fast: + $(MAKE) -f third_party/googletest/googlemock/CMakeFiles/gmock.dir/build.make third_party/googletest/googlemock/CMakeFiles/gmock.dir/build +.PHONY : gmock/fast + +#============================================================================= +# Target rules for targets named gtest_main + +# Build rule for target. +gtest_main: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 gtest_main +.PHONY : gtest_main + +# fast build rule for target. +gtest_main/fast: + $(MAKE) -f third_party/googletest/googlemock/gtest/CMakeFiles/gtest_main.dir/build.make third_party/googletest/googlemock/gtest/CMakeFiles/gtest_main.dir/build +.PHONY : gtest_main/fast + +#============================================================================= +# Target rules for targets named gtest + +# Build rule for target. +gtest: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 gtest +.PHONY : gtest + +# fast build rule for target. +gtest/fast: + $(MAKE) -f third_party/googletest/googlemock/gtest/CMakeFiles/gtest.dir/build.make third_party/googletest/googlemock/gtest/CMakeFiles/gtest.dir/build +.PHONY : gtest/fast + +#============================================================================= +# Target rules for targets named ContinuousSubmit + +# Build rule for target. +ContinuousSubmit: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ContinuousSubmit +.PHONY : ContinuousSubmit + +# fast build rule for target. +ContinuousSubmit/fast: + $(MAKE) -f third_party/json/CMakeFiles/ContinuousSubmit.dir/build.make third_party/json/CMakeFiles/ContinuousSubmit.dir/build +.PHONY : ContinuousSubmit/fast + +#============================================================================= +# Target rules for targets named ContinuousMemCheck + +# Build rule for target. +ContinuousMemCheck: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ContinuousMemCheck +.PHONY : ContinuousMemCheck + +# fast build rule for target. +ContinuousMemCheck/fast: + $(MAKE) -f third_party/json/CMakeFiles/ContinuousMemCheck.dir/build.make third_party/json/CMakeFiles/ContinuousMemCheck.dir/build +.PHONY : ContinuousMemCheck/fast + +#============================================================================= +# Target rules for targets named ContinuousConfigure + +# Build rule for target. +ContinuousConfigure: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ContinuousConfigure +.PHONY : ContinuousConfigure + +# fast build rule for target. +ContinuousConfigure/fast: + $(MAKE) -f third_party/json/CMakeFiles/ContinuousConfigure.dir/build.make third_party/json/CMakeFiles/ContinuousConfigure.dir/build +.PHONY : ContinuousConfigure/fast + +#============================================================================= +# Target rules for targets named ExperimentalSubmit + +# Build rule for target. +ExperimentalSubmit: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ExperimentalSubmit +.PHONY : ExperimentalSubmit + +# fast build rule for target. +ExperimentalSubmit/fast: + $(MAKE) -f third_party/json/CMakeFiles/ExperimentalSubmit.dir/build.make third_party/json/CMakeFiles/ExperimentalSubmit.dir/build +.PHONY : ExperimentalSubmit/fast + +#============================================================================= +# Target rules for targets named ExperimentalMemCheck + +# Build rule for target. +ExperimentalMemCheck: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ExperimentalMemCheck +.PHONY : ExperimentalMemCheck + +# fast build rule for target. +ExperimentalMemCheck/fast: + $(MAKE) -f third_party/json/CMakeFiles/ExperimentalMemCheck.dir/build.make third_party/json/CMakeFiles/ExperimentalMemCheck.dir/build +.PHONY : ExperimentalMemCheck/fast + +#============================================================================= +# Target rules for targets named ExperimentalTest + +# Build rule for target. +ExperimentalTest: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ExperimentalTest +.PHONY : ExperimentalTest + +# fast build rule for target. +ExperimentalTest/fast: + $(MAKE) -f third_party/json/CMakeFiles/ExperimentalTest.dir/build.make third_party/json/CMakeFiles/ExperimentalTest.dir/build +.PHONY : ExperimentalTest/fast + +#============================================================================= +# Target rules for targets named ContinuousTest + +# Build rule for target. +ContinuousTest: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ContinuousTest +.PHONY : ContinuousTest + +# fast build rule for target. +ContinuousTest/fast: + $(MAKE) -f third_party/json/CMakeFiles/ContinuousTest.dir/build.make third_party/json/CMakeFiles/ContinuousTest.dir/build +.PHONY : ContinuousTest/fast + +#============================================================================= +# Target rules for targets named ContinuousUpdate + +# Build rule for target. +ContinuousUpdate: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ContinuousUpdate +.PHONY : ContinuousUpdate + +# fast build rule for target. +ContinuousUpdate/fast: + $(MAKE) -f third_party/json/CMakeFiles/ContinuousUpdate.dir/build.make third_party/json/CMakeFiles/ContinuousUpdate.dir/build +.PHONY : ContinuousUpdate/fast + +#============================================================================= +# Target rules for targets named ExperimentalBuild + +# Build rule for target. +ExperimentalBuild: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ExperimentalBuild +.PHONY : ExperimentalBuild + +# fast build rule for target. +ExperimentalBuild/fast: + $(MAKE) -f third_party/json/CMakeFiles/ExperimentalBuild.dir/build.make third_party/json/CMakeFiles/ExperimentalBuild.dir/build +.PHONY : ExperimentalBuild/fast + +#============================================================================= +# Target rules for targets named NightlyMemoryCheck + +# Build rule for target. +NightlyMemoryCheck: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 NightlyMemoryCheck +.PHONY : NightlyMemoryCheck + +# fast build rule for target. +NightlyMemoryCheck/fast: + $(MAKE) -f third_party/json/CMakeFiles/NightlyMemoryCheck.dir/build.make third_party/json/CMakeFiles/NightlyMemoryCheck.dir/build +.PHONY : NightlyMemoryCheck/fast + +#============================================================================= +# Target rules for targets named NightlyBuild + +# Build rule for target. +NightlyBuild: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 NightlyBuild +.PHONY : NightlyBuild + +# fast build rule for target. +NightlyBuild/fast: + $(MAKE) -f third_party/json/CMakeFiles/NightlyBuild.dir/build.make third_party/json/CMakeFiles/NightlyBuild.dir/build +.PHONY : NightlyBuild/fast + +#============================================================================= +# Target rules for targets named ExperimentalUpdate + +# Build rule for target. +ExperimentalUpdate: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ExperimentalUpdate +.PHONY : ExperimentalUpdate + +# fast build rule for target. +ExperimentalUpdate/fast: + $(MAKE) -f third_party/json/CMakeFiles/ExperimentalUpdate.dir/build.make third_party/json/CMakeFiles/ExperimentalUpdate.dir/build +.PHONY : ExperimentalUpdate/fast + +#============================================================================= +# Target rules for targets named ContinuousBuild + +# Build rule for target. +ContinuousBuild: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ContinuousBuild +.PHONY : ContinuousBuild + +# fast build rule for target. +ContinuousBuild/fast: + $(MAKE) -f third_party/json/CMakeFiles/ContinuousBuild.dir/build.make third_party/json/CMakeFiles/ContinuousBuild.dir/build +.PHONY : ContinuousBuild/fast + +#============================================================================= +# Target rules for targets named Continuous + +# Build rule for target. +Continuous: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 Continuous +.PHONY : Continuous + +# fast build rule for target. +Continuous/fast: + $(MAKE) -f third_party/json/CMakeFiles/Continuous.dir/build.make third_party/json/CMakeFiles/Continuous.dir/build +.PHONY : Continuous/fast + +#============================================================================= +# Target rules for targets named Experimental + +# Build rule for target. +Experimental: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 Experimental +.PHONY : Experimental + +# fast build rule for target. +Experimental/fast: + $(MAKE) -f third_party/json/CMakeFiles/Experimental.dir/build.make third_party/json/CMakeFiles/Experimental.dir/build +.PHONY : Experimental/fast + +#============================================================================= +# Target rules for targets named ExperimentalConfigure + +# Build rule for target. +ExperimentalConfigure: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ExperimentalConfigure +.PHONY : ExperimentalConfigure + +# fast build rule for target. +ExperimentalConfigure/fast: + $(MAKE) -f third_party/json/CMakeFiles/ExperimentalConfigure.dir/build.make third_party/json/CMakeFiles/ExperimentalConfigure.dir/build +.PHONY : ExperimentalConfigure/fast + +#============================================================================= +# Target rules for targets named NightlyStart + +# Build rule for target. +NightlyStart: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 NightlyStart +.PHONY : NightlyStart + +# fast build rule for target. +NightlyStart/fast: + $(MAKE) -f third_party/json/CMakeFiles/NightlyStart.dir/build.make third_party/json/CMakeFiles/NightlyStart.dir/build +.PHONY : NightlyStart/fast + +#============================================================================= +# Target rules for targets named NightlyTest + +# Build rule for target. +NightlyTest: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 NightlyTest +.PHONY : NightlyTest + +# fast build rule for target. +NightlyTest/fast: + $(MAKE) -f third_party/json/CMakeFiles/NightlyTest.dir/build.make third_party/json/CMakeFiles/NightlyTest.dir/build +.PHONY : NightlyTest/fast + +#============================================================================= +# Target rules for targets named NightlyUpdate + +# Build rule for target. +NightlyUpdate: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 NightlyUpdate +.PHONY : NightlyUpdate + +# fast build rule for target. +NightlyUpdate/fast: + $(MAKE) -f third_party/json/CMakeFiles/NightlyUpdate.dir/build.make third_party/json/CMakeFiles/NightlyUpdate.dir/build +.PHONY : NightlyUpdate/fast + +#============================================================================= +# Target rules for targets named ContinuousCoverage + +# Build rule for target. +ContinuousCoverage: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ContinuousCoverage +.PHONY : ContinuousCoverage + +# fast build rule for target. +ContinuousCoverage/fast: + $(MAKE) -f third_party/json/CMakeFiles/ContinuousCoverage.dir/build.make third_party/json/CMakeFiles/ContinuousCoverage.dir/build +.PHONY : ContinuousCoverage/fast + +#============================================================================= +# Target rules for targets named ExperimentalStart + +# Build rule for target. +ExperimentalStart: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ExperimentalStart +.PHONY : ExperimentalStart + +# fast build rule for target. +ExperimentalStart/fast: + $(MAKE) -f third_party/json/CMakeFiles/ExperimentalStart.dir/build.make third_party/json/CMakeFiles/ExperimentalStart.dir/build +.PHONY : ExperimentalStart/fast + +#============================================================================= +# Target rules for targets named Nightly + +# Build rule for target. +Nightly: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 Nightly +.PHONY : Nightly + +# fast build rule for target. +Nightly/fast: + $(MAKE) -f third_party/json/CMakeFiles/Nightly.dir/build.make third_party/json/CMakeFiles/Nightly.dir/build +.PHONY : Nightly/fast + +#============================================================================= +# Target rules for targets named NightlyConfigure + +# Build rule for target. +NightlyConfigure: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 NightlyConfigure +.PHONY : NightlyConfigure + +# fast build rule for target. +NightlyConfigure/fast: + $(MAKE) -f third_party/json/CMakeFiles/NightlyConfigure.dir/build.make third_party/json/CMakeFiles/NightlyConfigure.dir/build +.PHONY : NightlyConfigure/fast + +#============================================================================= +# Target rules for targets named NightlyCoverage + +# Build rule for target. +NightlyCoverage: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 NightlyCoverage +.PHONY : NightlyCoverage + +# fast build rule for target. +NightlyCoverage/fast: + $(MAKE) -f third_party/json/CMakeFiles/NightlyCoverage.dir/build.make third_party/json/CMakeFiles/NightlyCoverage.dir/build +.PHONY : NightlyCoverage/fast + +#============================================================================= +# Target rules for targets named ExperimentalCoverage + +# Build rule for target. +ExperimentalCoverage: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ExperimentalCoverage +.PHONY : ExperimentalCoverage + +# fast build rule for target. +ExperimentalCoverage/fast: + $(MAKE) -f third_party/json/CMakeFiles/ExperimentalCoverage.dir/build.make third_party/json/CMakeFiles/ExperimentalCoverage.dir/build +.PHONY : ExperimentalCoverage/fast + +#============================================================================= +# Target rules for targets named NightlyMemCheck + +# Build rule for target. +NightlyMemCheck: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 NightlyMemCheck +.PHONY : NightlyMemCheck + +# fast build rule for target. +NightlyMemCheck/fast: + $(MAKE) -f third_party/json/CMakeFiles/NightlyMemCheck.dir/build.make third_party/json/CMakeFiles/NightlyMemCheck.dir/build +.PHONY : NightlyMemCheck/fast + +#============================================================================= +# Target rules for targets named ContinuousStart + +# Build rule for target. +ContinuousStart: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 ContinuousStart +.PHONY : ContinuousStart + +# fast build rule for target. +ContinuousStart/fast: + $(MAKE) -f third_party/json/CMakeFiles/ContinuousStart.dir/build.make third_party/json/CMakeFiles/ContinuousStart.dir/build +.PHONY : ContinuousStart/fast + +#============================================================================= +# Target rules for targets named NightlySubmit + +# Build rule for target. +NightlySubmit: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 NightlySubmit +.PHONY : NightlySubmit + +# fast build rule for target. +NightlySubmit/fast: + $(MAKE) -f third_party/json/CMakeFiles/NightlySubmit.dir/build.make third_party/json/CMakeFiles/NightlySubmit.dir/build +.PHONY : NightlySubmit/fast + +#============================================================================= +# Target rules for targets named test-wstring + +# Build rule for target. +test-wstring: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-wstring +.PHONY : test-wstring + +# fast build rule for target. +test-wstring/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-wstring.dir/build.make third_party/json/test/CMakeFiles/test-wstring.dir/build +.PHONY : test-wstring/fast + +#============================================================================= +# Target rules for targets named test-unicode + +# Build rule for target. +test-unicode: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-unicode +.PHONY : test-unicode + +# fast build rule for target. +test-unicode/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-unicode.dir/build.make third_party/json/test/CMakeFiles/test-unicode.dir/build +.PHONY : test-unicode/fast + +#============================================================================= +# Target rules for targets named test-udt + +# Build rule for target. +test-udt: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-udt +.PHONY : test-udt + +# fast build rule for target. +test-udt/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-udt.dir/build.make third_party/json/test/CMakeFiles/test-udt.dir/build +.PHONY : test-udt/fast + +#============================================================================= +# Target rules for targets named test-ubjson + +# Build rule for target. +test-ubjson: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-ubjson +.PHONY : test-ubjson + +# fast build rule for target. +test-ubjson/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-ubjson.dir/build.make third_party/json/test/CMakeFiles/test-ubjson.dir/build +.PHONY : test-ubjson/fast + +#============================================================================= +# Target rules for targets named test-to_chars + +# Build rule for target. +test-to_chars: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-to_chars +.PHONY : test-to_chars + +# fast build rule for target. +test-to_chars/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-to_chars.dir/build.make third_party/json/test/CMakeFiles/test-to_chars.dir/build +.PHONY : test-to_chars/fast + +#============================================================================= +# Target rules for targets named test-conversions + +# Build rule for target. +test-conversions: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-conversions +.PHONY : test-conversions + +# fast build rule for target. +test-conversions/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-conversions.dir/build.make third_party/json/test/CMakeFiles/test-conversions.dir/build +.PHONY : test-conversions/fast + +#============================================================================= +# Target rules for targets named test-convenience + +# Build rule for target. +test-convenience: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-convenience +.PHONY : test-convenience + +# fast build rule for target. +test-convenience/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-convenience.dir/build.make third_party/json/test/CMakeFiles/test-convenience.dir/build +.PHONY : test-convenience/fast + +#============================================================================= +# Target rules for targets named test-class_iterator + +# Build rule for target. +test-class_iterator: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-class_iterator +.PHONY : test-class_iterator + +# fast build rule for target. +test-class_iterator/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-class_iterator.dir/build.make third_party/json/test/CMakeFiles/test-class_iterator.dir/build +.PHONY : test-class_iterator/fast + +#============================================================================= +# Target rules for targets named test-class_parser + +# Build rule for target. +test-class_parser: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-class_parser +.PHONY : test-class_parser + +# fast build rule for target. +test-class_parser/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-class_parser.dir/build.make third_party/json/test/CMakeFiles/test-class_parser.dir/build +.PHONY : test-class_parser/fast + +#============================================================================= +# Target rules for targets named test-class_const_iterator + +# Build rule for target. +test-class_const_iterator: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-class_const_iterator +.PHONY : test-class_const_iterator + +# fast build rule for target. +test-class_const_iterator/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-class_const_iterator.dir/build.make third_party/json/test/CMakeFiles/test-class_const_iterator.dir/build +.PHONY : test-class_const_iterator/fast + +#============================================================================= +# Target rules for targets named test-json_patch + +# Build rule for target. +test-json_patch: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-json_patch +.PHONY : test-json_patch + +# fast build rule for target. +test-json_patch/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-json_patch.dir/build.make third_party/json/test/CMakeFiles/test-json_patch.dir/build +.PHONY : test-json_patch/fast + +#============================================================================= +# Target rules for targets named test-noexcept + +# Build rule for target. +test-noexcept: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-noexcept +.PHONY : test-noexcept + +# fast build rule for target. +test-noexcept/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-noexcept.dir/build.make third_party/json/test/CMakeFiles/test-noexcept.dir/build +.PHONY : test-noexcept/fast + +#============================================================================= +# Target rules for targets named test-class_lexer + +# Build rule for target. +test-class_lexer: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-class_lexer +.PHONY : test-class_lexer + +# fast build rule for target. +test-class_lexer/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-class_lexer.dir/build.make third_party/json/test/CMakeFiles/test-class_lexer.dir/build +.PHONY : test-class_lexer/fast + +#============================================================================= +# Target rules for targets named test-concepts + +# Build rule for target. +test-concepts: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-concepts +.PHONY : test-concepts + +# fast build rule for target. +test-concepts/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-concepts.dir/build.make third_party/json/test/CMakeFiles/test-concepts.dir/build +.PHONY : test-concepts/fast + +#============================================================================= +# Target rules for targets named test-testsuites + +# Build rule for target. +test-testsuites: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-testsuites +.PHONY : test-testsuites + +# fast build rule for target. +test-testsuites/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-testsuites.dir/build.make third_party/json/test/CMakeFiles/test-testsuites.dir/build +.PHONY : test-testsuites/fast + +#============================================================================= +# Target rules for targets named test-element_access2 + +# Build rule for target. +test-element_access2: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-element_access2 +.PHONY : test-element_access2 + +# fast build rule for target. +test-element_access2/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-element_access2.dir/build.make third_party/json/test/CMakeFiles/test-element_access2.dir/build +.PHONY : test-element_access2/fast + +#============================================================================= +# Target rules for targets named test-comparison + +# Build rule for target. +test-comparison: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-comparison +.PHONY : test-comparison + +# fast build rule for target. +test-comparison/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-comparison.dir/build.make third_party/json/test/CMakeFiles/test-comparison.dir/build +.PHONY : test-comparison/fast + +#============================================================================= +# Target rules for targets named test-regression + +# Build rule for target. +test-regression: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-regression +.PHONY : test-regression + +# fast build rule for target. +test-regression/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-regression.dir/build.make third_party/json/test/CMakeFiles/test-regression.dir/build +.PHONY : test-regression/fast + +#============================================================================= +# Target rules for targets named catch_main + +# Build rule for target. +catch_main: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 catch_main +.PHONY : catch_main + +# fast build rule for target. +catch_main/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/catch_main.dir/build.make third_party/json/test/CMakeFiles/catch_main.dir/build +.PHONY : catch_main/fast + +#============================================================================= +# Target rules for targets named test-json_pointer + +# Build rule for target. +test-json_pointer: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-json_pointer +.PHONY : test-json_pointer + +# fast build rule for target. +test-json_pointer/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-json_pointer.dir/build.make third_party/json/test/CMakeFiles/test-json_pointer.dir/build +.PHONY : test-json_pointer/fast + +#============================================================================= +# Target rules for targets named test-modifiers + +# Build rule for target. +test-modifiers: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-modifiers +.PHONY : test-modifiers + +# fast build rule for target. +test-modifiers/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-modifiers.dir/build.make third_party/json/test/CMakeFiles/test-modifiers.dir/build +.PHONY : test-modifiers/fast + +#============================================================================= +# Target rules for targets named test-allocator + +# Build rule for target. +test-allocator: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-allocator +.PHONY : test-allocator + +# fast build rule for target. +test-allocator/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-allocator.dir/build.make third_party/json/test/CMakeFiles/test-allocator.dir/build +.PHONY : test-allocator/fast + +#============================================================================= +# Target rules for targets named test-items + +# Build rule for target. +test-items: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-items +.PHONY : test-items + +# fast build rule for target. +test-items/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-items.dir/build.make third_party/json/test/CMakeFiles/test-items.dir/build +.PHONY : test-items/fast + +#============================================================================= +# Target rules for targets named test-algorithms + +# Build rule for target. +test-algorithms: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-algorithms +.PHONY : test-algorithms + +# fast build rule for target. +test-algorithms/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-algorithms.dir/build.make third_party/json/test/CMakeFiles/test-algorithms.dir/build +.PHONY : test-algorithms/fast + +#============================================================================= +# Target rules for targets named test-cbor + +# Build rule for target. +test-cbor: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-cbor +.PHONY : test-cbor + +# fast build rule for target. +test-cbor/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-cbor.dir/build.make third_party/json/test/CMakeFiles/test-cbor.dir/build +.PHONY : test-cbor/fast + +#============================================================================= +# Target rules for targets named test-pointer_access + +# Build rule for target. +test-pointer_access: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-pointer_access +.PHONY : test-pointer_access + +# fast build rule for target. +test-pointer_access/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-pointer_access.dir/build.make third_party/json/test/CMakeFiles/test-pointer_access.dir/build +.PHONY : test-pointer_access/fast + +#============================================================================= +# Target rules for targets named test-constructor2 + +# Build rule for target. +test-constructor2: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-constructor2 +.PHONY : test-constructor2 + +# fast build rule for target. +test-constructor2/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-constructor2.dir/build.make third_party/json/test/CMakeFiles/test-constructor2.dir/build +.PHONY : test-constructor2/fast + +#============================================================================= +# Target rules for targets named test-alt-string + +# Build rule for target. +test-alt-string: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-alt-string +.PHONY : test-alt-string + +# fast build rule for target. +test-alt-string/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-alt-string.dir/build.make third_party/json/test/CMakeFiles/test-alt-string.dir/build +.PHONY : test-alt-string/fast + +#============================================================================= +# Target rules for targets named test-iterators2 + +# Build rule for target. +test-iterators2: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-iterators2 +.PHONY : test-iterators2 + +# fast build rule for target. +test-iterators2/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-iterators2.dir/build.make third_party/json/test/CMakeFiles/test-iterators2.dir/build +.PHONY : test-iterators2/fast + +#============================================================================= +# Target rules for targets named test-capacity + +# Build rule for target. +test-capacity: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-capacity +.PHONY : test-capacity + +# fast build rule for target. +test-capacity/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-capacity.dir/build.make third_party/json/test/CMakeFiles/test-capacity.dir/build +.PHONY : test-capacity/fast + +#============================================================================= +# Target rules for targets named test-constructor1 + +# Build rule for target. +test-constructor1: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-constructor1 +.PHONY : test-constructor1 + +# fast build rule for target. +test-constructor1/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-constructor1.dir/build.make third_party/json/test/CMakeFiles/test-constructor1.dir/build +.PHONY : test-constructor1/fast + +#============================================================================= +# Target rules for targets named test-deserialization + +# Build rule for target. +test-deserialization: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-deserialization +.PHONY : test-deserialization + +# fast build rule for target. +test-deserialization/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-deserialization.dir/build.make third_party/json/test/CMakeFiles/test-deserialization.dir/build +.PHONY : test-deserialization/fast + +#============================================================================= +# Target rules for targets named test-reference_access + +# Build rule for target. +test-reference_access: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-reference_access +.PHONY : test-reference_access + +# fast build rule for target. +test-reference_access/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-reference_access.dir/build.make third_party/json/test/CMakeFiles/test-reference_access.dir/build +.PHONY : test-reference_access/fast + +#============================================================================= +# Target rules for targets named test-element_access1 + +# Build rule for target. +test-element_access1: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-element_access1 +.PHONY : test-element_access1 + +# fast build rule for target. +test-element_access1/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-element_access1.dir/build.make third_party/json/test/CMakeFiles/test-element_access1.dir/build +.PHONY : test-element_access1/fast + +#============================================================================= +# Target rules for targets named test-meta + +# Build rule for target. +test-meta: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-meta +.PHONY : test-meta + +# fast build rule for target. +test-meta/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-meta.dir/build.make third_party/json/test/CMakeFiles/test-meta.dir/build +.PHONY : test-meta/fast + +#============================================================================= +# Target rules for targets named test-inspection + +# Build rule for target. +test-inspection: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-inspection +.PHONY : test-inspection + +# fast build rule for target. +test-inspection/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-inspection.dir/build.make third_party/json/test/CMakeFiles/test-inspection.dir/build +.PHONY : test-inspection/fast + +#============================================================================= +# Target rules for targets named test-readme + +# Build rule for target. +test-readme: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-readme +.PHONY : test-readme + +# fast build rule for target. +test-readme/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-readme.dir/build.make third_party/json/test/CMakeFiles/test-readme.dir/build +.PHONY : test-readme/fast + +#============================================================================= +# Target rules for targets named test-iterators1 + +# Build rule for target. +test-iterators1: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-iterators1 +.PHONY : test-iterators1 + +# fast build rule for target. +test-iterators1/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-iterators1.dir/build.make third_party/json/test/CMakeFiles/test-iterators1.dir/build +.PHONY : test-iterators1/fast + +#============================================================================= +# Target rules for targets named test-merge_patch + +# Build rule for target. +test-merge_patch: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-merge_patch +.PHONY : test-merge_patch + +# fast build rule for target. +test-merge_patch/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-merge_patch.dir/build.make third_party/json/test/CMakeFiles/test-merge_patch.dir/build +.PHONY : test-merge_patch/fast + +#============================================================================= +# Target rules for targets named test-msgpack + +# Build rule for target. +test-msgpack: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-msgpack +.PHONY : test-msgpack + +# fast build rule for target. +test-msgpack/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-msgpack.dir/build.make third_party/json/test/CMakeFiles/test-msgpack.dir/build +.PHONY : test-msgpack/fast + +#============================================================================= +# Target rules for targets named test-serialization + +# Build rule for target. +test-serialization: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test-serialization +.PHONY : test-serialization + +# fast build rule for target. +test-serialization/fast: + $(MAKE) -f third_party/json/test/CMakeFiles/test-serialization.dir/build.make third_party/json/test/CMakeFiles/test-serialization.dir/build +.PHONY : test-serialization/fast + +#============================================================================= +# Target rules for targets named spdlog_headers_for_ide + +# Build rule for target. +spdlog_headers_for_ide: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 spdlog_headers_for_ide +.PHONY : spdlog_headers_for_ide + +# fast build rule for target. +spdlog_headers_for_ide/fast: + $(MAKE) -f third_party/spdlog/CMakeFiles/spdlog_headers_for_ide.dir/build.make third_party/spdlog/CMakeFiles/spdlog_headers_for_ide.dir/build +.PHONY : spdlog_headers_for_ide/fast + +#============================================================================= +# Target rules for targets named spdlog-utests + +# Build rule for target. +spdlog-utests: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 spdlog-utests +.PHONY : spdlog-utests + +# fast build rule for target. +spdlog-utests/fast: + $(MAKE) -f third_party/spdlog/tests/CMakeFiles/spdlog-utests.dir/build.make third_party/spdlog/tests/CMakeFiles/spdlog-utests.dir/build +.PHONY : spdlog-utests/fast + +#============================================================================= +# Target rules for targets named _elf + +# Build rule for target. +_elf: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 _elf +.PHONY : _elf + +# fast build rule for target. +_elf/fast: + $(MAKE) -f elf/CMakeFiles/_elf.dir/build.make elf/CMakeFiles/_elf.dir/build +.PHONY : _elf/fast + +#============================================================================= +# Target rules for targets named elf + +# Build rule for target. +elf: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 elf +.PHONY : elf + +# fast build rule for target. +elf/fast: + $(MAKE) -f elf/CMakeFiles/elf.dir/build.make elf/CMakeFiles/elf.dir/build +.PHONY : elf/fast + +#============================================================================= +# Target rules for targets named test_cpp_elfgames_go_sgf_sgf_test + +# Build rule for target. +test_cpp_elfgames_go_sgf_sgf_test: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test_cpp_elfgames_go_sgf_sgf_test +.PHONY : test_cpp_elfgames_go_sgf_sgf_test + +# fast build rule for target. +test_cpp_elfgames_go_sgf_sgf_test/fast: + $(MAKE) -f elfgames/go/CMakeFiles/test_cpp_elfgames_go_sgf_sgf_test.dir/build.make elfgames/go/CMakeFiles/test_cpp_elfgames_go_sgf_sgf_test.dir/build +.PHONY : test_cpp_elfgames_go_sgf_sgf_test/fast + +#============================================================================= +# Target rules for targets named test_cpp_elfgames_go_base_test_symmetry_test + +# Build rule for target. +test_cpp_elfgames_go_base_test_symmetry_test: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test_cpp_elfgames_go_base_test_symmetry_test +.PHONY : test_cpp_elfgames_go_base_test_symmetry_test + +# fast build rule for target. +test_cpp_elfgames_go_base_test_symmetry_test/fast: + $(MAKE) -f elfgames/go/CMakeFiles/test_cpp_elfgames_go_base_test_symmetry_test.dir/build.make elfgames/go/CMakeFiles/test_cpp_elfgames_go_base_test_symmetry_test.dir/build +.PHONY : test_cpp_elfgames_go_base_test_symmetry_test/fast + +#============================================================================= +# Target rules for targets named test_cpp_elfgames_go_base_test_go_test + +# Build rule for target. +test_cpp_elfgames_go_base_test_go_test: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test_cpp_elfgames_go_base_test_go_test +.PHONY : test_cpp_elfgames_go_base_test_go_test + +# fast build rule for target. +test_cpp_elfgames_go_base_test_go_test/fast: + $(MAKE) -f elfgames/go/CMakeFiles/test_cpp_elfgames_go_base_test_go_test.dir/build.make elfgames/go/CMakeFiles/test_cpp_elfgames_go_base_test_go_test.dir/build +.PHONY : test_cpp_elfgames_go_base_test_go_test/fast + +#============================================================================= +# Target rules for targets named elfgames_go_inference + +# Build rule for target. +elfgames_go_inference: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 elfgames_go_inference +.PHONY : elfgames_go_inference + +# fast build rule for target. +elfgames_go_inference/fast: + $(MAKE) -f elfgames/go/CMakeFiles/elfgames_go_inference.dir/build.make elfgames/go/CMakeFiles/elfgames_go_inference.dir/build +.PHONY : elfgames_go_inference/fast + +#============================================================================= +# Target rules for targets named _elfgames_go + +# Build rule for target. +_elfgames_go: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 _elfgames_go +.PHONY : _elfgames_go + +# fast build rule for target. +_elfgames_go/fast: + $(MAKE) -f elfgames/go/CMakeFiles/_elfgames_go.dir/build.make elfgames/go/CMakeFiles/_elfgames_go.dir/build +.PHONY : _elfgames_go/fast + +#============================================================================= +# Target rules for targets named test_cpp_elfgames_go_base_test_board_feature_test + +# Build rule for target. +test_cpp_elfgames_go_base_test_board_feature_test: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test_cpp_elfgames_go_base_test_board_feature_test +.PHONY : test_cpp_elfgames_go_base_test_board_feature_test + +# fast build rule for target. +test_cpp_elfgames_go_base_test_board_feature_test/fast: + $(MAKE) -f elfgames/go/CMakeFiles/test_cpp_elfgames_go_base_test_board_feature_test.dir/build.make elfgames/go/CMakeFiles/test_cpp_elfgames_go_base_test_board_feature_test.dir/build +.PHONY : test_cpp_elfgames_go_base_test_board_feature_test/fast + +#============================================================================= +# Target rules for targets named elfgames_go + +# Build rule for target. +elfgames_go: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 elfgames_go +.PHONY : elfgames_go + +# fast build rule for target. +elfgames_go/fast: + $(MAKE) -f elfgames/go/CMakeFiles/elfgames_go.dir/build.make elfgames/go/CMakeFiles/elfgames_go.dir/build +.PHONY : elfgames_go/fast + +#============================================================================= +# Target rules for targets named test_cpp_elfgames_go_base_test_coord_test + +# Build rule for target. +test_cpp_elfgames_go_base_test_coord_test: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 test_cpp_elfgames_go_base_test_coord_test +.PHONY : test_cpp_elfgames_go_base_test_coord_test + +# fast build rule for target. +test_cpp_elfgames_go_base_test_coord_test/fast: + $(MAKE) -f elfgames/go/CMakeFiles/test_cpp_elfgames_go_base_test_coord_test.dir/build.make elfgames/go/CMakeFiles/test_cpp_elfgames_go_base_test_coord_test.dir/build +.PHONY : test_cpp_elfgames_go_base_test_coord_test/fast + +#============================================================================= +# Target rules for targets named elfgames_go9 + +# Build rule for target. +elfgames_go9: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 elfgames_go9 +.PHONY : elfgames_go9 + +# fast build rule for target. +elfgames_go9/fast: + $(MAKE) -f elfgames/go/CMakeFiles/elfgames_go9.dir/build.make elfgames/go/CMakeFiles/elfgames_go9.dir/build +.PHONY : elfgames_go9/fast + +#============================================================================= +# Target rules for targets named _elfgames_go_inference + +# Build rule for target. +_elfgames_go_inference: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 _elfgames_go_inference +.PHONY : _elfgames_go_inference + +# fast build rule for target. +_elfgames_go_inference/fast: + $(MAKE) -f elfgames/go/CMakeFiles/_elfgames_go_inference.dir/build.make elfgames/go/CMakeFiles/_elfgames_go_inference.dir/build +.PHONY : _elfgames_go_inference/fast + +#============================================================================= +# Target rules for targets named elfgames_tasks_inference + +# Build rule for target. +elfgames_tasks_inference: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 elfgames_tasks_inference +.PHONY : elfgames_tasks_inference + +# fast build rule for target. +elfgames_tasks_inference/fast: + $(MAKE) -f elfgames/tasks/CMakeFiles/elfgames_tasks_inference.dir/build.make elfgames/tasks/CMakeFiles/elfgames_tasks_inference.dir/build +.PHONY : elfgames_tasks_inference/fast + +#============================================================================= +# Target rules for targets named elfgames_tasks9 + +# Build rule for target. +elfgames_tasks9: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 elfgames_tasks9 +.PHONY : elfgames_tasks9 + +# fast build rule for target. +elfgames_tasks9/fast: + $(MAKE) -f elfgames/tasks/CMakeFiles/elfgames_tasks9.dir/build.make elfgames/tasks/CMakeFiles/elfgames_tasks9.dir/build +.PHONY : elfgames_tasks9/fast + +#============================================================================= +# Target rules for targets named _elfgames_tasks + +# Build rule for target. +_elfgames_tasks: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 _elfgames_tasks +.PHONY : _elfgames_tasks + +# fast build rule for target. +_elfgames_tasks/fast: + $(MAKE) -f elfgames/tasks/CMakeFiles/_elfgames_tasks.dir/build.make elfgames/tasks/CMakeFiles/_elfgames_tasks.dir/build +.PHONY : _elfgames_tasks/fast + +#============================================================================= +# Target rules for targets named elfgames_tasks + +# Build rule for target. +elfgames_tasks: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 elfgames_tasks +.PHONY : elfgames_tasks + +# fast build rule for target. +elfgames_tasks/fast: + $(MAKE) -f elfgames/tasks/CMakeFiles/elfgames_tasks.dir/build.make elfgames/tasks/CMakeFiles/elfgames_tasks.dir/build +.PHONY : elfgames_tasks/fast + +#============================================================================= +# Target rules for targets named _elfgames_tasks_inference + +# Build rule for target. +_elfgames_tasks_inference: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 _elfgames_tasks_inference +.PHONY : _elfgames_tasks_inference -.PHONY: test -test: test_cpp +# fast build rule for target. +_elfgames_tasks_inference/fast: + $(MAKE) -f elfgames/tasks/CMakeFiles/_elfgames_tasks_inference.dir/build.make elfgames/tasks/CMakeFiles/_elfgames_tasks_inference.dir/build +.PHONY : _elfgames_tasks_inference/fast -.PHONY: test_cpp -test_cpp: test_cpp_elf test_cpp_elfgames_go +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... install/strip" + @echo "... install" + @echo "... install/local" + @echo "... list_install_components" + @echo "... edit_cache" + @echo "... rebuild_cache" + @echo "... gmock_main" + @echo "... gmock" + @echo "... gtest_main" + @echo "... gtest" + @echo "... ContinuousSubmit" + @echo "... ContinuousMemCheck" + @echo "... ContinuousConfigure" + @echo "... ExperimentalSubmit" + @echo "... ExperimentalMemCheck" + @echo "... ExperimentalTest" + @echo "... ContinuousTest" + @echo "... ContinuousUpdate" + @echo "... ExperimentalBuild" + @echo "... NightlyMemoryCheck" + @echo "... NightlyBuild" + @echo "... ExperimentalUpdate" + @echo "... ContinuousBuild" + @echo "... Continuous" + @echo "... Experimental" + @echo "... ExperimentalConfigure" + @echo "... NightlyStart" + @echo "... NightlyTest" + @echo "... NightlyUpdate" + @echo "... ContinuousCoverage" + @echo "... ExperimentalStart" + @echo "... Nightly" + @echo "... NightlyConfigure" + @echo "... NightlyCoverage" + @echo "... ExperimentalCoverage" + @echo "... NightlyMemCheck" + @echo "... ContinuousStart" + @echo "... NightlySubmit" + @echo "... test-wstring" + @echo "... test-unicode" + @echo "... test-udt" + @echo "... test-ubjson" + @echo "... test-to_chars" + @echo "... test-conversions" + @echo "... test-convenience" + @echo "... test-class_iterator" + @echo "... test-class_parser" + @echo "... test-class_const_iterator" + @echo "... test-json_patch" + @echo "... test-noexcept" + @echo "... test-class_lexer" + @echo "... test-concepts" + @echo "... test-testsuites" + @echo "... test-element_access2" + @echo "... test-comparison" + @echo "... test-regression" + @echo "... catch_main" + @echo "... test-json_pointer" + @echo "... test-modifiers" + @echo "... test-allocator" + @echo "... test-items" + @echo "... test-algorithms" + @echo "... test-cbor" + @echo "... test-pointer_access" + @echo "... test-constructor2" + @echo "... test-alt-string" + @echo "... test-iterators2" + @echo "... test-capacity" + @echo "... test-constructor1" + @echo "... test-deserialization" + @echo "... test-reference_access" + @echo "... test-element_access1" + @echo "... test-meta" + @echo "... test-inspection" + @echo "... test-readme" + @echo "... test-iterators1" + @echo "... test-merge_patch" + @echo "... test-msgpack" + @echo "... test-serialization" + @echo "... spdlog_headers_for_ide" + @echo "... spdlog-utests" + @echo "... _elf" + @echo "... elf" + @echo "... test_cpp_elfgames_go_sgf_sgf_test" + @echo "... test_cpp_elfgames_go_base_test_symmetry_test" + @echo "... test_cpp_elfgames_go_base_test_go_test" + @echo "... elfgames_go_inference" + @echo "... _elfgames_go" + @echo "... test_cpp_elfgames_go_base_test_board_feature_test" + @echo "... elfgames_go" + @echo "... test_cpp_elfgames_go_base_test_coord_test" + @echo "... elfgames_go9" + @echo "... _elfgames_go_inference" + @echo "... elfgames_tasks_inference" + @echo "... elfgames_tasks9" + @echo "... _elfgames_tasks" + @echo "... elfgames_tasks" + @echo "... _elfgames_tasks_inference" +.PHONY : help -build/Makefile: CMakeLists.txt */CMakeLists.txt - mkdir -p build - (cd build && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..) -.PHONY: elf -elf: build/Makefile - (cd build && cmake --build elf -- -j) -.PHONY: test_cpp_elf -test_cpp_elf: - (cd build/elf && GTEST_COLOR=1 ctest --output-on-failure) +#============================================================================= +# Special targets to cleanup operation of make. -.PHONY: test_cpp_elfgames_go -test_cpp_elfgames_go: - (cd build/elfgames/go && GTEST_COLOR=1 ctest --output-on-failure) +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system -.PHONY: elfgames/go -elfgames/go: build/Makefile - (cd build && cmake --build elfgames/go -- -j) diff --git a/scripts/elfgames/tasks/df_console.py b/scripts/elfgames/tasks/df_console.py new file mode 100644 index 0000000..24859bd --- /dev/null +++ b/scripts/elfgames/tasks/df_console.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python + +# Copyright (c) 2018-present, Facebook, Inc. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +import os +import sys + +import torch + +from console_lib import GoConsoleGTP +from rlpytorch import Evaluator, load_env + + +def main(): + print('Python version:', sys.version) + print('PyTorch version:', torch.__version__) + print('CUDA version', torch.version.cuda) + print('Conda env:', os.environ.get("CONDA_DEFAULT_ENV", "")) + + additional_to_load = { + 'evaluator': ( + Evaluator.get_option_spec(), + lambda object_map: Evaluator(object_map, stats=None)), + } + + # Set game to online model. + env = load_env( + os.environ, + overrides={ + 'num_games': 1, + 'greedy': True, + 'T': 1, + 'model': 'online', + 'additional_labels': ['aug_code', 'move_idx'], + }, + additional_to_load=additional_to_load) + + evaluator = env['evaluator'] + + GC = env["game"].initialize() + + model_loader = env["model_loaders"][0] + model = model_loader.load_model(GC.params) + + mi = env['mi'] + mi.add_model("model", model) + mi.add_model("actor", model) + mi["model"].eval() + mi["actor"].eval() + + console = GoConsoleGTP(GC, evaluator) + + def human_actor(batch): + return console.prompt("", batch) + + def actor(batch): + return console.actor(batch) + + def train(batch): + console.prompt("DF Train> ", batch) + + evaluator.setup(sampler=env["sampler"], mi=mi) + + GC.reg_callback_if_exists("actor_black", actor) + GC.reg_callback_if_exists("human_actor", human_actor) + GC.reg_callback_if_exists("train", train) + + GC.start() + GC.GC.getClient().setRequest( + mi["actor"].step, -1, env['game'].options.resign_thres, -1) + + evaluator.episode_start(0) + + while True: + GC.run() + if console.exit: + break + GC.stop() + + +if __name__ == '__main__': + main() diff --git a/scripts/elfgames/tasks/selfplay.py b/scripts/elfgames/tasks/selfplay.py new file mode 100644 index 0000000..c1b9584 --- /dev/null +++ b/scripts/elfgames/tasks/selfplay.py @@ -0,0 +1,203 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright (c) 2018-present, Facebook, Inc. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +import os +import sys +import time +import re +from datetime import datetime + +import torch + +from rlpytorch import \ + Evaluator, load_env, ModelInterface + + +class Stats(object): + def __init__(self): + self.total_batchsize = 0 + self.total_sel_batchsize = 0 + self.actor_count = 0 + + def feed(self, batch): + self.total_sel_batchsize += batch.batchsize + self.total_batchsize += batch.max_batchsize + self.actor_count += 1 + + if self.total_sel_batchsize >= 500000: + print(datetime.now()) + + batch_usage = self.total_sel_batchsize / self.total_batchsize + print(f'Batch usage: ' + f'{self.total_sel_batchsize}/{self.total_batchsize} ' + f'({100.0 * batch_usage:.2f}%)') + + wr = batch.GC.getClient().getGameStats().getWinRateStats() + win_rate = (100.0 * wr.black_wins / wr.total_games + if wr.total_games > 0 + else 0.0) + print(f'B/W: {wr.black_wins}/{wr.white_wins}. ' + f'Black winrate: {win_rate:.2f} {wr.total_games}') + + self.total_sel_batchsize = 0 + self.total_batchsize = 0 + print('Actor count:', self.actor_count) + + +name_matcher = re.compile(r"save-(\d+)") + + +def extract_ver(model_loader): + name = os.path.basename(model_loader.options.load) + m = name_matcher.match(name) + return int(m.group(1)) + + +def reload_model(model_loader, params, mi, actor_name, args): + model = model_loader.load_model(params) + + if actor_name not in mi: + mi.add_model(actor_name, model, cuda=(args.gpu >= 0), gpu_id=args.gpu) + else: + mi.update_model(actor_name, model) + mi[actor_name].eval() + + +def reload(mi, model_loader, params, args, root, ver, actor_name): + if model_loader.options.load is None or model_loader.options.load == "": + print('No previous model loaded, loading from', root) + real_path = os.path.join(root, "save-" + str(ver) + ".bin") + else: + this_root = os.path.dirname(model_loader.options.load) + real_path = os.path.join(this_root, "save-" + str(ver) + ".bin") + + if model_loader.options.load != real_path: + model_loader.options.load = real_path + reload_model(model_loader, params, mi, actor_name, args) + else: + print('Warning! Same model, skip loading', real_path) + + +def main(): + print('Python version:', sys.version) + print('PyTorch version:', torch.__version__) + print('CUDA version', torch.version.cuda) + print('Conda env:', os.environ.get("CONDA_DEFAULT_ENV", "")) + + # Set game to online model. + actors = ["actor_black", "actor_white"] + additional_to_load = { + ("eval_" + actor_name): ( + Evaluator.get_option_spec(name="eval_" + actor_name), + lambda object_map, actor_name=actor_name: Evaluator( + object_map, name="eval_" + actor_name, + actor_name=actor_name, stats=None) + ) + for i, actor_name in enumerate(actors) + } + additional_to_load.update({ + ("mi_" + name): (ModelInterface.get_option_spec(), ModelInterface) + for name in actors + }) + + env = load_env( + os.environ, num_models=2, overrides={'actor_only': True}, + additional_to_load=additional_to_load) + + GC = env["game"].initialize() + + stats = [Stats(), Stats()] + + for i in range(len(actors)): + actor_name = actors[i] + stat = stats[i] + e = env["eval_" + actor_name] + + print(f'register {actor_name} for e = {e!s}') + e.setup(sampler=env["sampler"], mi=env["mi_" + actor_name]) + + def actor(batch, e, stat): + reply = e.actor(batch) + stat.feed(batch) + print("actor returns " + str(reply)) + return reply + + GC.reg_callback(actor_name, + lambda batch, e=e, stat=stat: actor(batch, e, stat)) + + root = os.environ.get("root", "./") + print(f'Root: "{root}"') + args = env["game"].options + loop_end = False + + def game_start(batch): + print("In game start") + + vers = [int(batch["black_ver"][0]), int(batch["white_ver"][0])] + + # Use the version number to load models. + for model_loader, ver, actor_name in zip( + env["model_loaders"], vers, actors): + if ver >= 0: + while True: + try: + reload( + env["mi_" + actor_name], model_loader, GC.params, + args, root, ver, actor_name) + break + except BaseException: + import traceback + traceback.print_exc() + time.sleep(10) + + def game_end(batch): + nonlocal loop_end + wr = batch.GC.getClient().getGameStats().getWinRateStats() + win_rate = (100.0 * wr.black_wins / wr.total_games + if wr.total_games > 0 else 0.0) + print(f'{datetime.now()!s} B/W: {wr.black_wins}/{wr.white_wins}.' + f'Black winrate: {win_rate:.2f} ({wr.total_games})') + + if args.suicide_after_n_games > 0 and \ + wr.total_games >= args.suicide_after_n_games: + print(f'#suicide_after_n_games: {args.suicide_after_n_games}, ' + f'total_games: {wr.total_games}') + loop_end = True + + GC.reg_callback_if_exists("game_start", game_start) + GC.reg_callback_if_exists("game_end", game_end) + + GC.start() + if args.eval_model_pair: + if args.eval_model_pair.find(",") >= 0: + black, white = args.eval_model_pair.split(",") + else: + black = extract_ver(env["model_loaders"][0]) + white = extract_ver(env["model_loaders"][1]) + + # Force them to reload in the future. + for model_loader, actor_name in zip(env["model_loaders"], actors): + reload_model(model_loader, GC.params, + env["mi_" + actor_name], actor_name, args) + + # We just use one thread to do selfplay. + GC.GC.getClient().setRequest( + int(black), int(white), env['game'].options.resign_thres, 1) + + for actor_name in actors: + env["eval_" + actor_name].episode_start(0) + + while not loop_end: + GC.run() + + GC.stop() + + +if __name__ == '__main__': + main() diff --git a/scripts/elfgames/tasks/server_addrs.py b/scripts/elfgames/tasks/server_addrs.py new file mode 100644 index 0000000..928cddb --- /dev/null +++ b/scripts/elfgames/tasks/server_addrs.py @@ -0,0 +1,3 @@ +addrs = { + "myserver": "[100.97.67.45]", +} diff --git a/scripts/elfgames/tasks/train.py b/scripts/elfgames/tasks/train.py new file mode 100644 index 0000000..3c143fb --- /dev/null +++ b/scripts/elfgames/tasks/train.py @@ -0,0 +1,144 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# Copyright (c) 2018-present, Facebook, Inc. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + +import os +import sys +import re +import time + +import torch + +from rlpytorch import load_env, SingleProcessRun, Trainer + + +matcher = re.compile(r"save-(\d+).bin") + + +def main(): + print('Python version:', sys.version) + print('PyTorch version:', torch.__version__) + print('CUDA version', torch.version.cuda) + print('Conda env:', os.environ.get("CONDA_DEFAULT_ENV", "")) + + additional_to_load = { + 'trainer': ( + Trainer.get_option_spec(), + lambda option_map: Trainer(option_map)), + 'runner': ( + SingleProcessRun.get_option_spec(), + lambda option_map: SingleProcessRun(option_map)), + } + + env = load_env(os.environ, additional_to_load=additional_to_load) + + trainer = env['trainer'] + runner = env['runner'] + + GC = env["game"].initialize() + + model_loader = env["model_loaders"][0] + model = model_loader.load_model(GC.params) + env["mi"].add_model("model", model, opt=True) + + keep_prev_selfplay = env["game"].options.keep_prev_selfplay + model_ver = 0 + model_filename = model_loader.options.load + if isinstance(model_filename, str) and model_filename != "": + realpath = os.path.realpath(model_filename) + m = matcher.match(os.path.basename(realpath)) + if m: + model_ver = int(m.group(1)) + + eval_old_model = env["game"].options.eval_old_model + + if eval_old_model >= 0: + GC.GC.getServer().setEvalMode(model_ver, eval_old_model) + else: + GC.GC.getServer().setInitialVersion(model_ver) + + selfplay_ver = model_ver + root = os.environ["save"] + print(f'Root: "{root}"') + print(f'Keep prev_selfplay: {keep_prev_selfplay!s}') + + def train(batch, *args, **kwargs): + # Check whether the version match. + if keep_prev_selfplay or \ + (batch["selfplay_ver"] != selfplay_ver).sum() == 0: + trainer.train(batch, *args, **kwargs) + else: + print(f'Get batch whose selfplay ver is different from ' + f'{selfplay_ver}, skipping') + runner.inc_episode_counter(-1) + + def train_ctrl(batch, *args, **kwargs): + nonlocal selfplay_ver + old_selfplay_ver = selfplay_ver + selfplay_ver = int(batch["selfplay_ver"][0]) + print( + f'Train ctrl: selfplay_ver: {old_selfplay_ver} -> {selfplay_ver}') + GC.GC.getServer().waitForSufficientSelfplay(selfplay_ver) + + # Reload old models. + real_path = os.path.join(root, "save-" + str(selfplay_ver) + ".bin") + model_loader.options.load = real_path + + while True: + try: + model = model_loader.load_model(GC.params) + break + except BaseException: + time.sleep(10) + + env["mi"].remove_model("model") + env["mi"].add_model("model", model, opt=True) + trainer.episode_reset() + runner.set_episode_counter(-1) + + GC.reg_callback("train", train) + GC.reg_callback("train_ctrl", train_ctrl) + + if GC.reg_has_callback("actor"): + args = env["game"].options + env["mi"].add_model( + "actor", + model, + copy=True, + cuda=(args.gpu >= 0), + gpu_id=args.gpu) + GC.reg_callback("actor", trainer.actor) + + trainer.setup( + sampler=env["sampler"], + mi=env["mi"], + rl_method=env["method"]) + + def episode_summary(i): + nonlocal selfplay_ver + ver = trainer.episode_summary(i) + # This might block (when evaluation does not catch up with training). + GC.GC.getServer().notifyNewVersion(selfplay_ver, ver) + + offline_training = (env["game"].options.mode == "offline_train") + + def after_start(): + nonlocal selfplay_ver + if not offline_training: + print("About to wait for sufficient selfplay") + GC.GC.getServer().waitForSufficientSelfplay(selfplay_ver) + + runner.setup(GC, after_start=after_start, + episode_summary=episode_summary, + episode_start=trainer.episode_start) + + runner.run() + + +if __name__ == '__main__': + main() diff --git a/src_cpp/elf/CMakeLists.txt b/src_cpp/elf/CMakeLists.txt index 0b26cdb..262ed03 100644 --- a/src_cpp/elf/CMakeLists.txt +++ b/src_cpp/elf/CMakeLists.txt @@ -14,10 +14,10 @@ set(ELF_SOURCES options/Pybind.cc ) -set(ELF_TEST_SOURCES - options/OptionMapTest.cc - options/OptionSpecTest.cc -) +# set(ELF_TEST_SOURCES +# options/OptionMapTest.cc +# options/OptionSpecTest.cc +# ) # Main ELF library @@ -40,7 +40,7 @@ target_link_libraries(elf PUBLIC # Tests enable_testing() -add_cpp_tests(test_cpp_elf_ elf ${ELF_TEST_SOURCES}) +# add_cpp_tests(test_cpp_elf_ elf ${ELF_TEST_SOURCES}) # Python bindings diff --git a/src_cpp/elfgames/tasks/base/board_feature.cc b/src_cpp/elfgames/tasks/base/board_feature.cc new file mode 100644 index 0000000..db7f5e0 --- /dev/null +++ b/src_cpp/elfgames/tasks/base/board_feature.cc @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2018-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include "board_feature.h" +#include +#include +#include +#include "go_state.h" + +#define S_ISA(c1, c2) ((c2 == S_EMPTY) || (c1 == c2)) + +void BoardFeature::extract(std::vector* features) const { + features->resize(TOTAL_FEATURE_SIZE); + extract(&(*features)[0]); +} + +void BoardFeature::extract(float* features) const { + std::copy(s_.GetFeatures(), s_.GetFeatures() + TOTAL_FEATURE_SIZE, features); + +} + +void BoardFeature::extractAGZ(std::vector* features) const { + features->resize(TOTAL_FEATURE_SIZE); + extractAGZ(&(*features)[0]); +} + +void BoardFeature::extractAGZ(float* features) const { + std::fill(features, features + TOTAL_FEATURE_SIZE, 0.0); + +} diff --git a/src_cpp/elfgames/tasks/base/board_feature.h b/src_cpp/elfgames/tasks/base/board_feature.h new file mode 100644 index 0000000..2ecc76f --- /dev/null +++ b/src_cpp/elfgames/tasks/base/board_feature.h @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2018-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#include "go_common.h" +#include "../Game.h" + +#include +#include + +typedef unsigned short Coord; + +#define TOTAL_FEATURE_SIZE 1 // for ChouFleur FIXME +/*#define MAX_NUM_FEATURE 25 + +#define OUR_LIB 0 +#define OPPONENT_LIB 3 +#define OUR_SIMPLE_KO 6 +#define OUR_STONES 7 +#define OPPONENT_STONES 8 +#define EMPTY_STONES 9 + +// [TODO]: Other todo features. +#define OUR_HISTORY 10 +#define OPPONENT_HISTORY 11 +#define BORDER 12 +#define POSITION_MARK 13 +#define OUR_CLOSEST_COLOR 14 +#define OPPONENT_CLOSEST_COLOR 15 + +#define BLACK_INDICATOR 16 +#define WHITE_INDICATOR 17 + +#define MAX_NUM_AGZ_FEATURE 18 +#define MAX_NUM_AGZ_HISTORY 8 */ + +/*struct BoardHistory { + std::vector black; + std::vector white; + + BoardHistory(const Board& b) { + for (int i = 0; i < BOARD_SIZE; ++i) { + for (int j = 0; j < BOARD_SIZE; ++j) { + Coord c = OFFSETXY(i, j); + Stone s = b._infos[c].color; + if (s == S_WHITE) + white.push_back(c); + else if (s == S_BLACK) + black.push_back(c); + } + } + } +};*/ + +class StateForChouFleur; + +class BoardFeature { + public: + enum Rot { NONE = 0, CCW90, CCW180, CCW270 }; + + BoardFeature(const StateForChouFleur& s, Rot rot, bool flip) + : s_(s), _rot(rot), _flip(flip) {} + BoardFeature(const StateForChouFleur& s) : s_(s), _rot(NONE), _flip(false) {} + + /* static BoardFeature RandomShuffle(const StateForChouFleur& s, std::mt19937* rng) { + BoardFeature bf(s); + bf.setD4Code((*rng)() % 8); + return bf; + }*/ + + const StateForChouFleur& state() const { + return s_; + } + +/* + void setD4Group(Rot new_rot, bool new_flip) { + _rot = new_rot; + _flip = new_flip; + } + void setD4Code(int code) { + auto rot = (BoardFeature::Rot)(code % 4); + bool flip = (code >> 2) == 1; + setD4Group(rot, flip); + } + int getD4Code() const { + return (int)_rot + ((_flip ? 1 : 0) << 2); + } + + std::pair Transform(const std::pair& p) const { + std::pair output; + + if (_rot == CCW90) + output = std::make_pair(p.second, BOARD_SIZE - p.first - 1); + else if (_rot == CCW180) + output = + std::make_pair(BOARD_SIZE - p.first - 1, BOARD_SIZE - p.second - 1); + else if (_rot == CCW270) + output = std::make_pair(BOARD_SIZE - p.second - 1, p.first); + else + output = p; + + if (_flip) + std::swap(output.first, output.second); + return output; + } + + std::pair InvTransform(const std::pair& p) const { + std::pair output(p); + + if (_flip) + std::swap(output.first, output.second); + + if (_rot == CCW90) + output = std::make_pair(BOARD_SIZE - output.second - 1, output.first); + else if (_rot == CCW180) + output = std::make_pair( + BOARD_SIZE - output.first - 1, BOARD_SIZE - output.second - 1); + else if (_rot == CCW270) + output = std::make_pair(output.second, BOARD_SIZE - output.first - 1); + + return output; + }*/ + + int64_t coord2Action(Coord m) const { + // FIXME: be very careful about how actions are indices, given that there is not a 1-1 mapping between actions and nn outputs... + /*if (m == M_PASS) + return BOARD_ACTION_PASS; + auto p = Transform(std::make_pair(X(m), Y(m))); + return EXPORT_OFFSET_XY(p.first, p.second);*/ + + //return static_cast(m.GetIndex()); WAS OK WHEN Coord was a ActionForChouFleur + //return static_cast(m); + + // Biggest FIXME of the extension to other games...here I find where in the output tensor my action is. + // FIXME: Coord refers to action indices in this.s_.GetLegalActions() + int xsize = s_.GetXActionSize(); + int ysize = s_.GetYActionSize(); + Action* a = s_.GetLegalActions()[m]; + std::cout << "selected coord = " << m << std::endl; + int64_t action = a->GetZ()*ysize*xsize + a->GetY()*xsize + a->GetX(); + std::cout << "selected action = " << action << std::endl; + return action; + //s_ is a StateForChouFleur and we return the index of the coord in GetLegalActions... not 1:1 though, FIXME + } + + Coord action2Coord(int64_t action) const { + std::cout << " action2coord1 for action=" << action << std::endl; + if (action < 0) { std::cout << "neg action!"<< std::endl;exit(-1); } + //return static_cast(*s_.GetLegalActions()[static_cast(action)]); + // FIXME: I just do the oppositote of coord2Actions above. + int xsize = s_.GetXActionSize(); + int ysize = s_.GetYActionSize(); + std::cout << " action2coord2 xsize=" << xsize << " ysize=" << ysize << std::endl; + + // slow version... for many games we should be able to do better. + // FIXME: think carefully about what we are doing here. + for (unsigned int a=0; aGetZ()*ysize*xsize + act->GetY()*xsize + act->GetX() <GetZ()*ysize*xsize + act->GetY()*xsize + act->GetX() == action) + { + std::cout << "validated" << a << std::endl; + return static_cast(a); + } + } + std::cout << " action2coord3 BUG BUG BUG BUG" << std::endl; + exit(-1); + //return static_cast(action); + /* if (action == -1 || action == BOARD_ACTION_PASS) + return M_PASS; + auto p = InvTransform(std::make_pair(EXPORT_X(action), EXPORT_Y(action))); + return OFFSETXY(p.first, p.second);*/ + } + + void extract(std::vector* features) const; + void extractAGZ(std::vector* features) const; + void extract(float* features) const; + void extractAGZ(float* features) const; + + private: + const StateForChouFleur& s_; + Rot _rot = NONE; + bool _flip = false; + + //static constexpr int64_t kBoardRegion = BOARD_SIZE * BOARD_SIZE; + +/* int transform(int x, int y) const { + auto p = Transform(std::make_pair(x, y)); + return EXPORT_OFFSET_XY(p.first, p.second); + }*/ + +/* int transform(Coord m) const { + return transform(X(m), Y(m)); + } + + int transform(Coord m, int c) const { + return transform(X(m), Y(m)) + c * kBoardRegion; + } + + // Compute features. + bool getLibertyMap3(Stone player, float* data) const; + bool getLibertyMap(Stone player, float* data) const; + bool getLibertyMap3binary(Stone player, float* data) const; + bool getStones(Stone player, float* data) const; + bool getSimpleKo(Stone player, float* data) const; + bool getHistory(Stone player, float* data) const; + bool getHistoryExp(Stone player, float* data) const; + bool getDistanceMap(Stone player, float* data) const;*/ +}; diff --git a/src_cpp/elfgames/tasks/common/game_selfplay.cc b/src_cpp/elfgames/tasks/common/game_selfplay.cc new file mode 100644 index 0000000..213ce22 --- /dev/null +++ b/src_cpp/elfgames/tasks/common/game_selfplay.cc @@ -0,0 +1,462 @@ +/** + * Copyright (c) 2018-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include "game_selfplay.h" +#include "../mcts/ai.h" +#include "../mcts/mcts.h" +#include "go_game_specific.h" + +////////////////// GoGame ///////////////////// +ChouFleurGameSelfPlay::ChouFleurGameSelfPlay( + int game_idx, + elf::GameClient* client, + const ContextOptions& context_options, + const GameOptions& options, + ThreadedDispatcher* dispatcher, + GameNotifierBase* notifier) + : ChouFleurGameBase(game_idx, client, context_options, options), + dispatcher_(dispatcher), + notifier_(notifier), + _state_ext(game_idx, options), + logger_(elf::logging::getLogger( + "elfgames::go::ChouFleurGameSelfPlay-" + std::to_string(game_idx) + "-", + "")) {} + +MCTSChouFleurAI* ChouFleurGameSelfPlay::init_ai( + const std::string& actor_name, + const elf::ai::tree_search::TSOptions& mcts_options, + float puct_override, + int mcts_rollout_per_batch_override, + int mcts_rollout_per_thread_override, + int64_t model_ver) { + logger_->info( + "Initializing actor {}; puct_override: {}; batch_override: {}; " + "per_thread_override: {}", + actor_name, + puct_override, + mcts_rollout_per_batch_override, + mcts_rollout_per_thread_override); + + MCTSActorParams params; + params.actor_name = actor_name; + params.seed = _rng(); + //params.ply_pass_enabled = _options.ply_pass_enabled; + //params.komi = _options.komi; + params.required_version = model_ver; + + elf::ai::tree_search::TSOptions opt = mcts_options; + if (puct_override > 0.0) { + logger_->warn( + "PUCT overridden: {} -> {}", opt.alg_opt.c_puct, puct_override); + opt.alg_opt.c_puct = puct_override; + } + if (mcts_rollout_per_batch_override > 0) { + logger_->warn( + "Batch size overridden: {} -> {}", + opt.num_rollouts_per_batch, + mcts_rollout_per_batch_override); + opt.num_rollouts_per_batch = mcts_rollout_per_batch_override; + } + if (mcts_rollout_per_thread_override > 0) { + logger_->warn( + "Rollouts per thread overridden: {} -> {}", + opt.num_rollouts_per_thread, + mcts_rollout_per_thread_override); + opt.num_rollouts_per_thread = mcts_rollout_per_thread_override; + } + if (opt.verbose) { + opt.log_prefix = "ts-game" + std::to_string(_game_idx) + "-mcts"; + logger_->warn("Log prefix {}", opt.log_prefix); + } + + return new MCTSChouFleurAI(opt, [&](int) { return new MCTSActor(client_, params); }); +} + +Coord ChouFleurGameSelfPlay::mcts_make_diverse_move(MCTSChouFleurAI* mcts_go_ai, Coord c) { + auto policy = mcts_go_ai->getMCTSPolicy(); + + /* FIXME I am not sure of what I am doing here... can I just skip this ? + bool diverse_policy = + _state_ext.state().getPly() <= _options.policy_distri_cutoff; + if (diverse_policy) { + // Sample from the policy. + c = policy.sampleAction(&_rng); + if (show_board) { + cout << "Move changed to [" << c << "][" << coord2str(c) << "][" << + coord2str2(c) << "]" << endl; + } + } + if (_options.policy_distri_training_for_all || diverse_policy) { + // [TODO]: Warning: MCTS Policy might not correspond to move idx. + _state_ext.addMCTSPolicy(policy); + } + */ + + return c; +} + +Coord ChouFleurGameSelfPlay::mcts_update_info(MCTSChouFleurAI* mcts_go_ai, Coord c) { + float predicted_value = mcts_go_ai->getValue(); + + _state_ext.addPredictedValue(predicted_value); + + if (!_options.dump_record_prefix.empty()) { + _state_ext.saveCurrentTree(mcts_go_ai->getCurrentTree()); + } + +/* bool we_are_good = _state_ext.state().nextPlayer() == 1 //S_BLACK FIXME S_BLACK==1 + ? ((getScore() > 0) && (predicted_value > 0.9)) + : ((getScore() < 0) && (predicted_value < -0.9)); + // If the opponent wants pass, and we are in good, we follow. + if (_human_player != nullptr && we_are_good && + _state_ext.state().lastMove() == M_PASS && _options.following_pass) + c = M_PASS;*/ + + // Check the ranking of selected move. + if (notifier_ != nullptr) { + notifier_->OnMCTSResult(c, mcts_go_ai->getLastResult()); + } + return c; +} + +void ChouFleurGameSelfPlay::finish_game(FinishReason reason) { + //std::cout << ("client side ---- let us finish the game") << std::endl; + if (!_state_ext.currRequest().vers.is_selfplay() && + _options.cheat_eval_new_model_wins_half) { + reason = FR_CHEAT_NEWER_WINS_HALF; + } + if (_state_ext.currRequest().vers.is_selfplay() && + _options.cheat_selfplay_random_result) { + reason = FR_CHEAT_SELFPLAY_RANDOM_RESULT; + } + + _state_ext.setFinalValue(reason, &_rng); + _state_ext.showFinishInfo(reason); + +/* if (!_options.dump_record_prefix.empty()) { + _state_ext.dumpSgf(); + }*/ + + if (_options.print_result) { + // lock_guard lock(_mutex); + // cout << endl << (final_value > 0 ? "Black" : "White") << " win. Ply: " << + // _state.getPly() << ", Value: " << final_value << ", Predicted: " << + // predicted_value << endl; + } + + // reset tree if MCTS_AI, otherwise just do nothing + _ai->endGame(_state_ext.state()); + if (_ai2 != nullptr) { + _ai2->endGame(_state_ext.state()); + } + + if (notifier_ != nullptr) { + notifier_->OnGameEnd(_state_ext); + } + // clear state, MCTS polices et.al. + _state_ext.restart(); + //std::cout << ("client side ---- let us finish the game END") << std::endl; +} + +void ChouFleurGameSelfPlay::setAsync() { + _ai->setRequiredVersion(-1); + if (_ai2 != nullptr) + _ai2->setRequiredVersion(-1); + + _state_ext.addCurrentModel(); +} + +void ChouFleurGameSelfPlay::restart() { + const MsgRequest& request = _state_ext.currRequest(); + bool async = request.client_ctrl.async; + + _ai.reset(nullptr); + _ai2.reset(nullptr); + if (_options.mode == "selfplay") { + _ai.reset(init_ai( + "actor_black", + request.vers.mcts_opt, + -1.0, + -1, + -1, + async ? -1 : request.vers.black_ver)); + if (request.vers.white_ver >= 0) { + _ai2.reset(init_ai( + "actor_white", + request.vers.mcts_opt, + _state_ext.options().white_puct, + _state_ext.options().white_mcts_rollout_per_batch, + _state_ext.options().white_mcts_rollout_per_thread, + async ? -1 : request.vers.white_ver)); + } + if (!request.vers.is_selfplay() && request.client_ctrl.player_swap) { + // Swap the two pointer. + swap(_ai, _ai2); + } + } else if (_options.mode == "online") { + _ai.reset(init_ai( + "actor_black", + request.vers.mcts_opt, + -1.0, + -1, + -1, + request.vers.black_ver)); + _human_player.reset(new AI(client_, {"human_actor"})); + } else { + logger_->critical("Unknown mode! {}", _options.mode); + throw std::range_error("Unknown mode"); + } + + _state_ext.restart(); + + /*if (!_options.preload_sgf.empty()) { + // Load an SGF file and follow this sgf while playing. + _preload_sgf.load(_options.preload_sgf); + _sgf_iter = _preload_sgf.begin(); + int i = 0; + while (!_sgf_iter.done() && i < _options.preload_sgf_move_to) { + auto curr = _sgf_iter.getCurrMove(); + if (!_state_ext.forward(curr.move)) { + logger_->critical( + "Board: {}; proposed invalid move: {}", + _state_ext.state().showBoard(), + elf::ai::tree_search::ActionTrait::to_string(curr.move)); + throw std::runtime_error("Preload sgf: move not valid!"); + } + i++; + ++_sgf_iter; + } + }*/ +} + +bool ChouFleurGameSelfPlay::OnReceive(const MsgRequest& request, RestartReply* reply) { + if (*reply == RestartReply::UPDATE_COMPLETE) + return false; + //std::cout << ("on the client side --- OnReceive") << std::endl; + bool is_waiting = request.vers.wait(); + bool is_prev_waiting = _state_ext.currRequest().vers.wait(); + + if (_options.verbose && !(is_waiting && is_prev_waiting)) { + logger_->debug( + "Receive request: {}, old: {}", + (!is_waiting ? request.info() : "[wait]"), + (!is_prev_waiting ? _state_ext.currRequest().info() : "[wait]")); + } + + bool same_vers = (request.vers == _state_ext.currRequest().vers); + bool same_player_swap = + (request.client_ctrl.player_swap == + _state_ext.currRequest().client_ctrl.player_swap); + + bool async = request.client_ctrl.async; + + bool no_restart = + (same_vers || async) && same_player_swap && !is_prev_waiting; + + // Then we need to reset everything. + _state_ext.setRequest(request); + + //std::cout << ("on the client side --- OnReceive END") << std::endl; + if (is_waiting) { + *reply = RestartReply::ONLY_WAIT; + return false; + } else { + if (!no_restart) { + restart(); + *reply = RestartReply::UPDATE_MODEL; + return true; + } else { + if (!async) + *reply = RestartReply::UPDATE_REQUEST_ONLY; + else { + setAsync(); + if (same_vers) + *reply = RestartReply::UPDATE_REQUEST_ONLY; + else + *reply = RestartReply::UPDATE_MODEL_ASYNC; + } + return false; + } + } +} + +void ChouFleurGameSelfPlay::act() { + if (_online_counter % 5 == 0) { + using std::placeholders::_1; + using std::placeholders::_2; + auto f = std::bind(&ChouFleurGameSelfPlay::OnReceive, this, _1, _2); + + do { + dispatcher_->checkMessage(_state_ext.currRequest().vers.wait(), f); + } while (_state_ext.currRequest().vers.wait()); + + // Check request every 5 times. + // Update current state. + if (notifier_ != nullptr) { + // std::cout << "Thread[" << _game_idx << ",ply:" << + // _state_ext.state().getPly() + // << "] state updating: " << _state_ext.getThreadState().info() << + // std::endl; + notifier_->OnStateUpdate(_state_ext.getThreadState()); + } + } + _online_counter++; + + bool show_board = (_options.verbose && _context_options.num_games == 1); + const StateForChouFleur& s = _state_ext.state(); + + if (_human_player != nullptr) { + do { + if (s.terminated()) { + finish_game(FR_ILLEGAL); + return; + } + + BoardFeature bf(s); + ChouFleurReply reply(bf); + _human_player->act(bf, &reply); + // skip the current move, and ask the ai to move. + if (reply.c == M_SKIP) + break; + if (reply.c == M_CLEAR) { + if (!_state_ext.state().justStarted()) { //FIXME: presumably I can just skip this. + finish_game(FR_CLEAR); + } + return; + } + + if (reply.c == M_RESIGN) { + finish_game(FR_RESIGN); + return; + } + // Otherwise we forward. + if (_state_ext.forward(reply.c)) { + /* if (_state_ext.state().isTwoPass()) { + // If the human opponent pass, we pass as well. + finish_game(FR_TWO_PASSES); + }*/ + return; + } + logger_->warn("invalid move {}", +// "Invalid move: x = {} y = {} move: {} please try again", +// X(reply.c), +// Y(reply.c), + std::to_string(reply.c)); + } while (!client_->checkPrepareToStop()); + } else { + // If re receive this, then we should not send games anymore + // (otherwise the process never stops) + if (client_->checkPrepareToStop()) { + // [TODO] A lot of hack here. We need to fix it later. + AI ai(client_, {"actor_black"}); + BoardFeature bf(s); + ChouFleurReply reply(bf); + ai.act(bf, &reply); + + if (client_->DoStopGames()) + return; + + AI ai_white(client_, {"actor_white"}); + ai_white.act(bf, &reply); + + elf::FuncsWithState funcs = client_->BindStateToFunctions( + {"game_start"}, &_state_ext.currRequest().vers); + client_->sendWait({"game_start"}, &funcs); + + funcs = client_->BindStateToFunctions({"game_end"}, &_state_ext.state()); + client_->sendWait({"game_end"}, &funcs); + + logger_->info("Received command to prepare to stop"); + std::this_thread::sleep_for(std::chrono::seconds(1)); + return; + } + } + + Stone player = s.nextPlayer(); + + Coord c = M_INVALID; + bool use_dga = + (player == S_WHITE && _options.white_use_dga) || + (player == S_BLACK && _options.black_use_dga); + if (use_dga) { + // we use the heuristic hard-coded in Game.h. + _state_ext.GetState().DoGoodAction(); + } else { + bool use_policy_network_only = + (player == S_WHITE && _options.white_use_policy_network_only) || + (player == S_BLACK && _options.black_use_policy_network_only); + MCTSChouFleurAI* curr_ai = + ((_ai2 != nullptr && player == S_WHITE) ? _ai2.get() : _ai.get()); + + if (use_policy_network_only) { + // Then we only use policy network to move. + curr_ai->actPolicyOnly(s, &c); + } else { + //std::cout << ("client side: choose a move for the current board...") << std::endl; + curr_ai->act(s, &c); + c = mcts_make_diverse_move(curr_ai, c); + //std::cout <<("client side: choose a move for the current board... END") << std::endl; + } + + //std::cout << ("client side: mcts_update_info") << std::endl; + c = mcts_update_info(curr_ai, c); + //std::cout << ("client side: mcts_update_info END") << std::endl; + + if (show_board) { + logger_->info( + "Current board:\n{}\n[{}] Propose move {}\n", + s.showBoard(), + s.getPly(), + elf::ai::tree_search::ActionTrait::to_string(c)); + } + + const bool shouldResign = _state_ext.shouldResign(&_rng); + if (shouldResign && s.getPly() >= 50) { + finish_game(FR_RESIGN); + return; + } + /*if (_preload_sgf.numMoves() > 0) { + if (_sgf_iter.done()) { + finish_game(FR_MAX_STEP); + return; + } + Coord new_c = _sgf_iter.getCurrMove().move; + logger_->info( + "[{}] Move changes from {} to {}", + s.getPly(), + elf::ai::tree_search::ActionTrait::to_string(c), + elf::ai::tree_search::ActionTrait::to_string(new_c)); + c = new_c; + ++_sgf_iter; + }*/ + + if (!_state_ext.forward(c)) { + logger_->error( + "Something is wrong! Move {} cannot be applied\nCurrent board: " + "{}\n[{}] Propose move {}\n", + c, + s.showBoard(), + s.getPly(), + elf::ai::tree_search::ActionTrait::to_string(c)); + return; + } + } + + if (s.terminated()) { + /*auto reason = s.isTwoPass() + ? FR_TWO_PASSES + : s.getPly() >= BOARD_MAX_MOVE ? FR_MAX_STEP : FR_ILLEGAL;*/ + auto reason = + s.getPly() >= 4000 ? FR_MAX_STEP : FR_ILLEGAL; // FIXME FR_MAX_STEP if 4000 steps ? + finish_game(reason); + } + + if (_options.move_cutoff > 0 && s.getPly() >= _options.move_cutoff) { + finish_game(FR_MAX_STEP); + } +} diff --git a/src_cpp/elfgames/tasks/common/game_selfplay.h b/src_cpp/elfgames/tasks/common/game_selfplay.h new file mode 100644 index 0000000..58d15e0 --- /dev/null +++ b/src_cpp/elfgames/tasks/common/game_selfplay.h @@ -0,0 +1,89 @@ +/** + * Copyright (c) 2018-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#include +#include +#include + +#include "elf/base/dispatcher.h" +#include "elf/legacy/python_options_utils_cpp.h" +#include "elf/logging/IndexedLoggerFactory.h" + +#include "../mcts/mcts.h" +//#include "../sgf/sgf.h" +#include "game_base.h" +#include "game_feature.h" +#include "game_stats.h" +#include "notifier.h" + +// Game interface for ChouFleur. +class ChouFleurGameSelfPlay : public ChouFleurGameBase { + public: + using ThreadedDispatcher = elf::ThreadedDispatcherT; + ChouFleurGameSelfPlay( + int game_idx, + elf::GameClient* client, + const ContextOptions& context_options, + const GameOptions& options, + ThreadedDispatcher* dispatcher, + GameNotifierBase* notifier = nullptr); + + void act() override; + bool OnReceive(const MsgRequest& request, RestartReply* reply); + + std::string showBoard() const { + return _state_ext.state().showBoard(); + } + std::string getNextPlayer() const { + return std::to_string(_state_ext.state().nextPlayer()); + } + std::string getLastMove() const { + return "lastmove"; //coord2str2(_state_ext.lastMove()); + } + float getScore() { + return _state_ext.state().evaluate(); //_options.komi); + } + + float getLastScore() const { + return _state_ext.getLastGameFinalValue(); + } + + private: + void setAsync(); + void restart(); + + MCTSChouFleurAI* init_ai( + const std::string& actor_name, + const elf::ai::tree_search::TSOptions& mcts_opt, + float second_puct, + int second_mcts_rollout_per_batch, + int second_mcts_rollout_per_thread, + int64_t model_ver); + Coord mcts_make_diverse_move(MCTSChouFleurAI* curr_ai, Coord c); + Coord mcts_update_info(MCTSChouFleurAI* mcts_go_ai, Coord c); + void finish_game(FinishReason reason); + + private: + ThreadedDispatcher* dispatcher_ = nullptr; + GameNotifierBase* notifier_ = nullptr; + ChouFleurStateExt _state_ext; + + //Sgf _preload_sgf; + //Sgf::iterator _sgf_iter; + + int _online_counter = 0; + + std::unique_ptr _ai; + // Opponent ai (used for selfplay evaluation) + std::unique_ptr _ai2; + std::unique_ptr _human_player; + + std::shared_ptr logger_; +}; diff --git a/src_cpp/elfgames/tasks/common/go_state_ext.cc b/src_cpp/elfgames/tasks/common/go_state_ext.cc new file mode 100644 index 0000000..517e7d0 --- /dev/null +++ b/src_cpp/elfgames/tasks/common/go_state_ext.cc @@ -0,0 +1,127 @@ +/** + * Copyright (c) 2018-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include "go_state_ext.h" + +void replaceAll( + std::string& s, + const std::string& search, + const std::string& replace) { + for (size_t pos = 0;; pos += replace.length()) { + // Locate the substring to replace + pos = s.find(search, pos); + if (pos == std::string::npos) + break; + // Replace by erasing and inserting + s.erase(pos, search.length()); + s.insert(pos, replace); + } +} + +/*std::string ChouFleurStateExt::dumpSgf(const std::string& filename) const { + std::vector moves = _state.getAllMoves(); + + std::stringstream ss; + float value = _state.getFinalValue(); + std::string result; + if (abs(value) == 1.0) { + result = (value > 0.0 ? "B+R" : "W+R"); + } else { + result = + (value > 0.0 ? "B+" + std::to_string(value) + : "W+" + std::to_string(-value)); + } + + std::stringstream ss_overall_comment; + ss_overall_comment << "Filename: " << filename << std::endl; + ss_overall_comment << "Git hash: " << __STR(GIT_COMMIT_HASH) << std::endl; + ss_overall_comment << "Staged: " << __STR(GIT_STAGED) << std::endl; + + ss << "(;SZ[" << BOARD_SIZE << "]RE[" << result + << "]C[" + ss_overall_comment.str() + "]"; + std::string black_name = _options.use_mcts ? "MCTS" : "Policy"; + if (_options.black_use_policy_network_only) + black_name += "(policy only)"; + + bool white_mcts = _options.mode == "selfplay_eval" ? _options.use_mcts_ai2 + : _options.use_mcts; + + std::string white_name = white_mcts ? "MCTS" : "Policy"; + if (_options.white_use_policy_network_only) + white_name += "(policy only)"; + + ss << "PB[" << black_name << "]PW[" << white_name << "]KM[" << _options.komi + << "]"; + + for (size_t i = 0; i < moves.size(); i++) { + std::string color = (i % 2 == 0 ? "B" : "W"); + ss << ";" << color << "[" << coord2str(moves[i]) << "]"; + std::string comments; + comments += std::to_string(i + 1) + ": "; + if (i < _predicted_values.size()) { + comments += "PredV: " + std::to_string(_predicted_values[i]); // + "\n"; + } + if (i < _mcts_policies.size()) { + string mcts_info = _mcts_policies[i].info_packed(coord2str); + replaceAll(mcts_info, "[", "\\["); + replaceAll(mcts_info, "]", "\\]"); + comments += mcts_info; + } + + ss << "C[" << comments << "]"; + } + ss << ")"; + return ss.str(); +}*/ + +void ChouFleurStateExt::showFinishInfo(FinishReason reason) const { + Stone player = _state.nextPlayer(); + std::cout << _state.showBoard() << std::endl; + std::string sgf_record = dumpSgf(""); + std::cout << sgf_record << std::endl; + + std::cout << "[" << _game_idx << ":" << _seq + << "] Current request: " << curr_request_.info() + << ", used_model: "; + for (const auto& i : using_models_) { + std::cout << i << ", "; + } + std::cout << std::endl; + + switch (reason) { + case FR_RESIGN: + std::cout << "Player " << std::to_string(player) << " resigned at " + << _state.getPly() + << " Resign Thres: " << _resign_check.resign_thres; + break; + case FR_MAX_STEP: + std::cout << "Ply: " << _state.getPly() + << " exceeds thread_state.Restarting the game"; + break; + case FR_TWO_PASSES: + std::cout << "Both pass at " << _state.getPly(); + break; + case FR_ILLEGAL: + std::cout << "Illegal move at " << _state.getPly(); + break; + case FR_CLEAR: + std::cout << "Restarting at " << _state.getPly(); + break; + case FR_CHEAT_NEWER_WINS_HALF: + std::cout << "Cheat mode: Version: " << curr_request_.vers.info() + << ", swap: " << curr_request_.client_ctrl.player_swap; + break; + case FR_CHEAT_SELFPLAY_RANDOM_RESULT: + std::cout << "Cheat selfplay mode: Version: " << curr_request_.vers.info() + << ", swap: " << curr_request_.client_ctrl.player_swap; + break; + } + std::cout << ", Value: " << _state.getFinalValue() + << ", Predicted: " << getLastPredictedValue() + << ", ResCheck: " << _resign_check.info() << std::endl; +} diff --git a/src_cpp/elfgames/tasks/common/go_state_ext.h b/src_cpp/elfgames/tasks/common/go_state_ext.h new file mode 100644 index 0000000..bf98140 --- /dev/null +++ b/src_cpp/elfgames/tasks/common/go_state_ext.h @@ -0,0 +1,356 @@ +/** + * Copyright (c) 2018-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#define UNUSED(expr) do { (void)(expr); } while (0) + +#include +#include +#include +#include +#include +#include "../base/go_state.h" +#include "game_utils.h" +#include "go_game_specific.h" +#include "../Game.h" +#include "record.h" + +#include "elf/ai/tree_search/tree_search_base.h" + +enum FinishReason { + FR_RESIGN = 0, + FR_TWO_PASSES, + FR_MAX_STEP, + FR_CLEAR, + FR_ILLEGAL, + FR_CHEAT_NEWER_WINS_HALF, + FR_CHEAT_SELFPLAY_RANDOM_RESULT, +}; + +struct ChouFleurStateExt { + public: + ChouFleurStateExt(int game_idx, const GameOptions& options) + : _game_idx(game_idx), + _last_move_for_the_game(M_INVALID), + _last_value(0.0), + _resign_check(options.resign_thres, options.resign_prob_never), + _options(options) { + restart(); + } + + std::string dumpSgf(const std::string& /*filename*/) const { +// void dumpSgf() const { + /* + std::string filename = _options.dump_record_prefix + "_" + + std::to_string(_game_idx) + "_" + std::to_string(_seq) + "_" + + (_state.getFinalValue() > 0 ? "B" : "W") + ".sgf"; + std::string sgf_record = dumpSgf(filename); + std::ofstream oo(filename); + oo << sgf_record << std::endl;*/ + return std::string("dumpSgf not implemented in ChouFleur"); + } + // void dumpSgf() const {} + void setRequest(const MsgRequest& request) { + curr_request_ = request; + + const auto& ctrl = request.client_ctrl; + + _resign_check.resign_thres = + (ctrl.black_resign_thres + ctrl.white_resign_thres) / 2.0; + _resign_check.never_resign_ratio = ctrl.never_resign_prob; + } + + void addCurrentModel() { + if (curr_request_.vers.black_ver >= 0) + using_models_.insert(curr_request_.vers.black_ver); + if (curr_request_.vers.white_ver >= 0) + using_models_.insert(curr_request_.vers.white_ver); + } + + const MsgRequest& currRequest() const { + return curr_request_; + } + + float setFinalValue(FinishReason reason, std::mt19937* rng) { + UNUSED(reason); + UNUSED(rng); + if (_state.GetStatus() == 3) { return -1.; }; // -1 means that black wins. FIXME + if (_state.GetStatus() == 4) { return 1.; }; // 1 means that white wins. + return 0.; /* + float final_value = 0.0; + _last_move_for_the_game = _state.lastMove(); + + if (reason == FR_RESIGN) { + final_value = _state.nextPlayer() == S_WHITE ? 1.0 : -1.0; + _last_move_for_the_game = M_RESIGN; + } else if ( + reason == FR_CHEAT_NEWER_WINS_HALF && + !curr_request_.vers.is_selfplay()) { + auto h = std::hash{}( + std::to_string(curr_request_.vers.black_ver)) ^ + std::hash{}( + std::to_string(curr_request_.vers.white_ver)); + final_value = h % 2 == 0 ? 1.0 : -1.0; + if (curr_request_.client_ctrl.player_swap) + final_value = -final_value; + } else if ( + reason == FR_CHEAT_SELFPLAY_RANDOM_RESULT && + curr_request_.vers.is_selfplay()) { + final_value = ((*rng)() % 2 == 0 ? 1.0 : -1.0); + } else { + final_value = _state.evaluate(_options.komi); + } + _state.setFinalValue(final_value); + return final_value;*/ + } + + /*Coord lastMove() const { + if (_state.justStarted()) + return _last_move_for_the_game; + else + return _state.lastMove(); + }*/ + + void restart() { + /*_last_value = _state.getFinalValue(); + _state.reset(); + _mcts_policies.clear(); + _predicted_values.clear(); + + using_models_.clear(); + + _resign_check.reset(); + _seq++; + + addCurrentModel();*/ + _state.Initialize(); + } + + Record dumpRecord() const { + Record r; + + r.timestamp = elf_utils::sec_since_epoch_from_now(); + r.thread_id = _game_idx; + r.seq = _seq; + r.request = curr_request_; + + //r.result.reward = _state.getFinalValue(); + if (_state.GetStatus() == 3) { + r.result.content = "black wins"; + r.result.reward = -1; + } else { + if (_state.GetStatus() == 4) { + r.result.content = "white wins"; + r.result.reward = 1; + } else { + if (_state.GetStatus() == 2) { + r.result.content = "draw"; + r.result.reward = 0; + } else { + r.result.content = "in progress"; + r.result.reward = 0; + } + } + } + //r.result.content = _state.GetStatus() == 3 ? "black wins" : "white wins"; //coords2sgfstr(_state.getAllMoves()); + r.result.black_never_resign = _resign_check.never_resign; + r.result.white_never_resign = _resign_check.never_resign; + r.result.using_models = + std::vector(using_models_.begin(), using_models_.end()); + r.result.policies = _mcts_policies; + r.result.num_move = -1; //_state.getPly() - 1; + r.result.values = _predicted_values; + + return r; + } + + ThreadState getThreadState() const { + ThreadState s; + s.thread_id = _game_idx; + s.seq = _seq; + s.move_idx = -1;//_state.getPly() - 1; + s.black = curr_request_.vers.black_ver; + s.white = curr_request_.vers.white_ver; + return s; + } + void saveCurrentTree(const std::string& tree_info) const { + // Dump the tree as well. + std::string filename = _options.dump_record_prefix + "_" + + std::to_string(_game_idx) + "_" + std::to_string(_seq) + "_" + + std::to_string(_state.getPly()) + ".tree"; + std::ofstream oo(filename); + oo << _state.showBoard() << std::endl; + oo << tree_info; + } + + float getLastGameFinalValue() const { + return _last_value; + } + + void addMCTSPolicy( + const elf::ai::tree_search::MCTSPolicy& mcts_policy) { + const auto& policy = mcts_policy.policy; + + // First find the max value + float max_val = 0.0; + for (size_t k = 0; k < policy.size(); k++) { + const auto& entry = policy[k]; + max_val = std::max(max_val, entry.second); + } + + _mcts_policies.emplace_back(); + std::fill( + _mcts_policies.back().prob, + _mcts_policies.back().prob + StateForChouFleurNumActions, + 0); + for (size_t k = 0; k < policy.size(); k++) { + const auto& entry = policy[k]; + unsigned char c = + static_cast(entry.second / max_val * 255); + _mcts_policies.back().prob[entry.first] = c; + } + } + + void addPredictedValue(float predicted_value) { + _predicted_values.push_back(predicted_value); + } + + float getLastPredictedValue() const { + if (_predicted_values.empty()) + return 0.0; + else + return _predicted_values.back(); + } + + bool shouldResign(std::mt19937* rng) { + // Run it after addPredictedValue + float predicted_value = getLastPredictedValue(); + Stone player = _state.nextPlayer(); + return ( + player == S_BLACK ? _resign_check.check(predicted_value, rng) + : _resign_check.check(-predicted_value, rng)); + } + + void showFinishInfo(FinishReason reason) const; + + bool forward(Coord c) { + return _state.forward(c); + } + + StateForChouFleur& GetState() { + return _state; + } + const StateForChouFleur& state() const { + return _state; + } + int seq() const { + return _seq; + } + + bool finished() const { + return _options.num_games_per_thread > 0 && + _seq >= _options.num_games_per_thread; + } + + const GameOptions& options() const { + return _options; + } + + protected: + const int _game_idx; + int _seq = 0; + + StateForChouFleur _state; + Coord _last_move_for_the_game; + + MsgRequest curr_request_; + std::set using_models_; + + float _last_value; + + ResignCheck _resign_check; + GameOptions _options; + + std::vector _mcts_policies; + std::vector _predicted_values; +}; + +class ChouFleurStateExtOffline { + public: + friend class ChouFleurFeature; + + ChouFleurStateExtOffline(int game_idx, const GameOptions& options) + : _game_idx(game_idx), _bf(_state), _options(options) {} + + void fromRecord(const Record& r) { + // std::cout << "Convert to moves: " << r.content << std::endl; + // _offline_all_moves = sgfstr2coords(r.result.content); + _offline_winner = r.result.reward > 0 ? 1.0 : -1.0; + // std::cout << "Convert complete, #move = " << moves.size() << std::endl; + + _mcts_policies = r.result.policies; + curr_request_ = r.request; + _seq = r.seq; + _predicted_values = r.result.values; + _state.Initialize(); + } + + bool switchRandomMove(std::mt19937* rng) { + // Random sample one move + if ((int)_offline_all_moves.size() <= _options.num_future_actions - 1) { + std::cout << "[" << _game_idx << "] #moves " << _offline_all_moves.size() + << " smaller than " << _options.num_future_actions << " - 1" + << std::endl; + return false; + } + size_t move_to = (*rng)() % + (_offline_all_moves.size() - _options.num_future_actions + 1); + switchBeforeMove(move_to); + return true; + } + + /* void generateD4Code(std::mt19937* rng) { + _bf.setD4Code((*rng)() % 8); + }*/ + + void switchBeforeMove(size_t move_to) { + assert(move_to < _offline_all_moves.size()); + + _state.reset(); + for (size_t i = 0; i < move_to; ++i) { + _state.forward(_offline_all_moves[i]); + } + } + + int getNumMoves() const { + return _offline_all_moves.size(); + } + + float getPredictedValue(int move_idx) const { + return _predicted_values[move_idx]; + } + private: + const int _game_idx; +// public: // FIXME this is public just because I am deadly tired right now... + StateForChouFleur _state; + BoardFeature _bf; + protected: + GameOptions _options; + + int _seq; + MsgRequest curr_request_; + + std::vector _offline_all_moves; + public: + float _offline_winner; + + + std::vector _mcts_policies; + std::vector _predicted_values; +}; diff --git a/src_cpp/elfgames/tasks/elf2codingenv/include/fakemysql.h b/src_cpp/elfgames/tasks/elf2codingenv/include/fakemysql.h new file mode 100644 index 0000000..24cfe0b --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/include/fakemysql.h @@ -0,0 +1,337 @@ +/* + * fakemysql.h -- + * + * Fake definitions of the MySQL API sufficient to build tdbc::mysql + * without having an MySQL installation on the build system. This file + * comprises only data type, constant and function definitions. + * + * The programmers of this file believe that it contains material not + * subject to copyright under the doctrines of scenes a faire and + * of merger of idea and expression. Accordingly, this file is in the + * public domain. + * + *----------------------------------------------------------------------------- + */ + +#ifndef FAKEMYSQL_H_INCLUDED +#define FAKEMYSQL_H_INCLUDED + +#include + +#ifndef MODULE_SCOPE +#define MODULE_SCOPE extern +#endif + +MODULE_SCOPE Tcl_LoadHandle MysqlInitStubs(Tcl_Interp*); + +#ifdef _WIN32 +#define STDCALL __stdcall +#else +#define STDCALL /* nothing */ +#endif + +enum enum_field_types { + MYSQL_TYPE_DECIMAL = 0, + MYSQL_TYPE_TINY = 1, + MYSQL_TYPE_SHORT = 2, + MYSQL_TYPE_LONG = 3, + MYSQL_TYPE_FLOAT = 4, + MYSQL_TYPE_DOUBLE = 5, + MYSQL_TYPE_NULL = 6, + MYSQL_TYPE_TIMESTAMP = 7, + MYSQL_TYPE_LONGLONG = 8, + MYSQL_TYPE_INT24 = 9, + MYSQL_TYPE_DATE = 10, + MYSQL_TYPE_TIME = 11, + MYSQL_TYPE_DATETIME = 12, + MYSQL_TYPE_YEAR = 13, + MYSQL_TYPE_NEWDATE = 14, + MYSQL_TYPE_VARCHAR = 15, + MYSQL_TYPE_BIT = 16, + MYSQL_TYPE_NEWDECIMAL = 246, + MYSQL_TYPE_ENUM = 247, + MYSQL_TYPE_SET = 248, + MYSQL_TYPE_TINY_BLOB = 249, + MYSQL_TYPE_MEDIUM_BLOB = 250, + MYSQL_TYPE_LONG_BLOB = 251, + MYSQL_TYPE_BLOB = 252, + MYSQL_TYPE_VAR_STRING = 253, + MYSQL_TYPE_STRING = 254, + MYSQL_TYPE_GEOMETRY = 255 +}; + +enum mysql_option { + MYSQL_SET_CHARSET_NAME = 7, +}; + +enum mysql_status { + MYSQL_STATUS_READY = 0, +}; + +#define CLIENT_COMPRESS 32 +#define CLIENT_INTERACTIVE 1024 +#define MYSQL_DATA_TRUNCATED 101 +#define MYSQL_ERRMSG_SIZE 512 +#define MYSQL_NO_DATA 100 +#define SCRAMBLE_LENGTH 20 +#define SQLSTATE_LENGTH 5 + +typedef struct st_list LIST; +typedef struct st_mem_root MEM_ROOT; +typedef struct st_mysql MYSQL; +typedef struct st_mysql_bind MYSQL_BIND; +typedef struct st_mysql_field MYSQL_FIELD; +typedef struct st_mysql_res MYSQL_RES; +typedef char** MYSQL_ROW; +typedef struct st_mysql_stmt MYSQL_STMT; +typedef char my_bool; +#ifndef Socket_defined +typedef int my_socket; +#define INVALID_SOCKET -1 +#endif +typedef Tcl_WideUInt my_ulonglong; +typedef struct st_net NET; +typedef struct st_used_mem USED_MEM; +typedef struct st_vio Vio; + +struct st_mem_root { + USED_MEM* free; + USED_MEM* used; + USED_MEM* pre_alloc; + size_t min_malloc; + size_t block_size; + unsigned int block_num; + unsigned int first_block_usage; + void (*error_handler)(void); +}; + +struct st_mysql_options { + unsigned int connect_timeout; + unsigned int read_timeout; + unsigned int write_timeout; + unsigned int port; + unsigned int protocol; + unsigned long client_flag; + char* host; + char* user; + char* password; + char* unix_socket; + char* db; + struct st_dynamic_array* init_commands; + char* my_cnf_file; + char* my_cnf_group; + char* charset_dir; + char* charset_name; + char* ssl_key; + char* ssl_cert; + char* ssl_ca; + char* ssl_capath; + char* ssl_cipher; + char* shared_memory_base_name; + unsigned long max_allowed_packet; + my_bool use_ssl; + my_bool compress, named_pipe; + my_bool rpl_probe; + my_bool rpl_parse; + my_bool no_master_reads; +#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY) + my_bool separate_thread; +#endif + enum mysql_option methods_to_use; + char* client_ip; + my_bool secure_auth; + my_bool report_data_truncation; + int (*local_infile_init)(void**, const char*, void*); + int (*local_infile_read)(void*, char*, unsigned int); + void (*local_infile_end)(void*); + int (*local_infile_error)(void*, char*, unsigned int); + void* local_infile_userdata; + void* extension; +}; + +struct st_net { +#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY) + Vio* vio; + unsigned char* buff; + unsigned char* buff_end; + unsigned char* write_pos; + unsigned char* read_pos; + my_socket fd; + unsigned long remain_in_buf; + unsigned long length; + unsigned long buf_length; + unsigned long where_b; + unsigned long max_packet; + unsigned long max_packet_size; + unsigned int pkt_nr; + unsigned int compress_pkt_nr; + unsigned int write_timeout; + unsigned int read_timeout; + unsigned int retry_count; + int fcntl; + unsigned int* return_status; + unsigned char reading_or_writing; + char save_char; + my_bool unused0; + my_bool unused; + my_bool compress; + my_bool unused1; +#endif + unsigned char* query_cache_query; + unsigned int last_errno; + unsigned char error; + my_bool unused2; + my_bool return_errno; + char last_error[MYSQL_ERRMSG_SIZE]; + char sqlstate[SQLSTATE_LENGTH + 1]; + void* extension; +#if defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY) + my_bool skip_big_packet; +#endif +}; + +/* + * st_mysql differs between 5.0 and 5.1, but the 5.0 version is a + * strict subset, we don't use any of the 5.1 fields, and we don't + * ever allocate the structure ourselves. + */ + +struct st_mysql { + NET net; + unsigned char* connector_fd; + char* host; + char* user; + char* passwd; + char* unix_socket; + char* server_version; + char* host_info; + char* info; + char* db; + struct charset_info_st* charset; + MYSQL_FIELD* fields; + MEM_ROOT field_alloc; + my_ulonglong affected_rows; + my_ulonglong insert_id; + my_ulonglong extra_info; + unsigned long thread_id; + unsigned long packet_length; + unsigned int port; + unsigned long client_flag; + unsigned long server_capabilities; + unsigned int protocol_version; + unsigned int field_count; + unsigned int server_status; + unsigned int server_language; + unsigned int warning_count; + struct st_mysql_options options; + enum mysql_status status; + my_bool free_me; + my_bool reconnect; + char scramble[SCRAMBLE_LENGTH + 1]; + my_bool rpl_pivot; + struct st_mysql* master; + struct st_mysql* next_slave; + struct st_mysql* last_used_slave; + struct st_mysql* last_used_con; + LIST* stmts; + const struct st_mysql_methods* methods; + void* thd; + my_bool* unbuffered_fetch_owner; + char* info_buffer; +}; + +/* + * There are different version of the MYSQL_BIND structure before and after + * MySQL 5.1. We go after the fields of the structure using accessor functions + * so that the code in this file is compatible with both versions. + */ + +struct st_mysql_bind_51 { /* Post-5.1 */ + unsigned long* length; + my_bool* is_null; + void* buffer; + my_bool* error; + unsigned char* row_ptr; + void (*store_param_func)(NET* net, MYSQL_BIND* param); + void (*fetch_result)(MYSQL_BIND*, MYSQL_FIELD*, unsigned char**); + void (*skip_result)(MYSQL_BIND*, MYSQL_FIELD*, unsigned char**); + unsigned long buffer_length; + unsigned long offset; + unsigned long length_value; + unsigned int param_number; + unsigned int pack_length; + enum enum_field_types buffer_type; + my_bool error_value; + my_bool is_unsigned; + my_bool long_data_used; + my_bool is_null_value; + void* extension; +}; + +struct st_mysql_bind_50 { /* Pre-5.1 */ + unsigned long* length; + my_bool* is_null; + void* buffer; + my_bool* error; + enum enum_field_types buffer_type; + unsigned long buffer_length; + unsigned char* row_ptr; + unsigned long offset; + unsigned long length_value; + unsigned int param_number; + unsigned int pack_length; + my_bool error_value; + my_bool is_unsigned; + my_bool long_data_used; + my_bool is_null_value; + void (*store_param_func)(NET* net, MYSQL_BIND* param); + void (*fetch_result)(MYSQL_BIND*, MYSQL_FIELD*, unsigned char**); + void (*skip_result)(MYSQL_BIND*, MYSQL_FIELD*, unsigned char**); +}; + +/* + * There are also different versions of the MYSQL_FIELD structure; fortunately, + * the 5.1 version is a strict extension of the 5.0 version. + */ + +struct st_mysql_field { + char* name; + char* org_name; + char* table; + char* org_table; + char* db; + char* catalog; + char* def; + unsigned long length; + unsigned long max_length; + unsigned int name_length; + unsigned int org_name_length; + unsigned int table_length; + unsigned int org_table_length; + unsigned int db_length; + unsigned int catalog_length; + unsigned int def_length; + unsigned int flags; + unsigned int decimals; + unsigned int charsetnr; + enum enum_field_types type; +}; +struct st_mysql_field_50 { + struct st_mysql_field field; +}; +struct st_mysql_field_51 { + struct st_mysql_field field; + void* extension; +}; +#define NOT_NULL_FLAG 1 + +#define IS_NUM(t) \ + ((t) <= MYSQL_TYPE_INT24 || (t) == MYSQL_TYPE_YEAR || \ + (t) == MYSQL_TYPE_NEWDECIMAL) + +#define mysql_library_init mysql_server_init +#define mysql_library_end mysql_server_end + +#include "mysqlStubs.h" + +#endif /* not FAKEMYSQL_H_INCLUDED */ diff --git a/src_cpp/elfgames/tasks/elf2codingenv/include/fakepq.h b/src_cpp/elfgames/tasks/elf2codingenv/include/fakepq.h new file mode 100644 index 0000000..a405896 --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/include/fakepq.h @@ -0,0 +1,46 @@ +/* + * fakepq.h -- + * + * Minimal replacement for 'pq-fe.h' in the PostgreSQL client + * without having a PostgreSQL installation on the build system. + * This file comprises only data type, constant and function definitions. + * + * The programmers of this file believe that it contains material not + * subject to copyright under the doctrines of scenes a faire and + * of merger of idea and expression. Accordingly, this file is in the + * public domain. + * + *----------------------------------------------------------------------------- + */ + +#ifndef FAKEPQ_H_INCLUDED +#define FAKEPQ_H_INCLUDED + +#ifndef MODULE_SCOPE +#define MODULE_SCOPE extern +#endif + +MODULE_SCOPE Tcl_LoadHandle PostgresqlInitStubs(Tcl_Interp*); + +typedef enum { + CONNECTION_OK = 0, +} ConnStatusType; +typedef enum { + PGRES_EMPTY_QUERY = 0, + PGRES_BAD_RESPONSE = 5, + PGRES_NONFATAL_ERROR = 6, + PGRES_FATAL_ERROR = 7, +} ExecStatusType; +typedef unsigned int Oid; +typedef struct pg_conn PGconn; +typedef struct pg_result PGresult; +typedef void (*PQnoticeProcessor)(void*, const PGresult*); + +#define PG_DIAG_SQLSTATE 'C' +#define PG_DIAG_MESSAGE_PRIMARY 'M' + +#include "pqStubs.h" + +MODULE_SCOPE const pqStubDefs* pqStubs; + +#endif diff --git a/src_cpp/elfgames/tasks/elf2codingenv/include/fakesql.h b/src_cpp/elfgames/tasks/elf2codingenv/include/fakesql.h new file mode 100644 index 0000000..dabf0fd --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/include/fakesql.h @@ -0,0 +1,276 @@ +/* + * fakesql.h -- + * + * Include file that defines the subset of SQL/CLI that TDBC + * uses, so that tdbc::odbc can build without an explicit ODBC + * dependency. It comprises only data type, constant and + * function declarations. + * + * The programmers of this file believe that it contains material not + * subject to copyright under the doctrines of scenes a faire and + * of merger of idea and expression. Accordingly, this file is in the + * public domain. + * + *----------------------------------------------------------------------------- + */ + +#ifndef FAKESQL_H_INCLUDED +#define FAKESQL_H_INCLUDED + +#include + +#ifndef MODULE_SCOPE +#define MODULE_SCOPE extern +#endif + +/* Limits */ + +#define SQL_MAX_DSN_LENGTH 32 +#define SQL_MAX_MESSAGE_LENGTH 512 + +/* Fundamental data types */ + +#ifndef _WIN32 +typedef int BOOL; +typedef unsigned int DWORD; +typedef void* HANDLE; +typedef HANDLE HWND; +typedef unsigned short WCHAR; +typedef char* LPSTR; +typedef WCHAR* LPWSTR; +typedef const char* LPCSTR; +typedef const WCHAR* LPCWSTR; +typedef unsigned short WORD; +#endif +typedef void* PVOID; +typedef short RETCODE; +typedef long SDWORD; +typedef short SWORD; +typedef unsigned short USHORT; +typedef USHORT UWORD; + +/* ODBC data types */ + +typedef Tcl_WideInt SQLBIGINT; +typedef unsigned char SQLCHAR; +typedef double SQLDOUBLE; +typedef void* SQLHANDLE; +typedef SDWORD SQLINTEGER; +typedef PVOID SQLPOINTER; +typedef SWORD SQLSMALLINT; +typedef Tcl_WideUInt SQLUBIGINT; +typedef unsigned char SQLUCHAR; +typedef unsigned int SQLUINTEGER; +typedef UWORD SQLUSMALLINT; +typedef WCHAR SQLWCHAR; + +typedef SQLSMALLINT SQLRETURN; + +/* TODO - Check how the SQLLEN and SQLULEN types are handled on + * 64-bit Unix. */ + +#if defined(__WIN64) +typedef Tcl_WideInt SQLLEN; +typedef Tcl_WideUInt SQLULEN; +#else +typedef SQLINTEGER SQLLEN; +typedef SQLUINTEGER SQLULEN; +#endif + +/* Handle types */ + +typedef SQLHANDLE SQLHENV; +typedef SQLHANDLE SQLHDBC; +typedef SQLHANDLE SQLHSTMT; +typedef HWND SQLHWND; + +#define SQL_HANDLE_DBC 2 +#define SQL_HANDLE_ENV 1 +#define SQL_HANDLE_STMT 3 + +/* Null handles */ + +#define SQL_NULL_HANDLE ((SQLHANDLE)0) +#define SQL_NULL_HENV ((SQLHENV)0) +#define SQL_NULL_HSTMT ((SQLHSTMT)0) + +/* SQL data types */ + +enum _SQL_DATATYPE { + SQL_BIGINT = -5, + SQL_BINARY = -2, + SQL_BIT = -7, + SQL_CHAR = 1, + SQL_DATE = 9, + SQL_DECIMAL = 3, + SQL_DOUBLE = 8, + SQL_FLOAT = 6, + SQL_INTEGER = 4, + SQL_LONGVARBINARY = -4, + SQL_LONGVARCHAR = -1, + SQL_NUMERIC = 2, + SQL_REAL = 7, + SQL_SMALLINT = 5, + SQL_TIME = 10, + SQL_TIMESTAMP = 11, + SQL_TINYINT = -6, + SQL_VARBINARY = -3, + SQL_VARCHAR = 12, + SQL_WCHAR = -8, + SQL_WVARCHAR = -9, + SQL_WLONGVARCHAR = -10, +}; + +/* C data types */ + +#define SQL_SIGNED_OFFSET (-20) + +#define SQL_C_BINARY SQL_BINARY +#define SQL_C_CHAR SQL_CHAR +#define SQL_C_DOUBLE SQL_DOUBLE +#define SQL_C_LONG SQL_INTEGER +#define SQL_C_SBIGINT SQL_BIGINT + SQL_SIGNED_OFFSET +#define SQL_C_SLONG SQL_INTEGER + SQL_SIGNED_OFFSET +#define SQL_C_WCHAR SQL_WCHAR + +/* Parameter transmission diretions */ + +#define SQL_PARAM_INPUT 1 + +/* Status returns */ + +#define SQL_ERROR (-1) +#define SQL_NO_DATA 100 +#define SQL_NO_TOTAL (-4) +#define SQL_SUCCESS 0 +#define SQL_SUCCESS_WITH_INFO 1 + +/* Diagnostic fields */ + +enum _SQL_DIAG { + SQL_DIAG_SQLSTATE = 4, +}; + +/* Transaction isolation levels */ + +#define SQL_TXN_READ_COMMITTED 2 +#define SQL_TXN_READ_UNCOMMITTED 1 +#define SQL_TXN_REPEATABLE_READ 4 +#define SQL_TXN_SERIALIZABLE 8 + +/* Access modes */ + +#define SQL_MODE_READ_ONLY 1UL +#define SQL_MODE_READ_WRITE 0UL + +/* ODBC properties */ + +#define SQL_ACCESS_MODE 101 +#define SQL_AUTOCOMMIT 102 +#define SQL_TXN_ISOLATION 108 + +/* ODBC attributes */ + +#define SQL_ATTR_ACCESS_MODE SQL_ACCESS_MODE +#define SQL_ATTR_CONNECTION_TIMEOUT 113 +#define SQL_ATTR_ODBC_VERSION 200 +#define SQL_ATTR_TXN_ISOLATION SQL_TXN_ISOLATION + +/* Nullable? */ + +#define SQL_NULLABLE_UNKNOWN 2 + +/* Placeholder for length of missing data */ + +#define SQL_NULL_DATA (-1) + +/* ODBC versions */ + +#define SQL_OV_ODBC3 3UL + +/* SQLDriverConnect flags */ + +#define SQL_DRIVER_COMPLETE_REQUIRED 3 +#define SQL_DRIVER_NOPROMPT 0 + +/* SQLGetTypeInfo flags */ + +#define SQL_ALL_TYPES 0 + +/* Transaction actions */ + +#define SQL_COMMIT 0 +#define SQL_ROLLBACK 1 + +/* Data source fetch flags */ + +#define SQL_FETCH_FIRST 2 +#define SQL_FETCH_FIRST_SYSTEM 32 +#define SQL_FETCH_FIRST_USER 31 +#define SQL_FETCH_NEXT 1 + +/* ODBCINST actions */ + +#define ODBC_ADD_DSN 1 +#define ODBC_CONFIG_DSN 2 +#define ODBC_REMOVE_DSN 3 +#define ODBC_ADD_SYS_DSN 4 +#define ODBC_CONFIG_SYS_DSN 5 +#define ODBC_REMOVE_SYS_DSN 6 + +/* ODBCINST errors */ + +#define ODBC_ERROR_GENERAL_ERR 1 +#define ODBC_ERROR_INVALID_BUFF_LEN 2 +#define ODBC_ERROR_INVALID_HWND 3 +#define ODBC_ERROR_INVALID_STR 4 +#define ODBC_ERROR_INVALID_REQUEST_TYPE 5 +#define ODBC_ERROR_COMPONENT_NOT_FOUND 6 +#define ODBC_ERROR_INVALID_NAME 7 +#define ODBC_ERROR_INVALID_KEYWORD_VALUE 8 +#define ODBC_ERROR_INVALID_DSN 9 +#define ODBC_ERROR_INVALID_INF 10 +#define ODBC_ERROR_REQUEST_FAILED 11 +#define ODBC_ERROR_INVALID_PATH 12 +#define ODBC_ERROR_LOAD_LIB_FAILED 13 +#define ODBC_ERROR_INVALID_PARAM_SEQUENCE 14 +#define ODBC_ERROR_INVALID_LOG_FILE 15 +#define ODBC_ERROR_USER_CANCELED 16 +#define ODBC_ERROR_USAGE_UPDATE_FAILED 17 +#define ODBC_ERROR_CREATE_DSN_FAILED 18 +#define ODBC_ERROR_WRITING_SYSINFO_FAILED 19 +#define ODBC_ERROR_REMOVE_DSN_FAILED 20 +#define ODBC_ERROR_OUT_OF_MEM 21 +#define ODBC_ERROR_OUTPUT_STRING_TRUNCATED 22 + +/* ODBC client library entry points */ + +#ifdef _WIN32 +#define SQL_API __stdcall +#define INSTAPI __stdcall +#else +#define SQL_API /* nothing */ +#define INSTAPI /* nothing */ +#endif + +#include "odbcStubs.h" +MODULE_SCOPE const odbcStubDefs* odbcStubs; + +/* + * Additional entry points in ODBCINST - all of these are optional + * and resolved with Tcl_FindSymbol, not directly in Tcl_LoadLibrary. + */ + +MODULE_SCOPE BOOL(INSTAPI* SQLConfigDataSourceW)(HWND, WORD, LPCWSTR, LPCWSTR); +MODULE_SCOPE BOOL(INSTAPI* SQLConfigDataSource)(HWND, WORD, LPCSTR, LPCSTR); +MODULE_SCOPE BOOL( + INSTAPI* SQLInstallerErrorW)(WORD, DWORD*, LPWSTR, WORD, WORD*); +MODULE_SCOPE BOOL(INSTAPI* SQLInstallerError)(WORD, DWORD*, LPSTR, WORD, WORD*); + +/* + * Function that initialises the stubs + */ + +MODULE_SCOPE Tcl_LoadHandle OdbcInitStubs(Tcl_Interp*, Tcl_LoadHandle*); + +#endif diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/__future__.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/__future__.py new file mode 100644 index 0000000..b12b4c0 --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/__future__.py @@ -0,0 +1,143 @@ +"""Record of phased-in incompatible language changes. + +Each line is of the form: + + FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease "," + CompilerFlag ")" + +where, normally, OptionalRelease < MandatoryRelease, and both are 5-tuples +of the same form as sys.version_info: + + (PY_MAJOR_VERSION, # the 2 in 2.1.0a3; an int + PY_MINOR_VERSION, # the 1; an int + PY_MICRO_VERSION, # the 0; an int + PY_RELEASE_LEVEL, # "alpha", "beta", "candidate" or "final"; string + PY_RELEASE_SERIAL # the 3; an int + ) + +OptionalRelease records the first release in which + + from __future__ import FeatureName + +was accepted. + +In the case of MandatoryReleases that have not yet occurred, +MandatoryRelease predicts the release in which the feature will become part +of the language. + +Else MandatoryRelease records when the feature became part of the language; +in releases at or after that, modules no longer need + + from __future__ import FeatureName + +to use the feature in question, but may continue to use such imports. + +MandatoryRelease may also be None, meaning that a planned feature got +dropped. + +Instances of class _Feature have two corresponding methods, +.getOptionalRelease() and .getMandatoryRelease(). + +CompilerFlag is the (bitfield) flag that should be passed in the fourth +argument to the builtin function compile() to enable the feature in +dynamically compiled code. This flag is stored in the .compiler_flag +attribute on _Future instances. These values must match the appropriate +#defines of CO_xxx flags in Include/compile.h. + +No feature line is ever to be deleted from this file. +""" + +all_feature_names = [ + "nested_scopes", + "generators", + "division", + "absolute_import", + "with_statement", + "print_function", + "unicode_literals", + "barry_as_FLUFL", + "generator_stop", +] + +__all__ = ["all_feature_names"] + all_feature_names + +# The CO_xxx symbols are defined here under the same names used by +# compile.h, so that an editor search will find them here. However, +# they're not exported in __all__, because they don't really belong to +# this module. +CO_NESTED = 0x0010 # nested_scopes +CO_GENERATOR_ALLOWED = 0 # generators (obsolete, was 0x1000) +CO_FUTURE_DIVISION = 0x2000 # division +CO_FUTURE_ABSOLUTE_IMPORT = 0x4000 # perform absolute imports by default +CO_FUTURE_WITH_STATEMENT = 0x8000 # with statement +CO_FUTURE_PRINT_FUNCTION = 0x10000 # print function +CO_FUTURE_UNICODE_LITERALS = 0x20000 # unicode string literals +CO_FUTURE_BARRY_AS_BDFL = 0x40000 +# StopIteration becomes RuntimeError in generators +CO_FUTURE_GENERATOR_STOP = 0x80000 + + +class _Feature: + def __init__(self, optionalRelease, mandatoryRelease, compiler_flag): + self.optional = optionalRelease + self.mandatory = mandatoryRelease + self.compiler_flag = compiler_flag + + def getOptionalRelease(self): + """Return first release in which this feature was recognized. + + This is a 5-tuple, of the same form as sys.version_info. + """ + + return self.optional + + def getMandatoryRelease(self): + """Return release in which this feature will become mandatory. + + This is a 5-tuple, of the same form as sys.version_info, or, if + the feature was dropped, is None. + """ + + return self.mandatory + + def __repr__(self): + return "_Feature" + repr((self.optional, + self.mandatory, + self.compiler_flag)) + + +nested_scopes = _Feature((2, 1, 0, "beta", 1), + (2, 2, 0, "alpha", 0), + CO_NESTED) + +generators = _Feature((2, 2, 0, "alpha", 1), + (2, 3, 0, "final", 0), + CO_GENERATOR_ALLOWED) + +division = _Feature((2, 2, 0, "alpha", 2), + (3, 0, 0, "alpha", 0), + CO_FUTURE_DIVISION) + +absolute_import = _Feature((2, 5, 0, "alpha", 1), + (3, 0, 0, "alpha", 0), + CO_FUTURE_ABSOLUTE_IMPORT) + +with_statement = _Feature((2, 5, 0, "alpha", 1), + (2, 6, 0, "alpha", 0), + CO_FUTURE_WITH_STATEMENT) + +print_function = _Feature((2, 6, 0, "alpha", 2), + (3, 0, 0, "alpha", 0), + CO_FUTURE_PRINT_FUNCTION) + +unicode_literals = _Feature((2, 6, 0, "alpha", 2), + (3, 0, 0, "alpha", 0), + CO_FUTURE_UNICODE_LITERALS) + +barry_as_FLUFL = _Feature((3, 1, 0, "alpha", 2), + (3, 9, 0, "alpha", 0), + CO_FUTURE_BARRY_AS_BDFL) + +generator_stop = _Feature((3, 5, 0, "beta", 1), + (3, 7, 0, "alpha", 0), + CO_FUTURE_GENERATOR_STOP) diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/__phello__.foo.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/__phello__.foo.py new file mode 100644 index 0000000..8e8623e --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/__phello__.foo.py @@ -0,0 +1 @@ +# This file exists as a helper for the test.test_frozen module. diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_bootlocale.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_bootlocale.py new file mode 100644 index 0000000..4bccac1 --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_bootlocale.py @@ -0,0 +1,34 @@ +"""A minimal subset of the locale module used at interpreter startup +(imported by the _io module), in order to reduce startup time. + +Don't import directly from third-party code; use the `locale` module instead! +""" + +import sys +import _locale + +if sys.platform.startswith("win"): + def getpreferredencoding(do_setlocale=True): + return _locale._getdefaultlocale()[1] +else: + try: + _locale.CODESET + except AttributeError: + def getpreferredencoding(do_setlocale=True): + # This path for legacy systems needs the more complex + # getdefaultlocale() function, import the full locale module. + import locale + return locale.getpreferredencoding(do_setlocale) + else: + def getpreferredencoding(do_setlocale=True): + assert not do_setlocale + result = _locale.nl_langinfo(_locale.CODESET) + if not result and sys.platform == 'darwin': + # nl_langinfo can return an empty string + # when the setting has an invalid value. + # Default to UTF-8 in that case because + # UTF-8 is the default charset on OSX and + # returning nothing will crash the + # interpreter. + result = 'UTF-8' + return result diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_collections_abc.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_collections_abc.py new file mode 100644 index 0000000..30ca27d --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_collections_abc.py @@ -0,0 +1,1030 @@ +# Copyright 2007 Google, Inc. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Abstract Base Classes (ABCs) for collections, according to PEP 3119. + +Unit tests are in test_collections. +""" + +from abc import ABCMeta, abstractmethod +import sys + +__all__ = ["Awaitable", "Coroutine", + "AsyncIterable", "AsyncIterator", "AsyncGenerator", + "Hashable", "Iterable", "Iterator", "Generator", "Reversible", + "Sized", "Container", "Callable", "Collection", + "Set", "MutableSet", + "Mapping", "MutableMapping", + "MappingView", "KeysView", "ItemsView", "ValuesView", + "Sequence", "MutableSequence", + "ByteString", + ] + +# This module has been renamed from collections.abc to _collections_abc to +# speed up interpreter startup. Some of the types such as MutableMapping are +# required early but collections module imports a lot of other modules. +# See issue #19218 +__name__ = "collections.abc" + +# Private list of types that we want to register with the various ABCs +# so that they will pass tests like: +# it = iter(somebytearray) +# assert isinstance(it, Iterable) +# Note: in other implementations, these types might not be distinct +# and they may have their own implementation specific types that +# are not included on this list. +bytes_iterator = type(iter(b'')) +bytearray_iterator = type(iter(bytearray())) +# callable_iterator = ??? +dict_keyiterator = type(iter({}.keys())) +dict_valueiterator = type(iter({}.values())) +dict_itemiterator = type(iter({}.items())) +list_iterator = type(iter([])) +list_reverseiterator = type(iter(reversed([]))) +range_iterator = type(iter(range(0))) +longrange_iterator = type(iter(range(1 << 1000))) +set_iterator = type(iter(set())) +str_iterator = type(iter("")) +tuple_iterator = type(iter(())) +zip_iterator = type(iter(zip())) +## views ## +dict_keys = type({}.keys()) +dict_values = type({}.values()) +dict_items = type({}.items()) +## misc ## +mappingproxy = type(type.__dict__) +generator = type((lambda: (yield))()) +## coroutine ## + + +async def _coro(): pass +_coro = _coro() +coroutine = type(_coro) +_coro.close() # Prevent ResourceWarning +del _coro +## asynchronous generator ## + + +async def _ag(): yield +_ag = _ag() +async_generator = type(_ag) +del _ag + + +### ONE-TRICK PONIES ### + +def _check_methods(C, *methods): + mro = C.__mro__ + for method in methods: + for B in mro: + if method in B.__dict__: + if B.__dict__[method] is None: + return NotImplemented + break + else: + return NotImplemented + return True + + +class Hashable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __hash__(self): + return 0 + + @classmethod + def __subclasshook__(cls, C): + if cls is Hashable: + return _check_methods(C, "__hash__") + return NotImplemented + + +class Awaitable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __await__(self): + yield + + @classmethod + def __subclasshook__(cls, C): + if cls is Awaitable: + return _check_methods(C, "__await__") + return NotImplemented + + +class Coroutine(Awaitable): + + __slots__ = () + + @abstractmethod + def send(self, value): + """Send a value into the coroutine. + Return next yielded value or raise StopIteration. + """ + raise StopIteration + + @abstractmethod + def throw(self, typ, val=None, tb=None): + """Raise an exception in the coroutine. + Return next yielded value or raise StopIteration. + """ + if val is None: + if tb is None: + raise typ + val = typ() + if tb is not None: + val = val.with_traceback(tb) + raise val + + def close(self): + """Raise GeneratorExit inside coroutine. + """ + try: + self.throw(GeneratorExit) + except (GeneratorExit, StopIteration): + pass + else: + raise RuntimeError("coroutine ignored GeneratorExit") + + @classmethod + def __subclasshook__(cls, C): + if cls is Coroutine: + return _check_methods(C, '__await__', 'send', 'throw', 'close') + return NotImplemented + + +Coroutine.register(coroutine) + + +class AsyncIterable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __aiter__(self): + return AsyncIterator() + + @classmethod + def __subclasshook__(cls, C): + if cls is AsyncIterable: + return _check_methods(C, "__aiter__") + return NotImplemented + + +class AsyncIterator(AsyncIterable): + + __slots__ = () + + @abstractmethod + async def __anext__(self): + """Return the next item or raise StopAsyncIteration when exhausted.""" + raise StopAsyncIteration + + def __aiter__(self): + return self + + @classmethod + def __subclasshook__(cls, C): + if cls is AsyncIterator: + return _check_methods(C, "__anext__", "__aiter__") + return NotImplemented + + +class AsyncGenerator(AsyncIterator): + + __slots__ = () + + async def __anext__(self): + """Return the next item from the asynchronous generator. + When exhausted, raise StopAsyncIteration. + """ + return await self.asend(None) + + @abstractmethod + async def asend(self, value): + """Send a value into the asynchronous generator. + Return next yielded value or raise StopAsyncIteration. + """ + raise StopAsyncIteration + + @abstractmethod + async def athrow(self, typ, val=None, tb=None): + """Raise an exception in the asynchronous generator. + Return next yielded value or raise StopAsyncIteration. + """ + if val is None: + if tb is None: + raise typ + val = typ() + if tb is not None: + val = val.with_traceback(tb) + raise val + + async def aclose(self): + """Raise GeneratorExit inside coroutine. + """ + try: + await self.athrow(GeneratorExit) + except (GeneratorExit, StopAsyncIteration): + pass + else: + raise RuntimeError("asynchronous generator ignored GeneratorExit") + + @classmethod + def __subclasshook__(cls, C): + if cls is AsyncGenerator: + return _check_methods(C, '__aiter__', '__anext__', + 'asend', 'athrow', 'aclose') + return NotImplemented + + +AsyncGenerator.register(async_generator) + + +class Iterable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __iter__(self): + while False: + yield None + + @classmethod + def __subclasshook__(cls, C): + if cls is Iterable: + return _check_methods(C, "__iter__") + return NotImplemented + + +class Iterator(Iterable): + + __slots__ = () + + @abstractmethod + def __next__(self): + 'Return the next item from the iterator. When exhausted, raise StopIteration' + raise StopIteration + + def __iter__(self): + return self + + @classmethod + def __subclasshook__(cls, C): + if cls is Iterator: + return _check_methods(C, '__iter__', '__next__') + return NotImplemented + + +Iterator.register(bytes_iterator) +Iterator.register(bytearray_iterator) +# Iterator.register(callable_iterator) +Iterator.register(dict_keyiterator) +Iterator.register(dict_valueiterator) +Iterator.register(dict_itemiterator) +Iterator.register(list_iterator) +Iterator.register(list_reverseiterator) +Iterator.register(range_iterator) +Iterator.register(longrange_iterator) +Iterator.register(set_iterator) +Iterator.register(str_iterator) +Iterator.register(tuple_iterator) +Iterator.register(zip_iterator) + + +class Reversible(Iterable): + + __slots__ = () + + @abstractmethod + def __reversed__(self): + while False: + yield None + + @classmethod + def __subclasshook__(cls, C): + if cls is Reversible: + return _check_methods(C, "__reversed__", "__iter__") + return NotImplemented + + +class Generator(Iterator): + + __slots__ = () + + def __next__(self): + """Return the next item from the generator. + When exhausted, raise StopIteration. + """ + return self.send(None) + + @abstractmethod + def send(self, value): + """Send a value into the generator. + Return next yielded value or raise StopIteration. + """ + raise StopIteration + + @abstractmethod + def throw(self, typ, val=None, tb=None): + """Raise an exception in the generator. + Return next yielded value or raise StopIteration. + """ + if val is None: + if tb is None: + raise typ + val = typ() + if tb is not None: + val = val.with_traceback(tb) + raise val + + def close(self): + """Raise GeneratorExit inside generator. + """ + try: + self.throw(GeneratorExit) + except (GeneratorExit, StopIteration): + pass + else: + raise RuntimeError("generator ignored GeneratorExit") + + @classmethod + def __subclasshook__(cls, C): + if cls is Generator: + return _check_methods(C, '__iter__', '__next__', + 'send', 'throw', 'close') + return NotImplemented + + +Generator.register(generator) + + +class Sized(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __len__(self): + return 0 + + @classmethod + def __subclasshook__(cls, C): + if cls is Sized: + return _check_methods(C, "__len__") + return NotImplemented + + +class Container(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __contains__(self, x): + return False + + @classmethod + def __subclasshook__(cls, C): + if cls is Container: + return _check_methods(C, "__contains__") + return NotImplemented + + +class Collection(Sized, Iterable, Container): + + __slots__ = () + + @classmethod + def __subclasshook__(cls, C): + if cls is Collection: + return _check_methods(C, "__len__", "__iter__", "__contains__") + return NotImplemented + + +class Callable(metaclass=ABCMeta): + + __slots__ = () + + @abstractmethod + def __call__(self, *args, **kwds): + return False + + @classmethod + def __subclasshook__(cls, C): + if cls is Callable: + return _check_methods(C, "__call__") + return NotImplemented + + +### SETS ### + + +class Set(Collection): + + """A set is a finite, iterable container. + + This class provides concrete generic implementations of all + methods except for __contains__, __iter__ and __len__. + + To override the comparisons (presumably for speed, as the + semantics are fixed), redefine __le__ and __ge__, + then the other operations will automatically follow suit. + """ + + __slots__ = () + + def __le__(self, other): + if not isinstance(other, Set): + return NotImplemented + if len(self) > len(other): + return False + for elem in self: + if elem not in other: + return False + return True + + def __lt__(self, other): + if not isinstance(other, Set): + return NotImplemented + return len(self) < len(other) and self.__le__(other) + + def __gt__(self, other): + if not isinstance(other, Set): + return NotImplemented + return len(self) > len(other) and self.__ge__(other) + + def __ge__(self, other): + if not isinstance(other, Set): + return NotImplemented + if len(self) < len(other): + return False + for elem in other: + if elem not in self: + return False + return True + + def __eq__(self, other): + if not isinstance(other, Set): + return NotImplemented + return len(self) == len(other) and self.__le__(other) + + @classmethod + def _from_iterable(cls, it): + '''Construct an instance of the class from any iterable input. + + Must override this method if the class constructor signature + does not accept an iterable for an input. + ''' + return cls(it) + + def __and__(self, other): + if not isinstance(other, Iterable): + return NotImplemented + return self._from_iterable(value for value in other if value in self) + + __rand__ = __and__ + + def isdisjoint(self, other): + 'Return True if two sets have a null intersection.' + for value in other: + if value in self: + return False + return True + + def __or__(self, other): + if not isinstance(other, Iterable): + return NotImplemented + chain = (e for s in (self, other) for e in s) + return self._from_iterable(chain) + + __ror__ = __or__ + + def __sub__(self, other): + if not isinstance(other, Set): + if not isinstance(other, Iterable): + return NotImplemented + other = self._from_iterable(other) + return self._from_iterable(value for value in self + if value not in other) + + def __rsub__(self, other): + if not isinstance(other, Set): + if not isinstance(other, Iterable): + return NotImplemented + other = self._from_iterable(other) + return self._from_iterable(value for value in other + if value not in self) + + def __xor__(self, other): + if not isinstance(other, Set): + if not isinstance(other, Iterable): + return NotImplemented + other = self._from_iterable(other) + return (self - other) | (other - self) + + __rxor__ = __xor__ + + def _hash(self): + """Compute the hash value of a set. + + Note that we don't define __hash__: not all sets are hashable. + But if you define a hashable set type, its __hash__ should + call this function. + + This must be compatible __eq__. + + All sets ought to compare equal if they contain the same + elements, regardless of how they are implemented, and + regardless of the order of the elements; so there's not much + freedom for __eq__ or __hash__. We match the algorithm used + by the built-in frozenset type. + """ + MAX = sys.maxsize + MASK = 2 * MAX + 1 + n = len(self) + h = 1927868237 * (n + 1) + h &= MASK + for x in self: + hx = hash(x) + h ^= (hx ^ (hx << 16) ^ 89869747) * 3644798167 + h &= MASK + h = h * 69069 + 907133923 + h &= MASK + if h > MAX: + h -= MASK + 1 + if h == -1: + h = 590923713 + return h + + +Set.register(frozenset) + + +class MutableSet(Set): + """A mutable set is a finite, iterable container. + + This class provides concrete generic implementations of all + methods except for __contains__, __iter__, __len__, + add(), and discard(). + + To override the comparisons (presumably for speed, as the + semantics are fixed), all you have to do is redefine __le__ and + then the other operations will automatically follow suit. + """ + + __slots__ = () + + @abstractmethod + def add(self, value): + """Add an element.""" + raise NotImplementedError + + @abstractmethod + def discard(self, value): + """Remove an element. Do not raise an exception if absent.""" + raise NotImplementedError + + def remove(self, value): + """Remove an element. If not a member, raise a KeyError.""" + if value not in self: + raise KeyError(value) + self.discard(value) + + def pop(self): + """Return the popped value. Raise KeyError if empty.""" + it = iter(self) + try: + value = next(it) + except StopIteration: + raise KeyError + self.discard(value) + return value + + def clear(self): + """This is slow (creates N new iterators!) but effective.""" + try: + while True: + self.pop() + except KeyError: + pass + + def __ior__(self, it): + for value in it: + self.add(value) + return self + + def __iand__(self, it): + for value in (self - it): + self.discard(value) + return self + + def __ixor__(self, it): + if it is self: + self.clear() + else: + if not isinstance(it, Set): + it = self._from_iterable(it) + for value in it: + if value in self: + self.discard(value) + else: + self.add(value) + return self + + def __isub__(self, it): + if it is self: + self.clear() + else: + for value in it: + self.discard(value) + return self + + +MutableSet.register(set) + + +### MAPPINGS ### + + +class Mapping(Collection): + + __slots__ = () + + """A Mapping is a generic container for associating key/value + pairs. + + This class provides concrete generic implementations of all + methods except for __getitem__, __iter__, and __len__. + + """ + + @abstractmethod + def __getitem__(self, key): + raise KeyError + + def get(self, key, default=None): + 'D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.' + try: + return self[key] + except KeyError: + return default + + def __contains__(self, key): + try: + self[key] + except KeyError: + return False + else: + return True + + def keys(self): + "D.keys() -> a set-like object providing a view on D's keys" + return KeysView(self) + + def items(self): + "D.items() -> a set-like object providing a view on D's items" + return ItemsView(self) + + def values(self): + "D.values() -> an object providing a view on D's values" + return ValuesView(self) + + def __eq__(self, other): + if not isinstance(other, Mapping): + return NotImplemented + return dict(self.items()) == dict(other.items()) + + __reversed__ = None + + +Mapping.register(mappingproxy) + + +class MappingView(Sized): + + __slots__ = '_mapping', + + def __init__(self, mapping): + self._mapping = mapping + + def __len__(self): + return len(self._mapping) + + def __repr__(self): + return '{0.__class__.__name__}({0._mapping!r})'.format(self) + + +class KeysView(MappingView, Set): + + __slots__ = () + + @classmethod + def _from_iterable(self, it): + return set(it) + + def __contains__(self, key): + return key in self._mapping + + def __iter__(self): + yield from self._mapping + + +KeysView.register(dict_keys) + + +class ItemsView(MappingView, Set): + + __slots__ = () + + @classmethod + def _from_iterable(self, it): + return set(it) + + def __contains__(self, item): + key, value = item + try: + v = self._mapping[key] + except KeyError: + return False + else: + return v is value or v == value + + def __iter__(self): + for key in self._mapping: + yield (key, self._mapping[key]) + + +ItemsView.register(dict_items) + + +class ValuesView(MappingView): + + __slots__ = () + + def __contains__(self, value): + for key in self._mapping: + v = self._mapping[key] + if v is value or v == value: + return True + return False + + def __iter__(self): + for key in self._mapping: + yield self._mapping[key] + + +ValuesView.register(dict_values) + + +class MutableMapping(Mapping): + + __slots__ = () + + """A MutableMapping is a generic container for associating + key/value pairs. + + This class provides concrete generic implementations of all + methods except for __getitem__, __setitem__, __delitem__, + __iter__, and __len__. + + """ + + @abstractmethod + def __setitem__(self, key, value): + raise KeyError + + @abstractmethod + def __delitem__(self, key): + raise KeyError + + __marker = object() + + def pop(self, key, default=__marker): + '''D.pop(k[,d]) -> v, remove specified key and return the corresponding value. + If key is not found, d is returned if given, otherwise KeyError is raised. + ''' + try: + value = self[key] + except KeyError: + if default is self.__marker: + raise + return default + else: + del self[key] + return value + + def popitem(self): + '''D.popitem() -> (k, v), remove and return some (key, value) pair + as a 2-tuple; but raise KeyError if D is empty. + ''' + try: + key = next(iter(self)) + except StopIteration: + raise KeyError + value = self[key] + del self[key] + return key, value + + def clear(self): + 'D.clear() -> None. Remove all items from D.' + try: + while True: + self.popitem() + except KeyError: + pass + + def update(*args, **kwds): + ''' D.update([E, ]**F) -> None. Update D from mapping/iterable E and F. + If E present and has a .keys() method, does: for k in E: D[k] = E[k] + If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v + In either case, this is followed by: for k, v in F.items(): D[k] = v + ''' + if not args: + raise TypeError("descriptor 'update' of 'MutableMapping' object " + "needs an argument") + self, *args = args + if len(args) > 1: + raise TypeError('update expected at most 1 arguments, got %d' % + len(args)) + if args: + other = args[0] + if isinstance(other, Mapping): + for key in other: + self[key] = other[key] + elif hasattr(other, "keys"): + for key in other.keys(): + self[key] = other[key] + else: + for key, value in other: + self[key] = value + for key, value in kwds.items(): + self[key] = value + + def setdefault(self, key, default=None): + 'D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D' + try: + return self[key] + except KeyError: + self[key] = default + return default + + +MutableMapping.register(dict) + + +### SEQUENCES ### + + +class Sequence(Reversible, Collection): + + """All the operations on a read-only sequence. + + Concrete subclasses must override __new__ or __init__, + __getitem__, and __len__. + """ + + __slots__ = () + + @abstractmethod + def __getitem__(self, index): + raise IndexError + + def __iter__(self): + i = 0 + try: + while True: + v = self[i] + yield v + i += 1 + except IndexError: + return + + def __contains__(self, value): + for v in self: + if v is value or v == value: + return True + return False + + def __reversed__(self): + for i in reversed(range(len(self))): + yield self[i] + + def index(self, value, start=0, stop=None): + '''S.index(value, [start, [stop]]) -> integer -- return first index of value. + Raises ValueError if the value is not present. + + Supporting start and stop arguments is optional, but + recommended. + ''' + if start is not None and start < 0: + start = max(len(self) + start, 0) + if stop is not None and stop < 0: + stop += len(self) + + i = start + while stop is None or i < stop: + try: + v = self[i] + if v is value or v == value: + return i + except IndexError: + break + i += 1 + raise ValueError + + def count(self, value): + 'S.count(value) -> integer -- return number of occurrences of value' + return sum(1 for v in self if v is value or v == value) + + +Sequence.register(tuple) +Sequence.register(str) +Sequence.register(range) +Sequence.register(memoryview) + + +class ByteString(Sequence): + + """This unifies bytes and bytearray. + + XXX Should add all their methods. + """ + + __slots__ = () + + +ByteString.register(bytes) +ByteString.register(bytearray) + + +class MutableSequence(Sequence): + + __slots__ = () + + """All the operations on a read-write sequence. + + Concrete subclasses must provide __new__ or __init__, + __getitem__, __setitem__, __delitem__, __len__, and insert(). + + """ + + @abstractmethod + def __setitem__(self, index, value): + raise IndexError + + @abstractmethod + def __delitem__(self, index): + raise IndexError + + @abstractmethod + def insert(self, index, value): + 'S.insert(index, value) -- insert value before index' + raise IndexError + + def append(self, value): + 'S.append(value) -- append value to the end of the sequence' + self.insert(len(self), value) + + def clear(self): + 'S.clear() -> None -- remove all items from S' + try: + while True: + self.pop() + except IndexError: + pass + + def reverse(self): + 'S.reverse() -- reverse *IN PLACE*' + n = len(self) + for i in range(n//2): + self[i], self[n-i-1] = self[n-i-1], self[i] + + def extend(self, values): + 'S.extend(iterable) -- extend sequence by appending elements from the iterable' + for v in values: + self.append(v) + + def pop(self, index=-1): + '''S.pop([index]) -> item -- remove and return item at index (default last). + Raise IndexError if list is empty or index is out of range. + ''' + v = self[index] + del self[index] + return v + + def remove(self, value): + '''S.remove(value) -- remove first occurrence of value. + Raise ValueError if the value is not present. + ''' + del self[self.index(value)] + + def __iadd__(self, values): + self.extend(values) + return self + + +MutableSequence.register(list) +MutableSequence.register(bytearray) # Multiply inheriting, see ByteString diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_compat_pickle.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_compat_pickle.py new file mode 100644 index 0000000..102ab5b --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_compat_pickle.py @@ -0,0 +1,252 @@ +# This module is used to map the old Python 2 names to the new names used in +# Python 3 for the pickle module. This needed to make pickle streams +# generated with Python 2 loadable by Python 3. + +# This is a copy of lib2to3.fixes.fix_imports.MAPPING. We cannot import +# lib2to3 and use the mapping defined there, because lib2to3 uses pickle. +# Thus, this could cause the module to be imported recursively. +IMPORT_MAPPING = { + '__builtin__': 'builtins', + 'copy_reg': 'copyreg', + 'Queue': 'queue', + 'SocketServer': 'socketserver', + 'ConfigParser': 'configparser', + 'repr': 'reprlib', + 'tkFileDialog': 'tkinter.filedialog', + 'tkSimpleDialog': 'tkinter.simpledialog', + 'tkColorChooser': 'tkinter.colorchooser', + 'tkCommonDialog': 'tkinter.commondialog', + 'Dialog': 'tkinter.dialog', + 'Tkdnd': 'tkinter.dnd', + 'tkFont': 'tkinter.font', + 'tkMessageBox': 'tkinter.messagebox', + 'ScrolledText': 'tkinter.scrolledtext', + 'Tkconstants': 'tkinter.constants', + 'Tix': 'tkinter.tix', + 'ttk': 'tkinter.ttk', + 'Tkinter': 'tkinter', + 'markupbase': '_markupbase', + '_winreg': 'winreg', + 'thread': '_thread', + 'dummy_thread': '_dummy_thread', + 'dbhash': 'dbm.bsd', + 'dumbdbm': 'dbm.dumb', + 'dbm': 'dbm.ndbm', + 'gdbm': 'dbm.gnu', + 'xmlrpclib': 'xmlrpc.client', + 'SimpleXMLRPCServer': 'xmlrpc.server', + 'httplib': 'http.client', + 'htmlentitydefs': 'html.entities', + 'HTMLParser': 'html.parser', + 'Cookie': 'http.cookies', + 'cookielib': 'http.cookiejar', + 'BaseHTTPServer': 'http.server', + 'test.test_support': 'test.support', + 'commands': 'subprocess', + 'urlparse': 'urllib.parse', + 'robotparser': 'urllib.robotparser', + 'urllib2': 'urllib.request', + 'anydbm': 'dbm', + '_abcoll': 'collections.abc', +} + + +# This contains rename rules that are easy to handle. We ignore the more +# complex stuff (e.g. mapping the names in the urllib and types modules). +# These rules should be run before import names are fixed. +NAME_MAPPING = { + ('__builtin__', 'xrange'): ('builtins', 'range'), + ('__builtin__', 'reduce'): ('functools', 'reduce'), + ('__builtin__', 'intern'): ('sys', 'intern'), + ('__builtin__', 'unichr'): ('builtins', 'chr'), + ('__builtin__', 'unicode'): ('builtins', 'str'), + ('__builtin__', 'long'): ('builtins', 'int'), + ('itertools', 'izip'): ('builtins', 'zip'), + ('itertools', 'imap'): ('builtins', 'map'), + ('itertools', 'ifilter'): ('builtins', 'filter'), + ('itertools', 'ifilterfalse'): ('itertools', 'filterfalse'), + ('itertools', 'izip_longest'): ('itertools', 'zip_longest'), + ('UserDict', 'IterableUserDict'): ('collections', 'UserDict'), + ('UserList', 'UserList'): ('collections', 'UserList'), + ('UserString', 'UserString'): ('collections', 'UserString'), + ('whichdb', 'whichdb'): ('dbm', 'whichdb'), + ('_socket', 'fromfd'): ('socket', 'fromfd'), + ('_multiprocessing', 'Connection'): ('multiprocessing.connection', 'Connection'), + ('multiprocessing.process', 'Process'): ('multiprocessing.context', 'Process'), + ('multiprocessing.forking', 'Popen'): ('multiprocessing.popen_fork', 'Popen'), + ('urllib', 'ContentTooShortError'): ('urllib.error', 'ContentTooShortError'), + ('urllib', 'getproxies'): ('urllib.request', 'getproxies'), + ('urllib', 'pathname2url'): ('urllib.request', 'pathname2url'), + ('urllib', 'quote_plus'): ('urllib.parse', 'quote_plus'), + ('urllib', 'quote'): ('urllib.parse', 'quote'), + ('urllib', 'unquote_plus'): ('urllib.parse', 'unquote_plus'), + ('urllib', 'unquote'): ('urllib.parse', 'unquote'), + ('urllib', 'url2pathname'): ('urllib.request', 'url2pathname'), + ('urllib', 'urlcleanup'): ('urllib.request', 'urlcleanup'), + ('urllib', 'urlencode'): ('urllib.parse', 'urlencode'), + ('urllib', 'urlopen'): ('urllib.request', 'urlopen'), + ('urllib', 'urlretrieve'): ('urllib.request', 'urlretrieve'), + ('urllib2', 'HTTPError'): ('urllib.error', 'HTTPError'), + ('urllib2', 'URLError'): ('urllib.error', 'URLError'), +} + +PYTHON2_EXCEPTIONS = ( + "ArithmeticError", + "AssertionError", + "AttributeError", + "BaseException", + "BufferError", + "BytesWarning", + "DeprecationWarning", + "EOFError", + "EnvironmentError", + "Exception", + "FloatingPointError", + "FutureWarning", + "GeneratorExit", + "IOError", + "ImportError", + "ImportWarning", + "IndentationError", + "IndexError", + "KeyError", + "KeyboardInterrupt", + "LookupError", + "MemoryError", + "NameError", + "NotImplementedError", + "OSError", + "OverflowError", + "PendingDeprecationWarning", + "ReferenceError", + "RuntimeError", + "RuntimeWarning", + # StandardError is gone in Python 3, so we map it to Exception + "StopIteration", + "SyntaxError", + "SyntaxWarning", + "SystemError", + "SystemExit", + "TabError", + "TypeError", + "UnboundLocalError", + "UnicodeDecodeError", + "UnicodeEncodeError", + "UnicodeError", + "UnicodeTranslateError", + "UnicodeWarning", + "UserWarning", + "ValueError", + "Warning", + "ZeroDivisionError", +) + +try: + WindowsError +except NameError: + pass +else: + PYTHON2_EXCEPTIONS += ("WindowsError",) + +for excname in PYTHON2_EXCEPTIONS: + NAME_MAPPING[("exceptions", excname)] = ("builtins", excname) + +MULTIPROCESSING_EXCEPTIONS = ( + 'AuthenticationError', + 'BufferTooShort', + 'ProcessError', + 'TimeoutError', +) + +for excname in MULTIPROCESSING_EXCEPTIONS: + NAME_MAPPING[("multiprocessing", excname)] = ( + "multiprocessing.context", excname) + +# Same, but for 3.x to 2.x +REVERSE_IMPORT_MAPPING = dict((v, k) for (k, v) in IMPORT_MAPPING.items()) +assert len(REVERSE_IMPORT_MAPPING) == len(IMPORT_MAPPING) +REVERSE_NAME_MAPPING = dict((v, k) for (k, v) in NAME_MAPPING.items()) +assert len(REVERSE_NAME_MAPPING) == len(NAME_MAPPING) + +# Non-mutual mappings. + +IMPORT_MAPPING.update({ + 'cPickle': 'pickle', + '_elementtree': 'xml.etree.ElementTree', + 'FileDialog': 'tkinter.filedialog', + 'SimpleDialog': 'tkinter.simpledialog', + 'DocXMLRPCServer': 'xmlrpc.server', + 'SimpleHTTPServer': 'http.server', + 'CGIHTTPServer': 'http.server', + # For compatibility with broken pickles saved in old Python 3 versions + 'UserDict': 'collections', + 'UserList': 'collections', + 'UserString': 'collections', + 'whichdb': 'dbm', + 'StringIO': 'io', + 'cStringIO': 'io', +}) + +REVERSE_IMPORT_MAPPING.update({ + '_bz2': 'bz2', + '_dbm': 'dbm', + '_functools': 'functools', + '_gdbm': 'gdbm', + '_pickle': 'pickle', +}) + +NAME_MAPPING.update({ + ('__builtin__', 'basestring'): ('builtins', 'str'), + ('exceptions', 'StandardError'): ('builtins', 'Exception'), + ('UserDict', 'UserDict'): ('collections', 'UserDict'), + ('socket', '_socketobject'): ('socket', 'SocketType'), +}) + +REVERSE_NAME_MAPPING.update({ + ('_functools', 'reduce'): ('__builtin__', 'reduce'), + ('tkinter.filedialog', 'FileDialog'): ('FileDialog', 'FileDialog'), + ('tkinter.filedialog', 'LoadFileDialog'): ('FileDialog', 'LoadFileDialog'), + ('tkinter.filedialog', 'SaveFileDialog'): ('FileDialog', 'SaveFileDialog'), + ('tkinter.simpledialog', 'SimpleDialog'): ('SimpleDialog', 'SimpleDialog'), + ('xmlrpc.server', 'ServerHTMLDoc'): ('DocXMLRPCServer', 'ServerHTMLDoc'), + ('xmlrpc.server', 'XMLRPCDocGenerator'): + ('DocXMLRPCServer', 'XMLRPCDocGenerator'), + ('xmlrpc.server', 'DocXMLRPCRequestHandler'): + ('DocXMLRPCServer', 'DocXMLRPCRequestHandler'), + ('xmlrpc.server', 'DocXMLRPCServer'): + ('DocXMLRPCServer', 'DocXMLRPCServer'), + ('xmlrpc.server', 'DocCGIXMLRPCRequestHandler'): + ('DocXMLRPCServer', 'DocCGIXMLRPCRequestHandler'), + ('http.server', 'SimpleHTTPRequestHandler'): + ('SimpleHTTPServer', 'SimpleHTTPRequestHandler'), + ('http.server', 'CGIHTTPRequestHandler'): + ('CGIHTTPServer', 'CGIHTTPRequestHandler'), + ('_socket', 'socket'): ('socket', '_socketobject'), +}) + +PYTHON3_OSERROR_EXCEPTIONS = ( + 'BrokenPipeError', + 'ChildProcessError', + 'ConnectionAbortedError', + 'ConnectionError', + 'ConnectionRefusedError', + 'ConnectionResetError', + 'FileExistsError', + 'FileNotFoundError', + 'InterruptedError', + 'IsADirectoryError', + 'NotADirectoryError', + 'PermissionError', + 'ProcessLookupError', + 'TimeoutError', +) + +for excname in PYTHON3_OSERROR_EXCEPTIONS: + REVERSE_NAME_MAPPING[('builtins', excname)] = ('exceptions', 'OSError') + +PYTHON3_IMPORTERROR_EXCEPTIONS = ( + 'ModuleNotFoundError', +) + +for excname in PYTHON3_IMPORTERROR_EXCEPTIONS: + REVERSE_NAME_MAPPING[('builtins', excname)] = ('exceptions', 'ImportError') diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_compression.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_compression.py new file mode 100644 index 0000000..b00f31b --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_compression.py @@ -0,0 +1,152 @@ +"""Internal classes used by the gzip, lzma and bz2 modules""" + +import io + + +BUFFER_SIZE = io.DEFAULT_BUFFER_SIZE # Compressed data read chunk size + + +class BaseStream(io.BufferedIOBase): + """Mode-checking helper functions.""" + + def _check_not_closed(self): + if self.closed: + raise ValueError("I/O operation on closed file") + + def _check_can_read(self): + if not self.readable(): + raise io.UnsupportedOperation("File not open for reading") + + def _check_can_write(self): + if not self.writable(): + raise io.UnsupportedOperation("File not open for writing") + + def _check_can_seek(self): + if not self.readable(): + raise io.UnsupportedOperation("Seeking is only supported " + "on files open for reading") + if not self.seekable(): + raise io.UnsupportedOperation("The underlying file object " + "does not support seeking") + + +class DecompressReader(io.RawIOBase): + """Adapts the decompressor API to a RawIOBase reader API""" + + def readable(self): + return True + + def __init__(self, fp, decomp_factory, trailing_error=(), **decomp_args): + self._fp = fp + self._eof = False + self._pos = 0 # Current offset in decompressed stream + + # Set to size of decompressed stream once it is known, for SEEK_END + self._size = -1 + + # Save the decompressor factory and arguments. + # If the file contains multiple compressed streams, each + # stream will need a separate decompressor object. A new decompressor + # object is also needed when implementing a backwards seek(). + self._decomp_factory = decomp_factory + self._decomp_args = decomp_args + self._decompressor = self._decomp_factory(**self._decomp_args) + + # Exception class to catch from decompressor signifying invalid + # trailing data to ignore + self._trailing_error = trailing_error + + def close(self): + self._decompressor = None + return super().close() + + def seekable(self): + return self._fp.seekable() + + def readinto(self, b): + with memoryview(b) as view, view.cast("B") as byte_view: + data = self.read(len(byte_view)) + byte_view[:len(data)] = data + return len(data) + + def read(self, size=-1): + if size < 0: + return self.readall() + + if not size or self._eof: + return b"" + data = None # Default if EOF is encountered + # Depending on the input data, our call to the decompressor may not + # return any data. In this case, try again after reading another block. + while True: + if self._decompressor.eof: + rawblock = (self._decompressor.unused_data or + self._fp.read(BUFFER_SIZE)) + if not rawblock: + break + # Continue to next stream. + self._decompressor = self._decomp_factory( + **self._decomp_args) + try: + data = self._decompressor.decompress(rawblock, size) + except self._trailing_error: + # Trailing data isn't a valid compressed stream; ignore it. + break + else: + if self._decompressor.needs_input: + rawblock = self._fp.read(BUFFER_SIZE) + if not rawblock: + raise EOFError("Compressed file ended before the " + "end-of-stream marker was reached") + else: + rawblock = b"" + data = self._decompressor.decompress(rawblock, size) + if data: + break + if not data: + self._eof = True + self._size = self._pos + return b"" + self._pos += len(data) + return data + + # Rewind the file to the beginning of the data stream. + def _rewind(self): + self._fp.seek(0) + self._eof = False + self._pos = 0 + self._decompressor = self._decomp_factory(**self._decomp_args) + + def seek(self, offset, whence=io.SEEK_SET): + # Recalculate offset as an absolute file position. + if whence == io.SEEK_SET: + pass + elif whence == io.SEEK_CUR: + offset = self._pos + offset + elif whence == io.SEEK_END: + # Seeking relative to EOF - we need to know the file's size. + if self._size < 0: + while self.read(io.DEFAULT_BUFFER_SIZE): + pass + offset = self._size + offset + else: + raise ValueError("Invalid value for whence: {}".format(whence)) + + # Make it so that offset is the number of bytes to skip forward. + if offset < self._pos: + self._rewind() + else: + offset -= self._pos + + # Read and discard data until we reach the desired position. + while offset > 0: + data = self.read(min(io.DEFAULT_BUFFER_SIZE, offset)) + if not data: + break + offset -= len(data) + + return self._pos + + def tell(self): + """Return the current file position.""" + return self._pos diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_dummy_thread.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_dummy_thread.py new file mode 100644 index 0000000..4b1f9c8 --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_dummy_thread.py @@ -0,0 +1,172 @@ +"""Drop-in replacement for the thread module. + +Meant to be used as a brain-dead substitute so that threaded code does +not need to be rewritten for when the thread module is not present. + +Suggested usage is:: + + try: + import _thread + except ImportError: + import _dummy_thread as _thread + +""" +# Exports only things specified by thread documentation; +# skipping obsolete synonyms allocate(), start_new(), exit_thread(). +__all__ = ['error', 'start_new_thread', 'exit', 'get_ident', 'allocate_lock', + 'interrupt_main', 'LockType'] + +# A dummy value +TIMEOUT_MAX = 2**31 + +# NOTE: this module can be imported early in the extension building process, +# and so top level imports of other modules should be avoided. Instead, all +# imports are done when needed on a function-by-function basis. Since threads +# are disabled, the import lock should not be an issue anyway (??). + +error = RuntimeError + + +def start_new_thread(function, args, kwargs={}): + """Dummy implementation of _thread.start_new_thread(). + + Compatibility is maintained by making sure that ``args`` is a + tuple and ``kwargs`` is a dictionary. If an exception is raised + and it is SystemExit (which can be done by _thread.exit()) it is + caught and nothing is done; all other exceptions are printed out + by using traceback.print_exc(). + + If the executed function calls interrupt_main the KeyboardInterrupt will be + raised when the function returns. + + """ + if type(args) != type(tuple()): + raise TypeError("2nd arg must be a tuple") + if type(kwargs) != type(dict()): + raise TypeError("3rd arg must be a dict") + global _main + _main = False + try: + function(*args, **kwargs) + except SystemExit: + pass + except: + import traceback + traceback.print_exc() + _main = True + global _interrupt + if _interrupt: + _interrupt = False + raise KeyboardInterrupt + + +def exit(): + """Dummy implementation of _thread.exit().""" + raise SystemExit + + +def get_ident(): + """Dummy implementation of _thread.get_ident(). + + Since this module should only be used when _threadmodule is not + available, it is safe to assume that the current process is the + only thread. Thus a constant can be safely returned. + """ + return -1 + + +def allocate_lock(): + """Dummy implementation of _thread.allocate_lock().""" + return LockType() + + +def stack_size(size=None): + """Dummy implementation of _thread.stack_size().""" + if size is not None: + raise error("setting thread stack size not supported") + return 0 + + +def _set_sentinel(): + """Dummy implementation of _thread._set_sentinel().""" + return LockType() + + +class LockType(object): + """Class implementing dummy implementation of _thread.LockType. + + Compatibility is maintained by maintaining self.locked_status + which is a boolean that stores the state of the lock. Pickling of + the lock, though, should not be done since if the _thread module is + then used with an unpickled ``lock()`` from here problems could + occur from this class not having atomic methods. + + """ + + def __init__(self): + self.locked_status = False + + def acquire(self, waitflag=None, timeout=-1): + """Dummy implementation of acquire(). + + For blocking calls, self.locked_status is automatically set to + True and returned appropriately based on value of + ``waitflag``. If it is non-blocking, then the value is + actually checked and not set if it is already acquired. This + is all done so that threading.Condition's assert statements + aren't triggered and throw a little fit. + + """ + if waitflag is None or waitflag: + self.locked_status = True + return True + else: + if not self.locked_status: + self.locked_status = True + return True + else: + if timeout > 0: + import time + time.sleep(timeout) + return False + + __enter__ = acquire + + def __exit__(self, typ, val, tb): + self.release() + + def release(self): + """Release the dummy lock.""" + # XXX Perhaps shouldn't actually bother to test? Could lead + # to problems for complex, threaded code. + if not self.locked_status: + raise error + self.locked_status = False + return True + + def locked(self): + return self.locked_status + + def __repr__(self): + return "<%s %s.%s object at %s>" % ( + "locked" if self.locked_status else "unlocked", + self.__class__.__module__, + self.__class__.__qualname__, + hex(id(self)) + ) + + +# Used to signal that interrupt_main was called in a "thread" +_interrupt = False +# True when not executing in a "thread" +_main = True + + +def interrupt_main(): + """Set _interrupt flag to True to have start_new_thread raise + KeyboardInterrupt upon exiting.""" + if _main: + raise KeyboardInterrupt + else: + global _interrupt + _interrupt = True diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_markupbase.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_markupbase.py new file mode 100644 index 0000000..1139c1c --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/_markupbase.py @@ -0,0 +1,399 @@ +"""Shared support for scanning document type declarations in HTML and XHTML. + +This module is used as a foundation for the html.parser module. It has no +documented public API and should not be used directly. + +""" + +import re + +_declname_match = re.compile(r'[a-zA-Z][-_.a-zA-Z0-9]*\s*').match +_declstringlit_match = re.compile(r'(\'[^\']*\'|"[^"]*")\s*').match +_commentclose = re.compile(r'--\s*>') +_markedsectionclose = re.compile(r']\s*]\s*>') + +# An analysis of the MS-Word extensions is available at +# http://www.planetpublish.com/xmlarena/xap/Thursday/WordtoXML.pdf + +_msmarkedsectionclose = re.compile(r']\s*>') + +del re + + +class ParserBase: + """Parser base class which provides some common support methods used + by the SGML/HTML and XHTML parsers.""" + + def __init__(self): + if self.__class__ is ParserBase: + raise RuntimeError( + "_markupbase.ParserBase must be subclassed") + + def error(self, message): + raise NotImplementedError( + "subclasses of ParserBase must override error()") + + def reset(self): + self.lineno = 1 + self.offset = 0 + + def getpos(self): + """Return current line number and offset.""" + return self.lineno, self.offset + + # Internal -- update line number and offset. This should be + # called for each piece of data exactly once, in order -- in other + # words the concatenation of all the input strings to this + # function should be exactly the entire input. + def updatepos(self, i, j): + if i >= j: + return j + rawdata = self.rawdata + nlines = rawdata.count("\n", i, j) + if nlines: + self.lineno = self.lineno + nlines + pos = rawdata.rindex("\n", i, j) # Should not fail + self.offset = j-(pos+1) + else: + self.offset = self.offset + j-i + return j + + _decl_otherchars = '' + + # Internal -- parse declaration (for use by subclasses). + def parse_declaration(self, i): + # This is some sort of declaration; in "HTML as + # deployed," this should only be the document type + # declaration (""). + # ISO 8879:1986, however, has more complex + # declaration syntax for elements in , including: + # --comment-- + # [marked section] + # name in the following list: ENTITY, DOCTYPE, ELEMENT, + # ATTLIST, NOTATION, SHORTREF, USEMAP, + # LINKTYPE, LINK, IDLINK, USELINK, SYSTEM + rawdata = self.rawdata + j = i + 2 + assert rawdata[i:j] == "": + # the empty comment + return j + 1 + if rawdata[j:j+1] in ("-", ""): + # Start of comment followed by buffer boundary, + # or just a buffer boundary. + return -1 + # A simple, practical version could look like: ((name|stringlit) S*) + '>' + n = len(rawdata) + if rawdata[j:j+2] == '--': # comment + # Locate --.*-- as the body of the comment + return self.parse_comment(i) + elif rawdata[j] == '[': # marked section + # Locate [statusWord [...arbitrary SGML...]] as the body of the marked section + # Where statusWord is one of TEMP, CDATA, IGNORE, INCLUDE, RCDATA + # Note that this is extended by Microsoft Office "Save as Web" function + # to include [if...] and [endif]. + return self.parse_marked_section(i) + else: # all other declaration elements + decltype, j = self._scan_name(j, i) + if j < 0: + return j + if decltype == "doctype": + self._decl_otherchars = '' + while j < n: + c = rawdata[j] + if c == ">": + # end of declaration syntax + data = rawdata[i+2:j] + if decltype == "doctype": + self.handle_decl(data) + else: + # According to the HTML5 specs sections "8.2.4.44 Bogus + # comment state" and "8.2.4.45 Markup declaration open + # state", a comment token should be emitted. + # Calling unknown_decl provides more flexibility though. + self.unknown_decl(data) + return j + 1 + if c in "\"'": + m = _declstringlit_match(rawdata, j) + if not m: + return -1 # incomplete + j = m.end() + elif c in "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ": + name, j = self._scan_name(j, i) + elif c in self._decl_otherchars: + j = j + 1 + elif c == "[": + # this could be handled in a separate doctype parser + if decltype == "doctype": + j = self._parse_doctype_subset(j + 1, i) + elif decltype in {"attlist", "linktype", "link", "element"}: + # must tolerate []'d groups in a content model in an element declaration + # also in data attribute specifications of attlist declaration + # also link type declaration subsets in linktype declarations + # also link attribute specification lists in link declarations + self.error( + "unsupported '[' char in %s declaration" % decltype) + else: + self.error("unexpected '[' char in declaration") + else: + self.error( + "unexpected %r char in declaration" % rawdata[j]) + if j < 0: + return j + return -1 # incomplete + + # Internal -- parse a marked section + # Override this to handle MS-word extension syntax content + def parse_marked_section(self, i, report=1): + rawdata = self.rawdata + assert rawdata[i:i + + 3] == ' ending + match = _markedsectionclose.search(rawdata, i+3) + elif sectName in {"if", "else", "endif"}: + # look for MS Office ]> ending + match = _msmarkedsectionclose.search(rawdata, i+3) + else: + self.error('unknown status keyword %r in marked section' % + rawdata[i+3:j]) + if not match: + return -1 + if report: + j = match.start(0) + self.unknown_decl(rawdata[i+3: j]) + return match.end(0) + + # Internal -- parse comment, return length or -1 if not terminated + def parse_comment(self, i, report=1): + rawdata = self.rawdata + if rawdata[i:i+4] != ' + --> --> + + ''' + + +__UNDEF__ = [] # a special sentinel object + + +def small(text): + if text: + return '' + text + '' + else: + return '' + + +def strong(text): + if text: + return '' + text + '' + else: + return '' + + +def grey(text): + if text: + return '' + text + '' + else: + return '' + + +def lookup(name, frame, locals): + """Find the value for a given name in the given environment.""" + if name in locals: + return 'local', locals[name] + if name in frame.f_globals: + return 'global', frame.f_globals[name] + if '__builtins__' in frame.f_globals: + builtins = frame.f_globals['__builtins__'] + if type(builtins) is type({}): + if name in builtins: + return 'builtin', builtins[name] + else: + if hasattr(builtins, name): + return 'builtin', getattr(builtins, name) + return None, __UNDEF__ + + +def scanvars(reader, frame, locals): + """Scan one logical line of Python and look up values of variables used.""" + vars, lasttoken, parent, prefix, value = [], None, None, '', __UNDEF__ + for ttype, token, start, end, line in tokenize.generate_tokens(reader): + if ttype == tokenize.NEWLINE: + break + if ttype == tokenize.NAME and token not in keyword.kwlist: + if lasttoken == '.': + if parent is not __UNDEF__: + value = getattr(parent, token, __UNDEF__) + vars.append((prefix + token, prefix, value)) + else: + where, value = lookup(token, frame, locals) + vars.append((token, where, value)) + elif token == '.': + prefix += lasttoken + '.' + parent = value + else: + parent, prefix = None, '' + lasttoken = token + return vars + + +def html(einfo, context=5): + """Return a nice HTML document describing a given traceback.""" + etype, evalue, etb = einfo + if isinstance(etype, type): + etype = etype.__name__ + pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable + date = time.ctime(time.time()) + head = '' + pydoc.html.heading( + '%s' % + strong(pydoc.html.escape(str(etype))), + '#ffffff', '#6622aa', pyver + '
' + date) + ''' +

A problem occurred in a Python script. Here is the sequence of +function calls leading up to the error, in the order they occurred.

''' + + indent = '' + small(' ' * 5) + ' ' + frames = [] + records = inspect.getinnerframes(etb, context) + for frame, file, lnum, func, lines, index in records: + if file: + file = os.path.abspath(file) + link = '%s' % (file, + pydoc.html.escape(file)) + else: + file = link = '?' + args, varargs, varkw, locals = inspect.getargvalues(frame) + call = '' + if func != '?': + call = 'in ' + strong(func) + \ + inspect.formatargvalues(args, varargs, varkw, locals, + formatvalue=lambda value: '=' + pydoc.html.repr(value)) + + highlight = {} + + def reader(lnum=[lnum]): + highlight[lnum[0]] = 1 + try: + return linecache.getline(file, lnum[0]) + finally: + lnum[0] += 1 + vars = scanvars(reader, frame, locals) + + rows = ['%s%s %s' % + (' ', link, call)] + if index is not None: + i = lnum - index + for line in lines: + num = small(' ' * (5-len(str(i))) + str(i)) + ' ' + if i in highlight: + line = '=>%s%s' % (num, + pydoc.html.preformat(line)) + rows.append( + '%s' % line) + else: + line = '  %s%s' % ( + num, pydoc.html.preformat(line)) + rows.append('%s' % grey(line)) + i += 1 + + done, dump = {}, [] + for name, where, value in vars: + if name in done: + continue + done[name] = 1 + if value is not __UNDEF__: + if where in ('global', 'builtin'): + name = ('%s ' % where) + strong(name) + elif where == 'local': + name = strong(name) + else: + name = where + strong(name.split('.')[-1]) + dump.append('%s = %s' % (name, pydoc.html.repr(value))) + else: + dump.append(name + ' undefined') + + rows.append('%s' % small(grey(', '.join(dump)))) + frames.append(''' + +%s
''' % '\n'.join(rows)) + + exception = ['

%s: %s' % (strong(pydoc.html.escape(str(etype))), + pydoc.html.escape(str(evalue)))] + for name in dir(evalue): + if name[:1] == '_': + continue + value = pydoc.html.repr(getattr(evalue, name)) + exception.append('\n
%s%s =\n%s' % (indent, name, value)) + + return head + ''.join(frames) + ''.join(exception) + ''' + + + +''' % pydoc.html.escape( + ''.join(traceback.format_exception(etype, evalue, etb))) + + +def text(einfo, context=5): + """Return a plain text document describing a given traceback.""" + etype, evalue, etb = einfo + if isinstance(etype, type): + etype = etype.__name__ + pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable + date = time.ctime(time.time()) + head = "%s\n%s\n%s\n" % (str(etype), pyver, date) + ''' +A problem occurred in a Python script. Here is the sequence of +function calls leading up to the error, in the order they occurred. +''' + + frames = [] + records = inspect.getinnerframes(etb, context) + for frame, file, lnum, func, lines, index in records: + file = file and os.path.abspath(file) or '?' + args, varargs, varkw, locals = inspect.getargvalues(frame) + call = '' + if func != '?': + call = 'in ' + func + \ + inspect.formatargvalues(args, varargs, varkw, locals, + formatvalue=lambda value: '=' + pydoc.text.repr(value)) + + highlight = {} + + def reader(lnum=[lnum]): + highlight[lnum[0]] = 1 + try: + return linecache.getline(file, lnum[0]) + finally: + lnum[0] += 1 + vars = scanvars(reader, frame, locals) + + rows = [' %s %s' % (file, call)] + if index is not None: + i = lnum - index + for line in lines: + num = '%5d ' % i + rows.append(num+line.rstrip()) + i += 1 + + done, dump = {}, [] + for name, where, value in vars: + if name in done: + continue + done[name] = 1 + if value is not __UNDEF__: + if where == 'global': + name = 'global ' + name + elif where != 'local': + name = where + name.split('.')[-1] + dump.append('%s = %s' % (name, pydoc.text.repr(value))) + else: + dump.append(name + ' undefined') + + rows.append('\n'.join(dump)) + frames.append('\n%s\n' % '\n'.join(rows)) + + exception = ['%s: %s' % (str(etype), str(evalue))] + for name in dir(evalue): + value = pydoc.text.repr(getattr(evalue, name)) + exception.append('\n%s%s = %s' % (" "*4, name, value)) + + return head + ''.join(frames) + ''.join(exception) + ''' + +The above is a description of an error in a Python program. Here is +the original traceback: + +%s +''' % ''.join(traceback.format_exception(etype, evalue, etb)) + + +class Hook: + """A hook to replace sys.excepthook that shows tracebacks in HTML.""" + + def __init__(self, display=1, logdir=None, context=5, file=None, + format="html"): + self.display = display # send tracebacks to browser if true + self.logdir = logdir # log tracebacks to files if not None + self.context = context # number of source code lines per frame + self.file = file or sys.stdout # place to send the output + self.format = format + + def __call__(self, etype, evalue, etb): + self.handle((etype, evalue, etb)) + + def handle(self, info=None): + info = info or sys.exc_info() + if self.format == "html": + self.file.write(reset()) + + formatter = (self.format == "html") and html or text + plain = False + try: + doc = formatter(info, self.context) + except: # just in case something goes wrong + doc = ''.join(traceback.format_exception(*info)) + plain = True + + if self.display: + if plain: + doc = doc.replace('&', '&').replace('<', '<') + self.file.write('

' + doc + '
\n') + else: + self.file.write(doc + '\n') + else: + self.file.write('

A problem occurred in a Python script.\n') + + if self.logdir is not None: + suffix = ['.txt', '.html'][self.format == "html"] + (fd, path) = tempfile.mkstemp(suffix=suffix, dir=self.logdir) + + try: + with os.fdopen(fd, 'w') as file: + file.write(doc) + msg = '%s contains the description of this error.' % path + except: + msg = 'Tried to save traceback to %s, but failed.' % path + + if self.format == 'html': + self.file.write('

%s

\n' % msg) + else: + self.file.write(msg + '\n') + try: + self.file.flush() + except: + pass + + +handler = Hook().handle + + +def enable(display=1, logdir=None, context=5, format="html"): + """Install an exception handler that formats tracebacks as HTML. + + The optional argument 'display' can be set to 0 to suppress sending the + traceback to the browser, and 'logdir' can be set to a directory to cause + tracebacks to be written to files there.""" + sys.excepthook = Hook(display=display, logdir=logdir, + context=context, format=format) diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/chunk.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/chunk.py new file mode 100644 index 0000000..3868021 --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/chunk.py @@ -0,0 +1,170 @@ +"""Simple class to read IFF chunks. + +An IFF chunk (used in formats such as AIFF, TIFF, RMFF (RealMedia File +Format)) has the following structure: + ++----------------+ +| ID (4 bytes) | ++----------------+ +| size (4 bytes) | ++----------------+ +| data | +| ... | ++----------------+ + +The ID is a 4-byte string which identifies the type of chunk. + +The size field (a 32-bit value, encoded using big-endian byte order) +gives the size of the whole chunk, including the 8-byte header. + +Usually an IFF-type file consists of one or more chunks. The proposed +usage of the Chunk class defined here is to instantiate an instance at +the start of each chunk and read from the instance until it reaches +the end, after which a new instance can be instantiated. At the end +of the file, creating a new instance will fail with an EOFError +exception. + +Usage: +while True: + try: + chunk = Chunk(file) + except EOFError: + break + chunktype = chunk.getname() + while True: + data = chunk.read(nbytes) + if not data: + pass + # do something with data + +The interface is file-like. The implemented methods are: +read, close, seek, tell, isatty. +Extra methods are: skip() (called by close, skips to the end of the chunk), +getname() (returns the name (ID) of the chunk) + +The __init__ method has one required argument, a file-like object +(including a chunk instance), and one optional argument, a flag which +specifies whether or not chunks are aligned on 2-byte boundaries. The +default is 1, i.e. aligned. +""" + + +class Chunk: + def __init__(self, file, align=True, bigendian=True, inclheader=False): + import struct + self.closed = False + self.align = align # whether to align to word (2-byte) boundaries + if bigendian: + strflag = '>' + else: + strflag = '<' + self.file = file + self.chunkname = file.read(4) + if len(self.chunkname) < 4: + raise EOFError + try: + self.chunksize = struct.unpack_from(strflag+'L', file.read(4))[0] + except struct.error: + raise EOFError + if inclheader: + self.chunksize = self.chunksize - 8 # subtract header + self.size_read = 0 + try: + self.offset = self.file.tell() + except (AttributeError, OSError): + self.seekable = False + else: + self.seekable = True + + def getname(self): + """Return the name (ID) of the current chunk.""" + return self.chunkname + + def getsize(self): + """Return the size of the current chunk.""" + return self.chunksize + + def close(self): + if not self.closed: + try: + self.skip() + finally: + self.closed = True + + def isatty(self): + if self.closed: + raise ValueError("I/O operation on closed file") + return False + + def seek(self, pos, whence=0): + """Seek to specified position into the chunk. + Default position is 0 (start of chunk). + If the file is not seekable, this will result in an error. + """ + + if self.closed: + raise ValueError("I/O operation on closed file") + if not self.seekable: + raise OSError("cannot seek") + if whence == 1: + pos = pos + self.size_read + elif whence == 2: + pos = pos + self.chunksize + if pos < 0 or pos > self.chunksize: + raise RuntimeError + self.file.seek(self.offset + pos, 0) + self.size_read = pos + + def tell(self): + if self.closed: + raise ValueError("I/O operation on closed file") + return self.size_read + + def read(self, size=-1): + """Read at most size bytes from the chunk. + If size is omitted or negative, read until the end + of the chunk. + """ + + if self.closed: + raise ValueError("I/O operation on closed file") + if self.size_read >= self.chunksize: + return b'' + if size < 0: + size = self.chunksize - self.size_read + if size > self.chunksize - self.size_read: + size = self.chunksize - self.size_read + data = self.file.read(size) + self.size_read = self.size_read + len(data) + if self.size_read == self.chunksize and \ + self.align and \ + (self.chunksize & 1): + dummy = self.file.read(1) + self.size_read = self.size_read + len(dummy) + return data + + def skip(self): + """Skip the rest of the chunk. + If you are not interested in the contents of the chunk, + this method should be called so that the file points to + the start of the next chunk. + """ + + if self.closed: + raise ValueError("I/O operation on closed file") + if self.seekable: + try: + n = self.chunksize - self.size_read + # maybe fix alignment + if self.align and (self.chunksize & 1): + n = n + 1 + self.file.seek(n, 1) + self.size_read = self.size_read + n + return + except OSError: + pass + while self.size_read < self.chunksize: + n = min(8192, self.chunksize - self.size_read) + dummy = self.read(n) + if not dummy: + raise EOFError diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/cmd.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/cmd.py new file mode 100644 index 0000000..05a13a1 --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/cmd.py @@ -0,0 +1,403 @@ +"""A generic class to build line-oriented command interpreters. + +Interpreters constructed with this class obey the following conventions: + +1. End of file on input is processed as the command 'EOF'. +2. A command is parsed out of each line by collecting the prefix composed + of characters in the identchars member. +3. A command `foo' is dispatched to a method 'do_foo()'; the do_ method + is passed a single argument consisting of the remainder of the line. +4. Typing an empty line repeats the last command. (Actually, it calls the + method `emptyline', which may be overridden in a subclass.) +5. There is a predefined `help' method. Given an argument `topic', it + calls the command `help_topic'. With no arguments, it lists all topics + with defined help_ functions, broken into up to three topics; documented + commands, miscellaneous help topics, and undocumented commands. +6. The command '?' is a synonym for `help'. The command '!' is a synonym + for `shell', if a do_shell method exists. +7. If completion is enabled, completing commands will be done automatically, + and completing of commands args is done by calling complete_foo() with + arguments text, line, begidx, endidx. text is string we are matching + against, all returned matches must begin with it. line is the current + input line (lstripped), begidx and endidx are the beginning and end + indexes of the text being matched, which could be used to provide + different completion depending upon which position the argument is in. + +The `default' method may be overridden to intercept commands for which there +is no do_ method. + +The `completedefault' method may be overridden to intercept completions for +commands that have no complete_ method. + +The data member `self.ruler' sets the character used to draw separator lines +in the help messages. If empty, no ruler line is drawn. It defaults to "=". + +If the value of `self.intro' is nonempty when the cmdloop method is called, +it is printed out on interpreter startup. This value may be overridden +via an optional argument to the cmdloop() method. + +The data members `self.doc_header', `self.misc_header', and +`self.undoc_header' set the headers used for the help function's +listings of documented functions, miscellaneous topics, and undocumented +functions respectively. +""" + +import string +import sys + +__all__ = ["Cmd"] + +PROMPT = '(Cmd) ' +IDENTCHARS = string.ascii_letters + string.digits + '_' + + +class Cmd: + """A simple framework for writing line-oriented command interpreters. + + These are often useful for test harnesses, administrative tools, and + prototypes that will later be wrapped in a more sophisticated interface. + + A Cmd instance or subclass instance is a line-oriented interpreter + framework. There is no good reason to instantiate Cmd itself; rather, + it's useful as a superclass of an interpreter class you define yourself + in order to inherit Cmd's methods and encapsulate action methods. + + """ + prompt = PROMPT + identchars = IDENTCHARS + ruler = '=' + lastcmd = '' + intro = None + doc_leader = "" + doc_header = "Documented commands (type help ):" + misc_header = "Miscellaneous help topics:" + undoc_header = "Undocumented commands:" + nohelp = "*** No help on %s" + use_rawinput = 1 + + def __init__(self, completekey='tab', stdin=None, stdout=None): + """Instantiate a line-oriented interpreter framework. + + The optional argument 'completekey' is the readline name of a + completion key; it defaults to the Tab key. If completekey is + not None and the readline module is available, command completion + is done automatically. The optional arguments stdin and stdout + specify alternate input and output file objects; if not specified, + sys.stdin and sys.stdout are used. + + """ + if stdin is not None: + self.stdin = stdin + else: + self.stdin = sys.stdin + if stdout is not None: + self.stdout = stdout + else: + self.stdout = sys.stdout + self.cmdqueue = [] + self.completekey = completekey + + def cmdloop(self, intro=None): + """Repeatedly issue a prompt, accept input, parse an initial prefix + off the received input, and dispatch to action methods, passing them + the remainder of the line as argument. + + """ + + self.preloop() + if self.use_rawinput and self.completekey: + try: + import readline + self.old_completer = readline.get_completer() + readline.set_completer(self.complete) + readline.parse_and_bind(self.completekey+": complete") + except ImportError: + pass + try: + if intro is not None: + self.intro = intro + if self.intro: + self.stdout.write(str(self.intro)+"\n") + stop = None + while not stop: + if self.cmdqueue: + line = self.cmdqueue.pop(0) + else: + if self.use_rawinput: + try: + line = input(self.prompt) + except EOFError: + line = 'EOF' + else: + self.stdout.write(self.prompt) + self.stdout.flush() + line = self.stdin.readline() + if not len(line): + line = 'EOF' + else: + line = line.rstrip('\r\n') + line = self.precmd(line) + stop = self.onecmd(line) + stop = self.postcmd(stop, line) + self.postloop() + finally: + if self.use_rawinput and self.completekey: + try: + import readline + readline.set_completer(self.old_completer) + except ImportError: + pass + + def precmd(self, line): + """Hook method executed just before the command line is + interpreted, but after the input prompt is generated and issued. + + """ + return line + + def postcmd(self, stop, line): + """Hook method executed just after a command dispatch is finished.""" + return stop + + def preloop(self): + """Hook method executed once when the cmdloop() method is called.""" + pass + + def postloop(self): + """Hook method executed once when the cmdloop() method is about to + return. + + """ + pass + + def parseline(self, line): + """Parse the line into a command name and a string containing + the arguments. Returns a tuple containing (command, args, line). + 'command' and 'args' may be None if the line couldn't be parsed. + """ + line = line.strip() + if not line: + return None, None, line + elif line[0] == '?': + line = 'help ' + line[1:] + elif line[0] == '!': + if hasattr(self, 'do_shell'): + line = 'shell ' + line[1:] + else: + return None, None, line + i, n = 0, len(line) + while i < n and line[i] in self.identchars: + i = i+1 + cmd, arg = line[:i], line[i:].strip() + return cmd, arg, line + + def onecmd(self, line): + """Interpret the argument as though it had been typed in response + to the prompt. + + This may be overridden, but should not normally need to be; + see the precmd() and postcmd() methods for useful execution hooks. + The return value is a flag indicating whether interpretation of + commands by the interpreter should stop. + + """ + cmd, arg, line = self.parseline(line) + if not line: + return self.emptyline() + if cmd is None: + return self.default(line) + self.lastcmd = line + if line == 'EOF': + self.lastcmd = '' + if cmd == '': + return self.default(line) + else: + try: + func = getattr(self, 'do_' + cmd) + except AttributeError: + return self.default(line) + return func(arg) + + def emptyline(self): + """Called when an empty line is entered in response to the prompt. + + If this method is not overridden, it repeats the last nonempty + command entered. + + """ + if self.lastcmd: + return self.onecmd(self.lastcmd) + + def default(self, line): + """Called on an input line when the command prefix is not recognized. + + If this method is not overridden, it prints an error message and + returns. + + """ + self.stdout.write('*** Unknown syntax: %s\n' % line) + + def completedefault(self, *ignored): + """Method called to complete an input line when no command-specific + complete_*() method is available. + + By default, it returns an empty list. + + """ + return [] + + def completenames(self, text, *ignored): + dotext = 'do_'+text + return [a[3:] for a in self.get_names() if a.startswith(dotext)] + + def complete(self, text, state): + """Return the next possible completion for 'text'. + + If a command has not been entered, then complete against command list. + Otherwise try to call complete_ to get list of completions. + """ + if state == 0: + import readline + origline = readline.get_line_buffer() + line = origline.lstrip() + stripped = len(origline) - len(line) + begidx = readline.get_begidx() - stripped + endidx = readline.get_endidx() - stripped + if begidx > 0: + cmd, args, foo = self.parseline(line) + if cmd == '': + compfunc = self.completedefault + else: + try: + compfunc = getattr(self, 'complete_' + cmd) + except AttributeError: + compfunc = self.completedefault + else: + compfunc = self.completenames + self.completion_matches = compfunc(text, line, begidx, endidx) + try: + return self.completion_matches[state] + except IndexError: + return None + + def get_names(self): + # This method used to pull in base class attributes + # at a time dir() didn't do it yet. + return dir(self.__class__) + + def complete_help(self, *args): + commands = set(self.completenames(*args)) + topics = set(a[5:] for a in self.get_names() + if a.startswith('help_' + args[0])) + return list(commands | topics) + + def do_help(self, arg): + 'List available commands with "help" or detailed help with "help cmd".' + if arg: + # XXX check arg syntax + try: + func = getattr(self, 'help_' + arg) + except AttributeError: + try: + doc = getattr(self, 'do_' + arg).__doc__ + if doc: + self.stdout.write("%s\n" % str(doc)) + return + except AttributeError: + pass + self.stdout.write("%s\n" % str(self.nohelp % (arg,))) + return + func() + else: + names = self.get_names() + cmds_doc = [] + cmds_undoc = [] + help = {} + for name in names: + if name[:5] == 'help_': + help[name[5:]] = 1 + names.sort() + # There can be duplicates if routines overridden + prevname = '' + for name in names: + if name[:3] == 'do_': + if name == prevname: + continue + prevname = name + cmd = name[3:] + if cmd in help: + cmds_doc.append(cmd) + del help[cmd] + elif getattr(self, name).__doc__: + cmds_doc.append(cmd) + else: + cmds_undoc.append(cmd) + self.stdout.write("%s\n" % str(self.doc_leader)) + self.print_topics(self.doc_header, cmds_doc, 15, 80) + self.print_topics(self.misc_header, list(help.keys()), 15, 80) + self.print_topics(self.undoc_header, cmds_undoc, 15, 80) + + def print_topics(self, header, cmds, cmdlen, maxcol): + if cmds: + self.stdout.write("%s\n" % str(header)) + if self.ruler: + self.stdout.write("%s\n" % str(self.ruler * len(header))) + self.columnize(cmds, maxcol-1) + self.stdout.write("\n") + + def columnize(self, list, displaywidth=80): + """Display a list of strings as a compact set of columns. + + Each column is only as wide as necessary. + Columns are separated by two spaces (one was not legible enough). + """ + if not list: + self.stdout.write("\n") + return + + nonstrings = [i for i in range(len(list)) + if not isinstance(list[i], str)] + if nonstrings: + raise TypeError("list[i] not a string for i in %s" + % ", ".join(map(str, nonstrings))) + size = len(list) + if size == 1: + self.stdout.write('%s\n' % str(list[0])) + return + # Try every row count from 1 upwards + for nrows in range(1, len(list)): + ncols = (size+nrows-1) // nrows + colwidths = [] + totwidth = -2 + for col in range(ncols): + colwidth = 0 + for row in range(nrows): + i = row + nrows*col + if i >= size: + break + x = list[i] + colwidth = max(colwidth, len(x)) + colwidths.append(colwidth) + totwidth += colwidth + 2 + if totwidth > displaywidth: + break + if totwidth <= displaywidth: + break + else: + nrows = len(list) + ncols = 1 + colwidths = [0] + for row in range(nrows): + texts = [] + for col in range(ncols): + i = row + nrows*col + if i >= size: + x = "" + else: + x = list[i] + texts.append(x) + while texts and not texts[-1]: + del texts[-1] + for col in range(len(texts)): + texts[col] = texts[col].ljust(colwidths[col]) + self.stdout.write("%s\n" % str(" ".join(texts))) diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/code.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/code.py new file mode 100644 index 0000000..a39ca2a --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/code.py @@ -0,0 +1,314 @@ +"""Utilities needed to emulate Python's interactive interpreter. + +""" + +# Inspired by similar code by Jeff Epler and Fredrik Lundh. + + +import sys +import traceback +import argparse +from codeop import CommandCompiler, compile_command + +__all__ = ["InteractiveInterpreter", "InteractiveConsole", "interact", + "compile_command"] + + +class InteractiveInterpreter: + """Base class for InteractiveConsole. + + This class deals with parsing and interpreter state (the user's + namespace); it doesn't deal with input buffering or prompting or + input file naming (the filename is always passed in explicitly). + + """ + + def __init__(self, locals=None): + """Constructor. + + The optional 'locals' argument specifies the dictionary in + which code will be executed; it defaults to a newly created + dictionary with key "__name__" set to "__console__" and key + "__doc__" set to None. + + """ + if locals is None: + locals = {"__name__": "__console__", "__doc__": None} + self.locals = locals + self.compile = CommandCompiler() + + def runsource(self, source, filename="", symbol="single"): + """Compile and run some source in the interpreter. + + Arguments are as for compile_command(). + + One several things can happen: + + 1) The input is incorrect; compile_command() raised an + exception (SyntaxError or OverflowError). A syntax traceback + will be printed by calling the showsyntaxerror() method. + + 2) The input is incomplete, and more input is required; + compile_command() returned None. Nothing happens. + + 3) The input is complete; compile_command() returned a code + object. The code is executed by calling self.runcode() (which + also handles run-time exceptions, except for SystemExit). + + The return value is True in case 2, False in the other cases (unless + an exception is raised). The return value can be used to + decide whether to use sys.ps1 or sys.ps2 to prompt the next + line. + + """ + try: + code = self.compile(source, filename, symbol) + except (OverflowError, SyntaxError, ValueError): + # Case 1 + self.showsyntaxerror(filename) + return False + + if code is None: + # Case 2 + return True + + # Case 3 + self.runcode(code) + return False + + def runcode(self, code): + """Execute a code object. + + When an exception occurs, self.showtraceback() is called to + display a traceback. All exceptions are caught except + SystemExit, which is reraised. + + A note about KeyboardInterrupt: this exception may occur + elsewhere in this code, and may not always be caught. The + caller should be prepared to deal with it. + + """ + try: + exec(code, self.locals) + except SystemExit: + raise + except: + self.showtraceback() + + def showsyntaxerror(self, filename=None): + """Display the syntax error that just occurred. + + This doesn't display a stack trace because there isn't one. + + If a filename is given, it is stuffed in the exception instead + of what was there before (because Python's parser always uses + "" when reading from a string). + + The output is written by self.write(), below. + + """ + type, value, tb = sys.exc_info() + sys.last_type = type + sys.last_value = value + sys.last_traceback = tb + if filename and type is SyntaxError: + # Work hard to stuff the correct filename in the exception + try: + msg, (dummy_filename, lineno, offset, line) = value.args + except ValueError: + # Not the format we expect; leave it alone + pass + else: + # Stuff in the right filename + value = SyntaxError(msg, (filename, lineno, offset, line)) + sys.last_value = value + if sys.excepthook is sys.__excepthook__: + lines = traceback.format_exception_only(type, value) + self.write(''.join(lines)) + else: + # If someone has set sys.excepthook, we let that take precedence + # over self.write + sys.excepthook(type, value, tb) + + def showtraceback(self): + """Display the exception that just occurred. + + We remove the first stack item because it is our own code. + + The output is written by self.write(), below. + + """ + sys.last_type, sys.last_value, last_tb = ei = sys.exc_info() + sys.last_traceback = last_tb + try: + lines = traceback.format_exception(ei[0], ei[1], last_tb.tb_next) + if sys.excepthook is sys.__excepthook__: + self.write(''.join(lines)) + else: + # If someone has set sys.excepthook, we let that take precedence + # over self.write + sys.excepthook(ei[0], ei[1], last_tb) + finally: + last_tb = ei = None + + def write(self, data): + """Write a string. + + The base implementation writes to sys.stderr; a subclass may + replace this with a different implementation. + + """ + sys.stderr.write(data) + + +class InteractiveConsole(InteractiveInterpreter): + """Closely emulate the behavior of the interactive Python interpreter. + + This class builds on InteractiveInterpreter and adds prompting + using the familiar sys.ps1 and sys.ps2, and input buffering. + + """ + + def __init__(self, locals=None, filename=""): + """Constructor. + + The optional locals argument will be passed to the + InteractiveInterpreter base class. + + The optional filename argument should specify the (file)name + of the input stream; it will show up in tracebacks. + + """ + InteractiveInterpreter.__init__(self, locals) + self.filename = filename + self.resetbuffer() + + def resetbuffer(self): + """Reset the input buffer.""" + self.buffer = [] + + def interact(self, banner=None, exitmsg=None): + """Closely emulate the interactive Python console. + + The optional banner argument specifies the banner to print + before the first interaction; by default it prints a banner + similar to the one printed by the real Python interpreter, + followed by the current class name in parentheses (so as not + to confuse this with the real interpreter -- since it's so + close!). + + The optional exitmsg argument specifies the exit message + printed when exiting. Pass the empty string to suppress + printing an exit message. If exitmsg is not given or None, + a default message is printed. + + """ + try: + sys.ps1 + except AttributeError: + sys.ps1 = ">>> " + try: + sys.ps2 + except AttributeError: + sys.ps2 = "... " + cprt = 'Type "help", "copyright", "credits" or "license" for more information.' + if banner is None: + self.write("Python %s on %s\n%s\n(%s)\n" % + (sys.version, sys.platform, cprt, + self.__class__.__name__)) + elif banner: + self.write("%s\n" % str(banner)) + more = 0 + while 1: + try: + if more: + prompt = sys.ps2 + else: + prompt = sys.ps1 + try: + line = self.raw_input(prompt) + except EOFError: + self.write("\n") + break + else: + more = self.push(line) + except KeyboardInterrupt: + self.write("\nKeyboardInterrupt\n") + self.resetbuffer() + more = 0 + if exitmsg is None: + self.write('now exiting %s...\n' % self.__class__.__name__) + elif exitmsg != '': + self.write('%s\n' % exitmsg) + + def push(self, line): + """Push a line to the interpreter. + + The line should not have a trailing newline; it may have + internal newlines. The line is appended to a buffer and the + interpreter's runsource() method is called with the + concatenated contents of the buffer as source. If this + indicates that the command was executed or invalid, the buffer + is reset; otherwise, the command is incomplete, and the buffer + is left as it was after the line was appended. The return + value is 1 if more input is required, 0 if the line was dealt + with in some way (this is the same as runsource()). + + """ + self.buffer.append(line) + source = "\n".join(self.buffer) + more = self.runsource(source, self.filename) + if not more: + self.resetbuffer() + return more + + def raw_input(self, prompt=""): + """Write a prompt and read a line. + + The returned line does not include the trailing newline. + When the user enters the EOF key sequence, EOFError is raised. + + The base implementation uses the built-in function + input(); a subclass may replace this with a different + implementation. + + """ + return input(prompt) + + +def interact(banner=None, readfunc=None, local=None, exitmsg=None): + """Closely emulate the interactive Python interpreter. + + This is a backwards compatible interface to the InteractiveConsole + class. When readfunc is not specified, it attempts to import the + readline module to enable GNU readline if it is available. + + Arguments (all optional, all default to None): + + banner -- passed to InteractiveConsole.interact() + readfunc -- if not None, replaces InteractiveConsole.raw_input() + local -- passed to InteractiveInterpreter.__init__() + exitmsg -- passed to InteractiveConsole.interact() + + """ + console = InteractiveConsole(local) + if readfunc is not None: + console.raw_input = readfunc + else: + try: + import readline + except ImportError: + pass + console.interact(banner, exitmsg) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument('-q', action='store_true', + help="don't print version and copyright messages") + args = parser.parse_args() + if args.q or sys.flags.quiet: + banner = '' + else: + banner = None + interact(banner) diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/codecs.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/codecs.py new file mode 100644 index 0000000..6e23268 --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/codecs.py @@ -0,0 +1,1112 @@ +""" codecs -- Python Codec Registry, API and helpers. + + +Written by Marc-Andre Lemburg (mal@lemburg.com). + +(c) Copyright CNRI, All Rights Reserved. NO WARRANTY. + +""" # " + +import builtins +import sys + +# Registry and builtin stateless codec functions + +try: + from _codecs import * +except ImportError as why: + raise SystemError('Failed to load the builtin codecs: %s' % why) + +__all__ = ["register", "lookup", "open", "EncodedFile", "BOM", "BOM_BE", + "BOM_LE", "BOM32_BE", "BOM32_LE", "BOM64_BE", "BOM64_LE", + "BOM_UTF8", "BOM_UTF16", "BOM_UTF16_LE", "BOM_UTF16_BE", + "BOM_UTF32", "BOM_UTF32_LE", "BOM_UTF32_BE", + "CodecInfo", "Codec", "IncrementalEncoder", "IncrementalDecoder", + "StreamReader", "StreamWriter", + "StreamReaderWriter", "StreamRecoder", + "getencoder", "getdecoder", "getincrementalencoder", + "getincrementaldecoder", "getreader", "getwriter", + "encode", "decode", "iterencode", "iterdecode", + "strict_errors", "ignore_errors", "replace_errors", + "xmlcharrefreplace_errors", + "backslashreplace_errors", "namereplace_errors", + "register_error", "lookup_error"] + +# Constants + +# +# Byte Order Mark (BOM = ZERO WIDTH NO-BREAK SPACE = U+FEFF) +# and its possible byte string values +# for UTF8/UTF16/UTF32 output and little/big endian machines +# + +# UTF-8 +BOM_UTF8 = b'\xef\xbb\xbf' + +# UTF-16, little endian +BOM_LE = BOM_UTF16_LE = b'\xff\xfe' + +# UTF-16, big endian +BOM_BE = BOM_UTF16_BE = b'\xfe\xff' + +# UTF-32, little endian +BOM_UTF32_LE = b'\xff\xfe\x00\x00' + +# UTF-32, big endian +BOM_UTF32_BE = b'\x00\x00\xfe\xff' + +if sys.byteorder == 'little': + + # UTF-16, native endianness + BOM = BOM_UTF16 = BOM_UTF16_LE + + # UTF-32, native endianness + BOM_UTF32 = BOM_UTF32_LE + +else: + + # UTF-16, native endianness + BOM = BOM_UTF16 = BOM_UTF16_BE + + # UTF-32, native endianness + BOM_UTF32 = BOM_UTF32_BE + +# Old broken names (don't use in new code) +BOM32_LE = BOM_UTF16_LE +BOM32_BE = BOM_UTF16_BE +BOM64_LE = BOM_UTF32_LE +BOM64_BE = BOM_UTF32_BE + + +# Codec base classes (defining the API) + +class CodecInfo(tuple): + """Codec details when looking up the codec registry""" + + # Private API to allow Python 3.4 to blacklist the known non-Unicode + # codecs in the standard library. A more general mechanism to + # reliably distinguish test encodings from other codecs will hopefully + # be defined for Python 3.5 + # + # See http://bugs.python.org/issue19619 + _is_text_encoding = True # Assume codecs are text encodings by default + + def __new__(cls, encode, decode, streamreader=None, streamwriter=None, + incrementalencoder=None, incrementaldecoder=None, name=None, + *, _is_text_encoding=None): + self = tuple.__new__(cls, (encode, decode, streamreader, streamwriter)) + self.name = name + self.encode = encode + self.decode = decode + self.incrementalencoder = incrementalencoder + self.incrementaldecoder = incrementaldecoder + self.streamwriter = streamwriter + self.streamreader = streamreader + if _is_text_encoding is not None: + self._is_text_encoding = _is_text_encoding + return self + + def __repr__(self): + return "<%s.%s object for encoding %s at %#x>" % \ + (self.__class__.__module__, self.__class__.__qualname__, + self.name, id(self)) + + +class Codec: + + """ Defines the interface for stateless encoders/decoders. + + The .encode()/.decode() methods may use different error + handling schemes by providing the errors argument. These + string values are predefined: + + 'strict' - raise a ValueError error (or a subclass) + 'ignore' - ignore the character and continue with the next + 'replace' - replace with a suitable replacement character; + Python will use the official U+FFFD REPLACEMENT + CHARACTER for the builtin Unicode codecs on + decoding and '?' on encoding. + 'surrogateescape' - replace with private code points U+DCnn. + 'xmlcharrefreplace' - Replace with the appropriate XML + character reference (only for encoding). + 'backslashreplace' - Replace with backslashed escape sequences. + 'namereplace' - Replace with \\N{...} escape sequences + (only for encoding). + + The set of allowed values can be extended via register_error. + + """ + + def encode(self, input, errors='strict'): + """ Encodes the object input and returns a tuple (output + object, length consumed). + + errors defines the error handling to apply. It defaults to + 'strict' handling. + + The method may not store state in the Codec instance. Use + StreamWriter for codecs which have to keep state in order to + make encoding efficient. + + The encoder must be able to handle zero length input and + return an empty object of the output object type in this + situation. + + """ + raise NotImplementedError + + def decode(self, input, errors='strict'): + """ Decodes the object input and returns a tuple (output + object, length consumed). + + input must be an object which provides the bf_getreadbuf + buffer slot. Python strings, buffer objects and memory + mapped files are examples of objects providing this slot. + + errors defines the error handling to apply. It defaults to + 'strict' handling. + + The method may not store state in the Codec instance. Use + StreamReader for codecs which have to keep state in order to + make decoding efficient. + + The decoder must be able to handle zero length input and + return an empty object of the output object type in this + situation. + + """ + raise NotImplementedError + + +class IncrementalEncoder(object): + """ + An IncrementalEncoder encodes an input in multiple steps. The input can + be passed piece by piece to the encode() method. The IncrementalEncoder + remembers the state of the encoding process between calls to encode(). + """ + + def __init__(self, errors='strict'): + """ + Creates an IncrementalEncoder instance. + + The IncrementalEncoder may use different error handling schemes by + providing the errors keyword argument. See the module docstring + for a list of possible values. + """ + self.errors = errors + self.buffer = "" + + def encode(self, input, final=False): + """ + Encodes input and returns the resulting object. + """ + raise NotImplementedError + + def reset(self): + """ + Resets the encoder to the initial state. + """ + + def getstate(self): + """ + Return the current state of the encoder. + """ + return 0 + + def setstate(self, state): + """ + Set the current state of the encoder. state must have been + returned by getstate(). + """ + + +class BufferedIncrementalEncoder(IncrementalEncoder): + """ + This subclass of IncrementalEncoder can be used as the baseclass for an + incremental encoder if the encoder must keep some of the output in a + buffer between calls to encode(). + """ + + def __init__(self, errors='strict'): + IncrementalEncoder.__init__(self, errors) + # unencoded input that is kept between calls to encode() + self.buffer = "" + + def _buffer_encode(self, input, errors, final): + # Overwrite this method in subclasses: It must encode input + # and return an (output, length consumed) tuple + raise NotImplementedError + + def encode(self, input, final=False): + # encode input (taking the buffer into account) + data = self.buffer + input + (result, consumed) = self._buffer_encode(data, self.errors, final) + # keep unencoded input until the next call + self.buffer = data[consumed:] + return result + + def reset(self): + IncrementalEncoder.reset(self) + self.buffer = "" + + def getstate(self): + return self.buffer or 0 + + def setstate(self, state): + self.buffer = state or "" + + +class IncrementalDecoder(object): + """ + An IncrementalDecoder decodes an input in multiple steps. The input can + be passed piece by piece to the decode() method. The IncrementalDecoder + remembers the state of the decoding process between calls to decode(). + """ + + def __init__(self, errors='strict'): + """ + Create an IncrementalDecoder instance. + + The IncrementalDecoder may use different error handling schemes by + providing the errors keyword argument. See the module docstring + for a list of possible values. + """ + self.errors = errors + + def decode(self, input, final=False): + """ + Decode input and returns the resulting object. + """ + raise NotImplementedError + + def reset(self): + """ + Reset the decoder to the initial state. + """ + + def getstate(self): + """ + Return the current state of the decoder. + + This must be a (buffered_input, additional_state_info) tuple. + buffered_input must be a bytes object containing bytes that + were passed to decode() that have not yet been converted. + additional_state_info must be a non-negative integer + representing the state of the decoder WITHOUT yet having + processed the contents of buffered_input. In the initial state + and after reset(), getstate() must return (b"", 0). + """ + return (b"", 0) + + def setstate(self, state): + """ + Set the current state of the decoder. + + state must have been returned by getstate(). The effect of + setstate((b"", 0)) must be equivalent to reset(). + """ + + +class BufferedIncrementalDecoder(IncrementalDecoder): + """ + This subclass of IncrementalDecoder can be used as the baseclass for an + incremental decoder if the decoder must be able to handle incomplete + byte sequences. + """ + + def __init__(self, errors='strict'): + IncrementalDecoder.__init__(self, errors) + # undecoded input that is kept between calls to decode() + self.buffer = b"" + + def _buffer_decode(self, input, errors, final): + # Overwrite this method in subclasses: It must decode input + # and return an (output, length consumed) tuple + raise NotImplementedError + + def decode(self, input, final=False): + # decode input (taking the buffer into account) + data = self.buffer + input + (result, consumed) = self._buffer_decode(data, self.errors, final) + # keep undecoded input until the next call + self.buffer = data[consumed:] + return result + + def reset(self): + IncrementalDecoder.reset(self) + self.buffer = b"" + + def getstate(self): + # additional state info is always 0 + return (self.buffer, 0) + + def setstate(self, state): + # ignore additional state info + self.buffer = state[0] + +# +# The StreamWriter and StreamReader class provide generic working +# interfaces which can be used to implement new encoding submodules +# very easily. See encodings/utf_8.py for an example on how this is +# done. +# + + +class StreamWriter(Codec): + + def __init__(self, stream, errors='strict'): + """ Creates a StreamWriter instance. + + stream must be a file-like object open for writing. + + The StreamWriter may use different error handling + schemes by providing the errors keyword argument. These + parameters are predefined: + + 'strict' - raise a ValueError (or a subclass) + 'ignore' - ignore the character and continue with the next + 'replace'- replace with a suitable replacement character + 'xmlcharrefreplace' - Replace with the appropriate XML + character reference. + 'backslashreplace' - Replace with backslashed escape + sequences. + 'namereplace' - Replace with \\N{...} escape sequences. + + The set of allowed parameter values can be extended via + register_error. + """ + self.stream = stream + self.errors = errors + + def write(self, object): + """ Writes the object's contents encoded to self.stream. + """ + data, consumed = self.encode(object, self.errors) + self.stream.write(data) + + def writelines(self, list): + """ Writes the concatenated list of strings to the stream + using .write(). + """ + self.write(''.join(list)) + + def reset(self): + """ Flushes and resets the codec buffers used for keeping state. + + Calling this method should ensure that the data on the + output is put into a clean state, that allows appending + of new fresh data without having to rescan the whole + stream to recover state. + + """ + pass + + def seek(self, offset, whence=0): + self.stream.seek(offset, whence) + if whence == 0 and offset == 0: + self.reset() + + def __getattr__(self, name, + getattr=getattr): + """ Inherit all other methods from the underlying stream. + """ + return getattr(self.stream, name) + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + +### + + +class StreamReader(Codec): + + charbuffertype = str + + def __init__(self, stream, errors='strict'): + """ Creates a StreamReader instance. + + stream must be a file-like object open for reading. + + The StreamReader may use different error handling + schemes by providing the errors keyword argument. These + parameters are predefined: + + 'strict' - raise a ValueError (or a subclass) + 'ignore' - ignore the character and continue with the next + 'replace'- replace with a suitable replacement character + 'backslashreplace' - Replace with backslashed escape sequences; + + The set of allowed parameter values can be extended via + register_error. + """ + self.stream = stream + self.errors = errors + self.bytebuffer = b"" + self._empty_charbuffer = self.charbuffertype() + self.charbuffer = self._empty_charbuffer + self.linebuffer = None + + def decode(self, input, errors='strict'): + raise NotImplementedError + + def read(self, size=-1, chars=-1, firstline=False): + """ Decodes data from the stream self.stream and returns the + resulting object. + + chars indicates the number of decoded code points or bytes to + return. read() will never return more data than requested, + but it might return less, if there is not enough available. + + size indicates the approximate maximum number of decoded + bytes or code points to read for decoding. The decoder + can modify this setting as appropriate. The default value + -1 indicates to read and decode as much as possible. size + is intended to prevent having to decode huge files in one + step. + + If firstline is true, and a UnicodeDecodeError happens + after the first line terminator in the input only the first line + will be returned, the rest of the input will be kept until the + next call to read(). + + The method should use a greedy read strategy, meaning that + it should read as much data as is allowed within the + definition of the encoding and the given size, e.g. if + optional encoding endings or state markers are available + on the stream, these should be read too. + """ + # If we have lines cached, first merge them back into characters + if self.linebuffer: + self.charbuffer = self._empty_charbuffer.join(self.linebuffer) + self.linebuffer = None + + if chars < 0: + # For compatibility with other read() methods that take a + # single argument + chars = size + + # read until we get the required number of characters (if available) + while True: + # can the request be satisfied from the character buffer? + if chars >= 0: + if len(self.charbuffer) >= chars: + break + # we need more data + if size < 0: + newdata = self.stream.read() + else: + newdata = self.stream.read(size) + # decode bytes (those remaining from the last call included) + data = self.bytebuffer + newdata + if not data: + break + try: + newchars, decodedbytes = self.decode(data, self.errors) + except UnicodeDecodeError as exc: + if firstline: + newchars, decodedbytes = \ + self.decode(data[:exc.start], self.errors) + lines = newchars.splitlines(keepends=True) + if len(lines) <= 1: + raise + else: + raise + # keep undecoded bytes until the next call + self.bytebuffer = data[decodedbytes:] + # put new characters in the character buffer + self.charbuffer += newchars + # there was no data available + if not newdata: + break + if chars < 0: + # Return everything we've got + result = self.charbuffer + self.charbuffer = self._empty_charbuffer + else: + # Return the first chars characters + result = self.charbuffer[:chars] + self.charbuffer = self.charbuffer[chars:] + return result + + def readline(self, size=None, keepends=True): + """ Read one line from the input stream and return the + decoded data. + + size, if given, is passed as size argument to the + read() method. + + """ + # If we have lines cached from an earlier read, return + # them unconditionally + if self.linebuffer: + line = self.linebuffer[0] + del self.linebuffer[0] + if len(self.linebuffer) == 1: + # revert to charbuffer mode; we might need more data + # next time + self.charbuffer = self.linebuffer[0] + self.linebuffer = None + if not keepends: + line = line.splitlines(keepends=False)[0] + return line + + readsize = size or 72 + line = self._empty_charbuffer + # If size is given, we call read() only once + while True: + data = self.read(readsize, firstline=True) + if data: + # If we're at a "\r" read one extra character (which might + # be a "\n") to get a proper line ending. If the stream is + # temporarily exhausted we return the wrong line ending. + if (isinstance(data, str) and data.endswith("\r")) or \ + (isinstance(data, bytes) and data.endswith(b"\r")): + data += self.read(size=1, chars=1) + + line += data + lines = line.splitlines(keepends=True) + if lines: + if len(lines) > 1: + # More than one line result; the first line is a full line + # to return + line = lines[0] + del lines[0] + if len(lines) > 1: + # cache the remaining lines + lines[-1] += self.charbuffer + self.linebuffer = lines + self.charbuffer = None + else: + # only one remaining line, put it back into charbuffer + self.charbuffer = lines[0] + self.charbuffer + if not keepends: + line = line.splitlines(keepends=False)[0] + break + line0withend = lines[0] + line0withoutend = lines[0].splitlines(keepends=False)[0] + if line0withend != line0withoutend: # We really have a line end + # Put the rest back together and keep it until the next call + self.charbuffer = self._empty_charbuffer.join(lines[1:]) + \ + self.charbuffer + if keepends: + line = line0withend + else: + line = line0withoutend + break + # we didn't get anything or this was our only try + if not data or size is not None: + if line and not keepends: + line = line.splitlines(keepends=False)[0] + break + if readsize < 8000: + readsize *= 2 + return line + + def readlines(self, sizehint=None, keepends=True): + """ Read all lines available on the input stream + and return them as a list. + + Line breaks are implemented using the codec's decoder + method and are included in the list entries. + + sizehint, if given, is ignored since there is no efficient + way to finding the true end-of-line. + + """ + data = self.read() + return data.splitlines(keepends) + + def reset(self): + """ Resets the codec buffers used for keeping state. + + Note that no stream repositioning should take place. + This method is primarily intended to be able to recover + from decoding errors. + + """ + self.bytebuffer = b"" + self.charbuffer = self._empty_charbuffer + self.linebuffer = None + + def seek(self, offset, whence=0): + """ Set the input stream's current position. + + Resets the codec buffers used for keeping state. + """ + self.stream.seek(offset, whence) + self.reset() + + def __next__(self): + """ Return the next decoded line from the input stream.""" + line = self.readline() + if line: + return line + raise StopIteration + + def __iter__(self): + return self + + def __getattr__(self, name, + getattr=getattr): + """ Inherit all other methods from the underlying stream. + """ + return getattr(self.stream, name) + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + +### + + +class StreamReaderWriter: + + """ StreamReaderWriter instances allow wrapping streams which + work in both read and write modes. + + The design is such that one can use the factory functions + returned by the codec.lookup() function to construct the + instance. + + """ + # Optional attributes set by the file wrappers below + encoding = 'unknown' + + def __init__(self, stream, Reader, Writer, errors='strict'): + """ Creates a StreamReaderWriter instance. + + stream must be a Stream-like object. + + Reader, Writer must be factory functions or classes + providing the StreamReader, StreamWriter interface resp. + + Error handling is done in the same way as defined for the + StreamWriter/Readers. + + """ + self.stream = stream + self.reader = Reader(stream, errors) + self.writer = Writer(stream, errors) + self.errors = errors + + def read(self, size=-1): + + return self.reader.read(size) + + def readline(self, size=None): + + return self.reader.readline(size) + + def readlines(self, sizehint=None): + + return self.reader.readlines(sizehint) + + def __next__(self): + """ Return the next decoded line from the input stream.""" + return next(self.reader) + + def __iter__(self): + return self + + def write(self, data): + + return self.writer.write(data) + + def writelines(self, list): + + return self.writer.writelines(list) + + def reset(self): + + self.reader.reset() + self.writer.reset() + + def seek(self, offset, whence=0): + self.stream.seek(offset, whence) + self.reader.reset() + if whence == 0 and offset == 0: + self.writer.reset() + + def __getattr__(self, name, + getattr=getattr): + """ Inherit all other methods from the underlying stream. + """ + return getattr(self.stream, name) + + # these are needed to make "with codecs.open(...)" work properly + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + +### + + +class StreamRecoder: + + """ StreamRecoder instances translate data from one encoding to another. + + They use the complete set of APIs returned by the + codecs.lookup() function to implement their task. + + Data written to the StreamRecoder is first decoded into an + intermediate format (depending on the "decode" codec) and then + written to the underlying stream using an instance of the provided + Writer class. + + In the other direction, data is read from the underlying stream using + a Reader instance and then encoded and returned to the caller. + + """ + # Optional attributes set by the file wrappers below + data_encoding = 'unknown' + file_encoding = 'unknown' + + def __init__(self, stream, encode, decode, Reader, Writer, + errors='strict'): + """ Creates a StreamRecoder instance which implements a two-way + conversion: encode and decode work on the frontend (the + data visible to .read() and .write()) while Reader and Writer + work on the backend (the data in stream). + + You can use these objects to do transparent + transcodings from e.g. latin-1 to utf-8 and back. + + stream must be a file-like object. + + encode and decode must adhere to the Codec interface; Reader and + Writer must be factory functions or classes providing the + StreamReader and StreamWriter interfaces resp. + + Error handling is done in the same way as defined for the + StreamWriter/Readers. + + """ + self.stream = stream + self.encode = encode + self.decode = decode + self.reader = Reader(stream, errors) + self.writer = Writer(stream, errors) + self.errors = errors + + def read(self, size=-1): + + data = self.reader.read(size) + data, bytesencoded = self.encode(data, self.errors) + return data + + def readline(self, size=None): + + if size is None: + data = self.reader.readline() + else: + data = self.reader.readline(size) + data, bytesencoded = self.encode(data, self.errors) + return data + + def readlines(self, sizehint=None): + + data = self.reader.read() + data, bytesencoded = self.encode(data, self.errors) + return data.splitlines(keepends=True) + + def __next__(self): + """ Return the next decoded line from the input stream.""" + data = next(self.reader) + data, bytesencoded = self.encode(data, self.errors) + return data + + def __iter__(self): + return self + + def write(self, data): + + data, bytesdecoded = self.decode(data, self.errors) + return self.writer.write(data) + + def writelines(self, list): + + data = ''.join(list) + data, bytesdecoded = self.decode(data, self.errors) + return self.writer.write(data) + + def reset(self): + + self.reader.reset() + self.writer.reset() + + def __getattr__(self, name, + getattr=getattr): + """ Inherit all other methods from the underlying stream. + """ + return getattr(self.stream, name) + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + self.stream.close() + +# Shortcuts + + +def open(filename, mode='r', encoding=None, errors='strict', buffering=1): + """ Open an encoded file using the given mode and return + a wrapped version providing transparent encoding/decoding. + + Note: The wrapped version will only accept the object format + defined by the codecs, i.e. Unicode objects for most builtin + codecs. Output is also codec dependent and will usually be + Unicode as well. + + Underlying encoded files are always opened in binary mode. + The default file mode is 'r', meaning to open the file in read mode. + + encoding specifies the encoding which is to be used for the + file. + + errors may be given to define the error handling. It defaults + to 'strict' which causes ValueErrors to be raised in case an + encoding error occurs. + + buffering has the same meaning as for the builtin open() API. + It defaults to line buffered. + + The returned wrapped file object provides an extra attribute + .encoding which allows querying the used encoding. This + attribute is only available if an encoding was specified as + parameter. + + """ + if encoding is not None and \ + 'b' not in mode: + # Force opening of the file in binary mode + mode = mode + 'b' + file = builtins.open(filename, mode, buffering) + if encoding is None: + return file + info = lookup(encoding) + srw = StreamReaderWriter(file, info.streamreader, + info.streamwriter, errors) + # Add attributes to simplify introspection + srw.encoding = encoding + return srw + + +def EncodedFile(file, data_encoding, file_encoding=None, errors='strict'): + """ Return a wrapped version of file which provides transparent + encoding translation. + + Data written to the wrapped file is decoded according + to the given data_encoding and then encoded to the underlying + file using file_encoding. The intermediate data type + will usually be Unicode but depends on the specified codecs. + + Bytes read from the file are decoded using file_encoding and then + passed back to the caller encoded using data_encoding. + + If file_encoding is not given, it defaults to data_encoding. + + errors may be given to define the error handling. It defaults + to 'strict' which causes ValueErrors to be raised in case an + encoding error occurs. + + The returned wrapped file object provides two extra attributes + .data_encoding and .file_encoding which reflect the given + parameters of the same name. The attributes can be used for + introspection by Python programs. + + """ + if file_encoding is None: + file_encoding = data_encoding + data_info = lookup(data_encoding) + file_info = lookup(file_encoding) + sr = StreamRecoder(file, data_info.encode, data_info.decode, + file_info.streamreader, file_info.streamwriter, errors) + # Add attributes to simplify introspection + sr.data_encoding = data_encoding + sr.file_encoding = file_encoding + return sr + +# Helpers for codec lookup + + +def getencoder(encoding): + """ Lookup up the codec for the given encoding and return + its encoder function. + + Raises a LookupError in case the encoding cannot be found. + + """ + return lookup(encoding).encode + + +def getdecoder(encoding): + """ Lookup up the codec for the given encoding and return + its decoder function. + + Raises a LookupError in case the encoding cannot be found. + + """ + return lookup(encoding).decode + + +def getincrementalencoder(encoding): + """ Lookup up the codec for the given encoding and return + its IncrementalEncoder class or factory function. + + Raises a LookupError in case the encoding cannot be found + or the codecs doesn't provide an incremental encoder. + + """ + encoder = lookup(encoding).incrementalencoder + if encoder is None: + raise LookupError(encoding) + return encoder + + +def getincrementaldecoder(encoding): + """ Lookup up the codec for the given encoding and return + its IncrementalDecoder class or factory function. + + Raises a LookupError in case the encoding cannot be found + or the codecs doesn't provide an incremental decoder. + + """ + decoder = lookup(encoding).incrementaldecoder + if decoder is None: + raise LookupError(encoding) + return decoder + + +def getreader(encoding): + """ Lookup up the codec for the given encoding and return + its StreamReader class or factory function. + + Raises a LookupError in case the encoding cannot be found. + + """ + return lookup(encoding).streamreader + + +def getwriter(encoding): + """ Lookup up the codec for the given encoding and return + its StreamWriter class or factory function. + + Raises a LookupError in case the encoding cannot be found. + + """ + return lookup(encoding).streamwriter + + +def iterencode(iterator, encoding, errors='strict', **kwargs): + """ + Encoding iterator. + + Encodes the input strings from the iterator using an IncrementalEncoder. + + errors and kwargs are passed through to the IncrementalEncoder + constructor. + """ + encoder = getincrementalencoder(encoding)(errors, **kwargs) + for input in iterator: + output = encoder.encode(input) + if output: + yield output + output = encoder.encode("", True) + if output: + yield output + + +def iterdecode(iterator, encoding, errors='strict', **kwargs): + """ + Decoding iterator. + + Decodes the input strings from the iterator using an IncrementalDecoder. + + errors and kwargs are passed through to the IncrementalDecoder + constructor. + """ + decoder = getincrementaldecoder(encoding)(errors, **kwargs) + for input in iterator: + output = decoder.decode(input) + if output: + yield output + output = decoder.decode(b"", True) + if output: + yield output + +# Helpers for charmap-based codecs + + +def make_identity_dict(rng): + """ make_identity_dict(rng) -> dict + + Return a dictionary where elements of the rng sequence are + mapped to themselves. + + """ + return {i: i for i in rng} + + +def make_encoding_map(decoding_map): + """ Creates an encoding map from a decoding map. + + If a target mapping in the decoding map occurs multiple + times, then that target is mapped to None (undefined mapping), + causing an exception when encountered by the charmap codec + during translation. + + One example where this happens is cp875.py which decodes + multiple character to \\u001a. + + """ + m = {} + for k, v in decoding_map.items(): + if not v in m: + m[v] = k + else: + m[v] = None + return m + +# error handlers + + +try: + strict_errors = lookup_error("strict") + ignore_errors = lookup_error("ignore") + replace_errors = lookup_error("replace") + xmlcharrefreplace_errors = lookup_error("xmlcharrefreplace") + backslashreplace_errors = lookup_error("backslashreplace") + namereplace_errors = lookup_error("namereplace") +except LookupError: + # In --disable-unicode builds, these error handler are missing + strict_errors = None + ignore_errors = None + replace_errors = None + xmlcharrefreplace_errors = None + backslashreplace_errors = None + namereplace_errors = None + +# Tell modulefinder that using codecs probably needs the encodings +# package +_false = 0 +if _false: + import encodings + +# Tests + +if __name__ == '__main__': + + # Make stdout translate Latin-1 output into UTF-8 output + sys.stdout = EncodedFile(sys.stdout, 'latin-1', 'utf-8') + + # Have stdin translate Latin-1 input into UTF-8 input + sys.stdin = EncodedFile(sys.stdin, 'utf-8', 'latin-1') diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/codeop.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/codeop.py new file mode 100644 index 0000000..75c70a0 --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/codeop.py @@ -0,0 +1,174 @@ +r"""Utilities to compile possibly incomplete Python source code. + +This module provides two interfaces, broadly similar to the builtin +function compile(), which take program text, a filename and a 'mode' +and: + +- Return code object if the command is complete and valid +- Return None if the command is incomplete +- Raise SyntaxError, ValueError or OverflowError if the command is a + syntax error (OverflowError and ValueError can be produced by + malformed literals). + +Approach: + +First, check if the source consists entirely of blank lines and +comments; if so, replace it with 'pass', because the built-in +parser doesn't always do the right thing for these. + +Compile three times: as is, with \n, and with \n\n appended. If it +compiles as is, it's complete. If it compiles with one \n appended, +we expect more. If it doesn't compile either way, we compare the +error we get when compiling with \n or \n\n appended. If the errors +are the same, the code is broken. But if the errors are different, we +expect more. Not intuitive; not even guaranteed to hold in future +releases; but this matches the compiler's behavior from Python 1.4 +through 2.2, at least. + +Caveat: + +It is possible (but not likely) that the parser stops parsing with a +successful outcome before reaching the end of the source; in this +case, trailing symbols may be ignored instead of causing an error. +For example, a backslash followed by two newlines may be followed by +arbitrary garbage. This will be fixed once the API for the parser is +better. + +The two interfaces are: + +compile_command(source, filename, symbol): + + Compiles a single command in the manner described above. + +CommandCompiler(): + + Instances of this class have __call__ methods identical in + signature to compile_command; the difference is that if the + instance compiles program text containing a __future__ statement, + the instance 'remembers' and compiles all subsequent program texts + with the statement in force. + +The module also provides another class: + +Compile(): + + Instances of this class act like the built-in function compile, + but with 'memory' in the sense described above. +""" + +import __future__ + +_features = [getattr(__future__, fname) + for fname in __future__.all_feature_names] + +__all__ = ["compile_command", "Compile", "CommandCompiler"] + +PyCF_DONT_IMPLY_DEDENT = 0x200 # Matches pythonrun.h + + +def _maybe_compile(compiler, source, filename, symbol): + # Check for source consisting of only blank lines and comments + for line in source.split("\n"): + line = line.strip() + if line and line[0] != '#': + break # Leave it alone + else: + if symbol != "eval": + source = "pass" # Replace it with a 'pass' statement + + err = err1 = err2 = None + code = code1 = code2 = None + + try: + code = compiler(source, filename, symbol) + except SyntaxError as err: + pass + + try: + code1 = compiler(source + "\n", filename, symbol) + except SyntaxError as e: + err1 = e + + try: + code2 = compiler(source + "\n\n", filename, symbol) + except SyntaxError as e: + err2 = e + + if code: + return code + if not code1 and repr(err1) == repr(err2): + raise err1 + + +def _compile(source, filename, symbol): + return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT) + + +def compile_command(source, filename="", symbol="single"): + r"""Compile a command and determine whether it is incomplete. + + Arguments: + + source -- the source string; may contain \n characters + filename -- optional filename from which source was read; default + "" + symbol -- optional grammar start symbol; "single" (default) or "eval" + + Return value / exceptions raised: + + - Return a code object if the command is complete and valid + - Return None if the command is incomplete + - Raise SyntaxError, ValueError or OverflowError if the command is a + syntax error (OverflowError and ValueError can be produced by + malformed literals). + """ + return _maybe_compile(_compile, source, filename, symbol) + + +class Compile: + """Instances of this class behave much like the built-in compile + function, but if one is used to compile text containing a future + statement, it "remembers" and compiles all subsequent program texts + with the statement in force.""" + + def __init__(self): + self.flags = PyCF_DONT_IMPLY_DEDENT + + def __call__(self, source, filename, symbol): + codeob = compile(source, filename, symbol, self.flags, 1) + for feature in _features: + if codeob.co_flags & feature.compiler_flag: + self.flags |= feature.compiler_flag + return codeob + + +class CommandCompiler: + """Instances of this class have __call__ methods identical in + signature to compile_command; the difference is that if the + instance compiles program text containing a __future__ statement, + the instance 'remembers' and compiles all subsequent program texts + with the statement in force.""" + + def __init__(self,): + self.compiler = Compile() + + def __call__(self, source, filename="", symbol="single"): + r"""Compile a command and determine whether it is incomplete. + + Arguments: + + source -- the source string; may contain \n characters + filename -- optional filename from which source was read; + default "" + symbol -- optional grammar start symbol; "single" (default) or + "eval" + + Return value / exceptions raised: + + - Return a code object if the command is complete and valid + - Return None if the command is incomplete + - Raise SyntaxError, ValueError or OverflowError if the command is a + syntax error (OverflowError and ValueError can be produced by + malformed literals). + """ + return _maybe_compile(self.compiler, source, filename, symbol) diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/collections/__init__.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/collections/__init__.py new file mode 100644 index 0000000..4c05c24 --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/collections/__init__.py @@ -0,0 +1,1353 @@ +'''This module implements specialized container datatypes providing +alternatives to Python's general purpose built-in containers, dict, +list, set, and tuple. + +* namedtuple factory function for creating tuple subclasses with named fields +* deque list-like container with fast appends and pops on either end +* ChainMap dict-like class for creating a single view of multiple mappings +* Counter dict subclass for counting hashable objects +* OrderedDict dict subclass that remembers the order entries were added +* defaultdict dict subclass that calls a factory function to supply missing values +* UserDict wrapper around dictionary objects for easier dict subclassing +* UserList wrapper around list objects for easier list subclassing +* UserString wrapper around string objects for easier string subclassing + +''' + +__all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList', + 'UserString', 'Counter', 'OrderedDict', 'ChainMap'] + +# For backwards compatibility, continue to make the collections ABCs +# available through the collections module. +from _collections_abc import * +import _collections_abc +__all__ += _collections_abc.__all__ + +from operator import itemgetter as _itemgetter, eq as _eq +from keyword import iskeyword as _iskeyword +import sys as _sys +import heapq as _heapq +from _weakref import proxy as _proxy +from itertools import repeat as _repeat, chain as _chain, starmap as _starmap +from reprlib import recursive_repr as _recursive_repr + +try: + from _collections import deque +except ImportError: + pass +else: + MutableSequence.register(deque) + +try: + from _collections import defaultdict +except ImportError: + pass + + +################################################################################ +# OrderedDict +################################################################################ + +class _OrderedDictKeysView(KeysView): + + def __reversed__(self): + yield from reversed(self._mapping) + + +class _OrderedDictItemsView(ItemsView): + + def __reversed__(self): + for key in reversed(self._mapping): + yield (key, self._mapping[key]) + + +class _OrderedDictValuesView(ValuesView): + + def __reversed__(self): + for key in reversed(self._mapping): + yield self._mapping[key] + + +class _Link(object): + __slots__ = 'prev', 'next', 'key', '__weakref__' + + +class OrderedDict(dict): + 'Dictionary that remembers insertion order' + # An inherited dict maps keys to values. + # The inherited dict provides __getitem__, __len__, __contains__, and get. + # The remaining methods are order-aware. + # Big-O running times for all methods are the same as regular dictionaries. + + # The internal self.__map dict maps keys to links in a doubly linked list. + # The circular doubly linked list starts and ends with a sentinel element. + # The sentinel element never gets deleted (this simplifies the algorithm). + # The sentinel is in self.__hardroot with a weakref proxy in self.__root. + # The prev links are weakref proxies (to prevent circular references). + # Individual links are kept alive by the hard reference in self.__map. + # Those hard references disappear when a key is deleted from an OrderedDict. + + def __init__(*args, **kwds): + '''Initialize an ordered dictionary. The signature is the same as + regular dictionaries. Keyword argument order is preserved. + ''' + if not args: + raise TypeError("descriptor '__init__' of 'OrderedDict' object " + "needs an argument") + self, *args = args + if len(args) > 1: + raise TypeError('expected at most 1 arguments, got %d' % len(args)) + try: + self.__root + except AttributeError: + self.__hardroot = _Link() + self.__root = root = _proxy(self.__hardroot) + root.prev = root.next = root + self.__map = {} + self.__update(*args, **kwds) + + def __setitem__(self, key, value, + dict_setitem=dict.__setitem__, proxy=_proxy, Link=_Link): + 'od.__setitem__(i, y) <==> od[i]=y' + # Setting a new item creates a new link at the end of the linked list, + # and the inherited dictionary is updated with the new key/value pair. + if key not in self: + self.__map[key] = link = Link() + root = self.__root + last = root.prev + link.prev, link.next, link.key = last, root, key + last.next = link + root.prev = proxy(link) + dict_setitem(self, key, value) + + def __delitem__(self, key, dict_delitem=dict.__delitem__): + 'od.__delitem__(y) <==> del od[y]' + # Deleting an existing item uses self.__map to find the link which gets + # removed by updating the links in the predecessor and successor nodes. + dict_delitem(self, key) + link = self.__map.pop(key) + link_prev = link.prev + link_next = link.next + link_prev.next = link_next + link_next.prev = link_prev + link.prev = None + link.next = None + + def __iter__(self): + 'od.__iter__() <==> iter(od)' + # Traverse the linked list in order. + root = self.__root + curr = root.next + while curr is not root: + yield curr.key + curr = curr.next + + def __reversed__(self): + 'od.__reversed__() <==> reversed(od)' + # Traverse the linked list in reverse order. + root = self.__root + curr = root.prev + while curr is not root: + yield curr.key + curr = curr.prev + + def clear(self): + 'od.clear() -> None. Remove all items from od.' + root = self.__root + root.prev = root.next = root + self.__map.clear() + dict.clear(self) + + def popitem(self, last=True): + '''Remove and return a (key, value) pair from the dictionary. + + Pairs are returned in LIFO order if last is true or FIFO order if false. + ''' + if not self: + raise KeyError('dictionary is empty') + root = self.__root + if last: + link = root.prev + link_prev = link.prev + link_prev.next = root + root.prev = link_prev + else: + link = root.next + link_next = link.next + root.next = link_next + link_next.prev = root + key = link.key + del self.__map[key] + value = dict.pop(self, key) + return key, value + + def move_to_end(self, key, last=True): + '''Move an existing element to the end (or beginning if last==False). + + Raises KeyError if the element does not exist. + When last=True, acts like a fast version of self[key]=self.pop(key). + + ''' + link = self.__map[key] + link_prev = link.prev + link_next = link.next + soft_link = link_next.prev + link_prev.next = link_next + link_next.prev = link_prev + root = self.__root + if last: + last = root.prev + link.prev = last + link.next = root + root.prev = soft_link + last.next = link + else: + first = root.next + link.prev = root + link.next = first + first.prev = soft_link + root.next = link + + def __sizeof__(self): + sizeof = _sys.getsizeof + # number of links including root + n = len(self) + 1 + size = sizeof(self.__dict__) # instance dictionary + # internal dict and inherited dict + size += sizeof(self.__map) * 2 + size += sizeof(self.__hardroot) * n # link objects + size += sizeof(self.__root) * n # proxy objects + return size + + update = __update = MutableMapping.update + + def keys(self): + "D.keys() -> a set-like object providing a view on D's keys" + return _OrderedDictKeysView(self) + + def items(self): + "D.items() -> a set-like object providing a view on D's items" + return _OrderedDictItemsView(self) + + def values(self): + "D.values() -> an object providing a view on D's values" + return _OrderedDictValuesView(self) + + __ne__ = MutableMapping.__ne__ + + __marker = object() + + def pop(self, key, default=__marker): + '''od.pop(k[,d]) -> v, remove specified key and return the corresponding + value. If key is not found, d is returned if given, otherwise KeyError + is raised. + + ''' + if key in self: + result = self[key] + del self[key] + return result + if default is self.__marker: + raise KeyError(key) + return default + + def setdefault(self, key, default=None): + 'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od' + if key in self: + return self[key] + self[key] = default + return default + + @_recursive_repr() + def __repr__(self): + 'od.__repr__() <==> repr(od)' + if not self: + return '%s()' % (self.__class__.__name__,) + return '%s(%r)' % (self.__class__.__name__, list(self.items())) + + def __reduce__(self): + 'Return state information for pickling' + inst_dict = vars(self).copy() + for k in vars(OrderedDict()): + inst_dict.pop(k, None) + return self.__class__, (), inst_dict or None, None, iter(self.items()) + + def copy(self): + 'od.copy() -> a shallow copy of od' + return self.__class__(self) + + @classmethod + def fromkeys(cls, iterable, value=None): + '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S. + If not specified, the value defaults to None. + + ''' + self = cls() + for key in iterable: + self[key] = value + return self + + def __eq__(self, other): + '''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive + while comparison to a regular mapping is order-insensitive. + + ''' + if isinstance(other, OrderedDict): + return dict.__eq__(self, other) and all(map(_eq, self, other)) + return dict.__eq__(self, other) + + +try: + from _collections import OrderedDict +except ImportError: + # Leave the pure Python version in place. + pass + + +################################################################################ +# namedtuple +################################################################################ + +_class_template = """\ +from builtins import property as _property, tuple as _tuple +from operator import itemgetter as _itemgetter +from collections import OrderedDict + +class {typename}(tuple): + '{typename}({arg_list})' + + __slots__ = () + + _fields = {field_names!r} + + def __new__(_cls, {arg_list}): + 'Create new instance of {typename}({arg_list})' + return _tuple.__new__(_cls, ({arg_list})) + + @classmethod + def _make(cls, iterable, new=tuple.__new__, len=len): + 'Make a new {typename} object from a sequence or iterable' + result = new(cls, iterable) + if len(result) != {num_fields:d}: + raise TypeError('Expected {num_fields:d} arguments, got %d' % len(result)) + return result + + def _replace(_self, **kwds): + 'Return a new {typename} object replacing specified fields with new values' + result = _self._make(map(kwds.pop, {field_names!r}, _self)) + if kwds: + raise ValueError('Got unexpected field names: %r' % list(kwds)) + return result + + def __repr__(self): + 'Return a nicely formatted representation string' + return self.__class__.__name__ + '({repr_fmt})' % self + + def _asdict(self): + 'Return a new OrderedDict which maps field names to their values.' + return OrderedDict(zip(self._fields, self)) + + def __getnewargs__(self): + 'Return self as a plain tuple. Used by copy and pickle.' + return tuple(self) + +{field_defs} +""" + +_repr_template = '{name}=%r' + +_field_template = '''\ + {name} = _property(_itemgetter({index:d}), doc='Alias for field number {index:d}') +''' + + +def namedtuple(typename, field_names, *, verbose=False, rename=False, module=None): + """Returns a new subclass of tuple with named fields. + + >>> Point = namedtuple('Point', ['x', 'y']) + >>> Point.__doc__ # docstring for the new class + 'Point(x, y)' + >>> p = Point(11, y=22) # instantiate with positional args or keywords + >>> p[0] + p[1] # indexable like a plain tuple + 33 + >>> x, y = p # unpack like a regular tuple + >>> x, y + (11, 22) + >>> p.x + p.y # fields also accessible by name + 33 + >>> d = p._asdict() # convert to a dictionary + >>> d['x'] + 11 + >>> Point(**d) # convert from a dictionary + Point(x=11, y=22) + >>> p._replace(x=100) # _replace() is like str.replace() but targets named fields + Point(x=100, y=22) + + """ + + # Validate the field names. At the user's option, either generate an error + # message or automatically replace the field name with a valid name. + if isinstance(field_names, str): + field_names = field_names.replace(',', ' ').split() + field_names = list(map(str, field_names)) + typename = str(typename) + if rename: + seen = set() + for index, name in enumerate(field_names): + if (not name.isidentifier() + or _iskeyword(name) + or name.startswith('_') + or name in seen): + field_names[index] = '_%d' % index + seen.add(name) + for name in [typename] + field_names: + if type(name) is not str: + raise TypeError('Type names and field names must be strings') + if not name.isidentifier(): + raise ValueError('Type names and field names must be valid ' + 'identifiers: %r' % name) + if _iskeyword(name): + raise ValueError('Type names and field names cannot be a ' + 'keyword: %r' % name) + seen = set() + for name in field_names: + if name.startswith('_') and not rename: + raise ValueError('Field names cannot start with an underscore: ' + '%r' % name) + if name in seen: + raise ValueError('Encountered duplicate field name: %r' % name) + seen.add(name) + + # Fill-in the class template + class_definition = _class_template.format( + typename=typename, + field_names=tuple(field_names), + num_fields=len(field_names), + arg_list=repr(tuple(field_names)).replace("'", "")[1:-1], + repr_fmt=', '.join(_repr_template.format(name=name) + for name in field_names), + field_defs='\n'.join(_field_template.format(index=index, name=name) + for index, name in enumerate(field_names)) + ) + + # Execute the template string in a temporary namespace and support + # tracing utilities by setting a value for frame.f_globals['__name__'] + namespace = dict(__name__='namedtuple_%s' % typename) + exec(class_definition, namespace) + result = namespace[typename] + result._source = class_definition + if verbose: + print(result._source) + + # For pickling to work, the __module__ variable needs to be set to the frame + # where the named tuple is created. Bypass this step in environments where + # sys._getframe is not defined (Jython for example) or sys._getframe is not + # defined for arguments greater than 0 (IronPython), or where the user has + # specified a particular module. + if module is None: + try: + module = _sys._getframe(1).f_globals.get('__name__', '__main__') + except (AttributeError, ValueError): + pass + if module is not None: + result.__module__ = module + + return result + + +######################################################################## +# Counter +######################################################################## + +def _count_elements(mapping, iterable): + 'Tally elements from the iterable.' + mapping_get = mapping.get + for elem in iterable: + mapping[elem] = mapping_get(elem, 0) + 1 + + +try: # Load C helper function if available + from _collections import _count_elements +except ImportError: + pass + + +class Counter(dict): + '''Dict subclass for counting hashable items. Sometimes called a bag + or multiset. Elements are stored as dictionary keys and their counts + are stored as dictionary values. + + >>> c = Counter('abcdeabcdabcaba') # count elements from a string + + >>> c.most_common(3) # three most common elements + [('a', 5), ('b', 4), ('c', 3)] + >>> sorted(c) # list all unique elements + ['a', 'b', 'c', 'd', 'e'] + >>> ''.join(sorted(c.elements())) # list elements with repetitions + 'aaaaabbbbcccdde' + >>> sum(c.values()) # total of all counts + 15 + + >>> c['a'] # count of letter 'a' + 5 + >>> for elem in 'shazam': # update counts from an iterable + ... c[elem] += 1 # by adding 1 to each element's count + >>> c['a'] # now there are seven 'a' + 7 + >>> del c['b'] # remove all 'b' + >>> c['b'] # now there are zero 'b' + 0 + + >>> d = Counter('simsalabim') # make another counter + >>> c.update(d) # add in the second counter + >>> c['a'] # now there are nine 'a' + 9 + + >>> c.clear() # empty the counter + >>> c + Counter() + + Note: If a count is set to zero or reduced to zero, it will remain + in the counter until the entry is deleted or the counter is cleared: + + >>> c = Counter('aaabbc') + >>> c['b'] -= 2 # reduce the count of 'b' by two + >>> c.most_common() # 'b' is still in, but its count is zero + [('a', 3), ('c', 1), ('b', 0)] + + ''' + # References: + # http://en.wikipedia.org/wiki/Multiset + # http://www.gnu.org/software/smalltalk/manual-base/html_node/Bag.html + # http://www.demo2s.com/Tutorial/Cpp/0380__set-multiset/Catalog0380__set-multiset.htm + # http://code.activestate.com/recipes/259174/ + # Knuth, TAOCP Vol. II section 4.6.3 + + def __init__(*args, **kwds): + '''Create a new, empty Counter object. And if given, count elements + from an input iterable. Or, initialize the count from another mapping + of elements to their counts. + + >>> c = Counter() # a new, empty counter + >>> c = Counter('gallahad') # a new counter from an iterable + >>> c = Counter({'a': 4, 'b': 2}) # a new counter from a mapping + >>> c = Counter(a=4, b=2) # a new counter from keyword args + + ''' + if not args: + raise TypeError("descriptor '__init__' of 'Counter' object " + "needs an argument") + self, *args = args + if len(args) > 1: + raise TypeError('expected at most 1 arguments, got %d' % len(args)) + super(Counter, self).__init__() + self.update(*args, **kwds) + + def __missing__(self, key): + 'The count of elements not in the Counter is zero.' + # Needed so that self[missing_item] does not raise KeyError + return 0 + + def most_common(self, n=None): + '''List the n most common elements and their counts from the most + common to the least. If n is None, then list all element counts. + + >>> Counter('abcdeabcdabcaba').most_common(3) + [('a', 5), ('b', 4), ('c', 3)] + + ''' + # Emulate Bag.sortedByCount from Smalltalk + if n is None: + return sorted(self.items(), key=_itemgetter(1), reverse=True) + return _heapq.nlargest(n, self.items(), key=_itemgetter(1)) + + def elements(self): + '''Iterator over elements repeating each as many times as its count. + + >>> c = Counter('ABCABC') + >>> sorted(c.elements()) + ['A', 'A', 'B', 'B', 'C', 'C'] + + # Knuth's example for prime factors of 1836: 2**2 * 3**3 * 17**1 + >>> prime_factors = Counter({2: 2, 3: 3, 17: 1}) + >>> product = 1 + >>> for factor in prime_factors.elements(): # loop over factors + ... product *= factor # and multiply them + >>> product + 1836 + + Note, if an element's count has been set to zero or is a negative + number, elements() will ignore it. + + ''' + # Emulate Bag.do from Smalltalk and Multiset.begin from C++. + return _chain.from_iterable(_starmap(_repeat, self.items())) + + # Override dict methods where necessary + + @classmethod + def fromkeys(cls, iterable, v=None): + # There is no equivalent method for counters because setting v=1 + # means that no element can have a count greater than one. + raise NotImplementedError( + 'Counter.fromkeys() is undefined. Use Counter(iterable) instead.') + + def update(*args, **kwds): + '''Like dict.update() but add counts instead of replacing them. + + Source can be an iterable, a dictionary, or another Counter instance. + + >>> c = Counter('which') + >>> c.update('witch') # add elements from another iterable + >>> d = Counter('watch') + >>> c.update(d) # add elements from another counter + >>> c['h'] # four 'h' in which, witch, and watch + 4 + + ''' + # The regular dict.update() operation makes no sense here because the + # replace behavior results in the some of original untouched counts + # being mixed-in with all of the other counts for a mismash that + # doesn't have a straight-forward interpretation in most counting + # contexts. Instead, we implement straight-addition. Both the inputs + # and outputs are allowed to contain zero and negative counts. + + if not args: + raise TypeError("descriptor 'update' of 'Counter' object " + "needs an argument") + self, *args = args + if len(args) > 1: + raise TypeError('expected at most 1 arguments, got %d' % len(args)) + iterable = args[0] if args else None + if iterable is not None: + if isinstance(iterable, Mapping): + if self: + self_get = self.get + for elem, count in iterable.items(): + self[elem] = count + self_get(elem, 0) + else: + # fast path when counter is empty + super(Counter, self).update(iterable) + else: + _count_elements(self, iterable) + if kwds: + self.update(kwds) + + def subtract(*args, **kwds): + '''Like dict.update() but subtracts counts instead of replacing them. + Counts can be reduced below zero. Both the inputs and outputs are + allowed to contain zero and negative counts. + + Source can be an iterable, a dictionary, or another Counter instance. + + >>> c = Counter('which') + >>> c.subtract('witch') # subtract elements from another iterable + >>> c.subtract(Counter('watch')) # subtract elements from another counter + >>> c['h'] # 2 in which, minus 1 in witch, minus 1 in watch + 0 + >>> c['w'] # 1 in which, minus 1 in witch, minus 1 in watch + -1 + + ''' + if not args: + raise TypeError("descriptor 'subtract' of 'Counter' object " + "needs an argument") + self, *args = args + if len(args) > 1: + raise TypeError('expected at most 1 arguments, got %d' % len(args)) + iterable = args[0] if args else None + if iterable is not None: + self_get = self.get + if isinstance(iterable, Mapping): + for elem, count in iterable.items(): + self[elem] = self_get(elem, 0) - count + else: + for elem in iterable: + self[elem] = self_get(elem, 0) - 1 + if kwds: + self.subtract(kwds) + + def copy(self): + 'Return a shallow copy.' + return self.__class__(self) + + def __reduce__(self): + return self.__class__, (dict(self),) + + def __delitem__(self, elem): + 'Like dict.__delitem__() but does not raise KeyError for missing values.' + if elem in self: + super().__delitem__(elem) + + def __repr__(self): + if not self: + return '%s()' % self.__class__.__name__ + try: + items = ', '.join(map('%r: %r'.__mod__, self.most_common())) + return '%s({%s})' % (self.__class__.__name__, items) + except TypeError: + # handle case where values are not orderable + return '{0}({1!r})'.format(self.__class__.__name__, dict(self)) + + # Multiset-style mathematical operations discussed in: + # Knuth TAOCP Volume II section 4.6.3 exercise 19 + # and at http://en.wikipedia.org/wiki/Multiset + # + # Outputs guaranteed to only include positive counts. + # + # To strip negative and zero counts, add-in an empty counter: + # c += Counter() + + def __add__(self, other): + '''Add counts from two counters. + + >>> Counter('abbb') + Counter('bcc') + Counter({'b': 4, 'c': 2, 'a': 1}) + + ''' + if not isinstance(other, Counter): + return NotImplemented + result = Counter() + for elem, count in self.items(): + newcount = count + other[elem] + if newcount > 0: + result[elem] = newcount + for elem, count in other.items(): + if elem not in self and count > 0: + result[elem] = count + return result + + def __sub__(self, other): + ''' Subtract count, but keep only results with positive counts. + + >>> Counter('abbbc') - Counter('bccd') + Counter({'b': 2, 'a': 1}) + + ''' + if not isinstance(other, Counter): + return NotImplemented + result = Counter() + for elem, count in self.items(): + newcount = count - other[elem] + if newcount > 0: + result[elem] = newcount + for elem, count in other.items(): + if elem not in self and count < 0: + result[elem] = 0 - count + return result + + def __or__(self, other): + '''Union is the maximum of value in either of the input counters. + + >>> Counter('abbb') | Counter('bcc') + Counter({'b': 3, 'c': 2, 'a': 1}) + + ''' + if not isinstance(other, Counter): + return NotImplemented + result = Counter() + for elem, count in self.items(): + other_count = other[elem] + newcount = other_count if count < other_count else count + if newcount > 0: + result[elem] = newcount + for elem, count in other.items(): + if elem not in self and count > 0: + result[elem] = count + return result + + def __and__(self, other): + ''' Intersection is the minimum of corresponding counts. + + >>> Counter('abbb') & Counter('bcc') + Counter({'b': 1}) + + ''' + if not isinstance(other, Counter): + return NotImplemented + result = Counter() + for elem, count in self.items(): + other_count = other[elem] + newcount = count if count < other_count else other_count + if newcount > 0: + result[elem] = newcount + return result + + def __pos__(self): + 'Adds an empty counter, effectively stripping negative and zero counts' + result = Counter() + for elem, count in self.items(): + if count > 0: + result[elem] = count + return result + + def __neg__(self): + '''Subtracts from an empty counter. Strips positive and zero counts, + and flips the sign on negative counts. + + ''' + result = Counter() + for elem, count in self.items(): + if count < 0: + result[elem] = 0 - count + return result + + def _keep_positive(self): + '''Internal method to strip elements with a negative or zero count''' + nonpositive = [elem for elem, count in self.items() if not count > 0] + for elem in nonpositive: + del self[elem] + return self + + def __iadd__(self, other): + '''Inplace add from another counter, keeping only positive counts. + + >>> c = Counter('abbb') + >>> c += Counter('bcc') + >>> c + Counter({'b': 4, 'c': 2, 'a': 1}) + + ''' + for elem, count in other.items(): + self[elem] += count + return self._keep_positive() + + def __isub__(self, other): + '''Inplace subtract counter, but keep only results with positive counts. + + >>> c = Counter('abbbc') + >>> c -= Counter('bccd') + >>> c + Counter({'b': 2, 'a': 1}) + + ''' + for elem, count in other.items(): + self[elem] -= count + return self._keep_positive() + + def __ior__(self, other): + '''Inplace union is the maximum of value from either counter. + + >>> c = Counter('abbb') + >>> c |= Counter('bcc') + >>> c + Counter({'b': 3, 'c': 2, 'a': 1}) + + ''' + for elem, other_count in other.items(): + count = self[elem] + if other_count > count: + self[elem] = other_count + return self._keep_positive() + + def __iand__(self, other): + '''Inplace intersection is the minimum of corresponding counts. + + >>> c = Counter('abbb') + >>> c &= Counter('bcc') + >>> c + Counter({'b': 1}) + + ''' + for elem, count in self.items(): + other_count = other[elem] + if other_count < count: + self[elem] = other_count + return self._keep_positive() + + +######################################################################## +# ChainMap +######################################################################## + +class ChainMap(MutableMapping): + ''' A ChainMap groups multiple dicts (or other mappings) together + to create a single, updateable view. + + The underlying mappings are stored in a list. That list is public and can + be accessed or updated using the *maps* attribute. There is no other + state. + + Lookups search the underlying mappings successively until a key is found. + In contrast, writes, updates, and deletions only operate on the first + mapping. + + ''' + + def __init__(self, *maps): + '''Initialize a ChainMap by setting *maps* to the given mappings. + If no mappings are provided, a single empty dictionary is used. + + ''' + self.maps = list(maps) or [{}] # always at least one map + + def __missing__(self, key): + raise KeyError(key) + + def __getitem__(self, key): + for mapping in self.maps: + try: + # can't use 'key in mapping' with defaultdict + return mapping[key] + except KeyError: + pass + # support subclasses that define __missing__ + return self.__missing__(key) + + def get(self, key, default=None): + return self[key] if key in self else default + + def __len__(self): + # reuses stored hash values if possible + return len(set().union(*self.maps)) + + def __iter__(self): + return iter(set().union(*self.maps)) + + def __contains__(self, key): + return any(key in m for m in self.maps) + + def __bool__(self): + return any(self.maps) + + @_recursive_repr() + def __repr__(self): + return '{0.__class__.__name__}({1})'.format( + self, ', '.join(map(repr, self.maps))) + + @classmethod + def fromkeys(cls, iterable, *args): + 'Create a ChainMap with a single dict created from the iterable.' + return cls(dict.fromkeys(iterable, *args)) + + def copy(self): + 'New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]' + return self.__class__(self.maps[0].copy(), *self.maps[1:]) + + __copy__ = copy + + def new_child(self, m=None): # like Django's Context.push() + '''New ChainMap with a new map followed by all previous maps. + If no map is provided, an empty dict is used. + ''' + if m is None: + m = {} + return self.__class__(m, *self.maps) + + @property + def parents(self): # like Django's Context.pop() + 'New ChainMap from maps[1:].' + return self.__class__(*self.maps[1:]) + + def __setitem__(self, key, value): + self.maps[0][key] = value + + def __delitem__(self, key): + try: + del self.maps[0][key] + except KeyError: + raise KeyError( + 'Key not found in the first mapping: {!r}'.format(key)) + + def popitem(self): + 'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.' + try: + return self.maps[0].popitem() + except KeyError: + raise KeyError('No keys found in the first mapping.') + + def pop(self, key, *args): + 'Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].' + try: + return self.maps[0].pop(key, *args) + except KeyError: + raise KeyError( + 'Key not found in the first mapping: {!r}'.format(key)) + + def clear(self): + 'Clear maps[0], leaving maps[1:] intact.' + self.maps[0].clear() + + +################################################################################ +# UserDict +################################################################################ + +class UserDict(MutableMapping): + + # Start by filling-out the abstract methods + def __init__(*args, **kwargs): + if not args: + raise TypeError("descriptor '__init__' of 'UserDict' object " + "needs an argument") + self, *args = args + if len(args) > 1: + raise TypeError('expected at most 1 arguments, got %d' % len(args)) + if args: + dict = args[0] + elif 'dict' in kwargs: + dict = kwargs.pop('dict') + import warnings + warnings.warn("Passing 'dict' as keyword argument is deprecated", + DeprecationWarning, stacklevel=2) + else: + dict = None + self.data = {} + if dict is not None: + self.update(dict) + if len(kwargs): + self.update(kwargs) + + def __len__(self): return len(self.data) + + def __getitem__(self, key): + if key in self.data: + return self.data[key] + if hasattr(self.__class__, "__missing__"): + return self.__class__.__missing__(self, key) + raise KeyError(key) + + def __setitem__(self, key, item): self.data[key] = item + + def __delitem__(self, key): del self.data[key] + + def __iter__(self): + return iter(self.data) + + # Modify __contains__ to work correctly when __missing__ is present + def __contains__(self, key): + return key in self.data + + # Now, add the methods in dicts but not in MutableMapping + def __repr__(self): return repr(self.data) + + def copy(self): + if self.__class__ is UserDict: + return UserDict(self.data.copy()) + import copy + data = self.data + try: + self.data = {} + c = copy.copy(self) + finally: + self.data = data + c.update(self) + return c + + @classmethod + def fromkeys(cls, iterable, value=None): + d = cls() + for key in iterable: + d[key] = value + return d + + +################################################################################ +# UserList +################################################################################ + +class UserList(MutableSequence): + """A more or less complete user-defined wrapper around list objects.""" + + def __init__(self, initlist=None): + self.data = [] + if initlist is not None: + # XXX should this accept an arbitrary sequence? + if type(initlist) == type(self.data): + self.data[:] = initlist + elif isinstance(initlist, UserList): + self.data[:] = initlist.data[:] + else: + self.data = list(initlist) + + def __repr__(self): return repr(self.data) + + def __lt__(self, other): return self.data < self.__cast(other) + + def __le__(self, other): return self.data <= self.__cast(other) + + def __eq__(self, other): return self.data == self.__cast(other) + + def __gt__(self, other): return self.data > self.__cast(other) + + def __ge__(self, other): return self.data >= self.__cast(other) + + def __cast(self, other): + return other.data if isinstance(other, UserList) else other + + def __contains__(self, item): return item in self.data + + def __len__(self): return len(self.data) + + def __getitem__(self, i): return self.data[i] + + def __setitem__(self, i, item): self.data[i] = item + + def __delitem__(self, i): del self.data[i] + + def __add__(self, other): + if isinstance(other, UserList): + return self.__class__(self.data + other.data) + elif isinstance(other, type(self.data)): + return self.__class__(self.data + other) + return self.__class__(self.data + list(other)) + + def __radd__(self, other): + if isinstance(other, UserList): + return self.__class__(other.data + self.data) + elif isinstance(other, type(self.data)): + return self.__class__(other + self.data) + return self.__class__(list(other) + self.data) + + def __iadd__(self, other): + if isinstance(other, UserList): + self.data += other.data + elif isinstance(other, type(self.data)): + self.data += other + else: + self.data += list(other) + return self + + def __mul__(self, n): + return self.__class__(self.data*n) + __rmul__ = __mul__ + + def __imul__(self, n): + self.data *= n + return self + + def append(self, item): self.data.append(item) + + def insert(self, i, item): self.data.insert(i, item) + + def pop(self, i=-1): return self.data.pop(i) + + def remove(self, item): self.data.remove(item) + + def clear(self): self.data.clear() + + def copy(self): return self.__class__(self) + + def count(self, item): return self.data.count(item) + + def index(self, item, *args): return self.data.index(item, *args) + + def reverse(self): self.data.reverse() + + def sort(self, *args, **kwds): self.data.sort(*args, **kwds) + + def extend(self, other): + if isinstance(other, UserList): + self.data.extend(other.data) + else: + self.data.extend(other) + + +################################################################################ +# UserString +################################################################################ + +class UserString(Sequence): + def __init__(self, seq): + if isinstance(seq, str): + self.data = seq + elif isinstance(seq, UserString): + self.data = seq.data[:] + else: + self.data = str(seq) + + def __str__(self): return str(self.data) + + def __repr__(self): return repr(self.data) + + def __int__(self): return int(self.data) + + def __float__(self): return float(self.data) + + def __complex__(self): return complex(self.data) + + def __hash__(self): return hash(self.data) + + def __getnewargs__(self): + return (self.data[:],) + + def __eq__(self, string): + if isinstance(string, UserString): + return self.data == string.data + return self.data == string + + def __lt__(self, string): + if isinstance(string, UserString): + return self.data < string.data + return self.data < string + + def __le__(self, string): + if isinstance(string, UserString): + return self.data <= string.data + return self.data <= string + + def __gt__(self, string): + if isinstance(string, UserString): + return self.data > string.data + return self.data > string + + def __ge__(self, string): + if isinstance(string, UserString): + return self.data >= string.data + return self.data >= string + + def __contains__(self, char): + if isinstance(char, UserString): + char = char.data + return char in self.data + + def __len__(self): return len(self.data) + + def __getitem__(self, index): return self.__class__(self.data[index]) + + def __add__(self, other): + if isinstance(other, UserString): + return self.__class__(self.data + other.data) + elif isinstance(other, str): + return self.__class__(self.data + other) + return self.__class__(self.data + str(other)) + + def __radd__(self, other): + if isinstance(other, str): + return self.__class__(other + self.data) + return self.__class__(str(other) + self.data) + + def __mul__(self, n): + return self.__class__(self.data*n) + __rmul__ = __mul__ + + def __mod__(self, args): + return self.__class__(self.data % args) + + def __rmod__(self, format): + return self.__class__(format % args) + + # the following methods are defined in alphabetical order: + def capitalize(self): return self.__class__(self.data.capitalize()) + + def casefold(self): + return self.__class__(self.data.casefold()) + + def center(self, width, *args): + return self.__class__(self.data.center(width, *args)) + + def count(self, sub, start=0, end=_sys.maxsize): + if isinstance(sub, UserString): + sub = sub.data + return self.data.count(sub, start, end) + + def encode(self, encoding=None, errors=None): # XXX improve this? + if encoding: + if errors: + return self.__class__(self.data.encode(encoding, errors)) + return self.__class__(self.data.encode(encoding)) + return self.__class__(self.data.encode()) + + def endswith(self, suffix, start=0, end=_sys.maxsize): + return self.data.endswith(suffix, start, end) + + def expandtabs(self, tabsize=8): + return self.__class__(self.data.expandtabs(tabsize)) + + def find(self, sub, start=0, end=_sys.maxsize): + if isinstance(sub, UserString): + sub = sub.data + return self.data.find(sub, start, end) + + def format(self, *args, **kwds): + return self.data.format(*args, **kwds) + + def format_map(self, mapping): + return self.data.format_map(mapping) + + def index(self, sub, start=0, end=_sys.maxsize): + return self.data.index(sub, start, end) + + def isalpha(self): return self.data.isalpha() + + def isalnum(self): return self.data.isalnum() + + def isdecimal(self): return self.data.isdecimal() + + def isdigit(self): return self.data.isdigit() + + def isidentifier(self): return self.data.isidentifier() + + def islower(self): return self.data.islower() + + def isnumeric(self): return self.data.isnumeric() + + def isprintable(self): return self.data.isprintable() + + def isspace(self): return self.data.isspace() + + def istitle(self): return self.data.istitle() + + def isupper(self): return self.data.isupper() + + def join(self, seq): return self.data.join(seq) + + def ljust(self, width, *args): + return self.__class__(self.data.ljust(width, *args)) + + def lower(self): return self.__class__(self.data.lower()) + + def lstrip(self, chars=None): return self.__class__( + self.data.lstrip(chars)) + maketrans = str.maketrans + + def partition(self, sep): + return self.data.partition(sep) + + def replace(self, old, new, maxsplit=-1): + if isinstance(old, UserString): + old = old.data + if isinstance(new, UserString): + new = new.data + return self.__class__(self.data.replace(old, new, maxsplit)) + + def rfind(self, sub, start=0, end=_sys.maxsize): + if isinstance(sub, UserString): + sub = sub.data + return self.data.rfind(sub, start, end) + + def rindex(self, sub, start=0, end=_sys.maxsize): + return self.data.rindex(sub, start, end) + + def rjust(self, width, *args): + return self.__class__(self.data.rjust(width, *args)) + + def rpartition(self, sep): + return self.data.rpartition(sep) + + def rstrip(self, chars=None): + return self.__class__(self.data.rstrip(chars)) + + def split(self, sep=None, maxsplit=-1): + return self.data.split(sep, maxsplit) + + def rsplit(self, sep=None, maxsplit=-1): + return self.data.rsplit(sep, maxsplit) + + def splitlines(self, keepends=False): return self.data.splitlines(keepends) + + def startswith(self, prefix, start=0, end=_sys.maxsize): + return self.data.startswith(prefix, start, end) + + def strip(self, chars=None): return self.__class__(self.data.strip(chars)) + + def swapcase(self): return self.__class__(self.data.swapcase()) + + def title(self): return self.__class__(self.data.title()) + + def translate(self, *args): + return self.__class__(self.data.translate(*args)) + + def upper(self): return self.__class__(self.data.upper()) + + def zfill(self, width): return self.__class__(self.data.zfill(width)) diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/collections/abc.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/collections/abc.py new file mode 100644 index 0000000..891600d --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/collections/abc.py @@ -0,0 +1,2 @@ +from _collections_abc import * +from _collections_abc import __all__ diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/colorsys.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/colorsys.py new file mode 100644 index 0000000..5ba458a --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/colorsys.py @@ -0,0 +1,169 @@ +"""Conversion functions between RGB and other color systems. + +This modules provides two functions for each color system ABC: + + rgb_to_abc(r, g, b) --> a, b, c + abc_to_rgb(a, b, c) --> r, g, b + +All inputs and outputs are triples of floats in the range [0.0...1.0] +(with the exception of I and Q, which covers a slightly larger range). +Inputs outside the valid range may cause exceptions or invalid outputs. + +Supported color systems: +RGB: Red, Green, Blue components +YIQ: Luminance, Chrominance (used by composite video signals) +HLS: Hue, Luminance, Saturation +HSV: Hue, Saturation, Value +""" + +# References: +# http://en.wikipedia.org/wiki/YIQ +# http://en.wikipedia.org/wiki/HLS_color_space +# http://en.wikipedia.org/wiki/HSV_color_space + +__all__ = ["rgb_to_yiq", "yiq_to_rgb", "rgb_to_hls", "hls_to_rgb", + "rgb_to_hsv", "hsv_to_rgb"] + +# Some floating point constants + +ONE_THIRD = 1.0/3.0 +ONE_SIXTH = 1.0/6.0 +TWO_THIRD = 2.0/3.0 + +# YIQ: used by composite video signals (linear combinations of RGB) +# Y: perceived grey level (0.0 == black, 1.0 == white) +# I, Q: color components +# +# There are a great many versions of the constants used in these formulae. +# The ones in this library uses constants from the FCC version of NTSC. + + +def rgb_to_yiq(r, g, b): + y = 0.30*r + 0.59*g + 0.11*b + i = 0.74*(r-y) - 0.27*(b-y) + q = 0.48*(r-y) + 0.41*(b-y) + return (y, i, q) + + +def yiq_to_rgb(y, i, q): + # r = y + (0.27*q + 0.41*i) / (0.74*0.41 + 0.27*0.48) + # b = y + (0.74*q - 0.48*i) / (0.74*0.41 + 0.27*0.48) + # g = y - (0.30*(r-y) + 0.11*(b-y)) / 0.59 + + r = y + 0.9468822170900693*i + 0.6235565819861433*q + g = y - 0.27478764629897834*i - 0.6356910791873801*q + b = y - 1.1085450346420322*i + 1.7090069284064666*q + + if r < 0.0: + r = 0.0 + if g < 0.0: + g = 0.0 + if b < 0.0: + b = 0.0 + if r > 1.0: + r = 1.0 + if g > 1.0: + g = 1.0 + if b > 1.0: + b = 1.0 + return (r, g, b) + + +# HLS: Hue, Luminance, Saturation +# H: position in the spectrum +# L: color lightness +# S: color saturation + +def rgb_to_hls(r, g, b): + maxc = max(r, g, b) + minc = min(r, g, b) + # XXX Can optimize (maxc+minc) and (maxc-minc) + l = (minc+maxc)/2.0 + if minc == maxc: + return 0.0, l, 0.0 + if l <= 0.5: + s = (maxc-minc) / (maxc+minc) + else: + s = (maxc-minc) / (2.0-maxc-minc) + rc = (maxc-r) / (maxc-minc) + gc = (maxc-g) / (maxc-minc) + bc = (maxc-b) / (maxc-minc) + if r == maxc: + h = bc-gc + elif g == maxc: + h = 2.0+rc-bc + else: + h = 4.0+gc-rc + h = (h/6.0) % 1.0 + return h, l, s + + +def hls_to_rgb(h, l, s): + if s == 0.0: + return l, l, l + if l <= 0.5: + m2 = l * (1.0+s) + else: + m2 = l+s-(l*s) + m1 = 2.0*l - m2 + return (_v(m1, m2, h+ONE_THIRD), _v(m1, m2, h), _v(m1, m2, h-ONE_THIRD)) + + +def _v(m1, m2, hue): + hue = hue % 1.0 + if hue < ONE_SIXTH: + return m1 + (m2-m1)*hue*6.0 + if hue < 0.5: + return m2 + if hue < TWO_THIRD: + return m1 + (m2-m1)*(TWO_THIRD-hue)*6.0 + return m1 + + +# HSV: Hue, Saturation, Value +# H: position in the spectrum +# S: color saturation ("purity") +# V: color brightness + +def rgb_to_hsv(r, g, b): + maxc = max(r, g, b) + minc = min(r, g, b) + v = maxc + if minc == maxc: + return 0.0, 0.0, v + s = (maxc-minc) / maxc + rc = (maxc-r) / (maxc-minc) + gc = (maxc-g) / (maxc-minc) + bc = (maxc-b) / (maxc-minc) + if r == maxc: + h = bc-gc + elif g == maxc: + h = 2.0+rc-bc + else: + h = 4.0+gc-rc + h = (h/6.0) % 1.0 + return h, s, v + + +def hsv_to_rgb(h, s, v): + if s == 0.0: + return v, v, v + i = int(h*6.0) # XXX assume int() truncates! + f = (h*6.0) - i + p = v*(1.0 - s) + q = v*(1.0 - s*f) + t = v*(1.0 - s*(1.0-f)) + i = i % 6 + if i == 0: + return v, t, p + if i == 1: + return q, v, p + if i == 2: + return p, v, t + if i == 3: + return p, q, v + if i == 4: + return t, p, v + if i == 5: + return v, p, q + # Cannot get here diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/compileall.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/compileall.py new file mode 100644 index 0000000..42574fc --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/compileall.py @@ -0,0 +1,298 @@ +"""Module/script to byte-compile all .py files to .pyc files. + +When called as a script with arguments, this compiles the directories +given as arguments recursively; the -l option prevents it from +recursing into directories. + +Without arguments, if compiles all modules on sys.path, without +recursing into subdirectories. (Even though it should do so for +packages -- for now, you'll have to deal with packages separately.) + +See module py_compile for details of the actual byte-compilation. +""" +import os +import sys +import importlib.util +import py_compile +import struct + +try: + from concurrent.futures import ProcessPoolExecutor +except ImportError: + ProcessPoolExecutor = None +from functools import partial + +__all__ = ["compile_dir", "compile_file", "compile_path"] + + +def _walk_dir(dir, ddir=None, maxlevels=10, quiet=0): + if quiet < 2 and isinstance(dir, os.PathLike): + dir = os.fspath(dir) + if not quiet: + print('Listing {!r}...'.format(dir)) + try: + names = os.listdir(dir) + except OSError: + if quiet < 2: + print("Can't list {!r}".format(dir)) + names = [] + names.sort() + for name in names: + if name == '__pycache__': + continue + fullname = os.path.join(dir, name) + if ddir is not None: + dfile = os.path.join(ddir, name) + else: + dfile = None + if not os.path.isdir(fullname): + yield fullname + elif (maxlevels > 0 and name != os.curdir and name != os.pardir and + os.path.isdir(fullname) and not os.path.islink(fullname)): + yield from _walk_dir(fullname, ddir=dfile, + maxlevels=maxlevels - 1, quiet=quiet) + + +def compile_dir(dir, maxlevels=10, ddir=None, force=False, rx=None, + quiet=0, legacy=False, optimize=-1, workers=1): + """Byte-compile all modules in the given directory tree. + + Arguments (only dir is required): + + dir: the directory to byte-compile + maxlevels: maximum recursion level (default 10) + ddir: the directory that will be prepended to the path to the + file as it is compiled into each byte-code file. + force: if True, force compilation, even if timestamps are up-to-date + quiet: full output with False or 0, errors only with 1, + no output with 2 + legacy: if True, produce legacy pyc paths instead of PEP 3147 paths + optimize: optimization level or -1 for level of the interpreter + workers: maximum number of parallel workers + """ + if workers is not None and workers < 0: + raise ValueError('workers must be greater or equal to 0') + + files = _walk_dir(dir, quiet=quiet, maxlevels=maxlevels, + ddir=ddir) + success = True + if workers is not None and workers != 1 and ProcessPoolExecutor is not None: + workers = workers or None + with ProcessPoolExecutor(max_workers=workers) as executor: + results = executor.map(partial(compile_file, + ddir=ddir, force=force, + rx=rx, quiet=quiet, + legacy=legacy, + optimize=optimize), + files) + success = min(results, default=True) + else: + for file in files: + if not compile_file(file, ddir, force, rx, quiet, + legacy, optimize): + success = False + return success + + +def compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, + legacy=False, optimize=-1): + """Byte-compile one file. + + Arguments (only fullname is required): + + fullname: the file to byte-compile + ddir: if given, the directory name compiled in to the + byte-code file. + force: if True, force compilation, even if timestamps are up-to-date + quiet: full output with False or 0, errors only with 1, + no output with 2 + legacy: if True, produce legacy pyc paths instead of PEP 3147 paths + optimize: optimization level or -1 for level of the interpreter + """ + success = True + if quiet < 2 and isinstance(fullname, os.PathLike): + fullname = os.fspath(fullname) + name = os.path.basename(fullname) + if ddir is not None: + dfile = os.path.join(ddir, name) + else: + dfile = None + if rx is not None: + mo = rx.search(fullname) + if mo: + return success + if os.path.isfile(fullname): + if legacy: + cfile = fullname + 'c' + else: + if optimize >= 0: + opt = optimize if optimize >= 1 else '' + cfile = importlib.util.cache_from_source( + fullname, optimization=opt) + else: + cfile = importlib.util.cache_from_source(fullname) + cache_dir = os.path.dirname(cfile) + head, tail = name[:-3], name[-3:] + if tail == '.py': + if not force: + try: + mtime = int(os.stat(fullname).st_mtime) + expect = struct.pack('<4sl', importlib.util.MAGIC_NUMBER, + mtime) + with open(cfile, 'rb') as chandle: + actual = chandle.read(8) + if expect == actual: + return success + except OSError: + pass + if not quiet: + print('Compiling {!r}...'.format(fullname)) + try: + ok = py_compile.compile(fullname, cfile, dfile, True, + optimize=optimize) + except py_compile.PyCompileError as err: + success = False + if quiet >= 2: + return success + elif quiet: + print('*** Error compiling {!r}...'.format(fullname)) + else: + print('*** ', end='') + # escape non-printable characters in msg + msg = err.msg.encode(sys.stdout.encoding, + errors='backslashreplace') + msg = msg.decode(sys.stdout.encoding) + print(msg) + except (SyntaxError, UnicodeError, OSError) as e: + success = False + if quiet >= 2: + return success + elif quiet: + print('*** Error compiling {!r}...'.format(fullname)) + else: + print('*** ', end='') + print(e.__class__.__name__ + ':', e) + else: + if ok == 0: + success = False + return success + + +def compile_path(skip_curdir=1, maxlevels=0, force=False, quiet=0, + legacy=False, optimize=-1): + """Byte-compile all module on sys.path. + + Arguments (all optional): + + skip_curdir: if true, skip current directory (default True) + maxlevels: max recursion level (default 0) + force: as for compile_dir() (default False) + quiet: as for compile_dir() (default 0) + legacy: as for compile_dir() (default False) + optimize: as for compile_dir() (default -1) + """ + success = True + for dir in sys.path: + if (not dir or dir == os.curdir) and skip_curdir: + if quiet < 2: + print('Skipping current directory') + else: + success = success and compile_dir(dir, maxlevels, None, + force, quiet=quiet, + legacy=legacy, optimize=optimize) + return success + + +def main(): + """Script main program.""" + import argparse + + parser = argparse.ArgumentParser( + description='Utilities to support installing Python libraries.') + parser.add_argument('-l', action='store_const', const=0, + default=10, dest='maxlevels', + help="don't recurse into subdirectories") + parser.add_argument('-r', type=int, dest='recursion', + help=('control the maximum recursion level. ' + 'if `-l` and `-r` options are specified, ' + 'then `-r` takes precedence.')) + parser.add_argument('-f', action='store_true', dest='force', + help='force rebuild even if timestamps are up to date') + parser.add_argument('-q', action='count', dest='quiet', default=0, + help='output only error messages; -qq will suppress ' + 'the error messages as well.') + parser.add_argument('-b', action='store_true', dest='legacy', + help='use legacy (pre-PEP3147) compiled file locations') + parser.add_argument('-d', metavar='DESTDIR', dest='ddir', default=None, + help=('directory to prepend to file paths for use in ' + 'compile-time tracebacks and in runtime ' + 'tracebacks in cases where the source file is ' + 'unavailable')) + parser.add_argument('-x', metavar='REGEXP', dest='rx', default=None, + help=('skip files matching the regular expression; ' + 'the regexp is searched for in the full path ' + 'of each file considered for compilation')) + parser.add_argument('-i', metavar='FILE', dest='flist', + help=('add all the files and directories listed in ' + 'FILE to the list considered for compilation; ' + 'if "-", names are read from stdin')) + parser.add_argument('compile_dest', metavar='FILE|DIR', nargs='*', + help=('zero or more file and directory names ' + 'to compile; if no arguments given, defaults ' + 'to the equivalent of -l sys.path')) + parser.add_argument('-j', '--workers', default=1, + type=int, help='Run compileall concurrently') + + args = parser.parse_args() + compile_dests = args.compile_dest + + if args.rx: + import re + args.rx = re.compile(args.rx) + + if args.recursion is not None: + maxlevels = args.recursion + else: + maxlevels = args.maxlevels + + # if flist is provided then load it + if args.flist: + try: + with (sys.stdin if args.flist == '-' else open(args.flist)) as f: + for line in f: + compile_dests.append(line.strip()) + except OSError: + if args.quiet < 2: + print("Error reading file list {}".format(args.flist)) + return False + + if args.workers is not None: + args.workers = args.workers or None + + success = True + try: + if compile_dests: + for dest in compile_dests: + if os.path.isfile(dest): + if not compile_file(dest, args.ddir, args.force, args.rx, + args.quiet, args.legacy): + success = False + else: + if not compile_dir(dest, maxlevels, args.ddir, + args.force, args.rx, args.quiet, + args.legacy, workers=args.workers): + success = False + return success + else: + return compile_path(legacy=args.legacy, force=args.force, + quiet=args.quiet) + except KeyboardInterrupt: + if args.quiet < 2: + print("\n[interrupted]") + return False + return True + + +if __name__ == '__main__': + exit_status = int(not main()) + sys.exit(exit_status) diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/__init__.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/__init__.py new file mode 100644 index 0000000..196d378 --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/__init__.py @@ -0,0 +1 @@ +# This directory is a Python package. diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/__init__.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/__init__.py new file mode 100644 index 0000000..b5231f8 --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/__init__.py @@ -0,0 +1,18 @@ +# Copyright 2009 Brian Quinlan. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Execute computations asynchronously using threads or processes.""" + +__author__ = 'Brian Quinlan (brian@sweetapp.com)' + +from concurrent.futures._base import (FIRST_COMPLETED, + FIRST_EXCEPTION, + ALL_COMPLETED, + CancelledError, + TimeoutError, + Future, + Executor, + wait, + as_completed) +from concurrent.futures.process import ProcessPoolExecutor +from concurrent.futures.thread import ThreadPoolExecutor diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/_base.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/_base.py new file mode 100644 index 0000000..598cf48 --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/_base.py @@ -0,0 +1,628 @@ +# Copyright 2009 Brian Quinlan. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +__author__ = 'Brian Quinlan (brian@sweetapp.com)' + +import collections +import logging +import threading +import time + +FIRST_COMPLETED = 'FIRST_COMPLETED' +FIRST_EXCEPTION = 'FIRST_EXCEPTION' +ALL_COMPLETED = 'ALL_COMPLETED' +_AS_COMPLETED = '_AS_COMPLETED' + +# Possible future states (for internal use by the futures package). +PENDING = 'PENDING' +RUNNING = 'RUNNING' +# The future was cancelled by the user... +CANCELLED = 'CANCELLED' +# ...and _Waiter.add_cancelled() was called by a worker. +CANCELLED_AND_NOTIFIED = 'CANCELLED_AND_NOTIFIED' +FINISHED = 'FINISHED' + +_FUTURE_STATES = [ + PENDING, + RUNNING, + CANCELLED, + CANCELLED_AND_NOTIFIED, + FINISHED +] + +_STATE_TO_DESCRIPTION_MAP = { + PENDING: "pending", + RUNNING: "running", + CANCELLED: "cancelled", + CANCELLED_AND_NOTIFIED: "cancelled", + FINISHED: "finished" +} + +# Logger for internal use by the futures package. +LOGGER = logging.getLogger("concurrent.futures") + + +class Error(Exception): + """Base class for all future-related exceptions.""" + pass + + +class CancelledError(Error): + """The Future was cancelled.""" + pass + + +class TimeoutError(Error): + """The operation exceeded the given deadline.""" + pass + + +class _Waiter(object): + """Provides the event that wait() and as_completed() block on.""" + + def __init__(self): + self.event = threading.Event() + self.finished_futures = [] + + def add_result(self, future): + self.finished_futures.append(future) + + def add_exception(self, future): + self.finished_futures.append(future) + + def add_cancelled(self, future): + self.finished_futures.append(future) + + +class _AsCompletedWaiter(_Waiter): + """Used by as_completed().""" + + def __init__(self): + super(_AsCompletedWaiter, self).__init__() + self.lock = threading.Lock() + + def add_result(self, future): + with self.lock: + super(_AsCompletedWaiter, self).add_result(future) + self.event.set() + + def add_exception(self, future): + with self.lock: + super(_AsCompletedWaiter, self).add_exception(future) + self.event.set() + + def add_cancelled(self, future): + with self.lock: + super(_AsCompletedWaiter, self).add_cancelled(future) + self.event.set() + + +class _FirstCompletedWaiter(_Waiter): + """Used by wait(return_when=FIRST_COMPLETED).""" + + def add_result(self, future): + super().add_result(future) + self.event.set() + + def add_exception(self, future): + super().add_exception(future) + self.event.set() + + def add_cancelled(self, future): + super().add_cancelled(future) + self.event.set() + + +class _AllCompletedWaiter(_Waiter): + """Used by wait(return_when=FIRST_EXCEPTION and ALL_COMPLETED).""" + + def __init__(self, num_pending_calls, stop_on_exception): + self.num_pending_calls = num_pending_calls + self.stop_on_exception = stop_on_exception + self.lock = threading.Lock() + super().__init__() + + def _decrement_pending_calls(self): + with self.lock: + self.num_pending_calls -= 1 + if not self.num_pending_calls: + self.event.set() + + def add_result(self, future): + super().add_result(future) + self._decrement_pending_calls() + + def add_exception(self, future): + super().add_exception(future) + if self.stop_on_exception: + self.event.set() + else: + self._decrement_pending_calls() + + def add_cancelled(self, future): + super().add_cancelled(future) + self._decrement_pending_calls() + + +class _AcquireFutures(object): + """A context manager that does an ordered acquire of Future conditions.""" + + def __init__(self, futures): + self.futures = sorted(futures, key=id) + + def __enter__(self): + for future in self.futures: + future._condition.acquire() + + def __exit__(self, *args): + for future in self.futures: + future._condition.release() + + +def _create_and_install_waiters(fs, return_when): + if return_when == _AS_COMPLETED: + waiter = _AsCompletedWaiter() + elif return_when == FIRST_COMPLETED: + waiter = _FirstCompletedWaiter() + else: + pending_count = sum( + f._state not in [CANCELLED_AND_NOTIFIED, FINISHED] for f in fs) + + if return_when == FIRST_EXCEPTION: + waiter = _AllCompletedWaiter(pending_count, stop_on_exception=True) + elif return_when == ALL_COMPLETED: + waiter = _AllCompletedWaiter( + pending_count, stop_on_exception=False) + else: + raise ValueError("Invalid return condition: %r" % return_when) + + for f in fs: + f._waiters.append(waiter) + + return waiter + + +def _yield_finished_futures(fs, waiter, ref_collect): + """ + Iterate on the list *fs*, yielding finished futures one by one in + reverse order. + Before yielding a future, *waiter* is removed from its waiters + and the future is removed from each set in the collection of sets + *ref_collect*. + + The aim of this function is to avoid keeping stale references after + the future is yielded and before the iterator resumes. + """ + while fs: + f = fs[-1] + for futures_set in ref_collect: + futures_set.remove(f) + with f._condition: + f._waiters.remove(waiter) + del f + # Careful not to keep a reference to the popped value + yield fs.pop() + + +def as_completed(fs, timeout=None): + """An iterator over the given futures that yields each as it completes. + + Args: + fs: The sequence of Futures (possibly created by different Executors) to + iterate over. + timeout: The maximum number of seconds to wait. If None, then there + is no limit on the wait time. + + Returns: + An iterator that yields the given Futures as they complete (finished or + cancelled). If any given Futures are duplicated, they will be returned + once. + + Raises: + TimeoutError: If the entire result iterator could not be generated + before the given timeout. + """ + if timeout is not None: + end_time = timeout + time.time() + + fs = set(fs) + total_futures = len(fs) + with _AcquireFutures(fs): + finished = set( + f for f in fs + if f._state in [CANCELLED_AND_NOTIFIED, FINISHED]) + pending = fs - finished + waiter = _create_and_install_waiters(fs, _AS_COMPLETED) + finished = list(finished) + try: + yield from _yield_finished_futures(finished, waiter, + ref_collect=(fs,)) + + while pending: + if timeout is None: + wait_timeout = None + else: + wait_timeout = end_time - time.time() + if wait_timeout < 0: + raise TimeoutError( + '%d (of %d) futures unfinished' % ( + len(pending), total_futures)) + + waiter.event.wait(wait_timeout) + + with waiter.lock: + finished = waiter.finished_futures + waiter.finished_futures = [] + waiter.event.clear() + + # reverse to keep finishing order + finished.reverse() + yield from _yield_finished_futures(finished, waiter, + ref_collect=(fs, pending)) + + finally: + # Remove waiter from unfinished futures + for f in fs: + with f._condition: + f._waiters.remove(waiter) + + +DoneAndNotDoneFutures = collections.namedtuple( + 'DoneAndNotDoneFutures', 'done not_done') + + +def wait(fs, timeout=None, return_when=ALL_COMPLETED): + """Wait for the futures in the given sequence to complete. + + Args: + fs: The sequence of Futures (possibly created by different Executors) to + wait upon. + timeout: The maximum number of seconds to wait. If None, then there + is no limit on the wait time. + return_when: Indicates when this function should return. The options + are: + + FIRST_COMPLETED - Return when any future finishes or is + cancelled. + FIRST_EXCEPTION - Return when any future finishes by raising an + exception. If no future raises an exception + then it is equivalent to ALL_COMPLETED. + ALL_COMPLETED - Return when all futures finish or are cancelled. + + Returns: + A named 2-tuple of sets. The first set, named 'done', contains the + futures that completed (is finished or cancelled) before the wait + completed. The second set, named 'not_done', contains uncompleted + futures. + """ + with _AcquireFutures(fs): + done = set(f for f in fs + if f._state in [CANCELLED_AND_NOTIFIED, FINISHED]) + not_done = set(fs) - done + + if (return_when == FIRST_COMPLETED) and done: + return DoneAndNotDoneFutures(done, not_done) + elif (return_when == FIRST_EXCEPTION) and done: + if any(f for f in done + if not f.cancelled() and f.exception() is not None): + return DoneAndNotDoneFutures(done, not_done) + + if len(done) == len(fs): + return DoneAndNotDoneFutures(done, not_done) + + waiter = _create_and_install_waiters(fs, return_when) + + waiter.event.wait(timeout) + for f in fs: + with f._condition: + f._waiters.remove(waiter) + + done.update(waiter.finished_futures) + return DoneAndNotDoneFutures(done, set(fs) - done) + + +class Future(object): + """Represents the result of an asynchronous computation.""" + + def __init__(self): + """Initializes the future. Should not be called by clients.""" + self._condition = threading.Condition() + self._state = PENDING + self._result = None + self._exception = None + self._waiters = [] + self._done_callbacks = [] + + def _invoke_callbacks(self): + for callback in self._done_callbacks: + try: + callback(self) + except Exception: + LOGGER.exception('exception calling callback for %r', self) + + def __repr__(self): + with self._condition: + if self._state == FINISHED: + if self._exception: + return '<%s at %#x state=%s raised %s>' % ( + self.__class__.__name__, + id(self), + _STATE_TO_DESCRIPTION_MAP[self._state], + self._exception.__class__.__name__) + else: + return '<%s at %#x state=%s returned %s>' % ( + self.__class__.__name__, + id(self), + _STATE_TO_DESCRIPTION_MAP[self._state], + self._result.__class__.__name__) + return '<%s at %#x state=%s>' % ( + self.__class__.__name__, + id(self), + _STATE_TO_DESCRIPTION_MAP[self._state]) + + def cancel(self): + """Cancel the future if possible. + + Returns True if the future was cancelled, False otherwise. A future + cannot be cancelled if it is running or has already completed. + """ + with self._condition: + if self._state in [RUNNING, FINISHED]: + return False + + if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: + return True + + self._state = CANCELLED + self._condition.notify_all() + + self._invoke_callbacks() + return True + + def cancelled(self): + """Return True if the future was cancelled.""" + with self._condition: + return self._state in [CANCELLED, CANCELLED_AND_NOTIFIED] + + def running(self): + """Return True if the future is currently executing.""" + with self._condition: + return self._state == RUNNING + + def done(self): + """Return True of the future was cancelled or finished executing.""" + with self._condition: + return self._state in [CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED] + + def __get_result(self): + if self._exception: + raise self._exception + else: + return self._result + + def add_done_callback(self, fn): + """Attaches a callable that will be called when the future finishes. + + Args: + fn: A callable that will be called with this future as its only + argument when the future completes or is cancelled. The callable + will always be called by a thread in the same process in which + it was added. If the future has already completed or been + cancelled then the callable will be called immediately. These + callables are called in the order that they were added. + """ + with self._condition: + if self._state not in [CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED]: + self._done_callbacks.append(fn) + return + fn(self) + + def result(self, timeout=None): + """Return the result of the call that the future represents. + + Args: + timeout: The number of seconds to wait for the result if the future + isn't done. If None, then there is no limit on the wait time. + + Returns: + The result of the call that the future represents. + + Raises: + CancelledError: If the future was cancelled. + TimeoutError: If the future didn't finish executing before the given + timeout. + Exception: If the call raised then that exception will be raised. + """ + with self._condition: + if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: + raise CancelledError() + elif self._state == FINISHED: + return self.__get_result() + + self._condition.wait(timeout) + + if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: + raise CancelledError() + elif self._state == FINISHED: + return self.__get_result() + else: + raise TimeoutError() + + def exception(self, timeout=None): + """Return the exception raised by the call that the future represents. + + Args: + timeout: The number of seconds to wait for the exception if the + future isn't done. If None, then there is no limit on the wait + time. + + Returns: + The exception raised by the call that the future represents or None + if the call completed without raising. + + Raises: + CancelledError: If the future was cancelled. + TimeoutError: If the future didn't finish executing before the given + timeout. + """ + + with self._condition: + if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: + raise CancelledError() + elif self._state == FINISHED: + return self._exception + + self._condition.wait(timeout) + + if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]: + raise CancelledError() + elif self._state == FINISHED: + return self._exception + else: + raise TimeoutError() + + # The following methods should only be used by Executors and in tests. + def set_running_or_notify_cancel(self): + """Mark the future as running or process any cancel notifications. + + Should only be used by Executor implementations and unit tests. + + If the future has been cancelled (cancel() was called and returned + True) then any threads waiting on the future completing (though calls + to as_completed() or wait()) are notified and False is returned. + + If the future was not cancelled then it is put in the running state + (future calls to running() will return True) and True is returned. + + This method should be called by Executor implementations before + executing the work associated with this future. If this method returns + False then the work should not be executed. + + Returns: + False if the Future was cancelled, True otherwise. + + Raises: + RuntimeError: if this method was already called or if set_result() + or set_exception() was called. + """ + with self._condition: + if self._state == CANCELLED: + self._state = CANCELLED_AND_NOTIFIED + for waiter in self._waiters: + waiter.add_cancelled(self) + # self._condition.notify_all() is not necessary because + # self.cancel() triggers a notification. + return False + elif self._state == PENDING: + self._state = RUNNING + return True + else: + LOGGER.critical('Future %s in unexpected state: %s', + id(self), + self._state) + raise RuntimeError('Future in unexpected state') + + def set_result(self, result): + """Sets the return value of work associated with the future. + + Should only be used by Executor implementations and unit tests. + """ + with self._condition: + self._result = result + self._state = FINISHED + for waiter in self._waiters: + waiter.add_result(self) + self._condition.notify_all() + self._invoke_callbacks() + + def set_exception(self, exception): + """Sets the result of the future as being the given exception. + + Should only be used by Executor implementations and unit tests. + """ + with self._condition: + self._exception = exception + self._state = FINISHED + for waiter in self._waiters: + waiter.add_exception(self) + self._condition.notify_all() + self._invoke_callbacks() + + +class Executor(object): + """This is an abstract base class for concrete asynchronous executors.""" + + def submit(self, fn, *args, **kwargs): + """Submits a callable to be executed with the given arguments. + + Schedules the callable to be executed as fn(*args, **kwargs) and returns + a Future instance representing the execution of the callable. + + Returns: + A Future representing the given call. + """ + raise NotImplementedError() + + def map(self, fn, *iterables, timeout=None, chunksize=1): + """Returns an iterator equivalent to map(fn, iter). + + Args: + fn: A callable that will take as many arguments as there are + passed iterables. + timeout: The maximum number of seconds to wait. If None, then there + is no limit on the wait time. + chunksize: The size of the chunks the iterable will be broken into + before being passed to a child process. This argument is only + used by ProcessPoolExecutor; it is ignored by + ThreadPoolExecutor. + + Returns: + An iterator equivalent to: map(func, *iterables) but the calls may + be evaluated out-of-order. + + Raises: + TimeoutError: If the entire result iterator could not be generated + before the given timeout. + Exception: If fn(*args) raises for any values. + """ + if timeout is not None: + end_time = timeout + time.time() + + fs = [self.submit(fn, *args) for args in zip(*iterables)] + + # Yield must be hidden in closure so that the futures are submitted + # before the first iterator value is required. + def result_iterator(): + try: + # reverse to keep finishing order + fs.reverse() + while fs: + # Careful not to keep a reference to the popped future + if timeout is None: + yield fs.pop().result() + else: + yield fs.pop().result(end_time - time.time()) + finally: + for future in fs: + future.cancel() + return result_iterator() + + def shutdown(self, wait=True): + """Clean-up the resources associated with the Executor. + + It is safe to call this method several times. Otherwise, no other + methods can be called after this one. + + Args: + wait: If True then shutdown will not return until all running + futures have finished executing and the resources used by the + executor have been reclaimed. + """ + pass + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.shutdown(wait=True) + return False diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/process.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/process.py new file mode 100644 index 0000000..33ff7ba --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/process.py @@ -0,0 +1,535 @@ +# Copyright 2009 Brian Quinlan. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Implements ProcessPoolExecutor. + +The follow diagram and text describe the data-flow through the system: + +|======================= In-process =====================|== Out-of-process ==| + ++----------+ +----------+ +--------+ +-----------+ +---------+ +| | => | Work Ids | => | | => | Call Q | => | | +| | +----------+ | | +-----------+ | | +| | | ... | | | | ... | | | +| | | 6 | | | | 5, call() | | | +| | | 7 | | | | ... | | | +| Process | | ... | | Local | +-----------+ | Process | +| Pool | +----------+ | Worker | | #1..n | +| Executor | | Thread | | | +| | +----------- + | | +-----------+ | | +| | <=> | Work Items | <=> | | <= | Result Q | <= | | +| | +------------+ | | +-----------+ | | +| | | 6: call() | | | | ... | | | +| | | future | | | | 4, result | | | +| | | ... | | | | 3, except | | | ++----------+ +------------+ +--------+ +-----------+ +---------+ + +Executor.submit() called: +- creates a uniquely numbered _WorkItem and adds it to the "Work Items" dict +- adds the id of the _WorkItem to the "Work Ids" queue + +Local worker thread: +- reads work ids from the "Work Ids" queue and looks up the corresponding + WorkItem from the "Work Items" dict: if the work item has been cancelled then + it is simply removed from the dict, otherwise it is repackaged as a + _CallItem and put in the "Call Q". New _CallItems are put in the "Call Q" + until "Call Q" is full. NOTE: the size of the "Call Q" is kept small because + calls placed in the "Call Q" can no longer be cancelled with Future.cancel(). +- reads _ResultItems from "Result Q", updates the future stored in the + "Work Items" dict and deletes the dict entry + +Process #1..n: +- reads _CallItems from "Call Q", executes the calls, and puts the resulting + _ResultItems in "Result Q" +""" + +__author__ = 'Brian Quinlan (brian@sweetapp.com)' + +import atexit +import os +from concurrent.futures import _base +import queue +from queue import Full +import multiprocessing +from multiprocessing import SimpleQueue +from multiprocessing.connection import wait +import threading +import weakref +from functools import partial +import itertools +import traceback + +# Workers are created as daemon threads and processes. This is done to allow the +# interpreter to exit when there are still idle processes in a +# ProcessPoolExecutor's process pool (i.e. shutdown() was not called). However, +# allowing workers to die with the interpreter has two undesirable properties: +# - The workers would still be running during interpreter shutdown, +# meaning that they would fail in unpredictable ways. +# - The workers could be killed while evaluating a work item, which could +# be bad if the callable being evaluated has external side-effects e.g. +# writing to a file. +# +# To work around this problem, an exit handler is installed which tells the +# workers to exit when their work queues are empty and then waits until the +# threads/processes finish. + +_threads_queues = weakref.WeakKeyDictionary() +_shutdown = False + + +def _python_exit(): + global _shutdown + _shutdown = True + items = list(_threads_queues.items()) + for t, q in items: + q.put(None) + for t, q in items: + t.join() + + +# Controls how many more calls than processes will be queued in the call queue. +# A smaller number will mean that processes spend more time idle waiting for +# work while a larger number will make Future.cancel() succeed less frequently +# (Futures in the call queue cannot be cancelled). +EXTRA_QUEUED_CALLS = 1 + +# Hack to embed stringification of remote traceback in local traceback + + +class _RemoteTraceback(Exception): + def __init__(self, tb): + self.tb = tb + + def __str__(self): + return self.tb + + +class _ExceptionWithTraceback: + def __init__(self, exc, tb): + tb = traceback.format_exception(type(exc), exc, tb) + tb = ''.join(tb) + self.exc = exc + self.tb = '\n"""\n%s"""' % tb + + def __reduce__(self): + return _rebuild_exc, (self.exc, self.tb) + + +def _rebuild_exc(exc, tb): + exc.__cause__ = _RemoteTraceback(tb) + return exc + + +class _WorkItem(object): + def __init__(self, future, fn, args, kwargs): + self.future = future + self.fn = fn + self.args = args + self.kwargs = kwargs + + +class _ResultItem(object): + def __init__(self, work_id, exception=None, result=None): + self.work_id = work_id + self.exception = exception + self.result = result + + +class _CallItem(object): + def __init__(self, work_id, fn, args, kwargs): + self.work_id = work_id + self.fn = fn + self.args = args + self.kwargs = kwargs + + +def _get_chunks(*iterables, chunksize): + """ Iterates over zip()ed iterables in chunks. """ + it = zip(*iterables) + while True: + chunk = tuple(itertools.islice(it, chunksize)) + if not chunk: + return + yield chunk + + +def _process_chunk(fn, chunk): + """ Processes a chunk of an iterable passed to map. + + Runs the function passed to map() on a chunk of the + iterable passed to map. + + This function is run in a separate process. + + """ + return [fn(*args) for args in chunk] + + +def _process_worker(call_queue, result_queue): + """Evaluates calls from call_queue and places the results in result_queue. + + This worker is run in a separate process. + + Args: + call_queue: A multiprocessing.Queue of _CallItems that will be read and + evaluated by the worker. + result_queue: A multiprocessing.Queue of _ResultItems that will written + to by the worker. + shutdown: A multiprocessing.Event that will be set as a signal to the + worker that it should exit when call_queue is empty. + """ + while True: + call_item = call_queue.get(block=True) + if call_item is None: + # Wake up queue management thread + result_queue.put(os.getpid()) + return + try: + r = call_item.fn(*call_item.args, **call_item.kwargs) + except BaseException as e: + exc = _ExceptionWithTraceback(e, e.__traceback__) + result_queue.put(_ResultItem(call_item.work_id, exception=exc)) + else: + result_queue.put(_ResultItem(call_item.work_id, + result=r)) + + +def _add_call_item_to_queue(pending_work_items, + work_ids, + call_queue): + """Fills call_queue with _WorkItems from pending_work_items. + + This function never blocks. + + Args: + pending_work_items: A dict mapping work ids to _WorkItems e.g. + {5: <_WorkItem...>, 6: <_WorkItem...>, ...} + work_ids: A queue.Queue of work ids e.g. Queue([5, 6, ...]). Work ids + are consumed and the corresponding _WorkItems from + pending_work_items are transformed into _CallItems and put in + call_queue. + call_queue: A multiprocessing.Queue that will be filled with _CallItems + derived from _WorkItems. + """ + while True: + if call_queue.full(): + return + try: + work_id = work_ids.get(block=False) + except queue.Empty: + return + else: + work_item = pending_work_items[work_id] + + if work_item.future.set_running_or_notify_cancel(): + call_queue.put(_CallItem(work_id, + work_item.fn, + work_item.args, + work_item.kwargs), + block=True) + else: + del pending_work_items[work_id] + continue + + +def _queue_management_worker(executor_reference, + processes, + pending_work_items, + work_ids_queue, + call_queue, + result_queue): + """Manages the communication between this process and the worker processes. + + This function is run in a local thread. + + Args: + executor_reference: A weakref.ref to the ProcessPoolExecutor that owns + this thread. Used to determine if the ProcessPoolExecutor has been + garbage collected and that this function can exit. + process: A list of the multiprocessing.Process instances used as + workers. + pending_work_items: A dict mapping work ids to _WorkItems e.g. + {5: <_WorkItem...>, 6: <_WorkItem...>, ...} + work_ids_queue: A queue.Queue of work ids e.g. Queue([5, 6, ...]). + call_queue: A multiprocessing.Queue that will be filled with _CallItems + derived from _WorkItems for processing by the process workers. + result_queue: A multiprocessing.Queue of _ResultItems generated by the + process workers. + """ + executor = None + + def shutting_down(): + return _shutdown or executor is None or executor._shutdown_thread + + def shutdown_worker(): + # This is an upper bound + nb_children_alive = sum(p.is_alive() for p in processes.values()) + for i in range(0, nb_children_alive): + call_queue.put_nowait(None) + # Release the queue's resources as soon as possible. + call_queue.close() + # If .join() is not called on the created processes then + # some multiprocessing.Queue methods may deadlock on Mac OS X. + for p in processes.values(): + p.join() + + reader = result_queue._reader + + while True: + _add_call_item_to_queue(pending_work_items, + work_ids_queue, + call_queue) + + sentinels = [p.sentinel for p in processes.values()] + assert sentinels + ready = wait([reader] + sentinels) + if reader in ready: + result_item = reader.recv() + else: + # Mark the process pool broken so that submits fail right now. + executor = executor_reference() + if executor is not None: + executor._broken = True + executor._shutdown_thread = True + executor = None + # All futures in flight must be marked failed + for work_id, work_item in pending_work_items.items(): + work_item.future.set_exception( + BrokenProcessPool( + "A process in the process pool was " + "terminated abruptly while the future was " + "running or pending." + )) + # Delete references to object. See issue16284 + del work_item + pending_work_items.clear() + # Terminate remaining workers forcibly: the queues or their + # locks may be in a dirty state and block forever. + for p in processes.values(): + p.terminate() + shutdown_worker() + return + if isinstance(result_item, int): + # Clean shutdown of a worker using its PID + # (avoids marking the executor broken) + assert shutting_down() + p = processes.pop(result_item) + p.join() + if not processes: + shutdown_worker() + return + elif result_item is not None: + work_item = pending_work_items.pop(result_item.work_id, None) + # work_item can be None if another process terminated (see above) + if work_item is not None: + if result_item.exception: + work_item.future.set_exception(result_item.exception) + else: + work_item.future.set_result(result_item.result) + # Delete references to object. See issue16284 + del work_item + # Check whether we should start shutting down. + executor = executor_reference() + # No more work items can be added if: + # - The interpreter is shutting down OR + # - The executor that owns this worker has been collected OR + # - The executor that owns this worker has been shutdown. + if shutting_down(): + try: + # Since no new work items can be added, it is safe to shutdown + # this thread if there are no pending work items. + if not pending_work_items: + shutdown_worker() + return + except Full: + # This is not a problem: we will eventually be woken up (in + # result_queue.get()) and be able to send a sentinel again. + pass + executor = None + + +_system_limits_checked = False +_system_limited = None + + +def _check_system_limits(): + global _system_limits_checked, _system_limited + if _system_limits_checked: + if _system_limited: + raise NotImplementedError(_system_limited) + _system_limits_checked = True + try: + nsems_max = os.sysconf("SC_SEM_NSEMS_MAX") + except (AttributeError, ValueError): + # sysconf not available or setting not available + return + if nsems_max == -1: + # indetermined limit, assume that limit is determined + # by available memory only + return + if nsems_max >= 256: + # minimum number of semaphores available + # according to POSIX + return + _system_limited = "system provides too few semaphores (%d available, 256 necessary)" % nsems_max + raise NotImplementedError(_system_limited) + + +def _chain_from_iterable_of_lists(iterable): + """ + Specialized implementation of itertools.chain.from_iterable. + Each item in *iterable* should be a list. This function is + careful not to keep references to yielded objects. + """ + for element in iterable: + element.reverse() + while element: + yield element.pop() + + +class BrokenProcessPool(RuntimeError): + """ + Raised when a process in a ProcessPoolExecutor terminated abruptly + while a future was in the running state. + """ + + +class ProcessPoolExecutor(_base.Executor): + def __init__(self, max_workers=None): + """Initializes a new ProcessPoolExecutor instance. + + Args: + max_workers: The maximum number of processes that can be used to + execute the given calls. If None or not given then as many + worker processes will be created as the machine has processors. + """ + _check_system_limits() + + if max_workers is None: + self._max_workers = os.cpu_count() or 1 + else: + if max_workers <= 0: + raise ValueError("max_workers must be greater than 0") + + self._max_workers = max_workers + + # Make the call queue slightly larger than the number of processes to + # prevent the worker processes from idling. But don't make it too big + # because futures in the call queue cannot be cancelled. + self._call_queue = multiprocessing.Queue(self._max_workers + + EXTRA_QUEUED_CALLS) + # Killed worker processes can produce spurious "broken pipe" + # tracebacks in the queue's own worker thread. But we detect killed + # processes anyway, so silence the tracebacks. + self._call_queue._ignore_epipe = True + self._result_queue = SimpleQueue() + self._work_ids = queue.Queue() + self._queue_management_thread = None + # Map of pids to processes + self._processes = {} + + # Shutdown is a two-step process. + self._shutdown_thread = False + self._shutdown_lock = threading.Lock() + self._broken = False + self._queue_count = 0 + self._pending_work_items = {} + + def _start_queue_management_thread(self): + # When the executor gets lost, the weakref callback will wake up + # the queue management thread. + def weakref_cb(_, q=self._result_queue): + q.put(None) + if self._queue_management_thread is None: + # Start the processes so that their sentinels are known. + self._adjust_process_count() + self._queue_management_thread = threading.Thread( + target=_queue_management_worker, + args=(weakref.ref(self, weakref_cb), + self._processes, + self._pending_work_items, + self._work_ids, + self._call_queue, + self._result_queue)) + self._queue_management_thread.daemon = True + self._queue_management_thread.start() + _threads_queues[self._queue_management_thread] = self._result_queue + + def _adjust_process_count(self): + for _ in range(len(self._processes), self._max_workers): + p = multiprocessing.Process( + target=_process_worker, + args=(self._call_queue, + self._result_queue)) + p.start() + self._processes[p.pid] = p + + def submit(self, fn, *args, **kwargs): + with self._shutdown_lock: + if self._broken: + raise BrokenProcessPool('A child process terminated ' + 'abruptly, the process pool is not usable anymore') + if self._shutdown_thread: + raise RuntimeError( + 'cannot schedule new futures after shutdown') + + f = _base.Future() + w = _WorkItem(f, fn, args, kwargs) + + self._pending_work_items[self._queue_count] = w + self._work_ids.put(self._queue_count) + self._queue_count += 1 + # Wake up queue management thread + self._result_queue.put(None) + + self._start_queue_management_thread() + return f + submit.__doc__ = _base.Executor.submit.__doc__ + + def map(self, fn, *iterables, timeout=None, chunksize=1): + """Returns an iterator equivalent to map(fn, iter). + + Args: + fn: A callable that will take as many arguments as there are + passed iterables. + timeout: The maximum number of seconds to wait. If None, then there + is no limit on the wait time. + chunksize: If greater than one, the iterables will be chopped into + chunks of size chunksize and submitted to the process pool. + If set to one, the items in the list will be sent one at a time. + + Returns: + An iterator equivalent to: map(func, *iterables) but the calls may + be evaluated out-of-order. + + Raises: + TimeoutError: If the entire result iterator could not be generated + before the given timeout. + Exception: If fn(*args) raises for any values. + """ + if chunksize < 1: + raise ValueError("chunksize must be >= 1.") + + results = super().map(partial(_process_chunk, fn), + _get_chunks(*iterables, chunksize=chunksize), + timeout=timeout) + return _chain_from_iterable_of_lists(results) + + def shutdown(self, wait=True): + with self._shutdown_lock: + self._shutdown_thread = True + if self._queue_management_thread: + # Wake up queue management thread + self._result_queue.put(None) + if wait: + self._queue_management_thread.join() + # To reduce the risk of opening too many files, remove references to + # objects that use file descriptors. + self._queue_management_thread = None + self._call_queue = None + self._result_queue = None + self._processes = None + shutdown.__doc__ = _base.Executor.shutdown.__doc__ + + +atexit.register(_python_exit) diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/thread.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/thread.py new file mode 100644 index 0000000..e34ad63 --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/concurrent/futures/thread.py @@ -0,0 +1,159 @@ +# Copyright 2009 Brian Quinlan. All Rights Reserved. +# Licensed to PSF under a Contributor Agreement. + +"""Implements ThreadPoolExecutor.""" + +__author__ = 'Brian Quinlan (brian@sweetapp.com)' + +import atexit +from concurrent.futures import _base +import itertools +import queue +import threading +import weakref +import os + +# Workers are created as daemon threads. This is done to allow the interpreter +# to exit when there are still idle threads in a ThreadPoolExecutor's thread +# pool (i.e. shutdown() was not called). However, allowing workers to die with +# the interpreter has two undesirable properties: +# - The workers would still be running during interpreter shutdown, +# meaning that they would fail in unpredictable ways. +# - The workers could be killed while evaluating a work item, which could +# be bad if the callable being evaluated has external side-effects e.g. +# writing to a file. +# +# To work around this problem, an exit handler is installed which tells the +# workers to exit when their work queues are empty and then waits until the +# threads finish. + +_threads_queues = weakref.WeakKeyDictionary() +_shutdown = False + + +def _python_exit(): + global _shutdown + _shutdown = True + items = list(_threads_queues.items()) + for t, q in items: + q.put(None) + for t, q in items: + t.join() + + +atexit.register(_python_exit) + + +class _WorkItem(object): + def __init__(self, future, fn, args, kwargs): + self.future = future + self.fn = fn + self.args = args + self.kwargs = kwargs + + def run(self): + if not self.future.set_running_or_notify_cancel(): + return + + try: + result = self.fn(*self.args, **self.kwargs) + except BaseException as exc: + self.future.set_exception(exc) + # Break a reference cycle with the exception 'exc' + self = None + else: + self.future.set_result(result) + + +def _worker(executor_reference, work_queue): + try: + while True: + work_item = work_queue.get(block=True) + if work_item is not None: + work_item.run() + # Delete references to object. See issue16284 + del work_item + continue + executor = executor_reference() + # Exit if: + # - The interpreter is shutting down OR + # - The executor that owns the worker has been collected OR + # - The executor that owns the worker has been shutdown. + if _shutdown or executor is None or executor._shutdown: + # Notice other workers + work_queue.put(None) + return + del executor + except BaseException: + _base.LOGGER.critical('Exception in worker', exc_info=True) + + +class ThreadPoolExecutor(_base.Executor): + + # Used to assign unique thread names when thread_name_prefix is not supplied. + _counter = itertools.count().__next__ + + def __init__(self, max_workers=None, thread_name_prefix=''): + """Initializes a new ThreadPoolExecutor instance. + + Args: + max_workers: The maximum number of threads that can be used to + execute the given calls. + thread_name_prefix: An optional name prefix to give our threads. + """ + if max_workers is None: + # Use this number because ThreadPoolExecutor is often + # used to overlap I/O instead of CPU work. + max_workers = (os.cpu_count() or 1) * 5 + if max_workers <= 0: + raise ValueError("max_workers must be greater than 0") + + self._max_workers = max_workers + self._work_queue = queue.Queue() + self._threads = set() + self._shutdown = False + self._shutdown_lock = threading.Lock() + self._thread_name_prefix = (thread_name_prefix or + ("ThreadPoolExecutor-%d" % self._counter())) + + def submit(self, fn, *args, **kwargs): + with self._shutdown_lock: + if self._shutdown: + raise RuntimeError( + 'cannot schedule new futures after shutdown') + + f = _base.Future() + w = _WorkItem(f, fn, args, kwargs) + + self._work_queue.put(w) + self._adjust_thread_count() + return f + submit.__doc__ = _base.Executor.submit.__doc__ + + def _adjust_thread_count(self): + # When the executor gets lost, the weakref callback will wake up + # the worker threads. + def weakref_cb(_, q=self._work_queue): + q.put(None) + # TODO(bquinlan): Should avoid creating new threads if there are more + # idle threads than items in the work queue. + num_threads = len(self._threads) + if num_threads < self._max_workers: + thread_name = '%s_%d' % (self._thread_name_prefix or self, + num_threads) + t = threading.Thread(name=thread_name, target=_worker, + args=(weakref.ref(self, weakref_cb), + self._work_queue)) + t.daemon = True + t.start() + self._threads.add(t) + _threads_queues[t] = self._work_queue + + def shutdown(self, wait=True): + with self._shutdown_lock: + self._shutdown = True + self._work_queue.put(None) + if wait: + for t in self._threads: + t.join() + shutdown.__doc__ = _base.Executor.shutdown.__doc__ diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/config-3.6m-x86_64-linux-gnu/python-config.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/config-3.6m-x86_64-linux-gnu/python-config.py new file mode 100755 index 0000000..b5dde63 --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/config-3.6m-x86_64-linux-gnu/python-config.py @@ -0,0 +1,71 @@ +#!/private/home/oteytaud/newtasks/src_cpp/elfgames/tasks/elf2codingenv/bin/python3.6m +# -*- python -*- + +# Keep this script in sync with python-config.sh.in + +import getopt +import os +import sys +import sysconfig + +valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', + 'ldflags', 'extension-suffix', 'help', 'abiflags', 'configdir'] + + +def exit_with_usage(code=1): + print("Usage: {0} [{1}]".format( + sys.argv[0], '|'.join('--'+opt for opt in valid_opts)), file=sys.stderr) + sys.exit(code) + + +try: + opts, args = getopt.getopt(sys.argv[1:], '', valid_opts) +except getopt.error: + exit_with_usage() + +if not opts: + exit_with_usage() + +pyver = sysconfig.get_config_var('VERSION') +getvar = sysconfig.get_config_var + +opt_flags = [flag for (flag, val) in opts] + +if '--help' in opt_flags: + exit_with_usage(code=0) + +for opt in opt_flags: + if opt == '--prefix': + print(sysconfig.get_config_var('prefix')) + + elif opt == '--exec-prefix': + print(sysconfig.get_config_var('exec_prefix')) + + elif opt in ('--includes', '--cflags'): + flags = ['-I' + sysconfig.get_path('include'), + '-I' + sysconfig.get_path('platinclude')] + if opt == '--cflags': + flags.extend(getvar('CFLAGS').split()) + print(' '.join(flags)) + + elif opt in ('--libs', '--ldflags'): + libs = ['-lpython' + pyver + sys.abiflags] + libs += getvar('LIBS').split() + libs += getvar('SYSLIBS').split() + # add the prefix/lib/pythonX.Y/config dir, but only if there is no + # shared library in prefix/lib/. + if opt == '--ldflags': + if not getvar('Py_ENABLE_SHARED'): + libs.insert(0, '-L' + getvar('LIBPL')) + if not getvar('PYTHONFRAMEWORK'): + libs.extend(getvar('LINKFORSHARED').split()) + print(' '.join(libs)) + + elif opt == '--extension-suffix': + print(sysconfig.get_config_var('EXT_SUFFIX')) + + elif opt == '--abiflags': + print(sys.abiflags) + + elif opt == '--configdir': + print(sysconfig.get_config_var('LIBPL')) diff --git a/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/configparser.py b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/configparser.py new file mode 100644 index 0000000..919ac2d --- /dev/null +++ b/src_cpp/elfgames/tasks/elf2codingenv/lib/python3.6/configparser.py @@ -0,0 +1,1342 @@ +"""Configuration file parser. + +A configuration file consists of sections, lead by a "[section]" header, +and followed by "name: value" entries, with continuations and such in +the style of RFC 822. + +Intrinsic defaults can be specified by passing them into the +ConfigParser constructor as a dictionary. + +class: + +ConfigParser -- responsible for parsing a list of + configuration files, and managing the parsed database. + + methods: + + __init__(defaults=None, dict_type=_default_dict, allow_no_value=False, + delimiters=('=', ':'), comment_prefixes=('#', ';'), + inline_comment_prefixes=None, strict=True, + empty_lines_in_values=True, default_section='DEFAULT', + interpolation=, converters=): + Create the parser. When `defaults' is given, it is initialized into the + dictionary or intrinsic defaults. The keys must be strings, the values + must be appropriate for %()s string interpolation. + + When `dict_type' is given, it will be used to create the dictionary + objects for the list of sections, for the options within a section, and + for the default values. + + When `delimiters' is given, it will be used as the set of substrings + that divide keys from values. + + When `comment_prefixes' is given, it will be used as the set of + substrings that prefix comments in empty lines. Comments can be + indented. + + When `inline_comment_prefixes' is given, it will be used as the set of + substrings that prefix comments in non-empty lines. + + When `strict` is True, the parser won't allow for any section or option + duplicates while reading from a single source (file, string or + dictionary). Default is True. + + When `empty_lines_in_values' is False (default: True), each empty line + marks the end of an option. Otherwise, internal empty lines of + a multiline option are kept as part of the value. + + When `allow_no_value' is True (default: False), options without + values are accepted; the value presented for these is None. + + When `default_section' is given, the name of the special section is + named accordingly. By default it is called ``"DEFAULT"`` but this can + be customized to point to any other valid section name. Its current + value can be retrieved using the ``parser_instance.default_section`` + attribute and may be modified at runtime. + + When `interpolation` is given, it should be an Interpolation subclass + instance. It will be used as the handler for option value + pre-processing when using getters. RawConfigParser object s don't do + any sort of interpolation, whereas ConfigParser uses an instance of + BasicInterpolation. The library also provides a ``zc.buildbot`` + inspired ExtendedInterpolation implementation. + + When `converters` is given, it should be a dictionary where each key + represents the name of a type converter and each value is a callable + implementing the conversion from string to the desired datatype. Every + converter gets its corresponding get*() method on the parser object and + section proxies. + + sections() + Return all the configuration section names, sans DEFAULT. + + has_section(section) + Return whether the given section exists. + + has_option(section, option) + Return whether the given option exists in the given section. + + options(section) + Return list of configuration options for the named section. + + read(filenames, encoding=None) + Read and parse the list of named configuration files, given by + name. A single filename is also allowed. Non-existing files + are ignored. Return list of successfully read files. + + read_file(f, filename=None) + Read and parse one configuration file, given as a file object. + The filename defaults to f.name; it is only used in error + messages (if f has no `name' attribute, the string `' is used). + + read_string(string) + Read configuration from a given string. + + read_dict(dictionary) + Read configuration from a dictionary. Keys are section names, + values are dictionaries with keys and values that should be present + in the section. If the used dictionary type preserves order, sections + and their keys will be added in order. Values are automatically + converted to strings. + + get(section, option, raw=False, vars=None, fallback=_UNSET) + Return a string value for the named option. All % interpolations are + expanded in the return values, based on the defaults passed into the + constructor and the DEFAULT section. Additional substitutions may be + provided using the `vars' argument, which must be a dictionary whose + contents override any pre-existing defaults. If `option' is a key in + `vars', the value from `vars' is used. + + getint(section, options, raw=False, vars=None, fallback=_UNSET) + Like get(), but convert value to an integer. + + getfloat(section, options, raw=False, vars=None, fallback=_UNSET) + Like get(), but convert value to a float. + + getboolean(section, options, raw=False, vars=None, fallback=_UNSET) + Like get(), but convert value to a boolean (currently case + insensitively defined as 0, false, no, off for False, and 1, true, + yes, on for True). Returns False or True. + + items(section=_UNSET, raw=False, vars=None) + If section is given, return a list of tuples with (name, value) for + each option in the section. Otherwise, return a list of tuples with + (section_name, section_proxy) for each section, including DEFAULTSECT. + + remove_section(section) + Remove the given file section and all its options. + + remove_option(section, option) + Remove the given option from the given section. + + set(section, option, value) + Set the given option. + + write(fp, space_around_delimiters=True) + Write the configuration state in .ini format. If + `space_around_delimiters' is True (the default), delimiters + between keys and values are surrounded by spaces. +""" + +from collections.abc import MutableMapping +from collections import OrderedDict as _default_dict, ChainMap as _ChainMap +import functools +import io +import itertools +import os +import re +import sys +import warnings + +__all__ = ["NoSectionError", "DuplicateOptionError", "DuplicateSectionError", + "NoOptionError", "InterpolationError", "InterpolationDepthError", + "InterpolationMissingOptionError", "InterpolationSyntaxError", + "ParsingError", "MissingSectionHeaderError", + "ConfigParser", "SafeConfigParser", "RawConfigParser", + "Interpolation", "BasicInterpolation", "ExtendedInterpolation", + "LegacyInterpolation", "SectionProxy", "ConverterMapping", + "DEFAULTSECT", "MAX_INTERPOLATION_DEPTH"] + +DEFAULTSECT = "DEFAULT" + +MAX_INTERPOLATION_DEPTH = 10 + + +# exception classes +class Error(Exception): + """Base class for ConfigParser exceptions.""" + + def __init__(self, msg=''): + self.message = msg + Exception.__init__(self, msg) + + def __repr__(self): + return self.message + + __str__ = __repr__ + + +class NoSectionError(Error): + """Raised when no section matches a requested option.""" + + def __init__(self, section): + Error.__init__(self, 'No section: %r' % (section,)) + self.section = section + self.args = (section, ) + + +class DuplicateSectionError(Error): + """Raised when a section is repeated in an input source. + + Possible repetitions that raise this exception are: multiple creation + using the API or in strict parsers when a section is found more than once + in a single input file, string or dictionary. + """ + + def __init__(self, section, source=None, lineno=None): + msg = [repr(section), " already exists"] + if source is not None: + message = ["While reading from ", repr(source)] + if lineno is not None: + message.append(" [line {0:2d}]".format(lineno)) + message.append(": section ") + message.extend(msg) + msg = message + else: + msg.insert(0, "Section ") + Error.__init__(self, "".join(msg)) + self.section = section + self.source = source + self.lineno = lineno + self.args = (section, source, lineno) + + +class DuplicateOptionError(Error): + """Raised by strict parsers when an option is repeated in an input source. + + Current implementation raises this exception only when an option is found + more than once in a single file, string or dictionary. + """ + + def __init__(self, section, option, source=None, lineno=None): + msg = [repr(option), " in section ", repr(section), + " already exists"] + if source is not None: + message = ["While reading from ", repr(source)] + if lineno is not None: + message.append(" [line {0:2d}]".format(lineno)) + message.append(": option ") + message.extend(msg) + msg = message + else: + msg.insert(0, "Option ") + Error.__init__(self, "".join(msg)) + self.section = section + self.option = option + self.source = source + self.lineno = lineno + self.args = (section, option, source, lineno) + + +class NoOptionError(Error): + """A requested option was not found.""" + + def __init__(self, option, section): + Error.__init__(self, "No option %r in section: %r" % + (option, section)) + self.option = option + self.section = section + self.args = (option, section) + + +class InterpolationError(Error): + """Base class for interpolation-related exceptions.""" + + def __init__(self, option, section, msg): + Error.__init__(self, msg) + self.option = option + self.section = section + self.args = (option, section, msg) + + +class InterpolationMissingOptionError(InterpolationError): + """A string substitution required a setting which was not available.""" + + def __init__(self, option, section, rawval, reference): + msg = ("Bad value substitution: option {!r} in section {!r} contains " + "an interpolation key {!r} which is not a valid option name. " + "Raw value: {!r}".format(option, section, reference, rawval)) + InterpolationError.__init__(self, option, section, msg) + self.reference = reference + self.args = (option, section, rawval, reference) + + +class InterpolationSyntaxError(InterpolationError): + """Raised when the source text contains invalid syntax. + + Current implementation raises this exception when the source text into + which substitutions are made does not conform to the required syntax. + """ + + +class InterpolationDepthError(InterpolationError): + """Raised when substitutions are nested too deeply.""" + + def __init__(self, option, section, rawval): + msg = ("Recursion limit exceeded in value substitution: option {!r} " + "in section {!r} contains an interpolation key which " + "cannot be substituted in {} steps. Raw value: {!r}" + "".format(option, section, MAX_INTERPOLATION_DEPTH, + rawval)) + InterpolationError.__init__(self, option, section, msg) + self.args = (option, section, rawval) + + +class ParsingError(Error): + """Raised when a configuration file does not follow legal syntax.""" + + def __init__(self, source=None, filename=None): + # Exactly one of `source'/`filename' arguments has to be given. + # `filename' kept for compatibility. + if filename and source: + raise ValueError("Cannot specify both `filename' and `source'. " + "Use `source'.") + elif not filename and not source: + raise ValueError("Required argument `source' not given.") + elif filename: + source = filename + Error.__init__(self, 'Source contains parsing errors: %r' % source) + self.source = source + self.errors = [] + self.args = (source, ) + + @property + def filename(self): + """Deprecated, use `source'.""" + warnings.warn( + "The 'filename' attribute will be removed in future versions. " + "Use 'source' instead.", + DeprecationWarning, stacklevel=2 + ) + return self.source + + @filename.setter + def filename(self, value): + """Deprecated, user `source'.""" + warnings.warn( + "The 'filename' attribute will be removed in future versions. " + "Use 'source' instead.", + DeprecationWarning, stacklevel=2 + ) + self.source = value + + def append(self, lineno, line): + self.errors.append((lineno, line)) + self.message += '\n\t[line %2d]: %s' % (lineno, line) + + +class MissingSectionHeaderError(ParsingError): + """Raised when a key-value pair is found before any section header.""" + + def __init__(self, filename, lineno, line): + Error.__init__( + self, + 'File contains no section headers.\nfile: %r, line: %d\n%r' % + (filename, lineno, line)) + self.source = filename + self.lineno = lineno + self.line = line + self.args = (filename, lineno, line) + + +# Used in parser getters to indicate the default behaviour when a specific +# option is not found it to raise an exception. Created to enable `None' as +# a valid fallback value. +_UNSET = object() + + +class Interpolation: + """Dummy interpolation that passes the value through with no changes.""" + + def before_get(self, parser, section, option, value, defaults): + return value + + def before_set(self, parser, section, option, value): + return value + + def before_read(self, parser, section, option, value): + return value + + def before_write(self, parser, section, option, value): + return value + + +class BasicInterpolation(Interpolation): + """Interpolation as implemented in the classic ConfigParser. + + The option values can contain format strings which refer to other values in + the same section, or values in the special default section. + + For example: + + something: %(dir)s/whatever + + would resolve the "%(dir)s" to the value of dir. All reference + expansions are done late, on demand. If a user needs to use a bare % in + a configuration file, she can escape it by writing %%. Other % usage + is considered a user error and raises `InterpolationSyntaxError'.""" + + _KEYCRE = re.compile(r"%\(([^)]+)\)s") + + def before_get(self, parser, section, option, value, defaults): + L = [] + self._interpolate_some(parser, option, L, value, section, defaults, 1) + return ''.join(L) + + def before_set(self, parser, section, option, value): + tmp_value = value.replace('%%', '') # escaped percent signs + tmp_value = self._KEYCRE.sub('', tmp_value) # valid syntax + if '%' in tmp_value: + raise ValueError("invalid interpolation syntax in %r at " + "position %d" % (value, tmp_value.find('%'))) + return value + + def _interpolate_some(self, parser, option, accum, rest, section, map, + depth): + rawval = parser.get(section, option, raw=True, fallback=rest) + if depth > MAX_INTERPOLATION_DEPTH: + raise InterpolationDepthError(option, section, rawval) + while rest: + p = rest.find("%") + if p < 0: + accum.append(rest) + return + if p > 0: + accum.append(rest[:p]) + rest = rest[p:] + # p is no longer used + c = rest[1:2] + if c == "%": + accum.append("%") + rest = rest[2:] + elif c == "(": + m = self._KEYCRE.match(rest) + if m is None: + raise InterpolationSyntaxError(option, section, + "bad interpolation variable reference %r" % rest) + var = parser.optionxform(m.group(1)) + rest = rest[m.end():] + try: + v = map[var] + except KeyError: + raise InterpolationMissingOptionError( + option, section, rawval, var) from None + if "%" in v: + self._interpolate_some(parser, option, accum, v, + section, map, depth + 1) + else: + accum.append(v) + else: + raise InterpolationSyntaxError( + option, section, + "'%%' must be followed by '%%' or '(', " + "found: %r" % (rest,)) + + +class ExtendedInterpolation(Interpolation): + """Advanced variant of interpolation, supports the syntax used by + `zc.buildout'. Enables interpolation between sections.""" + + _KEYCRE = re.compile(r"\$\{([^}]+)\}") + + def before_get(self, parser, section, option, value, defaults): + L = [] + self._interpolate_some(parser, option, L, value, section, defaults, 1) + return ''.join(L) + + def before_set(self, parser, section, option, value): + tmp_value = value.replace('$$', '') # escaped dollar signs + tmp_value = self._KEYCRE.sub('', tmp_value) # valid syntax + if '$' in tmp_value: + raise ValueError("invalid interpolation syntax in %r at " + "position %d" % (value, tmp_value.find('$'))) + return value + + def _interpolate_some(self, parser, option, accum, rest, section, map, + depth): + rawval = parser.get(section, option, raw=True, fallback=rest) + if depth > MAX_INTERPOLATION_DEPTH: + raise InterpolationDepthError(option, section, rawval) + while rest: + p = rest.find("$") + if p < 0: + accum.append(rest) + return + if p > 0: + accum.append(rest[:p]) + rest = rest[p:] + # p is no longer used + c = rest[1:2] + if c == "$": + accum.append("$") + rest = rest[2:] + elif c == "{": + m = self._KEYCRE.match(rest) + if m is None: + raise InterpolationSyntaxError(option, section, + "bad interpolation variable reference %r" % rest) + path = m.group(1).split(':') + rest = rest[m.end():] + sect = section + opt = option + try: + if len(path) == 1: + opt = parser.optionxform(path[0]) + v = map[opt] + elif len(path) == 2: + sect = path[0] + opt = parser.optionxform(path[1]) + v = parser.get(sect, opt, raw=True) + else: + raise InterpolationSyntaxError( + option, section, + "More than one ':' found: %r" % (rest,)) + except (KeyError, NoSectionError, NoOptionError): + raise InterpolationMissingOptionError( + option, section, rawval, ":".join(path)) from None + if "$" in v: + self._interpolate_some(parser, opt, accum, v, sect, + dict(parser.items(sect, raw=True)), + depth + 1) + else: + accum.append(v) + else: + raise InterpolationSyntaxError( + option, section, + "'$' must be followed by '$' or '{', " + "found: %r" % (rest,)) + + +class LegacyInterpolation(Interpolation): + """Deprecated interpolation used in old versions of ConfigParser. + Use BasicInterpolation or ExtendedInterpolation instead.""" + + _KEYCRE = re.compile(r"%\(([^)]*)\)s|.") + + def before_get(self, parser, section, option, value, vars): + rawval = value + depth = MAX_INTERPOLATION_DEPTH + while depth: # Loop through this until it's done + depth -= 1 + if value and "%(" in value: + replace = functools.partial(self._interpolation_replace, + parser=parser) + value = self._KEYCRE.sub(replace, value) + try: + value = value % vars + except KeyError as e: + raise InterpolationMissingOptionError( + option, section, rawval, e.args[0]) from None + else: + break + if value and "%(" in value: + raise InterpolationDepthError(option, section, rawval) + return value + + def before_set(self, parser, section, option, value): + return value + + @staticmethod + def _interpolation_replace(match, parser): + s = match.group(1) + if s is None: + return match.group() + else: + return "%%(%s)s" % parser.optionxform(s) + + +class RawConfigParser(MutableMapping): + """ConfigParser that does not do interpolation.""" + + # Regular expressions for parsing section headers and options + _SECT_TMPL = r""" + \[ # [ + (?P
[^]]+) # very permissive! + \] # ] + """ + _OPT_TMPL = r""" + (?P