content
stringlengths
7
1.05M
AUTHOR = 'Sage Bionetworks' SITENAME = 'Sage Bionetworks Developer Handbook' SITEURL = '' PATH = 'content' TIMEZONE = 'America/Los_Angeles' DEFAULT_LANG = 'en' # Feed generation is usually not desired when developing # FEED_ALL_ATOM = None # CATEGORY_FEED_ATOM = None # TRANSLATION_FEED_ATOM = None # AUTHOR_FEED_ATOM = None # AUTHOR_FEED_RSS = None # Blogroll # LINKS = (('Pelican', 'https://getpelican.com/'), # ('Python.org', 'https://www.python.org/'), # ('Jinja2', 'https://palletsprojects.com/p/jinja/'), # ('You can modify those links in your config file', '#'),) # Social widget # SOCIAL = (('You can add links in your config file', '#'), # ('Another social link', '#'),) DEFAULT_PAGINATION = False #THEME = 'simple' # Uncomment following line if you want document-relative URLs when developing #RELATIVE_URLS = True
''' URL: https://leetcode.com/problems/diagonal-traverse Time complexity: O(mn) Space complexity: O(1) ''' class Solution: def findDiagonalOrder(self, matrix): """ :type matrix: List[List[int]] :rtype: List[int] """ if len(matrix) == 0: return [] m = len(matrix) n = len(matrix[0]) start = (0,0) end = (0,0) direction = 'up' diag_order = [] for _ in range(m + n - 1): curr_pointer, target = start, end if direction == 'down': curr_pointer, target = target, curr_pointer while 0 <= curr_pointer[0] < m and 0 <= curr_pointer[1] < n: x, y = curr_pointer diag_order.append(matrix[x][y]) if direction == 'up': curr_pointer = (x-1, y+1) else: curr_pointer = (x+1, y-1) start_x, start_y = start if start_x + 1 < m: start = (start_x+1, start_y) else: start = (start_x, start_y+1) end_x, end_y = end if end_y + 1 < n: end = (end_x, end_y+1) else: end = (end_x+1, end_y) if direction == 'up': direction = 'down' else: direction = 'up' return diag_order
''' Author: jianzhnie Date: 2022-01-24 11:36:20 LastEditTime: 2022-01-24 11:36:21 LastEditors: jianzhnie Description: '''
''' Crear un programa que permita al usuario ingresar los montos de las compras de un cliente (se desconoce la cantidad de datos que cargará, la cual puede cambiar en cada ejecución), cortando el ingreso de datos cuando el usuario ingrese el monto 0. Si ingresa un monto negativo, no se debe procesar y se debe pedir que ingrese un nuevo monto. Al finalizar, informar el total a pagar teniendo que cuenta que, si las ventas superan el total de $1000, se le debe aplicar un 10% de descuento. ''' total = 0 monto = float(input("Monto de una venta: $")) while monto != 0: if monto < 0: print("Monto no válido.") else: total += monto monto = float(input("Monto de una venta: $")) if total > 1000: total -= total*0.1 print("Monto total a pagar: $", total)
""" @generated cargo-raze generated Bazel file. DO NOT EDIT! Replaced on runs of cargo-raze """ load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository") # buildifier: disable=load load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # buildifier: disable=load load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") # buildifier: disable=load def zexe_fetch_remote_crates(): """This function defines a collection of repos and should be called in a WORKSPACE file""" maybe( http_archive, name = "raze__alga__0_9_3", url = "https://crates.io/api/v1/crates/alga/0.9.3/download", type = "tar.gz", sha256 = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2", strip_prefix = "alga-0.9.3", build_file = Label("//bzl/cargo/remote:BUILD.alga-0.9.3.bazel"), ) maybe( http_archive, name = "raze__approx__0_3_2", url = "https://crates.io/api/v1/crates/approx/0.3.2/download", type = "tar.gz", sha256 = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3", strip_prefix = "approx-0.3.2", build_file = Label("//bzl/cargo/remote:BUILD.approx-0.3.2.bazel"), ) maybe( http_archive, name = "raze__atty__0_2_14", url = "https://crates.io/api/v1/crates/atty/0.2.14/download", type = "tar.gz", sha256 = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8", strip_prefix = "atty-0.2.14", build_file = Label("//bzl/cargo/remote:BUILD.atty-0.2.14.bazel"), ) maybe( http_archive, name = "raze__autocfg__0_1_7", url = "https://crates.io/api/v1/crates/autocfg/0.1.7/download", type = "tar.gz", sha256 = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2", strip_prefix = "autocfg-0.1.7", build_file = Label("//bzl/cargo/remote:BUILD.autocfg-0.1.7.bazel"), ) maybe( http_archive, name = "raze__autocfg__1_0_1", url = "https://crates.io/api/v1/crates/autocfg/1.0.1/download", type = "tar.gz", sha256 = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a", strip_prefix = "autocfg-1.0.1", build_file = Label("//bzl/cargo/remote:BUILD.autocfg-1.0.1.bazel"), ) maybe( http_archive, name = "raze__bitflags__1_2_1", url = "https://crates.io/api/v1/crates/bitflags/1.2.1/download", type = "tar.gz", sha256 = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693", strip_prefix = "bitflags-1.2.1", build_file = Label("//bzl/cargo/remote:BUILD.bitflags-1.2.1.bazel"), ) maybe( http_archive, name = "raze__blake2__0_8_1", url = "https://crates.io/api/v1/crates/blake2/0.8.1/download", type = "tar.gz", sha256 = "94cb07b0da6a73955f8fb85d24c466778e70cda767a568229b104f0264089330", strip_prefix = "blake2-0.8.1", build_file = Label("//bzl/cargo/remote:BUILD.blake2-0.8.1.bazel"), ) maybe( http_archive, name = "raze__bstr__0_2_14", url = "https://crates.io/api/v1/crates/bstr/0.2.14/download", type = "tar.gz", sha256 = "473fc6b38233f9af7baa94fb5852dca389e3d95b8e21c8e3719301462c5d9faf", strip_prefix = "bstr-0.2.14", build_file = Label("//bzl/cargo/remote:BUILD.bstr-0.2.14.bazel"), ) maybe( http_archive, name = "raze__bumpalo__3_4_0", url = "https://crates.io/api/v1/crates/bumpalo/3.4.0/download", type = "tar.gz", sha256 = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820", strip_prefix = "bumpalo-3.4.0", build_file = Label("//bzl/cargo/remote:BUILD.bumpalo-3.4.0.bazel"), ) maybe( http_archive, name = "raze__byte_tools__0_3_1", url = "https://crates.io/api/v1/crates/byte-tools/0.3.1/download", type = "tar.gz", sha256 = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7", strip_prefix = "byte-tools-0.3.1", build_file = Label("//bzl/cargo/remote:BUILD.byte-tools-0.3.1.bazel"), ) maybe( http_archive, name = "raze__byteorder__1_3_4", url = "https://crates.io/api/v1/crates/byteorder/1.3.4/download", type = "tar.gz", sha256 = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de", strip_prefix = "byteorder-1.3.4", build_file = Label("//bzl/cargo/remote:BUILD.byteorder-1.3.4.bazel"), ) maybe( http_archive, name = "raze__cast__0_2_3", url = "https://crates.io/api/v1/crates/cast/0.2.3/download", type = "tar.gz", sha256 = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0", strip_prefix = "cast-0.2.3", build_file = Label("//bzl/cargo/remote:BUILD.cast-0.2.3.bazel"), ) maybe( http_archive, name = "raze__cfg_if__0_1_10", url = "https://crates.io/api/v1/crates/cfg-if/0.1.10/download", type = "tar.gz", sha256 = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822", strip_prefix = "cfg-if-0.1.10", build_file = Label("//bzl/cargo/remote:BUILD.cfg-if-0.1.10.bazel"), ) maybe( http_archive, name = "raze__cfg_if__1_0_0", url = "https://crates.io/api/v1/crates/cfg-if/1.0.0/download", type = "tar.gz", sha256 = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd", strip_prefix = "cfg-if-1.0.0", build_file = Label("//bzl/cargo/remote:BUILD.cfg-if-1.0.0.bazel"), ) maybe( http_archive, name = "raze__clap__2_33_3", url = "https://crates.io/api/v1/crates/clap/2.33.3/download", type = "tar.gz", sha256 = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002", strip_prefix = "clap-2.33.3", build_file = Label("//bzl/cargo/remote:BUILD.clap-2.33.3.bazel"), ) maybe( http_archive, name = "raze__colored__2_0_0", url = "https://crates.io/api/v1/crates/colored/2.0.0/download", type = "tar.gz", sha256 = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd", strip_prefix = "colored-2.0.0", build_file = Label("//bzl/cargo/remote:BUILD.colored-2.0.0.bazel"), ) maybe( http_archive, name = "raze__const_fn__0_4_3", url = "https://crates.io/api/v1/crates/const_fn/0.4.3/download", type = "tar.gz", sha256 = "c478836e029dcef17fb47c89023448c64f781a046e0300e257ad8225ae59afab", strip_prefix = "const_fn-0.4.3", build_file = Label("//bzl/cargo/remote:BUILD.const_fn-0.4.3.bazel"), ) maybe( http_archive, name = "raze__criterion__0_3_3", url = "https://crates.io/api/v1/crates/criterion/0.3.3/download", type = "tar.gz", sha256 = "70daa7ceec6cf143990669a04c7df13391d55fb27bd4079d252fca774ba244d8", strip_prefix = "criterion-0.3.3", build_file = Label("//bzl/cargo/remote:BUILD.criterion-0.3.3.bazel"), ) maybe( http_archive, name = "raze__criterion_plot__0_4_3", url = "https://crates.io/api/v1/crates/criterion-plot/0.4.3/download", type = "tar.gz", sha256 = "e022feadec601fba1649cfa83586381a4ad31c6bf3a9ab7d408118b05dd9889d", strip_prefix = "criterion-plot-0.4.3", build_file = Label("//bzl/cargo/remote:BUILD.criterion-plot-0.4.3.bazel"), ) maybe( http_archive, name = "raze__crossbeam_channel__0_5_0", url = "https://crates.io/api/v1/crates/crossbeam-channel/0.5.0/download", type = "tar.gz", sha256 = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775", strip_prefix = "crossbeam-channel-0.5.0", build_file = Label("//bzl/cargo/remote:BUILD.crossbeam-channel-0.5.0.bazel"), ) maybe( http_archive, name = "raze__crossbeam_deque__0_7_3", url = "https://crates.io/api/v1/crates/crossbeam-deque/0.7.3/download", type = "tar.gz", sha256 = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285", strip_prefix = "crossbeam-deque-0.7.3", build_file = Label("//bzl/cargo/remote:BUILD.crossbeam-deque-0.7.3.bazel"), ) maybe( http_archive, name = "raze__crossbeam_deque__0_8_0", url = "https://crates.io/api/v1/crates/crossbeam-deque/0.8.0/download", type = "tar.gz", sha256 = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9", strip_prefix = "crossbeam-deque-0.8.0", build_file = Label("//bzl/cargo/remote:BUILD.crossbeam-deque-0.8.0.bazel"), ) maybe( http_archive, name = "raze__crossbeam_epoch__0_8_2", url = "https://crates.io/api/v1/crates/crossbeam-epoch/0.8.2/download", type = "tar.gz", sha256 = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace", strip_prefix = "crossbeam-epoch-0.8.2", build_file = Label("//bzl/cargo/remote:BUILD.crossbeam-epoch-0.8.2.bazel"), ) maybe( http_archive, name = "raze__crossbeam_epoch__0_9_1", url = "https://crates.io/api/v1/crates/crossbeam-epoch/0.9.1/download", type = "tar.gz", sha256 = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d", strip_prefix = "crossbeam-epoch-0.9.1", build_file = Label("//bzl/cargo/remote:BUILD.crossbeam-epoch-0.9.1.bazel"), ) maybe( http_archive, name = "raze__crossbeam_utils__0_7_2", url = "https://crates.io/api/v1/crates/crossbeam-utils/0.7.2/download", type = "tar.gz", sha256 = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8", strip_prefix = "crossbeam-utils-0.7.2", build_file = Label("//bzl/cargo/remote:BUILD.crossbeam-utils-0.7.2.bazel"), ) maybe( http_archive, name = "raze__crossbeam_utils__0_8_1", url = "https://crates.io/api/v1/crates/crossbeam-utils/0.8.1/download", type = "tar.gz", sha256 = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d", strip_prefix = "crossbeam-utils-0.8.1", build_file = Label("//bzl/cargo/remote:BUILD.crossbeam-utils-0.8.1.bazel"), ) maybe( http_archive, name = "raze__crypto_mac__0_7_0", url = "https://crates.io/api/v1/crates/crypto-mac/0.7.0/download", type = "tar.gz", sha256 = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5", strip_prefix = "crypto-mac-0.7.0", build_file = Label("//bzl/cargo/remote:BUILD.crypto-mac-0.7.0.bazel"), ) maybe( http_archive, name = "raze__csv__1_1_5", url = "https://crates.io/api/v1/crates/csv/1.1.5/download", type = "tar.gz", sha256 = "f9d58633299b24b515ac72a3f869f8b91306a3cec616a602843a383acd6f9e97", strip_prefix = "csv-1.1.5", build_file = Label("//bzl/cargo/remote:BUILD.csv-1.1.5.bazel"), ) maybe( http_archive, name = "raze__csv_core__0_1_10", url = "https://crates.io/api/v1/crates/csv-core/0.1.10/download", type = "tar.gz", sha256 = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90", strip_prefix = "csv-core-0.1.10", build_file = Label("//bzl/cargo/remote:BUILD.csv-core-0.1.10.bazel"), ) maybe( http_archive, name = "raze__cty__0_2_1", url = "https://crates.io/api/v1/crates/cty/0.2.1/download", type = "tar.gz", sha256 = "7313c0d620d0cb4dbd9d019e461a4beb501071ff46ec0ab933efb4daa76d73e3", strip_prefix = "cty-0.2.1", build_file = Label("//bzl/cargo/remote:BUILD.cty-0.2.1.bazel"), ) maybe( http_archive, name = "raze__derivative__2_1_1", url = "https://crates.io/api/v1/crates/derivative/2.1.1/download", type = "tar.gz", sha256 = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f", strip_prefix = "derivative-2.1.1", build_file = Label("//bzl/cargo/remote:BUILD.derivative-2.1.1.bazel"), ) maybe( http_archive, name = "raze__digest__0_8_1", url = "https://crates.io/api/v1/crates/digest/0.8.1/download", type = "tar.gz", sha256 = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5", strip_prefix = "digest-0.8.1", build_file = Label("//bzl/cargo/remote:BUILD.digest-0.8.1.bazel"), ) maybe( http_archive, name = "raze__either__1_6_1", url = "https://crates.io/api/v1/crates/either/1.6.1/download", type = "tar.gz", sha256 = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457", strip_prefix = "either-1.6.1", build_file = Label("//bzl/cargo/remote:BUILD.either-1.6.1.bazel"), ) maybe( http_archive, name = "raze__endian_type__0_1_2", url = "https://crates.io/api/v1/crates/endian-type/0.1.2/download", type = "tar.gz", sha256 = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d", strip_prefix = "endian-type-0.1.2", build_file = Label("//bzl/cargo/remote:BUILD.endian-type-0.1.2.bazel"), ) maybe( http_archive, name = "raze__generic_array__0_12_3", url = "https://crates.io/api/v1/crates/generic-array/0.12.3/download", type = "tar.gz", sha256 = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec", strip_prefix = "generic-array-0.12.3", build_file = Label("//bzl/cargo/remote:BUILD.generic-array-0.12.3.bazel"), ) maybe( http_archive, name = "raze__getrandom__0_1_15", url = "https://crates.io/api/v1/crates/getrandom/0.1.15/download", type = "tar.gz", sha256 = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6", strip_prefix = "getrandom-0.1.15", build_file = Label("//bzl/cargo/remote:BUILD.getrandom-0.1.15.bazel"), ) maybe( http_archive, name = "raze__half__1_6_0", url = "https://crates.io/api/v1/crates/half/1.6.0/download", type = "tar.gz", sha256 = "d36fab90f82edc3c747f9d438e06cf0a491055896f2a279638bb5beed6c40177", strip_prefix = "half-1.6.0", build_file = Label("//bzl/cargo/remote:BUILD.half-1.6.0.bazel"), ) maybe( http_archive, name = "raze__hermit_abi__0_1_17", url = "https://crates.io/api/v1/crates/hermit-abi/0.1.17/download", type = "tar.gz", sha256 = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8", strip_prefix = "hermit-abi-0.1.17", build_file = Label("//bzl/cargo/remote:BUILD.hermit-abi-0.1.17.bazel"), ) maybe( http_archive, name = "raze__itertools__0_9_0", url = "https://crates.io/api/v1/crates/itertools/0.9.0/download", type = "tar.gz", sha256 = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b", strip_prefix = "itertools-0.9.0", build_file = Label("//bzl/cargo/remote:BUILD.itertools-0.9.0.bazel"), ) maybe( http_archive, name = "raze__itoa__0_4_6", url = "https://crates.io/api/v1/crates/itoa/0.4.6/download", type = "tar.gz", sha256 = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6", strip_prefix = "itoa-0.4.6", build_file = Label("//bzl/cargo/remote:BUILD.itoa-0.4.6.bazel"), ) maybe( http_archive, name = "raze__js_sys__0_3_39", url = "https://crates.io/api/v1/crates/js-sys/0.3.39/download", type = "tar.gz", sha256 = "fa5a448de267e7358beaf4a5d849518fe9a0c13fce7afd44b06e68550e5562a7", strip_prefix = "js-sys-0.3.39", build_file = Label("//bzl/cargo/remote:BUILD.js-sys-0.3.39.bazel"), ) maybe( http_archive, name = "raze__lazy_static__1_4_0", url = "https://crates.io/api/v1/crates/lazy_static/1.4.0/download", type = "tar.gz", sha256 = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646", strip_prefix = "lazy_static-1.4.0", build_file = Label("//bzl/cargo/remote:BUILD.lazy_static-1.4.0.bazel"), ) maybe( http_archive, name = "raze__libc__0_2_80", url = "https://crates.io/api/v1/crates/libc/0.2.80/download", type = "tar.gz", sha256 = "4d58d1b70b004888f764dfbf6a26a3b0342a1632d33968e4a179d8011c760614", strip_prefix = "libc-0.2.80", build_file = Label("//bzl/cargo/remote:BUILD.libc-0.2.80.bazel"), ) maybe( http_archive, name = "raze__libm__0_2_1", url = "https://crates.io/api/v1/crates/libm/0.2.1/download", type = "tar.gz", sha256 = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a", strip_prefix = "libm-0.2.1", build_file = Label("//bzl/cargo/remote:BUILD.libm-0.2.1.bazel"), ) maybe( http_archive, name = "raze__log__0_4_11", url = "https://crates.io/api/v1/crates/log/0.4.11/download", type = "tar.gz", sha256 = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b", strip_prefix = "log-0.4.11", build_file = Label("//bzl/cargo/remote:BUILD.log-0.4.11.bazel"), ) maybe( http_archive, name = "raze__matrixmultiply__0_2_3", url = "https://crates.io/api/v1/crates/matrixmultiply/0.2.3/download", type = "tar.gz", sha256 = "d4f7ec66360130972f34830bfad9ef05c6610a43938a467bcc9ab9369ab3478f", strip_prefix = "matrixmultiply-0.2.3", build_file = Label("//bzl/cargo/remote:BUILD.matrixmultiply-0.2.3.bazel"), ) maybe( http_archive, name = "raze__maybe_uninit__2_0_0", url = "https://crates.io/api/v1/crates/maybe-uninit/2.0.0/download", type = "tar.gz", sha256 = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00", strip_prefix = "maybe-uninit-2.0.0", build_file = Label("//bzl/cargo/remote:BUILD.maybe-uninit-2.0.0.bazel"), ) maybe( http_archive, name = "raze__memchr__2_3_4", url = "https://crates.io/api/v1/crates/memchr/2.3.4/download", type = "tar.gz", sha256 = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525", strip_prefix = "memchr-2.3.4", build_file = Label("//bzl/cargo/remote:BUILD.memchr-2.3.4.bazel"), ) maybe( http_archive, name = "raze__memoffset__0_5_6", url = "https://crates.io/api/v1/crates/memoffset/0.5.6/download", type = "tar.gz", sha256 = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa", strip_prefix = "memoffset-0.5.6", build_file = Label("//bzl/cargo/remote:BUILD.memoffset-0.5.6.bazel"), ) maybe( http_archive, name = "raze__memoffset__0_6_1", url = "https://crates.io/api/v1/crates/memoffset/0.6.1/download", type = "tar.gz", sha256 = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87", strip_prefix = "memoffset-0.6.1", build_file = Label("//bzl/cargo/remote:BUILD.memoffset-0.6.1.bazel"), ) maybe( http_archive, name = "raze__ndarray__0_13_1", url = "https://crates.io/api/v1/crates/ndarray/0.13.1/download", type = "tar.gz", sha256 = "ac06db03ec2f46ee0ecdca1a1c34a99c0d188a0d83439b84bf0cb4b386e4ab09", strip_prefix = "ndarray-0.13.1", build_file = Label("//bzl/cargo/remote:BUILD.ndarray-0.13.1.bazel"), ) maybe( http_archive, name = "raze__nibble_vec__0_0_4", url = "https://crates.io/api/v1/crates/nibble_vec/0.0.4/download", type = "tar.gz", sha256 = "c8d77f3db4bce033f4d04db08079b2ef1c3d02b44e86f25d08886fafa7756ffa", strip_prefix = "nibble_vec-0.0.4", build_file = Label("//bzl/cargo/remote:BUILD.nibble_vec-0.0.4.bazel"), ) maybe( http_archive, name = "raze__num_bigint__0_2_3", url = "https://crates.io/api/v1/crates/num-bigint/0.2.3/download", type = "tar.gz", sha256 = "f9c3f34cdd24f334cb265d9bf8bfa8a241920d026916785747a92f0e55541a1a", strip_prefix = "num-bigint-0.2.3", build_file = Label("//bzl/cargo/remote:BUILD.num-bigint-0.2.3.bazel"), ) maybe( http_archive, name = "raze__num_complex__0_2_4", url = "https://crates.io/api/v1/crates/num-complex/0.2.4/download", type = "tar.gz", sha256 = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95", strip_prefix = "num-complex-0.2.4", build_file = Label("//bzl/cargo/remote:BUILD.num-complex-0.2.4.bazel"), ) maybe( http_archive, name = "raze__num_integer__0_1_44", url = "https://crates.io/api/v1/crates/num-integer/0.1.44/download", type = "tar.gz", sha256 = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db", strip_prefix = "num-integer-0.1.44", build_file = Label("//bzl/cargo/remote:BUILD.num-integer-0.1.44.bazel"), ) maybe( http_archive, name = "raze__num_traits__0_1_43", url = "https://crates.io/api/v1/crates/num-traits/0.1.43/download", type = "tar.gz", sha256 = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31", strip_prefix = "num-traits-0.1.43", build_file = Label("//bzl/cargo/remote:BUILD.num-traits-0.1.43.bazel"), ) maybe( http_archive, name = "raze__num_traits__0_2_11", url = "https://crates.io/api/v1/crates/num-traits/0.2.11/download", type = "tar.gz", sha256 = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096", strip_prefix = "num-traits-0.2.11", build_file = Label("//bzl/cargo/remote:BUILD.num-traits-0.2.11.bazel"), ) maybe( http_archive, name = "raze__num_cpus__1_13_0", url = "https://crates.io/api/v1/crates/num_cpus/1.13.0/download", type = "tar.gz", sha256 = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3", strip_prefix = "num_cpus-1.13.0", build_file = Label("//bzl/cargo/remote:BUILD.num_cpus-1.13.0.bazel"), ) maybe( http_archive, name = "raze__ocaml__0_19_0", url = "https://crates.io/api/v1/crates/ocaml/0.19.0/download", type = "tar.gz", sha256 = "98b213b94c86b14286c44c53cf952e3ba1a9f5c1fef50bbdf5e546a8dcaf11d4", strip_prefix = "ocaml-0.19.0", build_file = Label("//bzl/cargo/remote:BUILD.ocaml-0.19.0.bazel"), ) maybe( http_archive, name = "raze__ocaml_derive__0_19_0", url = "https://crates.io/api/v1/crates/ocaml-derive/0.19.0/download", type = "tar.gz", sha256 = "21e86bf321d7b2a9012f284a8fbc0f97244edc0e3a7c6402a368e595524504fd", strip_prefix = "ocaml-derive-0.19.0", build_file = Label("//bzl/cargo/remote:BUILD.ocaml-derive-0.19.0.bazel"), ) maybe( http_archive, name = "raze__ocaml_sys__0_19_0", url = "https://crates.io/api/v1/crates/ocaml-sys/0.19.0/download", type = "tar.gz", sha256 = "3ebcb40980dce73b49d0dcf5b3a2844a9a28cbe5fa17115fa09f0f7706463d1a", strip_prefix = "ocaml-sys-0.19.0", build_file = Label("//bzl/cargo/remote:BUILD.ocaml-sys-0.19.0.bazel"), ) maybe( http_archive, name = "raze__oorandom__11_1_3", url = "https://crates.io/api/v1/crates/oorandom/11.1.3/download", type = "tar.gz", sha256 = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575", strip_prefix = "oorandom-11.1.3", build_file = Label("//bzl/cargo/remote:BUILD.oorandom-11.1.3.bazel"), ) maybe( http_archive, name = "raze__opaque_debug__0_2_3", url = "https://crates.io/api/v1/crates/opaque-debug/0.2.3/download", type = "tar.gz", sha256 = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c", strip_prefix = "opaque-debug-0.2.3", build_file = Label("//bzl/cargo/remote:BUILD.opaque-debug-0.2.3.bazel"), ) maybe( http_archive, name = "raze__paste__0_1_18", url = "https://crates.io/api/v1/crates/paste/0.1.18/download", type = "tar.gz", sha256 = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880", strip_prefix = "paste-0.1.18", build_file = Label("//bzl/cargo/remote:BUILD.paste-0.1.18.bazel"), ) maybe( http_archive, name = "raze__paste_impl__0_1_18", url = "https://crates.io/api/v1/crates/paste-impl/0.1.18/download", type = "tar.gz", sha256 = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6", strip_prefix = "paste-impl-0.1.18", build_file = Label("//bzl/cargo/remote:BUILD.paste-impl-0.1.18.bazel"), ) maybe( http_archive, name = "raze__plotters__0_2_15", url = "https://crates.io/api/v1/crates/plotters/0.2.15/download", type = "tar.gz", sha256 = "0d1685fbe7beba33de0330629da9d955ac75bd54f33d7b79f9a895590124f6bb", strip_prefix = "plotters-0.2.15", build_file = Label("//bzl/cargo/remote:BUILD.plotters-0.2.15.bazel"), ) maybe( http_archive, name = "raze__ppv_lite86__0_2_10", url = "https://crates.io/api/v1/crates/ppv-lite86/0.2.10/download", type = "tar.gz", sha256 = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857", strip_prefix = "ppv-lite86-0.2.10", build_file = Label("//bzl/cargo/remote:BUILD.ppv-lite86-0.2.10.bazel"), ) maybe( http_archive, name = "raze__proc_macro_hack__0_5_19", url = "https://crates.io/api/v1/crates/proc-macro-hack/0.5.19/download", type = "tar.gz", sha256 = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5", strip_prefix = "proc-macro-hack-0.5.19", build_file = Label("//bzl/cargo/remote:BUILD.proc-macro-hack-0.5.19.bazel"), ) maybe( http_archive, name = "raze__proc_macro2__0_4_30", url = "https://crates.io/api/v1/crates/proc-macro2/0.4.30/download", type = "tar.gz", sha256 = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759", strip_prefix = "proc-macro2-0.4.30", build_file = Label("//bzl/cargo/remote:BUILD.proc-macro2-0.4.30.bazel"), ) maybe( http_archive, name = "raze__proc_macro2__1_0_17", url = "https://crates.io/api/v1/crates/proc-macro2/1.0.17/download", type = "tar.gz", sha256 = "1502d12e458c49a4c9cbff560d0fe0060c252bc29799ed94ca2ed4bb665a0101", strip_prefix = "proc-macro2-1.0.17", build_file = Label("//bzl/cargo/remote:BUILD.proc-macro2-1.0.17.bazel"), ) maybe( http_archive, name = "raze__quote__0_6_13", url = "https://crates.io/api/v1/crates/quote/0.6.13/download", type = "tar.gz", sha256 = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1", strip_prefix = "quote-0.6.13", build_file = Label("//bzl/cargo/remote:BUILD.quote-0.6.13.bazel"), ) maybe( http_archive, name = "raze__quote__1_0_6", url = "https://crates.io/api/v1/crates/quote/1.0.6/download", type = "tar.gz", sha256 = "54a21852a652ad6f610c9510194f398ff6f8692e334fd1145fed931f7fbe44ea", strip_prefix = "quote-1.0.6", build_file = Label("//bzl/cargo/remote:BUILD.quote-1.0.6.bazel"), ) maybe( http_archive, name = "raze__radix_trie__0_1_6", url = "https://crates.io/api/v1/crates/radix_trie/0.1.6/download", type = "tar.gz", sha256 = "3d3681b28cd95acfb0560ea9441f82d6a4504fa3b15b97bd7b6e952131820e95", strip_prefix = "radix_trie-0.1.6", build_file = Label("//bzl/cargo/remote:BUILD.radix_trie-0.1.6.bazel"), ) maybe( http_archive, name = "raze__rand__0_7_0", url = "https://crates.io/api/v1/crates/rand/0.7.0/download", type = "tar.gz", sha256 = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c", strip_prefix = "rand-0.7.0", build_file = Label("//bzl/cargo/remote:BUILD.rand-0.7.0.bazel"), ) maybe( http_archive, name = "raze__rand_chacha__0_2_2", url = "https://crates.io/api/v1/crates/rand_chacha/0.2.2/download", type = "tar.gz", sha256 = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402", strip_prefix = "rand_chacha-0.2.2", build_file = Label("//bzl/cargo/remote:BUILD.rand_chacha-0.2.2.bazel"), ) maybe( http_archive, name = "raze__rand_core__0_5_1", url = "https://crates.io/api/v1/crates/rand_core/0.5.1/download", type = "tar.gz", sha256 = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19", strip_prefix = "rand_core-0.5.1", build_file = Label("//bzl/cargo/remote:BUILD.rand_core-0.5.1.bazel"), ) maybe( http_archive, name = "raze__rand_hc__0_2_0", url = "https://crates.io/api/v1/crates/rand_hc/0.2.0/download", type = "tar.gz", sha256 = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c", strip_prefix = "rand_hc-0.2.0", build_file = Label("//bzl/cargo/remote:BUILD.rand_hc-0.2.0.bazel"), ) maybe( http_archive, name = "raze__rand_xorshift__0_2_0", url = "https://crates.io/api/v1/crates/rand_xorshift/0.2.0/download", type = "tar.gz", sha256 = "77d416b86801d23dde1aa643023b775c3a462efc0ed96443add11546cdf1dca8", strip_prefix = "rand_xorshift-0.2.0", build_file = Label("//bzl/cargo/remote:BUILD.rand_xorshift-0.2.0.bazel"), ) maybe( http_archive, name = "raze__rawpointer__0_2_1", url = "https://crates.io/api/v1/crates/rawpointer/0.2.1/download", type = "tar.gz", sha256 = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3", strip_prefix = "rawpointer-0.2.1", build_file = Label("//bzl/cargo/remote:BUILD.rawpointer-0.2.1.bazel"), ) maybe( http_archive, name = "raze__rayon__1_3_1", url = "https://crates.io/api/v1/crates/rayon/1.3.1/download", type = "tar.gz", sha256 = "62f02856753d04e03e26929f820d0a0a337ebe71f849801eea335d464b349080", strip_prefix = "rayon-1.3.1", build_file = Label("//bzl/cargo/remote:BUILD.rayon-1.3.1.bazel"), ) maybe( http_archive, name = "raze__rayon_core__1_9_0", url = "https://crates.io/api/v1/crates/rayon-core/1.9.0/download", type = "tar.gz", sha256 = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a", strip_prefix = "rayon-core-1.9.0", build_file = Label("//bzl/cargo/remote:BUILD.rayon-core-1.9.0.bazel"), ) maybe( http_archive, name = "raze__regex__1_4_2", url = "https://crates.io/api/v1/crates/regex/1.4.2/download", type = "tar.gz", sha256 = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c", strip_prefix = "regex-1.4.2", build_file = Label("//bzl/cargo/remote:BUILD.regex-1.4.2.bazel"), ) maybe( http_archive, name = "raze__regex_automata__0_1_9", url = "https://crates.io/api/v1/crates/regex-automata/0.1.9/download", type = "tar.gz", sha256 = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4", strip_prefix = "regex-automata-0.1.9", build_file = Label("//bzl/cargo/remote:BUILD.regex-automata-0.1.9.bazel"), ) maybe( http_archive, name = "raze__regex_syntax__0_6_21", url = "https://crates.io/api/v1/crates/regex-syntax/0.6.21/download", type = "tar.gz", sha256 = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189", strip_prefix = "regex-syntax-0.6.21", build_file = Label("//bzl/cargo/remote:BUILD.regex-syntax-0.6.21.bazel"), ) maybe( http_archive, name = "raze__rustc_version__0_2_3", url = "https://crates.io/api/v1/crates/rustc_version/0.2.3/download", type = "tar.gz", sha256 = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a", strip_prefix = "rustc_version-0.2.3", build_file = Label("//bzl/cargo/remote:BUILD.rustc_version-0.2.3.bazel"), ) maybe( http_archive, name = "raze__ryu__1_0_5", url = "https://crates.io/api/v1/crates/ryu/1.0.5/download", type = "tar.gz", sha256 = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e", strip_prefix = "ryu-1.0.5", build_file = Label("//bzl/cargo/remote:BUILD.ryu-1.0.5.bazel"), ) maybe( http_archive, name = "raze__same_file__1_0_6", url = "https://crates.io/api/v1/crates/same-file/1.0.6/download", type = "tar.gz", sha256 = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502", strip_prefix = "same-file-1.0.6", build_file = Label("//bzl/cargo/remote:BUILD.same-file-1.0.6.bazel"), ) maybe( http_archive, name = "raze__scopeguard__1_1_0", url = "https://crates.io/api/v1/crates/scopeguard/1.1.0/download", type = "tar.gz", sha256 = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd", strip_prefix = "scopeguard-1.1.0", build_file = Label("//bzl/cargo/remote:BUILD.scopeguard-1.1.0.bazel"), ) maybe( http_archive, name = "raze__semver__0_9_0", url = "https://crates.io/api/v1/crates/semver/0.9.0/download", type = "tar.gz", sha256 = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403", strip_prefix = "semver-0.9.0", build_file = Label("//bzl/cargo/remote:BUILD.semver-0.9.0.bazel"), ) maybe( http_archive, name = "raze__semver_parser__0_7_0", url = "https://crates.io/api/v1/crates/semver-parser/0.7.0/download", type = "tar.gz", sha256 = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3", strip_prefix = "semver-parser-0.7.0", build_file = Label("//bzl/cargo/remote:BUILD.semver-parser-0.7.0.bazel"), ) maybe( http_archive, name = "raze__serde__1_0_117", url = "https://crates.io/api/v1/crates/serde/1.0.117/download", type = "tar.gz", sha256 = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a", strip_prefix = "serde-1.0.117", build_file = Label("//bzl/cargo/remote:BUILD.serde-1.0.117.bazel"), ) maybe( http_archive, name = "raze__serde_cbor__0_11_1", url = "https://crates.io/api/v1/crates/serde_cbor/0.11.1/download", type = "tar.gz", sha256 = "1e18acfa2f90e8b735b2836ab8d538de304cbb6729a7360729ea5a895d15a622", strip_prefix = "serde_cbor-0.11.1", build_file = Label("//bzl/cargo/remote:BUILD.serde_cbor-0.11.1.bazel"), ) maybe( http_archive, name = "raze__serde_derive__1_0_113", url = "https://crates.io/api/v1/crates/serde_derive/1.0.113/download", type = "tar.gz", sha256 = "93c5eaa17d0954cb481cdcfffe9d84fcfa7a1a9f2349271e678677be4c26ae31", strip_prefix = "serde_derive-1.0.113", build_file = Label("//bzl/cargo/remote:BUILD.serde_derive-1.0.113.bazel"), ) maybe( http_archive, name = "raze__serde_json__1_0_59", url = "https://crates.io/api/v1/crates/serde_json/1.0.59/download", type = "tar.gz", sha256 = "dcac07dbffa1c65e7f816ab9eba78eb142c6d44410f4eeba1e26e4f5dfa56b95", strip_prefix = "serde_json-1.0.59", build_file = Label("//bzl/cargo/remote:BUILD.serde_json-1.0.59.bazel"), ) maybe( http_archive, name = "raze__smallvec__1_5_0", url = "https://crates.io/api/v1/crates/smallvec/1.5.0/download", type = "tar.gz", sha256 = "7acad6f34eb9e8a259d3283d1e8c1d34d7415943d4895f65cc73813c7396fc85", strip_prefix = "smallvec-1.5.0", build_file = Label("//bzl/cargo/remote:BUILD.smallvec-1.5.0.bazel"), ) maybe( http_archive, name = "raze__sprs__0_7_1", url = "https://crates.io/api/v1/crates/sprs/0.7.1/download", type = "tar.gz", sha256 = "ec63571489873d4506683915840eeb1bb16b3198ee4894cc6f2fe3013d505e56", strip_prefix = "sprs-0.7.1", build_file = Label("//bzl/cargo/remote:BUILD.sprs-0.7.1.bazel"), ) maybe( http_archive, name = "raze__subtle__1_0_0", url = "https://crates.io/api/v1/crates/subtle/1.0.0/download", type = "tar.gz", sha256 = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee", strip_prefix = "subtle-1.0.0", build_file = Label("//bzl/cargo/remote:BUILD.subtle-1.0.0.bazel"), ) maybe( http_archive, name = "raze__syn__0_15_44", url = "https://crates.io/api/v1/crates/syn/0.15.44/download", type = "tar.gz", sha256 = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5", strip_prefix = "syn-0.15.44", build_file = Label("//bzl/cargo/remote:BUILD.syn-0.15.44.bazel"), ) maybe( http_archive, name = "raze__syn__1_0_17", url = "https://crates.io/api/v1/crates/syn/1.0.17/download", type = "tar.gz", sha256 = "0df0eb663f387145cab623dea85b09c2c5b4b0aef44e945d928e682fce71bb03", strip_prefix = "syn-1.0.17", build_file = Label("//bzl/cargo/remote:BUILD.syn-1.0.17.bazel"), ) maybe( http_archive, name = "raze__synstructure__0_12_4", url = "https://crates.io/api/v1/crates/synstructure/0.12.4/download", type = "tar.gz", sha256 = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701", strip_prefix = "synstructure-0.12.4", build_file = Label("//bzl/cargo/remote:BUILD.synstructure-0.12.4.bazel"), ) maybe( http_archive, name = "raze__textwrap__0_11_0", url = "https://crates.io/api/v1/crates/textwrap/0.11.0/download", type = "tar.gz", sha256 = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060", strip_prefix = "textwrap-0.11.0", build_file = Label("//bzl/cargo/remote:BUILD.textwrap-0.11.0.bazel"), ) maybe( http_archive, name = "raze__tinytemplate__1_1_0", url = "https://crates.io/api/v1/crates/tinytemplate/1.1.0/download", type = "tar.gz", sha256 = "6d3dc76004a03cec1c5932bca4cdc2e39aaa798e3f82363dd94f9adf6098c12f", strip_prefix = "tinytemplate-1.1.0", build_file = Label("//bzl/cargo/remote:BUILD.tinytemplate-1.1.0.bazel"), ) maybe( http_archive, name = "raze__typenum__1_12_0", url = "https://crates.io/api/v1/crates/typenum/1.12.0/download", type = "tar.gz", sha256 = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33", strip_prefix = "typenum-1.12.0", build_file = Label("//bzl/cargo/remote:BUILD.typenum-1.12.0.bazel"), ) maybe( http_archive, name = "raze__unicode_width__0_1_8", url = "https://crates.io/api/v1/crates/unicode-width/0.1.8/download", type = "tar.gz", sha256 = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3", strip_prefix = "unicode-width-0.1.8", build_file = Label("//bzl/cargo/remote:BUILD.unicode-width-0.1.8.bazel"), ) maybe( http_archive, name = "raze__unicode_xid__0_1_0", url = "https://crates.io/api/v1/crates/unicode-xid/0.1.0/download", type = "tar.gz", sha256 = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc", strip_prefix = "unicode-xid-0.1.0", build_file = Label("//bzl/cargo/remote:BUILD.unicode-xid-0.1.0.bazel"), ) maybe( http_archive, name = "raze__unicode_xid__0_2_1", url = "https://crates.io/api/v1/crates/unicode-xid/0.2.1/download", type = "tar.gz", sha256 = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564", strip_prefix = "unicode-xid-0.2.1", build_file = Label("//bzl/cargo/remote:BUILD.unicode-xid-0.2.1.bazel"), ) maybe( http_archive, name = "raze__unroll__0_1_4", url = "https://crates.io/api/v1/crates/unroll/0.1.4/download", type = "tar.gz", sha256 = "85890b49d9724df33edc575c4bacd5b0081977da22c4c4984d0c62ec44ed6e09", strip_prefix = "unroll-0.1.4", build_file = Label("//bzl/cargo/remote:BUILD.unroll-0.1.4.bazel"), ) maybe( http_archive, name = "raze__walkdir__2_3_1", url = "https://crates.io/api/v1/crates/walkdir/2.3.1/download", type = "tar.gz", sha256 = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d", strip_prefix = "walkdir-2.3.1", build_file = Label("//bzl/cargo/remote:BUILD.walkdir-2.3.1.bazel"), ) maybe( http_archive, name = "raze__wasi__0_9_0_wasi_snapshot_preview1", url = "https://crates.io/api/v1/crates/wasi/0.9.0+wasi-snapshot-preview1/download", type = "tar.gz", sha256 = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519", strip_prefix = "wasi-0.9.0+wasi-snapshot-preview1", build_file = Label("//bzl/cargo/remote:BUILD.wasi-0.9.0+wasi-snapshot-preview1.bazel"), ) maybe( http_archive, name = "raze__wasm_bindgen__0_2_62", url = "https://crates.io/api/v1/crates/wasm-bindgen/0.2.62/download", type = "tar.gz", sha256 = "e3c7d40d09cdbf0f4895ae58cf57d92e1e57a9dd8ed2e8390514b54a47cc5551", strip_prefix = "wasm-bindgen-0.2.62", build_file = Label("//bzl/cargo/remote:BUILD.wasm-bindgen-0.2.62.bazel"), ) maybe( http_archive, name = "raze__wasm_bindgen_backend__0_2_62", url = "https://crates.io/api/v1/crates/wasm-bindgen-backend/0.2.62/download", type = "tar.gz", sha256 = "c3972e137ebf830900db522d6c8fd74d1900dcfc733462e9a12e942b00b4ac94", strip_prefix = "wasm-bindgen-backend-0.2.62", build_file = Label("//bzl/cargo/remote:BUILD.wasm-bindgen-backend-0.2.62.bazel"), ) maybe( http_archive, name = "raze__wasm_bindgen_macro__0_2_62", url = "https://crates.io/api/v1/crates/wasm-bindgen-macro/0.2.62/download", type = "tar.gz", sha256 = "2cd85aa2c579e8892442954685f0d801f9129de24fa2136b2c6a539c76b65776", strip_prefix = "wasm-bindgen-macro-0.2.62", build_file = Label("//bzl/cargo/remote:BUILD.wasm-bindgen-macro-0.2.62.bazel"), ) maybe( http_archive, name = "raze__wasm_bindgen_macro_support__0_2_62", url = "https://crates.io/api/v1/crates/wasm-bindgen-macro-support/0.2.62/download", type = "tar.gz", sha256 = "8eb197bd3a47553334907ffd2f16507b4f4f01bbec3ac921a7719e0decdfe72a", strip_prefix = "wasm-bindgen-macro-support-0.2.62", build_file = Label("//bzl/cargo/remote:BUILD.wasm-bindgen-macro-support-0.2.62.bazel"), ) maybe( http_archive, name = "raze__wasm_bindgen_shared__0_2_62", url = "https://crates.io/api/v1/crates/wasm-bindgen-shared/0.2.62/download", type = "tar.gz", sha256 = "a91c2916119c17a8e316507afaaa2dd94b47646048014bbdf6bef098c1bb58ad", strip_prefix = "wasm-bindgen-shared-0.2.62", build_file = Label("//bzl/cargo/remote:BUILD.wasm-bindgen-shared-0.2.62.bazel"), ) maybe( http_archive, name = "raze__web_sys__0_3_39", url = "https://crates.io/api/v1/crates/web-sys/0.3.39/download", type = "tar.gz", sha256 = "8bc359e5dd3b46cb9687a051d50a2fdd228e4ba7cf6fcf861a5365c3d671a642", strip_prefix = "web-sys-0.3.39", build_file = Label("//bzl/cargo/remote:BUILD.web-sys-0.3.39.bazel"), ) maybe( http_archive, name = "raze__winapi__0_3_9", url = "https://crates.io/api/v1/crates/winapi/0.3.9/download", type = "tar.gz", sha256 = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419", strip_prefix = "winapi-0.3.9", build_file = Label("//bzl/cargo/remote:BUILD.winapi-0.3.9.bazel"), ) maybe( http_archive, name = "raze__winapi_i686_pc_windows_gnu__0_4_0", url = "https://crates.io/api/v1/crates/winapi-i686-pc-windows-gnu/0.4.0/download", type = "tar.gz", sha256 = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6", strip_prefix = "winapi-i686-pc-windows-gnu-0.4.0", build_file = Label("//bzl/cargo/remote:BUILD.winapi-i686-pc-windows-gnu-0.4.0.bazel"), ) maybe( http_archive, name = "raze__winapi_util__0_1_5", url = "https://crates.io/api/v1/crates/winapi-util/0.1.5/download", type = "tar.gz", sha256 = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178", strip_prefix = "winapi-util-0.1.5", build_file = Label("//bzl/cargo/remote:BUILD.winapi-util-0.1.5.bazel"), ) maybe( http_archive, name = "raze__winapi_x86_64_pc_windows_gnu__0_4_0", url = "https://crates.io/api/v1/crates/winapi-x86_64-pc-windows-gnu/0.4.0/download", type = "tar.gz", sha256 = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f", strip_prefix = "winapi-x86_64-pc-windows-gnu-0.4.0", build_file = Label("//bzl/cargo/remote:BUILD.winapi-x86_64-pc-windows-gnu-0.4.0.bazel"), )
# Ex083.2 """Create a program where the user types any espression that uses parentheses. Your application should analyze where the expression passed has open and closed parentheses in the correct order.""" list = [] temp = [] expression = str(input('\033[32mType a expression: \033[m')) for c in expression: if c == '(': temp.append(c) if c == ')': temp.append(c) if len(temp) % 2 == 0: print('\033[34mYour expression is \033[32mVALID!\033[m') else: print('\033[34mYour expression is \033[31mINVALID!\033[m') print('\033[32mxD\033[m')
jogador = {} lista = [] total = 0 jogador['Nome'] = input('Nome do jogador: ') quantidade = int(input('Quantas partidas {} jogou ? '.format(jogador['Nome']))) for i in range(0, quantidade): gol_quantidade = int(input('Quantos gols na partida {} ? '.format(i + 1))) total += gol_quantidade lista.append(gol_quantidade) jogador['Gols'] = lista jogador['Total'] = total print('-=' * 30) print(jogador) print('-=' * 30) for k, v in jogador.items(): print('O campo {} tem valor {}'.format(k, v)) print('-=' * 30) print('O jogador {} jogor {} partidas'.format(jogador['Nome'], quantidade)) for i, valor in enumerate(jogador['Gols']): print(' => Na partida {} , fez {} gols'.format(i + 1, valor)) print('Foi um total de {} gols'.format(total))
def my_sum(*args): # *args = 1, 2, 3 print(type(args)) print(args) return sum(args) def my_sum_2(args): # args = [1, 2, 3] return sum(args) print(my_sum(1, 2, 3)) # a # my_sum([1, 2, 3]) # b # my_sum_2(1, 2, 3) # c print(my_sum_2([1, 2, 3])) # d _, *args = 0, 1, 2, 3 args_2 = [1, 2, 3] print(args) print(args_2)
"""Views for WillPress. "An Excellent Blog Engine" Copyright (c) 2021 by William Ellison. This program is licensed under the terms of the Do What the Fuck You Want To Public License, version 2 or later, as described in the COPYING file at the root of this distribution. William Ellison <[email protected]> October 2021 """ SITE_NAME = "WillPress Test Site" POSTS_PER_PAGE = 5
#!/usr/bin/python3 def Encrypt(K, P): cipher = [] for letter in P: cipher.append(chr((ord(letter) - 65 + K) % 26 + 65)) return "".join(cipher) def disp(K): for i in range(0, 25): print(chr(i + 65), end=" ") print() for i in range(0, 25): print(chr((i + K) % 26 + 65), end=" ") print() def main(): print("Ceaser Cipher Encryption Alg") key = int(input("Enter Key: ")) disp(key) plain_text = input("Enter Plain Text: ").upper() cipher_text = Encrypt(key, plain_text) print(cipher_text) if __name__ == "__main__": main()
sample = { "asset": { "ancestors": [ "projects/163454223397", "organizations/673763744309" ], "assetType": "compute.googleapis.com/Instance", "name": "//compute.googleapis.com/projects/sc-vice-test/zones/us-central1-a/instances/instance-1", "resource": { "data": { "allocationAffinity": { "consumeAllocationType": "ANY_ALLOCATION" }, "canIpForward": False, "confidentialInstanceConfig": { "enableConfidentialCompute": False }, "cpuPlatform": "Unknown CPU Platform", "creationTimestamp": "2021-04-22T13:51:49.576-07:00", "deletionProtection": False, "description": "", "disks": [ { "autoDelete": True, "boot": True, "deviceName": "instance-1", "diskSizeGb": "10", "guestOsFeatures": [ { "type": "UEFI_COMPATIBLE" }, { "type": "VIRTIO_SCSI_MULTIQUEUE" } ], "index": 0, "interface": "SCSI", "licenses": [ "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-10-buster" ], "mode": "READ_WRITE", "source": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/disks/instance-1", "type": "PERSISTENT" } ], "displayDevice": { "enableDisplay": False }, "fingerprint": "kklxPt7MzL8=", "id": "4486036186437803787", "labelFingerprint": "42WmSpB8rSM=", "machineType": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/machineTypes/e2-medium", "name": "instance-1", "networkInterfaces": [ { "accessConfigs": [ { "name": "External NAT", "natIP": "108.59.84.233", "networkTier": "PREMIUM", "type": "ONE_TO_ONE_NAT" } ], "fingerprint": "3XxnerGjaPY=", "name": "nic0", "network": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/global/networks/default", "networkIP": "10.128.0.2", "subnetwork": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/regions/us-central1/subnetworks/default" } ], "scheduling": { "automaticRestart": True, "onHostMaintenance": "MIGRATE", "preemptible": False }, "selfLink": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/instances/instance-1", "serviceAccounts": [ { "email": "[email protected]", "scopes": [ "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/logging.write", "https://www.googleapis.com/auth/monitoring.write", "https://www.googleapis.com/auth/servicecontrol", "https://www.googleapis.com/auth/service.management.readonly", "https://www.googleapis.com/auth/trace.append" ] } ], "shieldedInstanceConfig": { "enableIntegrityMonitoring": True, "enableSecureBoot": False, "enableVtpm": True }, "shieldedInstanceIntegrityPolicy": { "updateAutoLearnPolicy": True }, "startRestricted": False, "status": "STAGING", "tags": { "fingerprint": "42WmSpB8rSM=" }, "zone": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a" }, "discoveryDocumentUri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", "discoveryName": "Instance", "location": "us-central1-a", "parent": "//cloudresourcemanager.googleapis.com/projects/163454223397", "version": "v1" }, "updateTime": "2021-04-22T20:51:50.801629Z" }, "priorAsset": { "ancestors": [ "projects/163454223397", "organizations/673763744309" ], "assetType": "compute.googleapis.com/Instance", "name": "//compute.googleapis.com/projects/sc-vice-test/zones/us-central1-a/instances/instance-1", "resource": { "data": { "allocationAffinity": { "consumeAllocationType": "ANY_ALLOCATION" }, "canIpForward": False, "confidentialInstanceConfig": { "enableConfidentialCompute": False }, "cpuPlatform": "Unknown CPU Platform", "creationTimestamp": "2021-04-22T13:51:49.576-07:00", "deletionProtection": False, "description": "", "disks": [ { "autoDelete": True, "boot": True, "deviceName": "instance-1", "diskSizeGb": "10", "guestOsFeatures": [ { "type": "UEFI_COMPATIBLE" }, { "type": "VIRTIO_SCSI_MULTIQUEUE" } ], "index": 0, "interface": "SCSI", "licenses": [ "https://www.googleapis.com/compute/v1/projects/debian-cloud/global/licenses/debian-10-buster" ], "mode": "READ_WRITE", "source": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/disks/instance-1", "type": "PERSISTENT" } ], "displayDevice": { "enableDisplay": False }, "fingerprint": "IbogiVywfFU=", "id": "4486036186437803787", "labelFingerprint": "42WmSpB8rSM=", "machineType": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/machineTypes/e2-medium", "name": "instance-1", "networkInterfaces": [ { "accessConfigs": [ { "name": "External NAT", "networkTier": "PREMIUM", "type": "ONE_TO_ONE_NAT" } ], "fingerprint": "bQWv9c5Re9E=", "name": "nic0", "network": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/global/networks/default", "subnetwork": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/regions/us-central1/subnetworks/default" } ], "scheduling": { "automaticRestart": True, "onHostMaintenance": "MIGRATE", "preemptible": False }, "selfLink": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a/instances/instance-1", "serviceAccounts": [ { "email": "[email protected]", "scopes": [ "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/logging.write", "https://www.googleapis.com/auth/monitoring.write", "https://www.googleapis.com/auth/servicecontrol", "https://www.googleapis.com/auth/service.management.readonly", "https://www.googleapis.com/auth/trace.append" ] } ], "shieldedInstanceConfig": { "enableIntegrityMonitoring": True, "enableSecureBoot": False, "enableVtpm": True }, "shieldedInstanceIntegrityPolicy": { "updateAutoLearnPolicy": True }, "startRestricted": False, "status": "PROVISIONING", "tags": { "fingerprint": "42WmSpB8rSM=" }, "zone": "https://www.googleapis.com/compute/v1/projects/sc-vice-test/zones/us-central1-a" }, "discoveryDocumentUri": "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest", "discoveryName": "Instance", "location": "us-central1-a", "parent": "//cloudresourcemanager.googleapis.com/projects/163454223397", "version": "v1" }, "updateTime": "2021-04-22T20:51:49.759449Z" }, "priorAssetState": "PRESENT", "window": { "startTime": "2021-04-22T20:51:50.801629Z" } }
smile_dict = [b"\xF0\x9F\x98\x81", b"\xF0\x9F\x98\x82", b"\xF0\x9F\x98\x83", b"\xF0\x9F\x98\x84", b"\xF0\x9F\x98\x85", b"\xF0\x9F\x98\x86", b"\xF0\x9F\x98\x89", b"\xF0\x9F\x98\x8A", b"\xF0\x9F\x98\x8B", b"\xF0\x9F\x98\x8C", b"\xF0\x9F\x98\x8D", b"\xF0\x9F\x98\x8F", b"\xF0\x9F\x98\x92", b"\xF0\x9F\x98\x93", b"\xF0\x9F\x98\x94", b"\xF0\x9F\x98\x96", b"\xF0\x9F\x98\x98", b"\xF0\x9F\x98\x9A", b"\xF0\x9F\x98\x9C", b"\xF0\x9F\x98\x9D", b"\xF0\x9F\x98\x9E", b"\xF0\x9F\x98\xA0", b"\xF0\x9F\x98\xA1", b"\xF0\x9F\x98\xA2", b"\xF0\x9F\x98\xA3", b"\xF0\x9F\x98\xA4", b"\xF0\x9F\x98\xA5", b"\xF0\x9F\x98\xA8", b"\xF0\x9F\x98\xA9", b"\xF0\x9F\x98\xAA", b"\xF0\x9F\x98\xAB", b"\xF0\x9F\x98\xAD", b"\xF0\x9F\x98\xB0", b"\xF0\x9F\x98\xB1", b"\xF0\x9F\x98\xB2", b"\xF0\x9F\x98\xB3", b"\xF0\x9F\x98\xB5", b"\xF0\x9F\x98\xB7", b"\xF0\x9F\x98\xB8", b"\xF0\x9F\x98\xB9", b"\xF0\x9F\x98\xBA", b"\xF0\x9F\x98\xBB", b"\xF0\x9F\x98\xBC", b"\xF0\x9F\x98\xBD", b"\xF0\x9F\x98\xBE", b"\xF0\x9F\x98\xBF", b"\xF0\x9F\x99\x80", b"\xF0\x9F\x99\x85", b"\xF0\x9F\x99\x86", b"\xF0\x9F\x99\x87", b"\xF0\x9F\x99\x88", b"\xF0\x9F\x99\x89", b"\xF0\x9F\x99\x8A", b"\xF0\x9F\x99\x8B", b"\xF0\x9F\x99\x8C", b"\xF0\x9F\x99\x8D", b"\xF0\x9F\x99\x8E", b"\xF0\x9F\x99\x8F", b"\xE2\x9C\x82", b"\xE2\x9C\x85", b"\xE2\x9C\x88", b"\xE2\x9C\x89", b"\xE2\x9C\x8A", b"\xE2\x9C\x8B", b"\xE2\x9C\x8C", b"\xE2\x9C\x8F", b"\xE2\x9C\x92", b"\xE2\x9C\x94", b"\xE2\x9C\x96", b"\xE2\x9C\xA8", b"\xE2\x9C\xB3", b"\xE2\x9C\xB4", b"\xE2\x9D\x84", b"\xE2\x9D\x87", b"\xE2\x9D\x8C", b"\xE2\x9D\x8E", b"\xE2\x9D\x93", b"\xE2\x9D\x94", b"\xE2\x9D\x95", b"\xE2\x9D\x97", b"\xE2\x9D\xA4", b"\xE2\x9E\x95", b"\xE2\x9E\x96", b"\xE2\x9E\x97", b"\xE2\x9E\xA1", b"\xE2\x9E\xB0", b"\xF0\x9F\x9A\x80", b"\xF0\x9F\x9A\x83", b"\xF0\x9F\x9A\x84", b"\xF0\x9F\x9A\x85", b"\xF0\x9F\x9A\x87", b"\xF0\x9F\x9A\x89", b"\xF0\x9F\x9A\x8C", b"\xF0\x9F\x9A\x8F", b"\xF0\x9F\x9A\x91", b"\xF0\x9F\x9A\x92", b"\xF0\x9F\x9A\x93", b"\xF0\x9F\x9A\x95", b"\xF0\x9F\x9A\x97", b"\xF0\x9F\x9A\x99", b"\xF0\x9F\x9A\x9A", b"\xF0\x9F\x9A\xA2", b"\xF0\x9F\x9A\xA4", b"\xF0\x9F\x9A\xA5", b"\xF0\x9F\x9A\xA7", b"\xF0\x9F\x9A\xA8", b"\xF0\x9F\x9A\xA9", b"\xF0\x9F\x9A\xAA", b"\xF0\x9F\x9A\xAB", b"\xF0\x9F\x9A\xAC", b"\xF0\x9F\x9A\xAD", b"\xF0\x9F\x9A\xB2", b"\xF0\x9F\x9A\xB6", b"\xF0\x9F\x9A\xB9", b"\xF0\x9F\x9A\xBA", b"\xF0\x9F\x9A\xBB", b"\xF0\x9F\x9A\xBC", b"\xF0\x9F\x9A\xBD", b"\xF0\x9F\x9A\xBE", b"\xF0\x9F\x9B\x80", b"\xE2\x93\x82", b"\xF0\x9F\x85\xB0", b"\xF0\x9F\x85\xB1", b"\xF0\x9F\x85\xBE", b"\xF0\x9F\x85\xBF", b"\xF0\x9F\x86\x8E", b"\xF0\x9F\x86\x91", b"\xF0\x9F\x86\x92", b"\xF0\x9F\x86\x93", b"\xF0\x9F\x86\x94", b"\xF0\x9F\x86\x95", b"\xF0\x9F\x86\x96", b"\xF0\x9F\x86\x97", b"\xF0\x9F\x86\x98", b"\xF0\x9F\x86\x99", b"\xF0\x9F\x86\x9A", b"\xF0\x9F\x87\xA9\xF0\x9F\x87\xAA", b"\xF0\x9F\x87\xAC\xF0\x9F\x87\xA7", b"\xF0\x9F\x87\xA8\xF0\x9F\x87\xB3", b"\xF0\x9F\x87\xAF\xF0\x9F\x87\xB5", b"\xF0\x9F\x87\xAB\xF0\x9F\x87\xB7", b"\xF0\x9F\x87\xB0\xF0\x9F\x87\xB7", b"\xF0\x9F\x87\xAA\xF0\x9F\x87\xB8", b"\xF0\x9F\x87\xAE\xF0\x9F\x87\xB9", b"\xF0\x9F\x87\xB7\xF0\x9F\x87\xBA", b"\xF0\x9F\x87\xBA\xF0\x9F\x87\xB8", b"\xF0\x9F\x88\x81", b"\xF0\x9F\x88\x82", b"\xF0\x9F\x88\x9A", b"\xF0\x9F\x88\xAF", b"\xF0\x9F\x88\xB2", b"\xF0\x9F\x88\xB3", b"\xF0\x9F\x88\xB4", b"\xF0\x9F\x88\xB5", b"\xF0\x9F\x88\xB6", b"\xF0\x9F\x88\xB7", b"\xF0\x9F\x88\xB8", b"\xF0\x9F\x88\xB9", b"\xF0\x9F\x88\xBA", b"\xF0\x9F\x89\x90", b"\xF0\x9F\x89\x91", b"\xC2\xA9", b"\xC2\xAE", b"\xE2\x80\xBC", b"\xE2\x81\x89", b"\x23\xE2\x83\xA3", b"\x38\xE2\x83\xA3", b"\x39\xE2\x83\xA3", b"\x37\xE2\x83\xA3", b"\x30\xE2\x83\xA3", b"\x36\xE2\x83\xA3", b"\x35\xE2\x83\xA3", b"\x34\xE2\x83\xA3", b"\x33\xE2\x83\xA3", b"\x32\xE2\x83\xA3", b"\x31\xE2\x83\xA3", b"\xE2\x84\xA2", b"\xE2\x84\xB9", b"\xE2\x86\x94", b"\xE2\x86\x95", b"\xE2\x86\x96", b"\xE2\x86\x97", b"\xE2\x86\x98", b"\xE2\x86\x99", b"\xE2\x86\xA9", b"\xE2\x86\xAA", b"\xE2\x8C\x9A", b"\xE2\x8C\x9B", b"\xE2\x8F\xA9", b"\xE2\x8F\xAA", b"\xE2\x8F\xAB", b"\xE2\x8F\xAC", b"\xE2\x8F\xB0", b"\xE2\x8F\xB3", b"\xE2\x96\xAA", b"\xE2\x96\xAB", b"\xE2\x96\xB6", b"\xE2\x97\x80", b"\xE2\x97\xBB", b"\xE2\x97\xBC", b"\xE2\x97\xBD", b"\xE2\x97\xBE", b"\xE2\x98\x80", b"\xE2\x98\x81", b"\xE2\x98\x8E", b"\xE2\x98\x91", b"\xE2\x98\x94", b"\xE2\x98\x95", b"\xE2\x98\x9D", b"\xE2\x98\xBA", b"\xE2\x99\x88", b"\xE2\x99\x89", b"\xE2\x99\x8A", b"\xE2\x99\x8B", b"\xE2\x99\x8C", b"\xE2\x99\x8D", b"\xE2\x99\x8E", b"\xE2\x99\x8F", b"\xE2\x99\x90", b"\xE2\x99\x91", b"\xE2\x99\x92", b"\xE2\x99\x93", b"\xE2\x99\xA0", b"\xE2\x99\xA3", b"\xE2\x99\xA5", b"\xE2\x99\xA6", b"\xE2\x99\xA8", b"\xE2\x99\xBB", b"\xE2\x99\xBF", b"\xE2\x9A\x93", b"\xE2\x9A\xA0", b"\xE2\x9A\xA1", b"\xE2\x9A\xAA", b"\xE2\x9A\xAB", b"\xE2\x9A\xBD", b"\xE2\x9A\xBE", b"\xE2\x9B\x84", b"\xE2\x9B\x85", b"\xE2\x9B\x8E", b"\xE2\x9B\x94", b"\xE2\x9B\xAA", b"\xE2\x9B\xB2", b"\xE2\x9B\xB3", b"\xE2\x9B\xB5", b"\xE2\x9B\xBA", b"\xE2\x9B\xBD", b"\xE2\xA4\xB4", b"\xE2\xA4\xB5", b"\xE2\xAC\x85", b"\xE2\xAC\x86", b"\xE2\xAC\x87", b"\xE2\xAC\x9B", b"\xE2\xAC\x9C", b"\xE2\xAD\x90", b"\xE2\xAD\x95", b"\xE3\x80\xB0", b"\xE3\x80\xBD", b"\xE3\x8A\x97", b"\xE3\x8A\x99", b"\xF0\x9F\x80\x84", b"\xF0\x9F\x83\x8F", b"\xF0\x9F\x8C\x80", b"\xF0\x9F\x8C\x81", b"\xF0\x9F\x8C\x82", b"\xF0\x9F\x8C\x83", b"\xF0\x9F\x8C\x84", b"\xF0\x9F\x8C\x85", b"\xF0\x9F\x8C\x86", b"\xF0\x9F\x8C\x87", b"\xF0\x9F\x8C\x88", b"\xF0\x9F\x8C\x89", b"\xF0\x9F\x8C\x8A", b"\xF0\x9F\x8C\x8B", b"\xF0\x9F\x8C\x8C", b"\xF0\x9F\x8C\x8F", b"\xF0\x9F\x8C\x91", b"\xF0\x9F\x8C\x93", b"\xF0\x9F\x8C\x94", b"\xF0\x9F\x8C\x95", b"\xF0\x9F\x8C\x99", b"\xF0\x9F\x8C\x9B", b"\xF0\x9F\x8C\x9F", b"\xF0\x9F\x8C\xA0", b"\xF0\x9F\x8C\xB0", b"\xF0\x9F\x8C\xB1", b"\xF0\x9F\x8C\xB4", b"\xF0\x9F\x8C\xB5", b"\xF0\x9F\x8C\xB7", b"\xF0\x9F\x8C\xB8", b"\xF0\x9F\x8C\xB9", b"\xF0\x9F\x8C\xBA", b"\xF0\x9F\x8C\xBB", b"\xF0\x9F\x8C\xBC", b"\xF0\x9F\x8C\xBD", b"\xF0\x9F\x8C\xBE", b"\xF0\x9F\x8C\xBF", b"\xF0\x9F\x8D\x80", b"\xF0\x9F\x8D\x81", b"\xF0\x9F\x8D\x82", b"\xF0\x9F\x8D\x83", b"\xF0\x9F\x8D\x84", b"\xF0\x9F\x8D\x85", b"\xF0\x9F\x8D\x86", b"\xF0\x9F\x8D\x87", b"\xF0\x9F\x8D\x88", b"\xF0\x9F\x8D\x89", b"\xF0\x9F\x8D\x8A", b"\xF0\x9F\x8D\x8C", b"\xF0\x9F\x8D\x8D", b"\xF0\x9F\x8D\x8E", b"\xF0\x9F\x8D\x8F", b"\xF0\x9F\x8D\x91", b"\xF0\x9F\x8D\x92", b"\xF0\x9F\x8D\x93", b"\xF0\x9F\x8D\x94", b"\xF0\x9F\x8D\x95", b"\xF0\x9F\x8D\x96", b"\xF0\x9F\x8D\x97", b"\xF0\x9F\x8D\x98", b"\xF0\x9F\x8D\x99", b"\xF0\x9F\x8D\x9A", b"\xF0\x9F\x8D\x9B", b"\xF0\x9F\x8D\x9C", b"\xF0\x9F\x8D\x9D", b"\xF0\x9F\x8D\x9E", b"\xF0\x9F\x8D\x9F", b"\xF0\x9F\x8D\xA0", b"\xF0\x9F\x8D\xA1", b"\xF0\x9F\x8D\xA2", b"\xF0\x9F\x8D\xA3", b"\xF0\x9F\x8D\xA4", b"\xF0\x9F\x8D\xA5", b"\xF0\x9F\x8D\xA6", b"\xF0\x9F\x8D\xA7", b"\xF0\x9F\x8D\xA8", b"\xF0\x9F\x8D\xA9", b"\xF0\x9F\x8D\xAA", b"\xF0\x9F\x8D\xAB", b"\xF0\x9F\x8D\xAC", b"\xF0\x9F\x8D\xAD", b"\xF0\x9F\x8D\xAE", b"\xF0\x9F\x8D\xAF", b"\xF0\x9F\x8D\xB0", b"\xF0\x9F\x8D\xB1", b"\xF0\x9F\x8D\xB2", b"\xF0\x9F\x8D\xB3", b"\xF0\x9F\x8D\xB4", b"\xF0\x9F\x8D\xB5", b"\xF0\x9F\x8D\xB6", b"\xF0\x9F\x8D\xB7", b"\xF0\x9F\x8D\xB8", b"\xF0\x9F\x8D\xB9", b"\xF0\x9F\x8D\xBA", b"\xF0\x9F\x8D\xBB", b"\xF0\x9F\x8E\x80", b"\xF0\x9F\x8E\x81", b"\xF0\x9F\x8E\x82", b"\xF0\x9F\x8E\x83", b"\xF0\x9F\x8E\x84", b"\xF0\x9F\x8E\x85", b"\xF0\x9F\x8E\x86", b"\xF0\x9F\x8E\x87", b"\xF0\x9F\x8E\x88", b"\xF0\x9F\x8E\x89", b"\xF0\x9F\x8E\x8A", b"\xF0\x9F\x8E\x8B", b"\xF0\x9F\x8E\x8C", b"\xF0\x9F\x8E\x8D", b"\xF0\x9F\x8E\x8E", b"\xF0\x9F\x8E\x8F", b"\xF0\x9F\x8E\x90", b"\xF0\x9F\x8E\x91", b"\xF0\x9F\x8E\x92", b"\xF0\x9F\x8E\x93", b"\xF0\x9F\x8E\xA0", b"\xF0\x9F\x8E\xA1", b"\xF0\x9F\x8E\xA2", b"\xF0\x9F\x8E\xA3", b"\xF0\x9F\x8E\xA4", b"\xF0\x9F\x8E\xA5", b"\xF0\x9F\x8E\xA6", b"\xF0\x9F\x8E\xA7", b"\xF0\x9F\x8E\xA8", b"\xF0\x9F\x8E\xA9", b"\xF0\x9F\x8E\xAA", b"\xF0\x9F\x8E\xAB", b"\xF0\x9F\x8E\xAC", b"\xF0\x9F\x8E\xAD", b"\xF0\x9F\x8E\xAE", b"\xF0\x9F\x8E\xAF", b"\xF0\x9F\x8E\xB0", b"\xF0\x9F\x8E\xB1", b"\xF0\x9F\x8E\xB2", b"\xF0\x9F\x8E\xB3", b"\xF0\x9F\x8E\xB4", b"\xF0\x9F\x8E\xB5", b"\xF0\x9F\x8E\xB6", b"\xF0\x9F\x8E\xB7", b"\xF0\x9F\x8E\xB8", b"\xF0\x9F\x8E\xB9", b"\xF0\x9F\x8E\xBA", b"\xF0\x9F\x8E\xBB", b"\xF0\x9F\x8E\xBC", b"\xF0\x9F\x8E\xBD", b"\xF0\x9F\x8E\xBE", b"\xF0\x9F\x8E\xBF", b"\xF0\x9F\x8F\x80", b"\xF0\x9F\x8F\x81", b"\xF0\x9F\x8F\x82", b"\xF0\x9F\x8F\x83", b"\xF0\x9F\x8F\x84", b"\xF0\x9F\x8F\x86", b"\xF0\x9F\x8F\x88", b"\xF0\x9F\x8F\x8A", b"\xF0\x9F\x8F\xA0", b"\xF0\x9F\x8F\xA1", b"\xF0\x9F\x8F\xA2", b"\xF0\x9F\x8F\xA3", b"\xF0\x9F\x8F\xA5", b"\xF0\x9F\x8F\xA6", b"\xF0\x9F\x8F\xA7", b"\xF0\x9F\x8F\xA8", b"\xF0\x9F\x8F\xA9", b"\xF0\x9F\x8F\xAA", b"\xF0\x9F\x8F\xAB", b"\xF0\x9F\x8F\xAC", b"\xF0\x9F\x8F\xAD", b"\xF0\x9F\x8F\xAE", b"\xF0\x9F\x8F\xAF", b"\xF0\x9F\x8F\xB0", b"\xF0\x9F\x90\x8C", b"\xF0\x9F\x90\x8D", b"\xF0\x9F\x90\x8E", b"\xF0\x9F\x90\x91", b"\xF0\x9F\x90\x92", b"\xF0\x9F\x90\x94", b"\xF0\x9F\x90\x97", b"\xF0\x9F\x90\x98", b"\xF0\x9F\x90\x99", b"\xF0\x9F\x90\x9A", b"\xF0\x9F\x90\x9B", b"\xF0\x9F\x90\x9C", b"\xF0\x9F\x90\x9D", b"\xF0\x9F\x90\x9E", b"\xF0\x9F\x90\x9F", b"\xF0\x9F\x90\xA0", b"\xF0\x9F\x90\xA1", b"\xF0\x9F\x90\xA2", b"\xF0\x9F\x90\xA3", b"\xF0\x9F\x90\xA4", b"\xF0\x9F\x90\xA5", b"\xF0\x9F\x90\xA6", b"\xF0\x9F\x90\xA7", b"\xF0\x9F\x90\xA8", b"\xF0\x9F\x90\xA9", b"\xF0\x9F\x90\xAB", b"\xF0\x9F\x90\xAC", b"\xF0\x9F\x90\xAD", b"\xF0\x9F\x90\xAE", b"\xF0\x9F\x90\xAF", b"\xF0\x9F\x90\xB0", b"\xF0\x9F\x90\xB1", b"\xF0\x9F\x90\xB2", b"\xF0\x9F\x90\xB3", b"\xF0\x9F\x90\xB4", b"\xF0\x9F\x90\xB5", b"\xF0\x9F\x90\xB6", b"\xF0\x9F\x90\xB7", b"\xF0\x9F\x90\xB8", b"\xF0\x9F\x90\xB9", b"\xF0\x9F\x90\xBA", b"\xF0\x9F\x90\xBB", b"\xF0\x9F\x90\xBC", b"\xF0\x9F\x90\xBD", b"\xF0\x9F\x90\xBE", b"\xF0\x9F\x91\x80", b"\xF0\x9F\x91\x82", b"\xF0\x9F\x91\x83", b"\xF0\x9F\x91\x84", b"\xF0\x9F\x91\x85", b"\xF0\x9F\x91\x86", b"\xF0\x9F\x91\x87", b"\xF0\x9F\x91\x88", b"\xF0\x9F\x91\x89", b"\xF0\x9F\x91\x8A", b"\xF0\x9F\x91\x8B", b"\xF0\x9F\x91\x8C", b"\xF0\x9F\x91\x8D", b"\xF0\x9F\x91\x8E", b"\xF0\x9F\x91\x8F", b"\xF0\x9F\x91\x90", b"\xF0\x9F\x91\x91", b"\xF0\x9F\x91\x92", b"\xF0\x9F\x91\x93", b"\xF0\x9F\x91\x94", b"\xF0\x9F\x91\x95", b"\xF0\x9F\x91\x96", b"\xF0\x9F\x91\x97", b"\xF0\x9F\x91\x98", b"\xF0\x9F\x91\x99", b"\xF0\x9F\x91\x9A", b"\xF0\x9F\x91\x9B", b"\xF0\x9F\x91\x9C", b"\xF0\x9F\x91\x9D", b"\xF0\x9F\x91\x9E", b"\xF0\x9F\x91\x9F", b"\xF0\x9F\x91\xA0", b"\xF0\x9F\x91\xA1", b"\xF0\x9F\x91\xA2", b"\xF0\x9F\x91\xA3", b"\xF0\x9F\x91\xA4", b"\xF0\x9F\x91\xA6", b"\xF0\x9F\x91\xA7", b"\xF0\x9F\x91\xA8", b"\xF0\x9F\x91\xA9", b"\xF0\x9F\x91\xAA", b"\xF0\x9F\x91\xAB", b"\xF0\x9F\x91\xAE", b"\xF0\x9F\x91\xAF", b"\xF0\x9F\x91\xB0", b"\xF0\x9F\x91\xB1", b"\xF0\x9F\x91\xB2", b"\xF0\x9F\x91\xB3", b"\xF0\x9F\x91\xB4", b"\xF0\x9F\x91\xB5", b"\xF0\x9F\x91\xB6", b"\xF0\x9F\x91\xB7", b"\xF0\x9F\x91\xB8", b"\xF0\x9F\x91\xB9", b"\xF0\x9F\x91\xBA", b"\xF0\x9F\x91\xBB", b"\xF0\x9F\x91\xBC", b"\xF0\x9F\x91\xBD", b"\xF0\x9F\x91\xBE", b"\xF0\x9F\x91\xBF", b"\xF0\x9F\x92\x80", b"\xF0\x9F\x92\x81", b"\xF0\x9F\x92\x82", b"\xF0\x9F\x92\x83", b"\xF0\x9F\x92\x84", b"\xF0\x9F\x92\x85", b"\xF0\x9F\x92\x86", b"\xF0\x9F\x92\x87", b"\xF0\x9F\x92\x88", b"\xF0\x9F\x92\x89", b"\xF0\x9F\x92\x8A", b"\xF0\x9F\x92\x8B", b"\xF0\x9F\x92\x8C", b"\xF0\x9F\x92\x8D", b"\xF0\x9F\x92\x8E", b"\xF0\x9F\x92\x8F", b"\xF0\x9F\x92\x90", b"\xF0\x9F\x92\x91", b"\xF0\x9F\x92\x92", b"\xF0\x9F\x92\x93", b"\xF0\x9F\x92\x94", b"\xF0\x9F\x92\x95", b"\xF0\x9F\x92\x96", b"\xF0\x9F\x92\x97", b"\xF0\x9F\x92\x98", b"\xF0\x9F\x92\x99", b"\xF0\x9F\x92\x9A", b"\xF0\x9F\x92\x9B", b"\xF0\x9F\x92\x9C", b"\xF0\x9F\x92\x9D", b"\xF0\x9F\x92\x9E", b"\xF0\x9F\x92\x9F", b"\xF0\x9F\x92\xA0", b"\xF0\x9F\x92\xA1", b"\xF0\x9F\x92\xA2", b"\xF0\x9F\x92\xA3", b"\xF0\x9F\x92\xA4", b"\xF0\x9F\x92\xA5", b"\xF0\x9F\x92\xA6", b"\xF0\x9F\x92\xA7", b"\xF0\x9F\x92\xA8", b"\xF0\x9F\x92\xA9", b"\xF0\x9F\x92\xAA", b"\xF0\x9F\x92\xAB", b"\xF0\x9F\x92\xAC", b"\xF0\x9F\x92\xAE", b"\xF0\x9F\x92\xAF", b"\xF0\x9F\x92\xB0", b"\xF0\x9F\x92\xB1", b"\xF0\x9F\x92\xB2", b"\xF0\x9F\x92\xB3", b"\xF0\x9F\x92\xB4", b"\xF0\x9F\x92\xB5", b"\xF0\x9F\x92\xB8", b"\xF0\x9F\x92\xB9", b"\xF0\x9F\x92\xBA", b"\xF0\x9F\x92\xBB", b"\xF0\x9F\x92\xBC", b"\xF0\x9F\x92\xBD", b"\xF0\x9F\x92\xBE", b"\xF0\x9F\x92\xBF", b"\xF0\x9F\x93\x80", b"\xF0\x9F\x93\x81", b"\xF0\x9F\x93\x82", b"\xF0\x9F\x93\x83", b"\xF0\x9F\x93\x84", b"\xF0\x9F\x93\x85", b"\xF0\x9F\x93\x86", b"\xF0\x9F\x93\x87", b"\xF0\x9F\x93\x88", b"\xF0\x9F\x93\x89", b"\xF0\x9F\x93\x8A", b"\xF0\x9F\x93\x8B", b"\xF0\x9F\x93\x8C", b"\xF0\x9F\x93\x8D", b"\xF0\x9F\x93\x8E", b"\xF0\x9F\x93\x8F", b"\xF0\x9F\x93\x90", b"\xF0\x9F\x93\x91", b"\xF0\x9F\x93\x92", b"\xF0\x9F\x93\x93", b"\xF0\x9F\x93\x94", b"\xF0\x9F\x93\x95", b"\xF0\x9F\x93\x96", b"\xF0\x9F\x93\x97", b"\xF0\x9F\x93\x98", b"\xF0\x9F\x93\x99", b"\xF0\x9F\x93\x9A", b"\xF0\x9F\x93\x9B", b"\xF0\x9F\x93\x9C", b"\xF0\x9F\x93\x9D", b"\xF0\x9F\x93\x9E", b"\xF0\x9F\x93\x9F", b"\xF0\x9F\x93\xA0", b"\xF0\x9F\x93\xA1", b"\xF0\x9F\x93\xA2", b"\xF0\x9F\x93\xA3", b"\xF0\x9F\x93\xA4", b"\xF0\x9F\x93\xA5", b"\xF0\x9F\x93\xA6", b"\xF0\x9F\x93\xA7", b"\xF0\x9F\x93\xA8", b"\xF0\x9F\x93\xA9", b"\xF0\x9F\x93\xAA", b"\xF0\x9F\x93\xAB", b"\xF0\x9F\x93\xAE", b"\xF0\x9F\x93\xB0", b"\xF0\x9F\x93\xB1", b"\xF0\x9F\x93\xB2", b"\xF0\x9F\x93\xB3", b"\xF0\x9F\x93\xB4", b"\xF0\x9F\x93\xB6", b"\xF0\x9F\x93\xB7", b"\xF0\x9F\x93\xB9", b"\xF0\x9F\x93\xBA", b"\xF0\x9F\x93\xBB", b"\xF0\x9F\x93\xBC", b"\xF0\x9F\x94\x83", b"\xF0\x9F\x94\x8A", b"\xF0\x9F\x94\x8B", b"\xF0\x9F\x94\x8C", b"\xF0\x9F\x94\x8D", b"\xF0\x9F\x94\x8E", b"\xF0\x9F\x94\x8F", b"\xF0\x9F\x94\x90", b"\xF0\x9F\x94\x91", b"\xF0\x9F\x94\x92", b"\xF0\x9F\x94\x93", b"\xF0\x9F\x94\x94", b"\xF0\x9F\x94\x96", b"\xF0\x9F\x94\x97", b"\xF0\x9F\x94\x98", b"\xF0\x9F\x94\x99", b"\xF0\x9F\x94\x9A", b"\xF0\x9F\x94\x9B", b"\xF0\x9F\x94\x9C", b"\xF0\x9F\x94\x9D", b"\xF0\x9F\x94\x9E", b"\xF0\x9F\x94\x9F", b"\xF0\x9F\x94\xA0", b"\xF0\x9F\x94\xA1", b"\xF0\x9F\x94\xA2", b"\xF0\x9F\x94\xA3", b"\xF0\x9F\x94\xA4", b"\xF0\x9F\x94\xA5", b"\xF0\x9F\x94\xA6", b"\xF0\x9F\x94\xA7", b"\xF0\x9F\x94\xA8", b"\xF0\x9F\x94\xA9", b"\xF0\x9F\x94\xAA", b"\xF0\x9F\x94\xAB", b"\xF0\x9F\x94\xAE", b"\xF0\x9F\x94\xAF", b"\xF0\x9F\x94\xB0", b"\xF0\x9F\x94\xB1", b"\xF0\x9F\x94\xB2", b"\xF0\x9F\x94\xB3", b"\xF0\x9F\x94\xB4", b"\xF0\x9F\x94\xB5", b"\xF0\x9F\x94\xB6", b"\xF0\x9F\x94\xB7", b"\xF0\x9F\x94\xB8", b"\xF0\x9F\x94\xB9", b"\xF0\x9F\x94\xBA", b"\xF0\x9F\x94\xBB", b"\xF0\x9F\x94\xBC", b"\xF0\x9F\x94\xBD", b"\xF0\x9F\x95\x90", b"\xF0\x9F\x95\x91", b"\xF0\x9F\x95\x92", b"\xF0\x9F\x95\x93", b"\xF0\x9F\x95\x94", b"\xF0\x9F\x95\x95", b"\xF0\x9F\x95\x96", b"\xF0\x9F\x95\x97", b"\xF0\x9F\x95\x98", b"\xF0\x9F\x95\x99", b"\xF0\x9F\x95\x9A", b"\xF0\x9F\x95\x9B", b"\xF0\x9F\x97\xBB", b"\xF0\x9F\x97\xBC", b"\xF0\x9F\x97\xBD", b"\xF0\x9F\x97\xBE", b"\xF0\x9F\x97\xBF", b"\xF0\x9F\x98\x80", b"\xF0\x9F\x98\x87", b"\xF0\x9F\x98\x88", b"\xF0\x9F\x98\x8E", b"\xF0\x9F\x98\x90", b"\xF0\x9F\x98\x91", b"\xF0\x9F\x98\x95", b"\xF0\x9F\x98\x97", b"\xF0\x9F\x98\x99", b"\xF0\x9F\x98\x9B", b"\xF0\x9F\x98\x9F", b"\xF0\x9F\x98\xA6", b"\xF0\x9F\x98\xA7", b"\xF0\x9F\x98\xAC", b"\xF0\x9F\x98\xAE", b"\xF0\x9F\x98\xAF", b"\xF0\x9F\x98\xB4", b"\xF0\x9F\x98\xB6", b"\xF0\x9F\x9A\x81", b"\xF0\x9F\x9A\x82", b"\xF0\x9F\x9A\x86", b"\xF0\x9F\x9A\x88", b"\xF0\x9F\x9A\x8A", b"\xF0\x9F\x9A\x8D", b"\xF0\x9F\x9A\x8E", b"\xF0\x9F\x9A\x90", b"\xF0\x9F\x9A\x94", b"\xF0\x9F\x9A\x96", b"\xF0\x9F\x9A\x98", b"\xF0\x9F\x9A\x9B", b"\xF0\x9F\x9A\x9C", b"\xF0\x9F\x9A\x9D", b"\xF0\x9F\x9A\x9E", b"\xF0\x9F\x9A\x9F", b"\xF0\x9F\x9A\xA0", b"\xF0\x9F\x9A\xA1", b"\xF0\x9F\x9A\xA3", b"\xF0\x9F\x9A\xA6", b"\xF0\x9F\x9A\xAE", b"\xF0\x9F\x9A\xAF", b"\xF0\x9F\x9A\xB0", b"\xF0\x9F\x9A\xB1", b"\xF0\x9F\x9A\xB3", b"\xF0\x9F\x9A\xB4", b"\xF0\x9F\x9A\xB5", b"\xF0\x9F\x9A\xB7", b"\xF0\x9F\x9A\xB8", b"\xF0\x9F\x9A\xBF", b"\xF0\x9F\x9B\x81", b"\xF0\x9F\x9B\x82", b"\xF0\x9F\x9B\x83", b"\xF0\x9F\x9B\x84", b"\xF0\x9F\x9B\x85", b"\xF0\x9F\x8C\x8D", b"\xF0\x9F\x8C\x8E", b"\xF0\x9F\x8C\x90", b"\xF0\x9F\x8C\x92", b"\xF0\x9F\x8C\x96", b"\xF0\x9F\x8C\x97", b"\xF0\x9F\x8C\x98", b"\xF0\x9F\x8C\x9A", b"\xF0\x9F\x8C\x9C", b"\xF0\x9F\x8C\x9D", b"\xF0\x9F\x8C\x9E", b"\xF0\x9F\x8C\xB2", b"\xF0\x9F\x8C\xB3", b"\xF0\x9F\x8D\x8B", b"\xF0\x9F\x8D\x90", b"\xF0\x9F\x8D\xBC", b"\xF0\x9F\x8F\x87", b"\xF0\x9F\x8F\x89", b"\xF0\x9F\x8F\xA4", b"\xF0\x9F\x90\x80", b"\xF0\x9F\x90\x81", b"\xF0\x9F\x90\x82", b"\xF0\x9F\x90\x83", b"\xF0\x9F\x90\x84", b"\xF0\x9F\x90\x85", b"\xF0\x9F\x90\x86", b"\xF0\x9F\x90\x87", b"\xF0\x9F\x90\x88", b"\xF0\x9F\x90\x89", b"\xF0\x9F\x90\x8A", b"\xF0\x9F\x90\x8B", b"\xF0\x9F\x90\x8F", b"\xF0\x9F\x90\x90", b"\xF0\x9F\x90\x93", b"\xF0\x9F\x90\x95", b"\xF0\x9F\x90\x96", b"\xF0\x9F\x90\xAA", b"\xF0\x9F\x91\xA5", b"\xF0\x9F\x91\xAC", b"\xF0\x9F\x91\xAD", b"\xF0\x9F\x92\xAD", b"\xF0\x9F\x92\xB6", b"\xF0\x9F\x92\xB7", b"\xF0\x9F\x93\xAC", b"\xF0\x9F\x93\xAD", b"\xF0\x9F\x93\xAF", b"\xF0\x9F\x93\xB5", b"\xF0\x9F\x94\x80", b"\xF0\x9F\x94\x81", b"\xF0\x9F\x94\x82", b"\xF0\x9F\x94\x84", b"\xF0\x9F\x94\x85", b"\xF0\x9F\x94\x86", b"\xF0\x9F\x94\x87", b"\xF0\x9F\x94\x89", b"\xF0\x9F\x94\x95", b"\xF0\x9F\x94\xAC", b"\xF0\x9F\x94\xAD", b"\xF0\x9F\x95\x9C", b"\xF0\x9F\x95\x9D", b"\xF0\x9F\x95\x9E", b"\xF0\x9F\x95\x9F", b"\xF0\x9F\x95\xA0", b"\xF0\x9F\x95\xA1", b"\xF0\x9F\x95\xA2", b"\xF0\x9F\x95\xA3", b"\xF0\x9F\x95\xA4", b"\xF0\x9F\x95\xA5", b"\xF0\x9F\x95\xA6", b"\xF0\x9F\x95\xA7", ]
# Code generated by font-to-py.py. # Font: dsm.ttf version = '0.26' def height(): return 21 def max_width(): return 12 def hmap(): return True def reverse(): return False def monospaced(): return False def min_ch(): return 32 def max_ch(): return 126 _font =\ b'\x0c\x00\x00\x00\x7c\x00\xfe\x00\x87\x00\x03\x00\x03\x00\x07\x00'\ b'\x0e\x00\x1c\x00\x38\x00\x30\x00\x30\x00\x30\x00\x00\x00\x30\x00'\ b'\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\x00\x00\x00\x00\xc0\x00\xc0\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00'\ b'\xcc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x06\x60\x04\x40\x0c\xc0\x0c\xc0\x7f\xf0\x7f\xf0'\ b'\x08\x80\x19\x80\x19\x80\xff\xe0\xff\xe0\x33\x00\x33\x00\x22\x00'\ b'\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\x08\x00\x08\x00\x3e\x00\x7f\x00\xe9\x00\xc8\x00\xc8\x00\x68\x00'\ b'\x3e\x00\x0b\x00\x09\x80\x09\x80\x8b\x80\xff\x00\x7e\x00\x08\x00'\ b'\x08\x00\x08\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x78\x00\xcc\x00'\ b'\xcc\x00\xcc\x00\xcc\x00\x78\xc0\x03\x00\x06\x00\x18\x00\x63\xc0'\ b'\x06\x60\x06\x60\x06\x60\x06\x60\x03\xc0\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\x1f\x00\x3f\x00\x30\x00\x30\x00'\ b'\x30\x00\x18\x00\x18\x00\x7c\x00\x6e\x60\xc6\x60\xc3\x60\xc3\xc0'\ b'\xe1\x80\x7e\xc0\x3c\xe0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\x30\x00\x20\x00\x60\x00\x60\x00\x40\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\x60\x00\x60\x00\x60\x00'\ b'\x20\x00\x30\x00\x00\x00\x00\x00\x0c\x00\x00\x00\xc0\x00\x40\x00'\ b'\x60\x00\x60\x00\x60\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00'\ b'\x30\x00\x30\x00\x30\x00\x60\x00\x60\x00\x60\x00\x40\x00\xc0\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\x08\x00\x08\x00\x88\x80\x6b\x00'\ b'\x1c\x00\x1c\x00\x6b\x00\x88\x80\x08\x00\x08\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x0c\x00'\ b'\x0c\x00\x0c\x00\xff\xc0\xff\xc0\x0c\x00\x0c\x00\x0c\x00\x0c\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x60\x00\x60\x00\x60\x00'\ b'\xc0\x00\xc0\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x00\xf8\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x00\xc0\x01\x80\x01\x80\x03\x00\x03\x00\x06\x00'\ b'\x06\x00\x0c\x00\x0c\x00\x18\x00\x18\x00\x30\x00\x30\x00\x60\x00'\ b'\x60\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\x3c\x00\x7f\x00\x63\x00\xe3\x80\xc1\x80\xc1\x80\xcd\x80\xcd\x80'\ b'\xc1\x80\xc1\x80\xc1\x80\xe3\x80\x63\x00\x7f\x00\x3c\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x38\x00\xf8\x00'\ b'\xd8\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00'\ b'\x18\x00\x18\x00\x18\x00\xff\x00\xff\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\x7e\x00\xff\x00\x83\x80\x01\x80'\ b'\x01\x80\x01\x80\x03\x80\x03\x00\x06\x00\x0c\x00\x18\x00\x30\x00'\ b'\x60\x00\xff\x80\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x7e\x00\xff\x00\x83\x80\x01\x80\x01\x80\x03\x80'\ b'\x1f\x00\x1e\x00\x03\x00\x01\x80\x01\x80\x01\x80\x83\x80\xff\x00'\ b'\x7e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\x07\x00\x07\x00\x0f\x00\x0b\x00\x1b\x00\x13\x00\x33\x00\x63\x00'\ b'\x63\x00\xc3\x00\xff\xc0\xff\xc0\x03\x00\x03\x00\x03\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x7f\x00\x7f\x00'\ b'\x60\x00\x60\x00\x60\x00\x7e\x00\x7f\x00\x43\x80\x01\x80\x01\x80'\ b'\x01\x80\x01\x80\x83\x00\xff\x00\x7c\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\x1e\x00\x3f\x00\x71\x00\x60\x00'\ b'\xc0\x00\xc0\x00\xde\x00\xff\x00\xe3\x80\xc1\x80\xc1\x80\xc1\x80'\ b'\x63\x80\x7f\x00\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\xff\x80\xff\x80\x03\x00\x03\x00\x03\x00\x06\x00'\ b'\x06\x00\x06\x00\x0c\x00\x0c\x00\x0c\x00\x18\x00\x18\x00\x18\x00'\ b'\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\x3e\x00\x7f\x00\xe3\x80\xc1\x80\xc1\x80\x63\x00\x3e\x00\x7f\x00'\ b'\x63\x00\xc1\x80\xc1\x80\xc1\x80\xe3\x80\x7f\x00\x3e\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x3e\x00\x7f\x00'\ b'\xe3\x00\xc1\x80\xc1\x80\xc1\x80\xe3\x80\x7f\x80\x3d\x80\x01\x80'\ b'\x01\x80\x03\x00\x47\x00\x7e\x00\x3c\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\xc0\x00\xc0\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00'\ b'\x60\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\x60\x00'\ b'\x60\x00\x60\x00\xc0\x00\xc0\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x03\xc0\x0f\x00\x3c\x00'\ b'\xe0\x00\xe0\x00\x3c\x00\x0f\x00\x03\xc0\x00\x40\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\xff\xc0\xff\xc0\x00\x00\x00\x00'\ b'\xff\xc0\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x80\x00\xf0\x00\x3c\x00\x0f\x00\x01\xc0\x01\xc0\x0f\x00\x3c\x00'\ b'\xf0\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x7c\x00\xfe\x00\x87\x00\x03\x00\x03\x00\x07\x00'\ b'\x0e\x00\x1c\x00\x38\x00\x30\x00\x30\x00\x30\x00\x00\x00\x30\x00'\ b'\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\x00\x00\x0f\x00\x31\x80\x60\xc0\x60\xc0\x47\xc0\xc4\xc0\xcc\xc0'\ b'\xcc\xc0\xcc\xc0\xcc\xc0\xcc\xc0\xc4\xc0\x67\xc0\x60\x00\x30\x00'\ b'\x38\x00\x0f\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x0c\x00\x0c\x00'\ b'\x1e\x00\x1e\x00\x1e\x00\x3f\x00\x33\x00\x33\x00\x33\x00\x73\x80'\ b'\x7f\x80\x7f\x80\x61\x80\xc0\xc0\xc0\xc0\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\xfe\x00\xff\x00\xc3\x80\xc1\x80'\ b'\xc1\x80\xc3\x80\xff\x00\xff\x00\xc1\x80\xc0\xc0\xc0\xc0\xc0\xc0'\ b'\xc1\xc0\xff\x80\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x0f\x80\x3f\xc0\x70\x40\x60\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\x60\x00\x70\x40\x3f\xc0'\ b'\x0f\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\xfc\x00\xff\x00\xc3\x80\xc1\x80\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0'\ b'\xc0\xc0\xc0\xc0\xc0\xc0\xc1\x80\xc3\x80\xff\x00\xfc\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\xff\xc0\xff\xc0'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xff\xc0\xff\xc0\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xff\xc0\xff\xc0\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\xff\xc0\xff\xc0\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xff\x80\xff\x80\xc0\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x1f\x00\x3f\x80\x70\x80\x60\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc3\xc0\xc3\xc0\xc0\xc0\xc0\xc0\x60\xc0\x70\xc0\x3f\xc0'\ b'\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xff\xc0\xff\xc0'\ b'\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\xff\x00\xff\x00'\ b'\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00'\ b'\x18\x00\x18\x00\x18\x00\xff\x00\xff\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\x3f\x00\x3f\x00\x03\x00\x03\x00'\ b'\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00'\ b'\x87\x00\xfe\x00\x7c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\xc0\xc0\xc1\x80\xc3\x00\xc6\x00\xcc\x00\xd8\x00'\ b'\xf8\x00\xfc\x00\xec\x00\xc6\x00\xc7\x00\xc3\x00\xc1\x80\xc1\xc0'\ b'\xc0\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xff\xc0\xff\xc0\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\xe1\xc0\xe1\xc0'\ b'\xe1\xc0\xf3\xc0\xd2\xc0\xd2\xc0\xde\xc0\xcc\xc0\xcc\xc0\xcc\xc0'\ b'\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\xe0\xc0\xe0\xc0\xf0\xc0\xf0\xc0'\ b'\xd8\xc0\xd8\xc0\xc8\xc0\xcc\xc0\xc4\xc0\xc6\xc0\xc6\xc0\xc3\xc0'\ b'\xc3\xc0\xc1\xc0\xc1\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x1e\x00\x7f\x80\x61\x80\xe1\xc0\xc0\xc0\xc0\xc0'\ b'\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xe1\xc0\x61\x80\x7f\x80'\ b'\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\xff\x00\xff\x80\xc1\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc1\xc0\xff\x80'\ b'\xff\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x1e\x00\x7f\x80'\ b'\x61\x80\xe1\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0'\ b'\xc0\xc0\xe1\xc0\x61\x80\x3f\x00\x1e\x00\x03\x00\x01\x80\x01\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\xff\x00\xff\x80\xc1\xc0\xc0\xc0'\ b'\xc0\xc0\xc1\xc0\xff\x80\xff\x00\xc3\x80\xc1\x80\xc1\xc0\xc0\xc0'\ b'\xc0\xe0\xc0\x60\xc0\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x3f\x00\x7f\x80\xe0\x80\xc0\x00\xc0\x00\xe0\x00'\ b'\x7c\x00\x3f\x00\x03\x80\x00\xc0\x00\xc0\x00\xc0\x81\xc0\xff\x80'\ b'\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\xff\xf0\xff\xf0\x06\x00\x06\x00\x06\x00\x06\x00\x06\x00\x06\x00'\ b'\x06\x00\x06\x00\x06\x00\x06\x00\x06\x00\x06\x00\x06\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\xc0\xc0\xc0\xc0'\ b'\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0\xc0'\ b'\xc0\xc0\xc0\xc0\xe1\xc0\x7f\x80\x3f\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\xc0\xc0\xc0\xc0\x61\x80\x61\x80'\ b'\x61\x80\x61\x80\x33\x00\x33\x00\x33\x00\x3f\x00\x1e\x00\x1e\x00'\ b'\x1e\x00\x0c\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\xc0\x30\xc0\x30\xc0\x30\x60\x60\x66\x60\x66\x60'\ b'\x6f\x60\x6f\x60\x69\x60\x69\x60\x39\xc0\x39\xc0\x39\xc0\x30\xc0'\ b'\x30\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\xe1\xc0\x61\x80\x73\x80\x33\x00\x1e\x00\x1e\x00\x0c\x00\x0c\x00'\ b'\x1e\x00\x1e\x00\x37\x00\x33\x00\x63\x80\x61\x80\xc1\xc0\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\xe0\x70\x60\x60'\ b'\x30\xc0\x30\xc0\x19\x80\x1f\x80\x0f\x00\x06\x00\x06\x00\x06\x00'\ b'\x06\x00\x06\x00\x06\x00\x06\x00\x06\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\xff\xc0\xff\xc0\x01\x80\x03\x80'\ b'\x03\x00\x06\x00\x0e\x00\x0c\x00\x1c\x00\x18\x00\x30\x00\x70\x00'\ b'\x60\x00\xff\xc0\xff\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\xf0\x00\xf0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xf0\x00\xf0\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\xc0\x00\x60\x00\x60\x00\x30\x00\x30\x00\x18\x00\x18\x00\x0c\x00'\ b'\x0c\x00\x06\x00\x06\x00\x03\x00\x03\x00\x01\x80\x01\x80\x00\xc0'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\xf0\x00\xf0\x00'\ b'\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00'\ b'\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\xf0\x00\xf0\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\x0e\x00\x1b\x00\x31\x80\x60\xc0'\ b'\xc0\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\xff\xf0\xff\xf0\x00\x00\x00\x00\x00\x00\x0c\x00\xc0\x00'\ b'\x60\x00\x30\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x3e\x00\x7f\x00\x43\x80\x01\x80\x3f\x80\x7f\x80'\ b'\xe1\x80\xc1\x80\xc3\x80\xff\x80\x3d\x80\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xde\x00\xff\x00\xe3\x00\xc1\x80\xc1\x80\xc1\x80\xc1\x80\xc1\x80'\ b'\xe3\x00\xff\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x7f\x00'\ b'\x61\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\x61\x00\x7f\x00'\ b'\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\x01\x80\x01\x80\x01\x80\x01\x80\x3d\x80\x7f\x80\x63\x80\xc1\x80'\ b'\xc1\x80\xc1\x80\xc1\x80\xc1\x80\x63\x80\x7f\x80\x3d\x80\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x1e\x00\x7f\x00\x63\x80\xc1\x80\xff\x80\xff\x80'\ b'\xc0\x00\xc0\x00\x60\x80\x7f\x80\x1f\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\x0f\x80\x1f\x80\x18\x00\x18\x00'\ b'\xff\x80\xff\x80\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00'\ b'\x18\x00\x18\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x80\x7f\x80'\ b'\x63\x80\xc1\x80\xc1\x80\xc1\x80\xc1\x80\xc1\x80\x63\x80\x7f\x80'\ b'\x3d\x80\x01\x80\x43\x80\x7f\x00\x3e\x00\x00\x00\x0c\x00\x00\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xce\x00\xff\x00\xe3\x80\xc1\x80'\ b'\xc1\x80\xc1\x80\xc1\x80\xc1\x80\xc1\x80\xc1\x80\xc1\x80\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x0c\x00\x0c\x00'\ b'\x00\x00\x00\x00\x7c\x00\x7c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00'\ b'\x0c\x00\x0c\x00\x0c\x00\xff\xc0\xff\xc0\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\x0c\x00\x0c\x00\x00\x00\x00\x00'\ b'\x7c\x00\x7c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00'\ b'\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\xf8\x00\xf0\x00\x00\x00'\ b'\x0c\x00\x00\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc3\x80\xc7\x00'\ b'\xce\x00\xdc\x00\xf8\x00\xf8\x00\xec\x00\xce\x00\xc6\x00\xc3\x00'\ b'\xc3\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\xfc\x00\xfc\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0c\x00'\ b'\x0c\x00\x0c\x00\x0c\x00\x0c\x00\x0e\x00\x07\xc0\x03\xc0\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\xdb\x80\xff\xc0\xcc\xc0\xcc\xc0\xcc\xc0\xcc\xc0'\ b'\xcc\xc0\xcc\xc0\xcc\xc0\xcc\xc0\xcc\xc0\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\xce\x00\xff\x00\xe3\x80\xc1\x80\xc1\x80\xc1\x80\xc1\x80\xc1\x80'\ b'\xc1\x80\xc1\x80\xc1\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x7f\x00'\ b'\x63\x00\xc1\x80\xc1\x80\xc1\x80\xc1\x80\xc1\x80\x63\x00\x7f\x00'\ b'\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\xff\x00\xe3\x00\xc1\x80'\ b'\xc1\x80\xc1\x80\xc1\x80\xc1\x80\xe3\x00\xff\x00\xde\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x3d\x80\x7f\x80\x63\x80\xc1\x80\xc1\x80\xc1\x80'\ b'\xc1\x80\xc1\x80\x63\x80\x7f\x80\x3d\x80\x01\x80\x01\x80\x01\x80'\ b'\x01\x80\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\xce\x00\xdf\x00\xf1\x00\xe0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x00\x7f\x80'\ b'\xc0\x80\xc0\x00\xfe\x00\x3f\x00\x03\x80\x01\x80\x83\x80\xff\x00'\ b'\x7e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\x00\x00\x18\x00\x18\x00\x18\x00\xff\x80\xff\x80\x18\x00\x18\x00'\ b'\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x1f\x80\x0f\x80\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\xc1\x80\xc1\x80\xc1\x80\xc1\x80\xc1\x80\xc1\x80'\ b'\xc1\x80\xc1\x80\xe3\x80\x7f\x80\x39\x80\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\xc1\x80\xe3\x80\x63\x00\x63\x00\x77\x00\x36\x00\x36\x00\x36\x00'\ b'\x1c\x00\x1c\x00\x1c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\x30\xc0\x30'\ b'\x60\x60\x66\x60\x66\x60\x66\x60\x3f\xc0\x39\xc0\x39\xc0\x39\xc0'\ b'\x30\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\xe3\x80\x63\x00\x36\x00\x3e\x00'\ b'\x1c\x00\x1c\x00\x1c\x00\x3e\x00\x36\x00\x63\x00\xe3\x80\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\xc1\x80\x63\x00\x63\x00\x63\x00\x36\x00\x36\x00'\ b'\x3e\x00\x1c\x00\x1c\x00\x0c\x00\x18\x00\x18\x00\x18\x00\x70\x00'\ b'\x70\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\xff\x80\xff\x80\x07\x00\x06\x00\x0e\x00\x1c\x00\x38\x00\x30\x00'\ b'\x60\x00\xff\x80\xff\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x0c\x00\x00\x00\x0f\x00\x1f\x00\x18\x00\x18\x00\x18\x00\x18\x00'\ b'\x18\x00\x18\x00\xf0\x00\xf0\x00\x38\x00\x18\x00\x18\x00\x18\x00'\ b'\x18\x00\x18\x00\x1f\x00\x0f\x00\x00\x00\x00\x00\x0c\x00\x00\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00\xc0\x00'\ b'\xc0\x00\xc0\x00\xc0\x00\xc0\x00\x0c\x00\x00\x00\xf0\x00\xf8\x00'\ b'\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x0f\x00\x0f\x00'\ b'\x1c\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\xf8\x00\xf0\x00'\ b'\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x78\x40\xff\xc0\x87\x80\x00\x00\x00\x00'\ b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\ _index =\ b'\x00\x00\x2c\x00\x2c\x00\x58\x00\x58\x00\x84\x00\x84\x00\xb0\x00'\ b'\xb0\x00\xdc\x00\xdc\x00\x08\x01\x08\x01\x34\x01\x34\x01\x60\x01'\ b'\x60\x01\x8c\x01\x8c\x01\xb8\x01\xb8\x01\xe4\x01\xe4\x01\x10\x02'\ b'\x10\x02\x3c\x02\x3c\x02\x68\x02\x68\x02\x94\x02\x94\x02\xc0\x02'\ b'\xc0\x02\xec\x02\xec\x02\x18\x03\x18\x03\x44\x03\x44\x03\x70\x03'\ b'\x70\x03\x9c\x03\x9c\x03\xc8\x03\xc8\x03\xf4\x03\xf4\x03\x20\x04'\ b'\x20\x04\x4c\x04\x4c\x04\x78\x04\x78\x04\xa4\x04\xa4\x04\xd0\x04'\ b'\xd0\x04\xfc\x04\xfc\x04\x28\x05\x28\x05\x54\x05\x54\x05\x80\x05'\ b'\x80\x05\xac\x05\xac\x05\xd8\x05\xd8\x05\x04\x06\x04\x06\x30\x06'\ b'\x30\x06\x5c\x06\x5c\x06\x88\x06\x88\x06\xb4\x06\xb4\x06\xe0\x06'\ b'\xe0\x06\x0c\x07\x0c\x07\x38\x07\x38\x07\x64\x07\x64\x07\x90\x07'\ b'\x90\x07\xbc\x07\xbc\x07\xe8\x07\xe8\x07\x14\x08\x14\x08\x40\x08'\ b'\x40\x08\x6c\x08\x6c\x08\x98\x08\x98\x08\xc4\x08\xc4\x08\xf0\x08'\ b'\xf0\x08\x1c\x09\x1c\x09\x48\x09\x48\x09\x74\x09\x74\x09\xa0\x09'\ b'\xa0\x09\xcc\x09\xcc\x09\xf8\x09\xf8\x09\x24\x0a\x24\x0a\x50\x0a'\ b'\x50\x0a\x7c\x0a\x7c\x0a\xa8\x0a\xa8\x0a\xd4\x0a\xd4\x0a\x00\x0b'\ b'\x00\x0b\x2c\x0b\x2c\x0b\x58\x0b\x58\x0b\x84\x0b\x84\x0b\xb0\x0b'\ b'\xb0\x0b\xdc\x0b\xdc\x0b\x08\x0c\x08\x0c\x34\x0c\x34\x0c\x60\x0c'\ b'\x60\x0c\x8c\x0c\x8c\x0c\xb8\x0c\xb8\x0c\xe4\x0c\xe4\x0c\x10\x0d'\ b'\x10\x0d\x3c\x0d\x3c\x0d\x68\x0d\x68\x0d\x94\x0d\x94\x0d\xc0\x0d'\ b'\xc0\x0d\xec\x0d\xec\x0d\x18\x0e\x18\x0e\x44\x0e\x44\x0e\x70\x0e'\ b'\x70\x0e\x9c\x0e\x9c\x0e\xc8\x0e\xc8\x0e\xf4\x0e\xf4\x0e\x20\x0f'\ b'\x20\x0f\x4c\x0f\x4c\x0f\x78\x0f\x78\x0f\xa4\x0f\xa4\x0f\xd0\x0f'\ b'\xd0\x0f\xfc\x0f\xfc\x0f\x28\x10\x28\x10\x54\x10\x54\x10\x80\x10'\ _mvfont = memoryview(_font) def get_ch(ch): ordch = ord(ch) ordch = ordch + 1 if ordch >= 32 and ordch <= 126 else 63 idx_offs = 4 * (ordch - 32) offset = int.from_bytes(_index[idx_offs : idx_offs + 2], 'little') next_offs = int.from_bytes(_index[idx_offs + 2 : idx_offs + 4], 'little') width = int.from_bytes(_font[offset:offset + 2], 'little') return _mvfont[offset + 2:next_offs], 21, width
# CPU: 0.42 s ids = set() for _ in range(int(input())): ids.add(int(input())) m = 1 while True: reduced_ids = set() for id_ in ids: reduced_id = id_ % m if reduced_id not in reduced_ids: reduced_ids.add(reduced_id) else: break else: break m += 1 print(m)
""" |-------------------------------------------| | Problem 2: Write a program to convert | | temperature in Celsius to Fahrenheit | | & vice versa | |-------------------------------------------| | Approach: | | We use the formula | |-------------------------------------------| """ temp = float(input("Enter Value: \n")) convert = input("Convert to Celsius or Farenheit?[c/f]\n") while True: if convert=='c': res = (temp - 32)/1.8 print(f"Temperature in Celsius is {res}") break elif convert=='f': res = temp*1.8 + 32 print(f"Temerature in Farhenheit is {res}") break else: convert = input("Convert to Celsius or Farenheit?[c/s]\n")
_item_fullname_='mdtraj.Topology' def is_mdtraj_Topology(item): item_fullname = item.__class__.__module__+'.'+item.__class__.__name__ return _item_fullname_==item_fullname
# -*- coding: utf-8 -*- # author: @RShirohara __version__ = "0.1.1" __doc__ = f""" tegaki v{__version__} Released under MIT License. https://github.com/RShirohara/handwriting_detection """
# Find the Runner-Up Score or Finding second largest number n = int(input()) arr = list(map(int, input().split())) l = max(arr) for i in range(n): if l == max(arr): arr.remove(max(arr)) print(max(arr))
class Solution: def findMedianSortedArrays(self, A: List[int], B: List[int]) -> float: def helper(A, B, k): if not A or not B: return (A or B)[k] else: ia, ib = len(A) // 2, len(B) // 2 ma, mb = A[ia], B[ib] if k > ia + ib: if ma > mb: return helper(A, B[ib + 1:], k - ib - 1) else: return helper(A[ia + 1:], B, k - ia - 1) else: # k <= ia + ib if ma > mb: return helper(A[:ia], B, k) else: return helper(A, B[:ib], k) n = len(A) + len(B) return helper(A, B, n // 2) if n % 2 == 1 else 0.5 * (helper(A, B, n // 2) + helper(A, B, n // 2 - 1))
""" Profile ../profile-datasets-py/div83/068.py file automaticaly created by prof_gen.py script """ self["ID"] = "../profile-datasets-py/div83/068.py" self["Q"] = numpy.array([ 2.83917200e+00, 3.51202800e+00, 4.81389700e+00, 6.13220200e+00, 6.51049800e+00, 6.51553800e+00, 6.51433800e+00, 6.36887900e+00, 6.11776300e+00, 6.07725300e+00, 6.09747300e+00, 5.89972500e+00, 5.63936800e+00, 5.44764000e+00, 5.34244100e+00, 5.25993200e+00, 5.16057300e+00, 4.93623600e+00, 4.63531900e+00, 4.35583100e+00, 4.24083200e+00, 4.18761200e+00, 4.04251400e+00, 3.88061500e+00, 3.74372600e+00, 3.64085700e+00, 3.53838700e+00, 3.45565800e+00, 3.40336800e+00, 3.37244900e+00, 3.34653900e+00, 3.32609900e+00, 3.31645900e+00, 3.30325900e+00, 3.27436900e+00, 3.21342000e+00, 3.10746000e+00, 2.97287100e+00, 2.86528200e+00, 2.82437200e+00, 2.80918200e+00, 2.79467200e+00, 2.80076200e+00, 2.83083200e+00, 2.87118200e+00, 2.89056200e+00, 2.86427200e+00, 2.82879200e+00, 2.86370200e+00, 3.06780100e+00, 3.95390400e+00, 7.87887800e+00, 1.55205600e+01, 1.90239400e+01, 1.88922400e+01, 2.18096200e+01, 2.77914300e+01, 3.74064000e+01, 5.26037300e+01, 7.55059000e+01, 1.04178100e+02, 1.39575500e+02, 1.82327800e+02, 2.37126800e+02, 3.05937400e+02, 3.97443000e+02, 5.10567200e+02, 6.38887600e+02, 7.48984600e+02, 8.48716100e+02, 9.50317000e+02, 1.06430600e+03, 1.18027500e+03, 1.35344600e+03, 1.54426200e+03, 1.74381400e+03, 1.94415300e+03, 2.12352100e+03, 2.25544100e+03, 2.33300400e+03, 2.39130800e+03, 2.43047800e+03, 2.45452100e+03, 2.47839200e+03, 2.54069800e+03, 2.70493300e+03, 3.07519400e+03, 3.49218200e+03, 3.76550700e+03, 3.88983000e+03, 4.00411300e+03, 4.37495600e+03, 4.24459700e+03, 4.11985700e+03, 4.00045200e+03, 3.88609900e+03, 3.77651400e+03, 3.67145100e+03, 3.57068500e+03, 3.47397900e+03, 3.38113900e+03]) self["P"] = numpy.array([ 5.00000000e-03, 1.61000000e-02, 3.84000000e-02, 7.69000000e-02, 1.37000000e-01, 2.24400000e-01, 3.45400000e-01, 5.06400000e-01, 7.14000000e-01, 9.75300000e-01, 1.29720000e+00, 1.68720000e+00, 2.15260000e+00, 2.70090000e+00, 3.33980000e+00, 4.07700000e+00, 4.92040000e+00, 5.87760000e+00, 6.95670000e+00, 8.16550000e+00, 9.51190000e+00, 1.10038000e+01, 1.26492000e+01, 1.44559000e+01, 1.64318000e+01, 1.85847000e+01, 2.09224000e+01, 2.34526000e+01, 2.61829000e+01, 2.91210000e+01, 3.22744000e+01, 3.56505000e+01, 3.92566000e+01, 4.31001000e+01, 4.71882000e+01, 5.15278000e+01, 5.61260000e+01, 6.09895000e+01, 6.61253000e+01, 7.15398000e+01, 7.72396000e+01, 8.32310000e+01, 8.95204000e+01, 9.61138000e+01, 1.03017000e+02, 1.10237000e+02, 1.17778000e+02, 1.25646000e+02, 1.33846000e+02, 1.42385000e+02, 1.51266000e+02, 1.60496000e+02, 1.70078000e+02, 1.80018000e+02, 1.90320000e+02, 2.00989000e+02, 2.12028000e+02, 2.23442000e+02, 2.35234000e+02, 2.47408000e+02, 2.59969000e+02, 2.72919000e+02, 2.86262000e+02, 3.00000000e+02, 3.14137000e+02, 3.28675000e+02, 3.43618000e+02, 3.58966000e+02, 3.74724000e+02, 3.90893000e+02, 4.07474000e+02, 4.24470000e+02, 4.41882000e+02, 4.59712000e+02, 4.77961000e+02, 4.96630000e+02, 5.15720000e+02, 5.35232000e+02, 5.55167000e+02, 5.75525000e+02, 5.96306000e+02, 6.17511000e+02, 6.39140000e+02, 6.61192000e+02, 6.83667000e+02, 7.06565000e+02, 7.29886000e+02, 7.53628000e+02, 7.77790000e+02, 8.02371000e+02, 8.27371000e+02, 8.52788000e+02, 8.78620000e+02, 9.04866000e+02, 9.31524000e+02, 9.58591000e+02, 9.86067000e+02, 1.01395000e+03, 1.04223000e+03, 1.07092000e+03, 1.10000000e+03]) self["CO2"] = numpy.array([ 372.2349, 372.2347, 372.2342, 372.2327, 372.2326, 372.2316, 372.2276, 372.2156, 372.2037, 372.1897, 372.1777, 372.1798, 372.2129, 372.261 , 372.325 , 372.441 , 372.5981, 372.7572, 372.8973, 373.0134, 373.1094, 373.2344, 373.3675, 373.4756, 373.5466, 373.5936, 373.5957, 373.5937, 373.5947, 373.5987, 373.6277, 373.6598, 373.7048, 373.7528, 373.9088, 374.1228, 374.4018, 374.8119, 375.2459, 375.5909, 375.9419, 376.4129, 377.0279, 377.6649, 378.0599, 378.4729, 378.7349, 378.8939, 379.0839, 379.3698, 379.6675, 379.874 , 380.0751, 380.2328, 380.3678, 380.4527, 380.4704, 380.4728, 380.444 , 380.4153, 380.3934, 380.3729, 380.3586, 380.3498, 380.3516, 380.3548, 380.3607, 380.3638, 380.3759, 380.3709, 380.3592, 380.3238, 380.2776, 380.2007, 380.0891, 379.9503, 379.7762, 379.5922, 379.4393, 379.324 , 379.236 , 379.1762, 379.1381, 379.1141, 379.0764, 379.006 , 378.963 , 378.8872, 378.849 , 378.8496, 378.836 , 378.7049, 378.7545, 378.8019, 378.8474, 378.8908, 378.9325, 378.9725, 379.0108, 379.0476, 379.0829]) self["CO"] = numpy.array([ 0.00168947, 0.00183774, 0.00217615, 0.00291352, 0.0045946 , 0.00891127, 0.01614969, 0.02064477, 0.03142571, 0.03814567, 0.03709217, 0.03104132, 0.02249217, 0.01513562, 0.01176164, 0.01038065, 0.00926295, 0.0084933 , 0.00804826, 0.00783803, 0.00768839, 0.00766614, 0.00770648, 0.00779106, 0.00786262, 0.00792719, 0.00787206, 0.00779876, 0.00773059, 0.00766293, 0.00765154, 0.00763937, 0.00765183, 0.00766616, 0.0079336 , 0.00835071, 0.00895563, 0.00997767, 0.01118377, 0.01202327, 0.01290886, 0.01409326, 0.01569006, 0.01755085, 0.01942894, 0.02160834, 0.02301013, 0.02379293, 0.02480563, 0.02655372, 0.02850289, 0.03047176, 0.03263249, 0.03410195, 0.03512794, 0.03592982, 0.03640229, 0.03670973, 0.03664597, 0.03652674, 0.03626982, 0.03603897, 0.03587906, 0.03577411, 0.03577005, 0.03582536, 0.03594644, 0.03610862, 0.03629659, 0.03648331, 0.03665953, 0.03676413, 0.03679612, 0.03675369, 0.03663164, 0.03647428, 0.03627314, 0.03606006, 0.03588458, 0.03577374, 0.03577305, 0.03587739, 0.03603134, 0.03616784, 0.03629236, 0.03654658, 0.03725588, 0.0391212 , 0.0452673 , 0.04731175, 0.04730632, 0.0472887 , 0.0472949 , 0.04730082, 0.04730649, 0.04731192, 0.04731713, 0.04732212, 0.0473269 , 0.0473315 , 0.04733591]) self["T"] = numpy.array([ 181.119, 189.807, 203.299, 216.001, 233.383, 250.703, 260.959, 264.472, 268.189, 270.974, 265.359, 251.51 , 242.145, 238.73 , 241.039, 247.478, 255.078, 255.608, 251.144, 244.124, 237.981, 232.086, 226.2 , 220.624, 216.32 , 214.849, 215.381, 214.692, 214.002, 214.038, 214.987, 216.292, 217.922, 219.722, 220.563, 219.438, 216.605, 213.545, 211.58 , 210.571, 209.831, 208.961, 208.249, 207.912, 208.062, 208.143, 208.021, 208.047, 208.47 , 208.671, 208.303, 207.158, 205.856, 204.983, 205.316, 206.85 , 208.899, 211.272, 214.161, 217.279, 220.17 , 222.893, 225.468, 228.058, 230.68 , 233.318, 235.958, 238.562, 241.06 , 243.737, 246.304, 248.588, 251.241, 253.417, 255.354, 257.274, 259.298, 261.172, 262.84 , 264.385, 265.869, 267.263, 268.669, 270.11 , 271.684, 273.44 , 275.4 , 277.598, 279.978, 282.474, 285.042, 286.606, 286.606, 286.606, 286.606, 286.606, 286.606, 286.606, 286.606, 286.606, 286.606]) self["N2O"] = numpy.array([ 0.01647995, 0.01043996, 0.00593997, 0.00337998, 0.00349998, 0.00339998, 0.00367998, 0.00353998, 0.00252998, 0.00365998, 0.00596996, 0.01195993, 0.02058988, 0.02991984, 0.03605981, 0.03480982, 0.03674981, 0.04510978, 0.05270976, 0.05773975, 0.06252973, 0.07593968, 0.09316962, 0.1096896 , 0.1367095 , 0.1641194 , 0.1905093 , 0.2142093 , 0.2365092 , 0.2580491 , 0.2750391 , 0.2765191 , 0.2779391 , 0.2793291 , 0.2796391 , 0.2807391 , 0.2817791 , 0.2844892 , 0.2876192 , 0.2905892 , 0.2940992 , 0.2975692 , 0.3009592 , 0.3042491 , 0.3073791 , 0.3103291 , 0.3130591 , 0.3155091 , 0.3176391 , 0.318509 , 0.3193187 , 0.3200275 , 0.320645 , 0.3211539 , 0.3215339 , 0.321783 , 0.3218611 , 0.321858 , 0.3218531 , 0.3218457 , 0.3218365 , 0.3218251 , 0.3218113 , 0.3217937 , 0.3217715 , 0.3217421 , 0.3217057 , 0.3216644 , 0.3216289 , 0.3215968 , 0.3215641 , 0.3215274 , 0.3214901 , 0.3214344 , 0.3213729 , 0.3213087 , 0.3212442 , 0.3211865 , 0.321144 , 0.3211191 , 0.3211003 , 0.3210877 , 0.32108 , 0.3210723 , 0.3210522 , 0.3209994 , 0.3208802 , 0.320746 , 0.320658 , 0.320618 , 0.3205812 , 0.3204618 , 0.3205038 , 0.3205439 , 0.3205824 , 0.3206192 , 0.3206545 , 0.3206883 , 0.3207207 , 0.3207518 , 0.3207817 ]) self["O3"] = numpy.array([ 0.1658245 , 0.1908913 , 0.2793447 , 0.5312297 , 0.8448715 , 1.114353 , 1.415621 , 1.790379 , 2.137557 , 2.487095 , 3.059991 , 4.094386 , 5.222051 , 6.119507 , 6.687124 , 7.004353 , 7.230303 , 7.633632 , 8.057623 , 8.329124 , 8.248045 , 8.004206 , 7.666299 , 7.137462 , 6.455076 , 5.803509 , 5.355151 , 4.876793 , 4.415675 , 4.031086 , 3.767057 , 3.601708 , 3.513288 , 3.450529 , 3.363689 , 3.17352 , 2.804741 , 2.301633 , 1.865745 , 1.608645 , 1.335586 , 1.051697 , 0.9360074 , 0.8462186 , 0.7259209 , 0.6034553 , 0.5163295 , 0.4515647 , 0.3699269 , 0.2872891 , 0.2317821 , 0.1866985 , 0.1428618 , 0.1005631 , 0.06805081, 0.05090839, 0.04516264, 0.04374906, 0.04308483, 0.04307455, 0.04363365, 0.04486514, 0.04641134, 0.04788024, 0.0490293 , 0.0498061 , 0.05028961, 0.05051651, 0.05058169, 0.05056165, 0.05046879, 0.05036344, 0.05057574, 0.05140443, 0.05249511, 0.05337356, 0.053493 , 0.05251934, 0.05069031, 0.04850058, 0.04619327, 0.0440795 , 0.04239698, 0.04094986, 0.03989528, 0.03949288, 0.03927674, 0.03893266, 0.03802288, 0.03558066, 0.03236698, 0.02650135, 0.02650482, 0.02650814, 0.02651132, 0.02651436, 0.02651728, 0.02652007, 0.02652276, 0.02652533, 0.0265278 ]) self["CH4"] = numpy.array([ 0.3914449, 0.2995939, 0.2313179, 0.1991328, 0.2333285, 0.2568503, 0.2881031, 0.31951 , 0.3578398, 0.3864427, 0.4515492, 0.5738466, 0.7355529, 0.8773242, 0.9849097, 1.018045 , 1.069254 , 1.159644 , 1.237034 , 1.254665 , 1.271465 , 1.310435 , 1.359175 , 1.405865 , 1.459685 , 1.512564 , 1.563454 , 1.597824 , 1.626094 , 1.636534 , 1.647734 , 1.659734 , 1.672554 , 1.678784 , 1.684784 , 1.690445 , 1.695655 , 1.700285 , 1.704325 , 1.708585 , 1.713075 , 1.717785 , 1.722735 , 1.736205 , 1.747485 , 1.759275 , 1.766705 , 1.771215 , 1.774725 , 1.774115 , 1.773483 , 1.773016 , 1.772542 , 1.773096 , 1.774266 , 1.775771 , 1.777681 , 1.779273 , 1.780236 , 1.780726 , 1.780135 , 1.779352 , 1.778196 , 1.777138 , 1.776236 , 1.775394 , 1.774593 , 1.773776 , 1.773001 , 1.772225 , 1.771445 , 1.770673 , 1.769829 , 1.768853 , 1.767786 , 1.766674 , 1.765541 , 1.764455 , 1.763454 , 1.762528 , 1.761637 , 1.76091 , 1.760418 , 1.760007 , 1.759478 , 1.75885 , 1.763101 , 1.76648 , 1.769283 , 1.771472 , 1.772743 , 1.772591 , 1.772823 , 1.773045 , 1.773258 , 1.773461 , 1.773656 , 1.773843 , 1.774023 , 1.774195 , 1.77436 ]) self["CTP"] = 500.0 self["CFRACTION"] = 0.0 self["IDG"] = 0 self["ISH"] = 0 self["ELEVATION"] = 0.0 self["S2M"]["T"] = 286.606 self["S2M"]["Q"] = 3381.13911363 self["S2M"]["O"] = 0.0265278015153 self["S2M"]["P"] = 839.59509 self["S2M"]["U"] = 0.0 self["S2M"]["V"] = 0.0 self["S2M"]["WFETC"] = 100000.0 self["SKIN"]["SURFTYPE"] = 0 self["SKIN"]["WATERTYPE"] = 1 self["SKIN"]["T"] = 286.606 self["SKIN"]["SALINITY"] = 35.0 self["SKIN"]["FOAM_FRACTION"] = 0.0 self["SKIN"]["FASTEM"] = numpy.array([ 3. , 5. , 15. , 0.1, 0.3]) self["ZENANGLE"] = 0.0 self["AZANGLE"] = 0.0 self["SUNZENANGLE"] = 0.0 self["SUNAZANGLE"] = 0.0 self["LATITUDE"] = -35.415 self["GAS_UNITS"] = 2 self["BE"] = 0.0 self["COSBK"] = 0.0 self["DATE"] = numpy.array([2006, 8, 10]) self["TIME"] = numpy.array([0, 0, 0])
"""Apparently you can't monkey-patch Curses windows, so we've got to have this stupid module instead.""" def movedown(window, rows=1, x=None): current_y, current_x = window.getyx() window.move(current_y+rows, x if x is not None else current_x) def movex(window, new_x): current_y = window.getyx()[0] window.move(current_y, new_x)
def translate(message): """ A dumb translator which does not actually translate anything. :param message: The message. :return: A translated message (dummy: actually, the same message). """ return message
while True: try: l = int(input()) except EOFError: break lesmas = map(int, input().split()) maior = max(lesmas) if maior < 10: print(1) elif maior >= 10 and maior < 20: print(2) else: print(3)
# Module to flatten a list def flatten(array, flattened=[]): for value in array: if(isinstance(value, list)): flatten(value, flattened) else: flattened.append(value) return flattened
# input N, K = map(int, input().split()) # process ''' 1. 쪽지들을 오름차순으로 정렬했다고 가정. 2. i번 쪽지를 1번 쪽지 바로 왼쪽으로 옮기면 i-1개의 그렇고 그런 사이 탄생. 3. 항상 그렇고 그런 사이가 가장 많이 생기는 쪽지를 옮김(0<i<=N && i<=K+1 인 i 중 최대). 한 번 옮긴 쪽지 번호 이상의 쪽지 번호는 옮길 수 없음. (모순으로 증명 가능) 4. K := K - (i-1) ''' moved = [0 for _ in range(N+1)] left_1 = [] last = N while K > 0: move = min(last, K + 1) left_1.append(move) last = move - 1 moved[move] = 1 K -= last # output if left_1: for n in left_1: print(n, end=' ') for i in range(1, N+1): if moved[i] == 0: print(i, end=' ')
class ComicException(Exception): pass class PathResolutionException(ComicException): """ A path given to a COMIC template tag contained variables that could not be resolved """
# -*- coding: utf-8 -*- """ Apache2 License Notice Copyright 2018 Alex Barry Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ class Object3dInterface(object): def __init__(self, name, props, is_selected, location, erotation, scale, transform, parent, type): self._name = name self._properties = props self._is_selected = is_selected self._location = location self._erotation = erotation self._scale = scale self._transform = transform self._parent = parent self._type = type def get_type(self): return self._type def set_type(self, new_type): self._type = new_type def get_parent(self): return self._parent def set_parent(self, new_parent): self._parent = new_parent def get_name(self): return self._name def set_name(self, new_name): self._name = new_name def get_property(self, prop_name): return self._properties[prop_name] def set_property(self, prop_name, prop_val): self._properties[prop_name] = prop_val def set_selection(self, selection): self._is_selected = selection def selected(self): return self._is_selected def get_location_x(self): return self._location[0] def set_location_x(self, new_loc): self._location[0] = new_loc def get_location_y(self): return self._location[1] def set_location_y(self, new_loc): self._location[1] = new_loc def get_location_z(self): return self._location[2] def set_location_z(self, new_loc): self._location[2] = new_loc def get_erotation_x(self): return self._erotation[0] def set_erotation_x(self, new_rot): self._erotation[0] = new_rot def get_erotation_y(self): return self._erotation[1] def set_erotation_y(self, new_rot): self._erotation[1] = new_rot def get_erotation_z(self): return self._erotation[2] def set_erotation_z(self, new_rot): self._erotation[2] = new_rot def get_scale_x(self): return self._scale[0] def set_scale_x(self, new_scl): self._scale[0] = new_scl def get_scale_y(self): return self._scale[1] def set_scale_y(self, new_scl): self._scale[1] = new_scl def get_scale_z(self): return self._scale[2] def set_scale_z(self, new_scl): self._scale[2] = new_scl def set_transform(self, transform): self._transform = transform def get_transform(self): return self._transform class ObjectApiWrapper(object): get_active_object = None get_object_by_name = None delete_selected_objects = None iterate_over_all_objects = None add_live_object = None remove_live_object = None iterate_over_live_objects = None iterate_over_selected_objects = None
def se_come(tablero, n, i, j): for col in range(n): if tablero[i][col]: return True for fil in range(n): if tablero[fil][j]: return True for x in range(j): if tablero[i + j - x][x] or tablero[i - j + x][x]: return True for x in range(j + 1, n): if tablero[i + j - x][x] or tablero[i - j + x][x]: return True def es_compatible(tablero, n, sol): for x, y in sol: if se_come(tablero, n, x, y): return False return True def reinas(tablero, fila, n, sol): if fila == n: return es_compatible(tablero, n, sol) if not es_compatible(tablero, n, sol): return False for columna in range(n): tablero[fila][columna] = True sol.append((fila,columna)) if reinas(tablero, fila + 1, n, sol): return True else: sol.remove((fila,columna)) tablero[fila][columna] = False return True def generar_tablero(tamaño): tablero = {} for fila in range(tamaño): tablero[fila] = {} for columna in range(tamaño): tablero[fila][columna] = 0 return tablero
class BaseAgent(object): def __init__(self, config): self.device = config.device self.num_actions = config.action_dim self.observation_dim = config.observation_dim self.discount_factor = config.discount_factor self.grad_clip_val = config.grad_clip_val self.batch_size = config.batch_size self.iteration_counter = 0 def act(self, observation, under_evaluation=False): raise NotImplementedError def experience(self, observations, action, rewards, terminals, infos, next_observations): raise NotImplementedError def experience_in_evaluation(self, terminals, infos): raise NotImplementedError def save_agent(self, epoch, path): raise NotImplementedError def load_agent(self, path): raise NotImplementedError
inp = input("please enter the text") print("The original string : " + inp) res = [int(i) for i in inp.split() if i.isdigit()] # this basically makes a list of all the numbers for i in res: if len(str(i))==10: print("the phone number in the text is:" + str(i))
### Static Array Sequence Implementation # Static array has fixed size and can't grow or shrink. # Static array has a O(1) constant time for get_at and set_at operations. # Static array has a O(n) time for insert and delete operations at the back of the array. # Reference implementation: MIT Introduction to Algorithms # https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-spring-2020/lecture-notes/MIT6_006S20_r02.pdf class Array_Seq: def __init__(self): #O(1) self.A = [] self.size = 0 def __len__self(self): #O(1) return self.size def __iter__(self): #O(n) yield from self.A def build(self, X): #O(n), building a static array from iterable self.A = [a for a in X] self.size = len(X) def get_at(self, i): #O(1) return self.A[i] def set_at(self, i, x): #O(1) self.A[i] = x def _copy_forward(self, i, n, A, j): #O(n) for k in range(n): A[j + k] = self.A[i + k] def _copy_backward(self, i, n, A, j): #O(n) for k in range(n - 1, -1, -1): A[j + k] = self.A[i + k] def insert_at(self, i, x): #O(n) n = len(self) A = [None] * (n + 1) self._copy_forward(0, i, A, 0) A[i] = x self._copy_forward(i, n - i, A, i + 1) self.build(A) def delete_at(self, i): #O(n) n = len(self) A = [None] * (n - 1) self._copy_forward(0, i, A, 0) x = self.A[i] self._copy_forward(i + 1, n - i - 1, A, i) self.build(A) return x def insert_first(self, x): #O(n) self.insert_at(0, x) def delete_first(self): #O(n) return self.delete_at(0) def insert_last(self, x): #O(n) self.insert_at(len(self), x) def delete_last(self, x): #O(n) return self.delete_at(len(self) - 1) # Reference implementation: MIT Introduction to Algorithms #https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-006-introduction-to-algorithms-spring-2020/lecture-notes/MIT6_006S20_r02.pdf
""" Interpolation search is an improved variant of binary search. This search algorithm works on the probing position of the required value. For this algorithm to work properly, the data collection should be in a sorted form and equally distributed. Binary search has a huge advantage of time complexity over linear search. Linear search has worst-case complexity of Ο(n) whereas binary search has Ο(log n). Step 1 − Start searching data from middle of the list. Step 2 − If it is a match, return the index of the item, and exit. Step 3 − If it is not a match, probe position. Step 4 − Divide the list using probing formula and find the new midle. Step 5 − If data is greater than middle, search in higher sub-list. Step 6 − If data is smaller than middle, search in lower sub-list. Step 7 − Repeat until match. """ a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] d = {'0': '0', '1': '1', '2': '2', '3': '3', '4': '4', '5': '5', '6': '6', '7': '7', '8': '8', '9': '9', '10': 'A', '11': 'B', '12': 'C', '13': 'D', '14': 'E', '15': 'F'} x = 0 def maf_interpolation(array, value): """ In this algorithm, we want to find whether element x belongs to a set of numbers stored in an array numbers[]. Where l and r represent the left and right index of a sub-array in which searching operation should be performed. """ err = "Not Found" lo = 0 mid = -1 hi = len(array) - 1 while value != mid: if lo == hi or array[lo] == a[hi]: print("No Dice! Target NOT Found!") break mid = lo + ((hi - lo) // (array[hi] - array[lo])) * (value - array[lo]) if array[mid] == value: return print("Success, Found in Index: ", mid) break elif array[mid] < value: lo = mid + 1 elif a[mid] > value: hi = mid - 1 maf_interpolation(a, x)
# This sample tests the case where super() is used within a metaclass # __init__ method. class Metaclass(type): def __init__(self, name, bases, attrs): super().__init__(name, bases, attrs)
__author__ = 'studentmac' def make_negative( number ): if number >0: number *=-1 return number
# -*- coding: utf-8 -*- """ Solution to Project Euler problem 389 - Platonic Dice Author: Jaime Liew https://github.com/jaimeliew1/Project_Euler_Solutions An unbiased single 4-sided die is thrown and its value, T, is noted. T unbiased 6-sided dice are thrown and their scores are added together. The sum, C, is noted. C unbiased 8-sided dice are thrown and their scores are added together. The sum, O, is noted. O unbiased 12-sided dice are thrown and their scores are added together. The sum, D, is noted. D unbiased 20-sided dice are thrown and their scores are added together. The sum, I, is noted. Find the variance of I, and give your answer rounded to 4 decimal places. Used probability generating functions, and find a recursive solution analytically. let G_n(s) be the generating function for a dice of n sides. G_n(s) = 1/n*(s + s^1 + s^2 + ... s^n) By differentiating with respect to s, the mean, mu_n = G_n'(1) = (n+1)/2 an intermediate variable, G_n''(1)/mu_n = 2/3*(n-1) The generating function of a dice being rolled t times, where t is the sum of rolls of another dice is THE COMPOSITION of the individual generating functions. Let H_i be the composed generating function of the first i dice. so H_5 = G_4(G_6(G_8(G_12(G_20)))) let mu_i be the mean corresponding to H_i, and lambda_i be an intermediate variable. Find mu_5 and lambda_5 using the recursive relation: mu_i = (n+1)/2*mu_(i-1) lambda_i = 2/3*(n-1) + (n+1)/2*lambda_(i-1) (note the use of the intermediate variable) Then finally, the variance, var(H_5) is: var(H_5) = mu_5*(lambda_i + 1 - mu_5) It turns out the intermediate variable can be completely omitted by using Wald's equation, or more algebra. """ def run(): Lambda, Mu = 0, 1 for n in [4, 6, 8, 12, 20]: Lambda = 2/3*(n-1) + (n+1)/2*Lambda Mu *= (n+1)/2 variance = Mu*(Lambda + 1 - Mu) return f'{variance:2.4f}' if __name__ == "__main__": print(run())
{ "targets": [ { "target_name": "rsvg", "sources": [ "src/Rsvg.cc", "src/Enums.cc", "src/Autocrop.cc" ], "variables": { "packages": "librsvg-2.0 cairo-png cairo-pdf cairo-svg", "libraries": "<!(pkg-config --libs-only-l <(packages))", "ldflags": "<!(pkg-config --libs-only-L --libs-only-other <(packages))", "cflags": "<!(pkg-config --cflags <(packages))" }, "libraries": [ "<@(libraries)" ], "conditions": [ [ "OS=='linux'", { "cflags": [ "<@(cflags)" ], "ldflags": [ "<@(ldflags)" ] } ], [ "OS=='mac'", { "xcode_settings": { "OTHER_CFLAGS": [ "<@(cflags)" ], "OTHER_LDFLAGS": [ "<@(ldflags)" ] } } ] ] } ] }
#!/usr/bin/python class me: # initialization routine def __init__(self, foo): self.myvar = foo def getval(self): return self.myvar # this is an instance of the "me" class my = me("this") # my instantiation/assignment allows access to getval method x = my.getval() print(x)
# OpenWeatherMap API Key weather_api_key = "48ae7399e76d973a4b9ac9efe89908a3" # Google API Key g_key = "AIzaSyBrlKm1v_NyDl4nT9LOZWE5s_sQa2D5Hoc"
height=list(map(int,input().split())) height def trapped_water(h): n=len(h) total=0 for i in range(1,n-1): left=h[i] for j in range(i): left=max(h[j],left) right=h[i] for j in range(i+1,n): right=max(h[j],right) total+=min(left,right)-h[i] return total print(trapped_water(height))
a=((1, 1, 1, 1), # matrix A # (2, 4, 8, 16), (3, 9, 27, 81), (4, 16, 64, 256)) b=(( 4 , -3 , 4/3., -1/4. ), # matrix B # (-13/3., 19/4., -7/3., 11/24.), ( 3/2., -2. , 7/6., -1/4. ), ( -1/6., 1/4., -1/6., 1/24.)) def MatrixMul( mtx_a, mtx_b): tpos_b = list(zip( *mtx_b)) rtn = [[ sum( ea*eb for ea,eb in zip(a,b)) for b in tpos_b] for a in mtx_a] return rtn v = MatrixMul( a, b ) print('v = (') for r in v: print('[', end=' ') for val in r: print('%8.2f '%val, end=' ') print(']') print(')') u = MatrixMul(b,a) print('u = ') for r in u: print('[', end=' ') for val in r: print('%8.2f '%val, end=' ') print(']') print(')')
def cria_matriz(num_linhas, num_colunas): """ (int, int) -> matriz (lista de listas) cria e retorna uma matriz comnum_linhas linhas e num_colunas colunas em que cada elemento é digitado pelo usuário. """ matriz = [] # lista vazia for i in range(num_linhas): #cria a linha i linha =[] # lista vazia for j in range(num_colunas): valor = int(input('Digite o elemento [' + str(i) + '][' + str(j) + '] ')) linha.append(valor) # adiciona linha à matriz matriz.append(linha) return matriz def minha_matriz(): lin = int(input('Digite o número de linhas da matriz: ')) col = int(input('Digite o número de colunas da matriz: ')) return cria_matriz(lin, col) def imprime_matriz(matriz): linhas = len(matriz) colunas = len(matriz[0]) for i in range(linhas): for j in range(colunas): if(j == colunas - 1): print("%d" %matriz[i][j]) else: print("%d" %matriz[i][j],end=" ") print() '''def imprime_matriz(m): for li in m: for val in li: print(f'{val}')''' m = minha_matriz() #m = [[1],[2],[3]] imprime_matriz(m)
# # PySNMP MIB module HPN-ICF-WEB-AUTHENTICATION-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-WEB-AUTHENTICATION-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:42:05 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion") hpnicfCommon, = mibBuilder.importSymbols("HPN-ICF-OID-MIB", "hpnicfCommon") ifDescr, = mibBuilder.importSymbols("IF-MIB", "ifDescr") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") Gauge32, ObjectIdentity, ModuleIdentity, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, Bits, NotificationType, Counter64, Unsigned32, Integer32, IpAddress, MibIdentifier, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "ObjectIdentity", "ModuleIdentity", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "Bits", "NotificationType", "Counter64", "Unsigned32", "Integer32", "IpAddress", "MibIdentifier", "TimeTicks") MacAddress, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "MacAddress", "TextualConvention", "DisplayString") hpnicfWebAuthentication = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 93)) hpnicfWebAuthentication.setRevisions(('2008-06-25 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: hpnicfWebAuthentication.setRevisionsDescriptions(('The initial version of hpnicfWebAuthenticationMIB',)) if mibBuilder.loadTexts: hpnicfWebAuthentication.setLastUpdated('200806250000Z') if mibBuilder.loadTexts: hpnicfWebAuthentication.setOrganization('') if mibBuilder.loadTexts: hpnicfWebAuthentication.setContactInfo('') if mibBuilder.loadTexts: hpnicfWebAuthentication.setDescription('The MIB module is used for web authentication to send traps.') hpnicfWaTrapObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 93, 1)) hpnicfWaVlanID = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 93, 1, 1), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfWaVlanID.setStatus('current') if mibBuilder.loadTexts: hpnicfWaVlanID.setDescription('The Vlan ID associate with the port and the MAC address.') hpnicfWaReasonCode = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 93, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))).clone(namedValues=NamedValues(("globalNumberMax", 1), ("configNumberMax", 2), ("portNumberMax", 3), ("invalidUsername", 4), ("authFail", 5), ("setACLFail", 6), ("changeVlanFail", 7), ("other", 8), ("onlineOverTime", 9), ("noTransferData", 10), ("cutOperation", 11), ("portDisabled", 12), ("portDown", 13), ("userLogout", 14), ("vlanChanged", 15), ("vlanDelted", 16)))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfWaReasonCode.setStatus('current') if mibBuilder.loadTexts: hpnicfWaReasonCode.setDescription('The code indicates the reason for the action of this trap. globalNumberMax: The global number of connections is up to max. configNumberMax: The global number of connections is up to configured max value. portNumberMax: The interface number of connections is up to max. invalidUsername: The username or password is too long or username is empty. authFail: Wrong username or password. setACLFail: Failed to set ACL. changeVlanFail: Failed to set VLAN. other: Other reasons. onlineOverTime: The online time is over the max value. noTransferData: There was no data flow for the connection. cutOperation: There was a cut operation. portDisabled: Web authentication was disabled on interface. portDown: The interface turned down. userLogout: The client required to logout. vlanChanged: The interface VLAN value was changed. vlanDelted: The interface VLAN was deleted.') hpnicfWaActionCode = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 93, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfWaActionCode.setStatus('current') if mibBuilder.loadTexts: hpnicfWaActionCode.setDescription('The code indicates the system action. enabled: Web authentication turns enabled. disabled: Web authentication turns disabled.') hpnicfWaClientMacAddr = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 93, 1, 4), MacAddress()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hpnicfWaClientMacAddr.setStatus('current') if mibBuilder.loadTexts: hpnicfWaClientMacAddr.setDescription('The MAC address of the client.') hpnicfWaTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 93, 2)) hpnicfWaTrapPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 93, 2, 0)) hpnicfWaClientLogon = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 93, 2, 0, 1)).setObjects(("HPN-ICF-WEB-AUTHENTICATION-MIB", "hpnicfWaClientMacAddr"), ("IF-MIB", "ifDescr"), ("HPN-ICF-WEB-AUTHENTICATION-MIB", "hpnicfWaVlanID")) if mibBuilder.loadTexts: hpnicfWaClientLogon.setStatus('current') if mibBuilder.loadTexts: hpnicfWaClientLogon.setDescription('It is generated when a client succeeded to logon.') hpnicfWaClientLogonFail = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 93, 2, 0, 2)).setObjects(("HPN-ICF-WEB-AUTHENTICATION-MIB", "hpnicfWaClientMacAddr"), ("IF-MIB", "ifDescr"), ("HPN-ICF-WEB-AUTHENTICATION-MIB", "hpnicfWaVlanID"), ("HPN-ICF-WEB-AUTHENTICATION-MIB", "hpnicfWaReasonCode")) if mibBuilder.loadTexts: hpnicfWaClientLogonFail.setStatus('current') if mibBuilder.loadTexts: hpnicfWaClientLogonFail.setDescription('It is generated when a client failed to logon, the hpnicfWaReasonCode shows the failure reason.') hpnicfWaClientLogout = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 93, 2, 0, 3)).setObjects(("HPN-ICF-WEB-AUTHENTICATION-MIB", "hpnicfWaClientMacAddr"), ("IF-MIB", "ifDescr"), ("HPN-ICF-WEB-AUTHENTICATION-MIB", "hpnicfWaVlanID"), ("HPN-ICF-WEB-AUTHENTICATION-MIB", "hpnicfWaReasonCode")) if mibBuilder.loadTexts: hpnicfWaClientLogout.setStatus('current') if mibBuilder.loadTexts: hpnicfWaClientLogout.setDescription('It is generated when a client logout, the hpnicfWaReasonCode shows the logout reason.') hpnicfWaSysAction = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 93, 2, 0, 4)).setObjects(("HPN-ICF-WEB-AUTHENTICATION-MIB", "hpnicfWaActionCode")) if mibBuilder.loadTexts: hpnicfWaSysAction.setStatus('current') if mibBuilder.loadTexts: hpnicfWaSysAction.setDescription('It is generated when a system action was occurred, the hpnicfWaActionCode shows the action information.') mibBuilder.exportSymbols("HPN-ICF-WEB-AUTHENTICATION-MIB", hpnicfWaClientLogout=hpnicfWaClientLogout, hpnicfWaTrapPrefix=hpnicfWaTrapPrefix, hpnicfWaTrapObjects=hpnicfWaTrapObjects, hpnicfWaClientMacAddr=hpnicfWaClientMacAddr, PYSNMP_MODULE_ID=hpnicfWebAuthentication, hpnicfWaClientLogon=hpnicfWaClientLogon, hpnicfWaVlanID=hpnicfWaVlanID, hpnicfWaActionCode=hpnicfWaActionCode, hpnicfWebAuthentication=hpnicfWebAuthentication, hpnicfWaReasonCode=hpnicfWaReasonCode, hpnicfWaClientLogonFail=hpnicfWaClientLogonFail, hpnicfWaSysAction=hpnicfWaSysAction, hpnicfWaTrap=hpnicfWaTrap)
COLORS = { 'darkest_blue': '#111111', 'background_blue': '#0C172D', 'text_green': '#54F041', 'dev_purple': '#ab52c5', 'loc_pink': '#f6c6fa', 'great_depression_red': '#C90705', 'walter_white': '#FFFFFF' }
class Order: Clayful = None name = 'Order' path = 'orders' @staticmethod def config(clayful): Order.Clayful = clayful return Order @staticmethod def accept_refund(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'accept_refund', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/refunds/{refundId}/accepted', 'params': ('orderId', 'refundId', ), 'without_payload': True, 'args': args }) @staticmethod def authenticate(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'authenticate', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/auth', 'params': ('orderId', ), 'args': args }) @staticmethod def cancel(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'cancel', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/cancellation', 'params': ('orderId', ), 'args': args }) @staticmethod def cancel_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'cancel_for_me', 'http_method': 'POST', 'path': '/v1/me/orders/{orderId}/cancellation', 'params': ('orderId', ), 'args': args }) @staticmethod def cancel_refund(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'cancel_refund', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/refunds/{refundId}/cancellation', 'params': ('orderId', 'refundId', ), 'args': args }) @staticmethod def cancel_refund_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'cancel_refund_for_me', 'http_method': 'POST', 'path': '/v1/me/orders/{orderId}/refunds/{refundId}/cancellation', 'params': ('orderId', 'refundId', ), 'args': args }) @staticmethod def check_ticket(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'check_ticket', 'http_method': 'POST', 'path': '/v1/orders/tickets/{code}/validity', 'params': ('code', ), 'args': args }) @staticmethod def count(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'count', 'http_method': 'GET', 'path': '/v1/orders/count', 'params': (), 'args': args }) @staticmethod def count_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'count_for_me', 'http_method': 'GET', 'path': '/v1/me/orders/count', 'params': (), 'args': args }) @staticmethod def create_download_url(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'create_download_url', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/items/{itemId}/download/url', 'params': ('orderId', 'itemId', ), 'without_payload': True, 'args': args }) @staticmethod def create_download_url_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'create_download_url_for_me', 'http_method': 'POST', 'path': '/v1/me/orders/{orderId}/items/{itemId}/download/url', 'params': ('orderId', 'itemId', ), 'without_payload': True, 'args': args }) @staticmethod def create_fulfillment(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'create_fulfillment', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/fulfillments', 'params': ('orderId', ), 'args': args }) @staticmethod def delete(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'delete', 'http_method': 'DELETE', 'path': '/v1/orders/{orderId}', 'params': ('orderId', ), 'args': args }) @staticmethod def delete_fulfillment(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'delete_fulfillment', 'http_method': 'DELETE', 'path': '/v1/orders/{orderId}/fulfillments/{fulfillmentId}', 'params': ('orderId', 'fulfillmentId', ), 'args': args }) @staticmethod def delete_inventory_operation(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'delete_inventory_operation', 'http_method': 'DELETE', 'path': '/v1/orders/{orderId}/inventory/operations/{operationId}', 'params': ('orderId', 'operationId', ), 'args': args }) @staticmethod def delete_metafield(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'delete_metafield', 'http_method': 'DELETE', 'path': '/v1/orders/{orderId}/meta/{field}', 'params': ('orderId', 'field', ), 'args': args }) @staticmethod def delete_refund(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'delete_refund', 'http_method': 'DELETE', 'path': '/v1/orders/{orderId}/refunds/{refundId}', 'params': ('orderId', 'refundId', ), 'args': args }) @staticmethod def get(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'get', 'http_method': 'GET', 'path': '/v1/orders/{orderId}', 'params': ('orderId', ), 'args': args }) @staticmethod def get_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'get_for_me', 'http_method': 'GET', 'path': '/v1/me/orders/{orderId}', 'params': ('orderId', ), 'args': args }) @staticmethod def increase_metafield(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'increase_metafield', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/meta/{field}/inc', 'params': ('orderId', 'field', ), 'args': args }) @staticmethod def list(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'list', 'http_method': 'GET', 'path': '/v1/orders', 'params': (), 'args': args }) @staticmethod def list_by_subscription(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'list_by_subscription', 'http_method': 'GET', 'path': '/v1/subscriptions/{subscriptionId}/orders', 'params': ('subscriptionId', ), 'args': args }) @staticmethod def list_by_subscription_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'list_by_subscription_for_me', 'http_method': 'GET', 'path': '/v1/me/subscriptions/{subscriptionId}/orders', 'params': ('subscriptionId', ), 'args': args }) @staticmethod def list_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'list_for_me', 'http_method': 'GET', 'path': '/v1/me/orders', 'params': (), 'args': args }) @staticmethod def list_inventory_operations(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'list_inventory_operations', 'http_method': 'GET', 'path': '/v1/orders/{orderId}/inventory/operations', 'params': ('orderId', ), 'args': args }) @staticmethod def mark_as_done(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'mark_as_done', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/done', 'params': ('orderId', ), 'without_payload': True, 'args': args }) @staticmethod def mark_as_not_received(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'mark_as_not_received', 'http_method': 'DELETE', 'path': '/v1/orders/{orderId}/received', 'params': ('orderId', ), 'args': args }) @staticmethod def mark_as_not_received_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'mark_as_not_received_for_me', 'http_method': 'DELETE', 'path': '/v1/me/orders/{orderId}/received', 'params': ('orderId', ), 'args': args }) @staticmethod def mark_as_received(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'mark_as_received', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/received', 'params': ('orderId', ), 'without_payload': True, 'args': args }) @staticmethod def mark_as_received_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'mark_as_received_for_me', 'http_method': 'POST', 'path': '/v1/me/orders/{orderId}/received', 'params': ('orderId', ), 'without_payload': True, 'args': args }) @staticmethod def mark_as_undone(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'mark_as_undone', 'http_method': 'DELETE', 'path': '/v1/orders/{orderId}/done', 'params': ('orderId', ), 'args': args }) @staticmethod def pull_from_metafield(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'pull_from_metafield', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/meta/{field}/pull', 'params': ('orderId', 'field', ), 'args': args }) @staticmethod def push_to_metafield(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'push_to_metafield', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/meta/{field}/push', 'params': ('orderId', 'field', ), 'args': args }) @staticmethod def register_payment_method(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'register_payment_method', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/transactions/payments/methods', 'params': ('orderId', ), 'args': args }) @staticmethod def request_refund(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'request_refund', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/refunds', 'params': ('orderId', ), 'args': args }) @staticmethod def request_refund_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'request_refund_for_me', 'http_method': 'POST', 'path': '/v1/me/orders/{orderId}/refunds', 'params': ('orderId', ), 'args': args }) @staticmethod def restock_all_refund_items(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'restock_all_refund_items', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/refunds/{refundId}/restock/all', 'params': ('orderId', 'refundId', ), 'without_payload': True, 'args': args }) @staticmethod def restock_refund_items(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'restock_refund_items', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/refunds/{refundId}/restock', 'params': ('orderId', 'refundId', ), 'args': args }) @staticmethod def sync_inventory(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'sync_inventory', 'http_method': 'POST', 'path': '/v1/orders/{orderId}/synced', 'params': ('orderId', ), 'without_payload': True, 'args': args }) @staticmethod def unaccept_refund(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'unaccept_refund', 'http_method': 'DELETE', 'path': '/v1/orders/{orderId}/refunds/{refundId}/accepted', 'params': ('orderId', 'refundId', ), 'args': args }) @staticmethod def unregister_payment_method(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'unregister_payment_method', 'http_method': 'DELETE', 'path': '/v1/orders/{orderId}/transactions/payments/methods/{paymentMethodId}', 'params': ('orderId', 'paymentMethodId', ), 'args': args }) @staticmethod def update(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'update', 'http_method': 'PUT', 'path': '/v1/orders/{orderId}', 'params': ('orderId', ), 'args': args }) @staticmethod def update_cancellation(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'update_cancellation', 'http_method': 'PUT', 'path': '/v1/orders/{orderId}/cancellation', 'params': ('orderId', ), 'args': args }) @staticmethod def update_cancellation_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'update_cancellation_for_me', 'http_method': 'PUT', 'path': '/v1/me/orders/{orderId}/cancellation', 'params': ('orderId', ), 'args': args }) @staticmethod def update_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'update_for_me', 'http_method': 'PUT', 'path': '/v1/me/orders/{orderId}', 'params': ('orderId', ), 'args': args }) @staticmethod def update_fulfillment(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'update_fulfillment', 'http_method': 'PUT', 'path': '/v1/orders/{orderId}/fulfillments/{fulfillmentId}', 'params': ('orderId', 'fulfillmentId', ), 'args': args }) @staticmethod def update_item(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'update_item', 'http_method': 'PUT', 'path': '/v1/orders/{orderId}/items/{itemId}', 'params': ('orderId', 'itemId', ), 'args': args }) @staticmethod def update_refund(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'update_refund', 'http_method': 'PUT', 'path': '/v1/orders/{orderId}/refunds/{refundId}', 'params': ('orderId', 'refundId', ), 'args': args }) @staticmethod def update_refund_cancellation(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'update_refund_cancellation', 'http_method': 'PUT', 'path': '/v1/orders/{orderId}/refunds/{refundId}/cancellation', 'params': ('orderId', 'refundId', ), 'args': args }) @staticmethod def update_refund_cancellation_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'update_refund_cancellation_for_me', 'http_method': 'PUT', 'path': '/v1/me/orders/{orderId}/refunds/{refundId}/cancellation', 'params': ('orderId', 'refundId', ), 'args': args }) @staticmethod def update_refund_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'update_refund_for_me', 'http_method': 'PUT', 'path': '/v1/me/orders/{orderId}/refunds/{refundId}', 'params': ('orderId', 'refundId', ), 'args': args }) @staticmethod def update_transactions(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'update_transactions', 'http_method': 'PUT', 'path': '/v1/orders/{orderId}/transactions', 'params': ('orderId', ), 'args': args }) @staticmethod def update_transactions_for_me(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'update_transactions_for_me', 'http_method': 'PUT', 'path': '/v1/me/orders/{orderId}/transactions', 'params': ('orderId', ), 'without_payload': True, 'args': args }) @staticmethod def use_ticket(*args): return Order.Clayful.call_api({ 'model_name': Order.name, 'method_name': 'use_ticket', 'http_method': 'POST', 'path': '/v1/orders/tickets/{code}/used', 'params': ('code', ), 'without_payload': True, 'args': args })
def neighboors(active, x, y, width, height): number = 0 for i in range(-1, 2): for j in range(-1, 2): #Skip the choosen block if 0 <= x+i < width and 0 <= y+j < height: if i == 0 and j == 0: pass elif active[x+i][y+j] == 1: number += 1 print(str(x+i) + ", " + str(y+j) + ": " + str(active[x+i][y+j])) return number tab = [ [1, 0, 0], [1, 0, 0], [1, 1, 1]] x, y = 1, 1 width, height = 3, 3 print(neighboors(tab, 0, 1, width, height))
''' --- Day 10: Balance botValues --- You come upon a factory in which many robots are zooming around handing small microchips to each other. Upon closer examination, you notice that each bot only proceeds when it has two microchips, and once it does, it gives each one to a different bot or puts it in a marked "output" bin. Sometimes, botValues take microchips from "input" bins, too. Inspecting one of the microchips, it seems like they each contain a single number; the botValues must use some logic to decide what to do with each chip. You access the local control computer and download the botValues' instructions (your puzzle input). Some of the instructions specify that a specific-valued microchip should be given to a specific bot; the rest of the instructions indicate what a given bot should do with its lower-value or higher-value chip. For example, consider the following instructions: value 5 goes to bot 2 bot 2 gives low to bot 1 and high to bot 0 value 3 goes to bot 1 bot 1 gives low to output 1 and high to bot 0 bot 0 gives low to output 2 and high to output 0 value 2 goes to bot 2 Initially, bot 1 starts with a value-3 chip, and bot 2 starts with a value-2 chip and a value-5 chip. Because bot 2 has two microchips, it gives its lower one (2) to bot 1 and its higher one (5) to bot 0. Then, bot 1 has two microchips; it puts the value-2 chip in output 1 and gives the value-3 chip to bot 0. Finally, bot 0 has two microchips; it puts the 3 in output 2 and the 5 in output 0. In the end, output bin 0 contains a value-5 microchip, output bin 1 contains a value-2 microchip, and output bin 2 contains a value-3 microchip. In this configuration, bot number 2 is responsible for comparing value-5 microchips with value-2 microchips. Based on your instructions, what is the number of the bot that is responsible for comparing value-61 microchips with value-17 microchips? input: str output: int ''' inFile = open("10.txt",'r') valFile = open("10.txt",'r') #inFile = open("10a.txt",'r') #valFile = open("10a.txt",'r') lChip = '17' hChip = '61' #lChip = 2 #hChip = 5 botValues = {} instructions = {} def activate(target,value): if target not in botValues: botValues[target] = [value] else: botValues[target].append(value) if len(botValues[target]) > 1: lowBot = instructions[target][0] highBot = instructions[target][1] lowVal, highVal = sorted(botValues[target],key=lambda x:int(x)) botValues[target] = [] if lowVal == lChip and highVal == hChip: print("Number of the bot which compares chips",highVal,"and",lowVal,"is:",target.split()[1]) activate(lowBot,lowVal) activate(highBot,highVal) for _ in inFile: inst = _.split() if inst[0] == "bot": active = " ".join([inst[0],inst[1]]) low = " ".join([inst[5],inst[6]]) high = " ".join([inst[10],inst[11]]) instructions[active] = [low,high] for _ in valFile: inst = _.split() if inst[0] == "value": value = inst[1] target = " ".join([inst[4],inst[5]]) activate(target,value)
#conjunto de cartas class Card: def __init__(self,suit,value): super().__init__() self.suit =suit self.value = value #reescribimos la salida al imprimir def __repr__(self): return " of ".join((self.value,self.suit))
#!/usr/bin/python filename = input("Please enter your file name: ") with open(filename, 'r') as f: lines = f.readlines() l = list(line.rstrip('\n') for line in lines) measurements_count = 0 while len(l) != 1: if l[0] < l[1]: measurements_count += 1 del(l[0]) else: print(f"There are {measurements_count} measurments larger than the previous measurment.")
class BasePlugin: name = None description = None package_name = None class ExportPlugin(BasePlugin): format_type = None def format(self): raise NotImplementedError() def help(self): return f"For help check the official documentation for '{self.package_name}' plugin."
def get_talker_candidates(predictions_prob, entities, cluster_map, inverse_cluster_map, return_prob=False): predictions_set = set() entity_prob_map = {} for prediction_prob, entity in zip(predictions_prob, entities): if prediction_prob[1] < 0.5: continue if cluster_map[entity] != -1: predictions_set = predictions_set.union(inverse_cluster_map[cluster_map[entity]]) if return_prob: for ent in inverse_cluster_map[cluster_map[entity]]: entity_prob_map[ent] = prediction_prob else: predictions_set.add(entity) if return_prob: for prediction_prob, entity in zip(predictions_prob, entities): if prediction_prob[1] < 0.5: continue if cluster_map[entity] == -1: entity_prob_map[entity] = prediction_prob if return_prob: return [(p, entity_prob_map[p]) for p in predictions_set] else: return list(predictions_set) def filter_candidates_by_heuristics(entities, entity_tags): """ Filter candidates based on following heuristics: - length between 4 - 30 - no blacklisted characters: - 's - . - - (and other variations) - said - only take Person entities """ filtered_entity = [] hyphens = [ "‐", "‑", "‒", "–", "—", "―" ] for entity in entities: char_length = len(entity) if char_length < 4 or char_length > 25: continue if "'s" in entity.lower(): continue if "." in entity.lower(): continue has_hyphen = False for hyphen in hyphens: if hyphen in entity: has_hyphen = True if has_hyphen: continue if "said" in entity.lower(): continue if "dot" in entity.lower(): continue if entity_tags[entity.lower()] != "I-PER": continue filtered_entity.append(entity) return filtered_entity def select_candidate(talker_candidates, entity_tags): filtered_condidates = filter_candidates_by_heuristics(talker_candidates, entity_tags) if filtered_condidates: return max(filtered_condidates, key=lambda x: len(x))
""" Module that defines the mappings for CSV rows, variable names in code and DHIS2 UIDs set_order: used to set certain Verbal Autopsy properties before others (dependants). needs to be an integer. csv_name: CSV column name if none => there is no column in the CSV for this property example: Age in Days dhis_uid: DHIS2 metadata Unique Identifier (UID) if none => we don't import it into DHIS2 example: Death Date (it's the Event date that we're using) options: mapping to DHIS2 optionSet.options """ class Mapping(object): """ Base class for Mappings""" @classmethod def properties(cls): """Return subclasses of Mapping class""" return cls.__subclasses__() @classmethod def set_order_range(cls): """Return a set of `set_order` for all sub classes""" return set([c.set_order for c in cls.__subclasses__()]) class Age(Mapping): set_order = 0 csv_name = 'age' code_name = 'age' dhis_uid = 'C2OT4YktNGX' class AgeCategory(Mapping): set_order = 0 csv_name = None code_name = 'age_category' dhis_uid = 'lFKqfDj9Rhk' options = { "Adult": 1, "Child": 2, "Neonate": 3 } class CauseCode(Mapping): set_order = 0 csv_name = 'cause list #' code_name = 'cause_code' dhis_uid = None class CauseOfDeath(Mapping): set_order = 2 csv_name = None code_name = 'cause_of_death' dhis_uid = 'EGuQ4jmbsjc' options = { 1: { 'B24': 101, 'X27': 103, 'C50': 104, 'C53': 105, 'K74': 106, 'C18': 107, 'E14': 109, 'A09': 110, 'W74': 111, 'G40': 112, 'C15': 113, 'W19': 114, 'X09': 115, 'Y09': 116, 'C96': 118, 'C34': 119, 'B54': 120, 'O95': 121, 'I99': 122, 'B99': 123, 'X58': 124, 'R100': 125, 'J22': 126, 'X49': 127, 'C61': 128, 'N18': 129, 'V89': 130, 'C16': 131, 'I64': 132, 'X84': 133, 'A16': 134, 'J44': 135, 'I24': 136, 'C76': 137, 'R99': 199 }, 2: { 'B24': 201, 'X27': 202, 'A09': 203, 'W74': 204, 'G04': 205, 'W19': 206, 'X09': 207, 'A99': 208, 'B54': 209, 'B05': 210, 'G03': 211, 'C76': 212, 'I99': 213, 'R101': 214, 'K92': 215, 'B99': 216, 'J22': 217, 'X49': 218, 'V89': 219, 'A41': 220, 'Y09': 221, 'R99': 299, }, 3: { 'P21': 301, 'Q89': 302, 'P36': 303, 'P23': 304, 'P07': 305, 'P95': 306, 'R99': 399, } } class BirthDate(Mapping): set_order = 0 csv_name = 'birth_date' code_name = 'birth_date' dhis_uid = 'ih4W8j2jDAS' class DeathDate(Mapping): set_order = 1 csv_name = 'death_date' code_name = 'death_date' dhis_uid = None class FirstName(Mapping): set_order = 0 csv_name = 'name' code_name = 'first_name' dhis_uid = 'uWGd9pUSgBK' class FirstName2nd(Mapping): set_order = 0 csv_name = 'name2' code_name = 'first_name_2nd' dhis_uid = 'd52GkmmpLMM' class Surname(Mapping): set_order = 0 csv_name = 'surname' code_name = 'surname' dhis_uid = 'NM9CFZmYq9S' class Surname2nd(Mapping): set_order = 0 csv_name = 'surname2' code_name = 'surname_2nd' dhis_uid = 'VEGzj76HCEN' class Orgunit(Mapping): set_order = 0 csv_name = 'geography3' code_name = 'orgunit' dhis_uid = None class Icd10(Mapping): set_order = 1 csv_name = 'icd10' code_name = 'icd10' dhis_uid = 'TSljgUq6Xfd' options = { "X58": 1, "I24": 2, "P07": 3, "A09": 4, "E14": 5, "P21": 6, "W74": 7, "B54": 8, "P95": 9, "G03": 10, "V89": 11, "B24": 12, "X09": 13, "P23": 14, "C16": 15, "I64": 16, "C76": 17, "N18": 18, "X84": 19, "C96": 20, "J22": 21, "B99": 22, "K74": 23, "A99": 24, "G04": 25, "J44": 26, "G40": 27, "R99": 28, "C18": 29, "C34": 30, "K92": 31, "C61": 32, "C15": 33, "X27": 34, "C50": 35, "O95": 36, "A41": 37, "A16": 38, "I99": 39, "C53": 40, "P36": 41, "R101": 42, "Y09": 43, "X49": 44, "R100": 45, "Q89": 46, "B05": 47, "W19": 48, } # reverse options dict # {key: value} becomes # {value: key} reverse = {v: k for k, v in options.items()} class InterviewDate(Mapping): set_order = 0 csv_name = 'interview_date' code_name = 'interview_date' dhis_uid = 't6O2A1gou0g' class Sex(Mapping): set_order = 0 csv_name = 'sex' code_name = 'sex' dhis_uid = 'GVVDthqI2Sz' options = { 1, # male 2, # female 3, # third gender 8, # don't know 9 # refused to answer } class Sid(Mapping): set_order = 0 csv_name = 'sid' code_name = 'sid' dhis_uid = 'L370gG5pb3P' class NationalId(Mapping): set_order = 0 csv_name = 'national_id' code_name = 'national_id' dhis_uid = 'iJzYZN4MIjD' class AlgorithmVersion(Mapping): set_order = 0 csv_name = None code_name = 'algorithm_version' dhis_uid = 'ePYyHl0VfmB' class QuestionnaireVersion(Mapping): set_order = 0 csv_name = None code_name = 'questionnaire_version' dhis_uid = 'qQuck3LgWeY' def cause_of_death_option_code(age_category, icd10): """Determine the Cause of Death option code depending on Age Category and ICD10""" if icd10 in Icd10.options.keys(): # if ICD-10 is the original code (e.g. C50) return CauseOfDeath.options[age_category][icd10] else: # if ICD-10 is the option (e.g. 35) original_code_lookup = Icd10.reverse[icd10] return CauseOfDeath.options[age_category][original_code_lookup]
''' A builder design pattern is a type of design pattern in which large complex objects are created without letting end user know about the complexity fo teh objects E.g: In the example below teh document object is made up of text,image, line, table objects but the end used is not aware of creation of all these objects separately ''' class Document: def __init__(self): print("Creating Document object") self.text_obj=Text() self.img_obj=Image() self.line_obj=Line() self.table_obj=Table() class Text: def __init__(self): print("creating text object") class Image: def __init__(self): print("creating image object") class Line: def __init__(self): print("creating line object") class Table: def __init__(self): print("creating table object") doc=Document()
#Candidates candidates_list = [ { "name": "Joe Biden", "party": "Democrat", "twitter_url": "https://twitter.com/JoeBiden", "twitter_screen_name": "JoeBiden", "twitter_user_id": "939091", "announcement_date": "April 25, 2019", "status": "running" }, { "name": "Cory Booker", "party": "Democrat", "twitter_url": "https://twitter.com/CoryBooker", "twitter_screen_name": "CoryBooker", "twitter_user_id": "15808765", "announcement_date": "February 1, 2019", "status": "running" }, { "name": "Pete Buttigieg", "party": "Democrat", "twitter_url": "https://twitter.com/PeteButtigieg", "twitter_screen_name": "PeteButtigieg", "twitter_user_id": "226222147", "announcement_date": "January 23, 2019", "status": "running" }, { "name": "Julián Castro", "party": "Democrat", "twitter_url": "https://twitter.com/JulianCastro", "twitter_screen_name": "JulianCastro", "twitter_user_id": "19682187", "announcement_date": "January 12, 2019", "status": "running" }, { "name": "John Delaney", "party": "Democrat", "twitter_url": "https://twitter.com/JohnDelaney", "twitter_screen_name": "JohnDelaney", "twitter_user_id": "426028646", "announcement_date": "August 10, 2017", "status": "running" }, { "name": "Tulsi Gabbard", "party": "Democrat", "twitter_url": "https://twitter.com/TulsiGabbard", "twitter_screen_name": "TulsiGabbard", "twitter_user_id": "26637348", "announcement_date": "January 12, 2019", "status": "running" }, { "name": "Kirsten Gillibrand", "party": "Democrat", "twitter_url": "https://twitter.com/SenGillibrand", "twitter_screen_name": "SenGillibrand", "twitter_user_id": "72198806", "announcement_date": "March 17, 2019", "status": "running" }, { "name": "Mike Gravel", "party": "Democrat", "twitter_url": "https://twitter.com/MikeGravel", "twitter_screen_name": "MikeGravel", "twitter_user_id": "14709326", "announcement_date": "April 2, 2019", "status": "running" }, { "name": "Kamala Harris", "party": "Democrat", "twitter_url": "https://twitter.com/KamalaHarris", "twitter_screen_name": "KamalaHarris", "twitter_user_id": "30354991", "announcement_date": "January 21, 2019", "status": "running" }, { "name": "John Hickenlooper", "party": "Democrat", "twitter_url": "https://twitter.com/Hickenlooper", "twitter_screen_name": "Hickenlooper", "twitter_user_id": "117839957", "announcement_date": "March 4, 2019", "status": "running" }, { "name": "Jay Inslee", "party": "Democrat", "twitter_url": "https://twitter.com/JayInslee", "twitter_screen_name": "JayInslee", "twitter_user_id": "21789463", "announcement_date": "March 1, 2019", "status": "running" }, { "name": "Amy Klobuchar", "party": "Democrat", "twitter_url": "https://twitter.com/amyklobuchar", "twitter_screen_name": "amyklobuchar", "twitter_user_id": "33537967", "announcement_date": "February 10, 2019", "status": "running" }, { "name": "Wayne Messam", "party": "Democrat", "twitter_url": "https://twitter.com/WayneMessam", "twitter_screen_name": "WayneMessam", "twitter_user_id": "33954145", "announcement_date": "March 13, 2019", "status": "running" }, { "name": "Seth Moulton", "party": "Democrat", "twitter_url": "https://twitter.com/sethmoulton", "twitter_screen_name": "sethmoulton", "twitter_user_id": "248495200", "announcement_date": "April 22, 2019", "status": "running" }, { "name": "Beto O'Rourke", "party": "Democrat", "twitter_url": "https://twitter.com/BetoORourke", "twitter_screen_name": "BetoORourke", "twitter_user_id": "342863309", "announcement_date": "March 14, 2019", "status": "running" }, { "name": "Tim Ryan", "party": "Democrat", "twitter_url": "https://twitter.com/TimRyan", "twitter_screen_name": "TimRyan", "twitter_user_id": "466532637", "announcement_date": "April 4, 2019", "status": "running" }, { "name": "Bernie Sanders", "party": "Independent", "twitter_url": "https://twitter.com/BernieSanders", "twitter_screen_name": "BernieSanders", "twitter_user_id": "216776631", "announcement_date": "February 19, 2019", "status": "running" }, { "name": "Donald J. Trump", "party": "Republican", "twitter_url": "https://twitter.com/realDonaldTrump", "twitter_screen_name": "realDonaldTrump", "twitter_user_id": "25073877", "announcement_date": "January 20, 2017", "status": "running" }, { "name": "Elizabeth Warren", "party": "Democrat", "twitter_url": "https://twitter.com/ewarren", "twitter_screen_name": "ewarren", "twitter_user_id": "357606935", "announcement_date": "February 9, 2019", "status": "running" }, { "name": "Bill Weld", "party": "Republican", "twitter_url": "https://twitter.com/GovBillWeld", "twitter_screen_name": "GovBillWeld", "twitter_user_id": "734783792502575105", "announcement_date": "April 15, 2019", "status": "running" }, { "name": "Marianne Williamson", "party": "Democrat", "twitter_url": "https://twitter.com/marwilliamson", "twitter_screen_name": "marwilliamson", "twitter_user_id": "21522338", "announcement_date": "January 28, 2019", "status": "running" }, { "name": "Andrew Yang", "party": "Democrat", "twitter_url": "https://twitter.com/AndrewYang", "twitter_screen_name": "AndrewYang", "twitter_user_id": "2228878592", "announcement_date": "November 6, 2017", "status": "running" }, { "name": "Eric Swalwell", "party": "Democrat", "twitter_url": "https://twitter.com/RepSwalwell", "twitter_screen_name": "RepSwalwell", "twitter_user_id": "942156122", "announcement_date": "April 8, 2019", "status": "dropped" }, { "name": "Michael Bennet", "party": "Democrat", "twitter_url": "https://twitter.com/MichaelBennet", "twitter_screen_name": "MichaelBennet", "twitter_user_id": "45645232", "announcement_date": "May 2, 2019", "status": "running" }, { "name": "Steve Bullock", "party": "Democrat", "twitter_url": "https://twitter.com/GovernorBullock", "twitter_screen_name": "GovernorBullock", "twitter_user_id": "111721601", "announcement_date": "May 14, 2019", "status": "running" }, { "name": "Bill de Blasio", "party": "Democrat", "twitter_url": "https://twitter.com/BilldeBlasio", "twitter_screen_name": "BilldeBlasio", "twitter_user_id": "476193064", "announcement_date": "May 16, 2019", "status": "running" }, { "name": "Joe Sestak", "party": "Democrat", "twitter_url": "https://twitter.com/JoeSestak", "twitter_screen_name": "JoeSestak", "twitter_user_id": "46764631", "announcement_date": "June 23, 2019", "status": "running" }, { "name": "Tom Steyer", "party": "Democrat", "twitter_url": "https://twitter.com/TomSteyer", "twitter_screen_name": "TomSteyer", "twitter_user_id": "949934436", "announcement_date": "July 9, 2019", "status": "running" } ]
#Jackknife reduction templates for NIRC2 and OSIRIS pipelines. #Author: Sean Terry def jackknife(): """ Do the Jackknife data reduction. """ ########## # # NIRC2 Format # ########## ########## # Ks-band reduction ########## # Nite 1 target = 'MB07192' sci_files1 = list(range(173, 177+1)) sky_files1 = list(range(206, 215+1)) refSrc1 = [385., 440.] #This is the target nearest to center sky.makesky(sky_files1, 'nite1', 'ks', instrument=nirc2) data.clean(sci_files1, 'nite1', 'ks', refSrc1, refSrc1, instrument=nirc2) # Nite 2 sci_files2 = list(range(195, 203+1)) sky_files2 = list(range(206, 215+1)) refSrc2 = [387., 443.] #This is the target nearest to center sky.makesky(sky_files2, 'nite2', 'ks', instrument=nirc2) data.clean(sci_files2, 'nite2', 'ks', refSrc2, refSrc2, instrument=nirc2) #----------------- sci_files = sci_files1 + sci_files2 for i in enumerate(sci_files, start=1): jack_list = sci_files[:] jack_list.remove(i[1]) data.calcStrehl(jack_list, 'ks', instrument=nirc2) data.combine(jack_list, 'ks', '27maylgs', trim=1, weight='strehl', instrument=nirc2, outSuffix='_' + str(i[0])) os.chdir('reduce') #--------------------------------------------------------------------------------- #--------------------------------------------------------------------------------- #--------------------------------------------------------------------------------- def jackknife(): """ Do the Jackknife data reduction. """ ########## # # OSIRIS Format # ########## ########## # Kp-band reduction ########## target = 'OB06284' sci_files = ['i200810_a004{0:03d}_flip'.format(ii) for ii in range(2, 26+1)] sky_files = ['i200810_a007{0:03d}_flip'.format(ii) for ii in range(2, 6+1)] refSrc = [1071., 854.] # This is the target sky.makesky(sky_files, target, 'kp_tdOpen', instrument=osiris) for i in enumerate(sci_files, start=1): jack_list = sci_files[:] jack_list.remove(i[1]) data.clean(jack_list, target, 'kp_tdOpen', refSrc, refSrc, field=target, instrument=osiris) data.calcStrehl(jack_list, 'kp_tdOpen', field=target, instrument=osiris) data.combine(jack_list, 'kp_tdOpen', epoch, field=target, trim=0, weight='strehl', instrument=osiris, outSuffix=str(i[0])) os.chdir('reduce')
# -*- coding: utf-8 -*- class Data: def __init__(self, d): seqs = tuple, list, set, frozenset for i, j in d.items(): if isinstance(j, dict): setattr(self, i, Data(j)) elif isinstance(j, seqs): setattr(self, i, type(j)(Data(sj) if isinstance(sj, dict) else sj for sj in j)) else: setattr(self, i, j) def _copy(self): return self.__copy__() def __copy__(self): return Data(self.__dict__.copy()) def __repr__(self): return "<Data " + repr(self.__dict__) + ">" def __iter__(self): return iter(self.__dict__)
#! /usr/bin/env python3 days = int(input("Enter days:")) months = days // 30 days = days % 30 print("Months = {} Days = {}".format(months, days))
# # PySNMP MIB module CISCO-ITP-TC-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-ITP-TC-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:46:02 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, iso, NotificationType, Counter32, Counter64, Unsigned32, ModuleIdentity, Bits, ObjectIdentity, MibIdentifier, TimeTicks, Integer32, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "iso", "NotificationType", "Counter32", "Counter64", "Unsigned32", "ModuleIdentity", "Bits", "ObjectIdentity", "MibIdentifier", "TimeTicks", "Integer32", "IpAddress") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") ciscoItpTextualConventions = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 231)) ciscoItpTextualConventions.setRevisions(('2004-04-26 00:00', '2003-08-03 00:00', '2003-01-29 00:00', '2001-12-11 00:00', '2001-10-01 00:00',)) if mibBuilder.loadTexts: ciscoItpTextualConventions.setLastUpdated('200404260000Z') if mibBuilder.loadTexts: ciscoItpTextualConventions.setOrganization('Cisco Systems, Inc.') class CItpTcAclId(TextualConvention, Unsigned32): status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(2700, 2999), ) class CItpTcCLLI(TextualConvention, OctetString): reference = 'Complete listings of geographical and geopolitical codes can be found in the BR 751-401-xxx series and BR 751-100-055, respectively.' status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 11) class CItpTcDisplayPC(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 12) class CItpTcEncodingSchemeValue(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 15) class CItpTcGlobalTitleSelector(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("nai", 1), ("tt", 2), ("ttNpEs", 3), ("ttNpNaiEs", 4)) class CItpTcGlobalTitleSelectorName(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 9) class CItpTcGtaAddr(TextualConvention, OctetString): status = 'deprecated' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8) fixedLength = 8 class CItpTcGtaLongAddr(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 64) class CItpTcGtaDisplay(TextualConvention, OctetString): status = 'deprecated' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 15) class CItpTcGtaDisplayZB(TextualConvention, OctetString): status = 'deprecated' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 15) class CItpTcGtaLongDisplay(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 64) class CItpTcGtaDisplayLen(TextualConvention, Unsigned32): status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1, 15) class CItpTcGtaLongDisplayLen(TextualConvention, Unsigned32): status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 64) class CItpTcNetworkName(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 19) class CItpTcInstanceNumber(TextualConvention, Unsigned32): status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 255) class CItpTcLinksetId(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 19) class CItpTcLinkSLC(TextualConvention, Unsigned32): status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 15) class CItpTcLinkType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5)) namedValues = NamedValues(("other", 1), ("serial", 2), ("sctpIp", 3), ("hsl", 4), ("virtual", 5)) class CItpTcNAI(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 255) class CItpTcNetworkIndicator(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3)) namedValues = NamedValues(("international", 0), ("internationatSpare", 1), ("national", 2), ("nationalSpare", 3)) class CItpTcNumberingPlan(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 255) class CItpTcPointCode(TextualConvention, Unsigned32): reference = 'The SS7 network node address as specified in the International Telecommunication Union standard Q.708: Specifications of Signalling System No. 7 - Numbering of International Signalling Point Codes, and by ANSI T1.111.8 Numbering of Signalling Point Codes. GF 001-9001 - Technical Specifications of Signalling System No. 7 for National Telephone Network of China.' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 16777216) class CItpTcPointCodeMask(TextualConvention, Unsigned32): reference = 'The SS7 network node address as specified in the International Telecommunication Union standard Q.708: Specifications of Signalling System No. 7 - Numbering of International Signalling Point Codes, and by ANSI T1.111.8 Numbering of Signalling Point Codes.' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 16777216) class CItpTcPointCodeType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("primary", 1), ("additional", 2), ("capability", 3), ("xua", 4)) class CItpTcQos(TextualConvention, Unsigned32): status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 7), ValueRangeConstraint(255, 255), ) class CItpTcRouteTableName(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 19) class CItpTcServiceIndicator(TextualConvention, Integer32): reference = 'ITU Q.704 Signalling network functions and messages section 14.2.1 Service indicator.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)) namedValues = NamedValues(("snmm", 0), ("sntm", 1), ("spare2", 2), ("sccp", 3), ("tup", 4), ("isup", 5), ("dupc", 6), ("dupf", 7), ("mtup", 8), ("bisup", 9), ("sisup", 10), ("spare11", 11), ("spare12", 12), ("spare13", 13), ("spare14", 14), ("spare15", 15)) class CItpTcSls(TextualConvention, Unsigned32): status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 255) class CItpTcSs7Variant(TextualConvention, Integer32): reference = 'GF 001-9001 - Technical Specifications of Signalling System No. 7 for National Telephone Network of China.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3)) namedValues = NamedValues(("ansi", 1), ("itu", 2), ("china", 3)) class CItpTcSubSystemNumber(TextualConvention, Unsigned32): status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(2, 255), ) class CItpTcSubSystemNumberMask(TextualConvention, Unsigned32): status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(2, 255) class CItpTcTableLoadStatus(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5)) namedValues = NamedValues(("loadNotRequested", 1), ("loadInProgress", 2), ("loadComplete", 3), ("loadCompleteWithErrors", 4), ("loadFailed", 5)) class CItpTcTimerMtp2T01(TextualConvention, Unsigned32): reference = 'ITU Q.703 Signalling Link. ANSI T1.111.3 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(5000, 150000) class CItpTcTimerMtp2T02(TextualConvention, Unsigned32): reference = 'ITU Q.703 Signalling Link. ANSI T1.111.3 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(5000, 150000), ) class CItpTcTimerMtp2T03(TextualConvention, Unsigned32): reference = 'ITU Q.703 Signalling Link. ANSI T1.111.3 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1000, 14000), ) class CItpTcTimerMtp2T04E(TextualConvention, Unsigned32): reference = 'ITU Q.703 Signalling Link. ANSI T1.111.3 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(400, 660), ) class CItpTcTimerMtp2T04N(TextualConvention, Unsigned32): reference = 'ITU Q.703 Signalling Link. ANSI T1.111.3 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(2007, 9500), ) class CItpTcTimerMtp2T05(TextualConvention, Unsigned32): reference = 'ITU Q.703 Signalling Link. ANSI T1.111.3 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(80, 120), ) class CItpTcTimerMtp2T06(TextualConvention, Unsigned32): reference = 'ITU Q.703 Signalling Link. ANSI T1.111.3 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1000, 6000) class CItpTcTimerMtp2T07(TextualConvention, Unsigned32): reference = 'ITU Q.703 Signalling Link. ANSI T1.111.3 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(100, 6000), ) class CItpTcTimerMtp3T01(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(500, 1200) class CItpTcTimerMtp3T02(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(700, 2000) class CItpTcTimerMtp3T03(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(500, 1200) class CItpTcTimerMtp3T04(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(500, 1200) class CItpTcTimerMtp3T05(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(500, 1200) class CItpTcTimerMtp3T06(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(500, 1200) class CItpTcTimerMtp3T07(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1000, 2000), ) class CItpTcTimerMtp3T08(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(800, 1200) class CItpTcTimerMtp3T10(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(30000, 60000) class CItpTcTimerMtp3T11(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(30000, 90000) class CItpTcTimerMtp3T12(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(800, 1500) class CItpTcTimerMtp3T13(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(800, 1500) class CItpTcTimerMtp3T14(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(2000, 3000) class CItpTcTimerMtp3T15(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(2000, 3000) class CItpTcTimerMtp3T16(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1400, 2000) class CItpTcTimerMtp3T17(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(800, 1500) class CItpTcTimerMtp3T18(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1000, 31000) class CItpTcTimerMtp3T19(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(67000, 600000) class CItpTcTimerMtp3T20(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(1000, 120000) class CItpTcTimerMtp3T21(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(63000, 120000) class CItpTcTimerMtp3T22(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(36000, 360000) class CItpTcTimerMtp3T23(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(9000, 360000) class CItpTcTimerMtp3T24(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(500, 60000) class CItpTcTimerMtp3T25(TextualConvention, Unsigned32): reference = 'ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP)' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(30000, 35000), ) class CItpTcTimerMtp3T26(TextualConvention, Unsigned32): reference = 'ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP)' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(12000, 15000), ) class CItpTcTimerMtp3T27(TextualConvention, Unsigned32): reference = 'ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP)' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(2000, 50000), ) class CItpTcTimerMtp3T28(TextualConvention, Unsigned32): reference = 'ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP)' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(3000, 35000), ) class CItpTcTimerMtp3T29(TextualConvention, Unsigned32): reference = 'ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP)' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(60000, 65000), ) class CItpTcTimerMtp3T30(TextualConvention, Unsigned32): reference = 'ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP)' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(30000, 35000), ) class CItpTcTimerMtp3T31(TextualConvention, Unsigned32): reference = 'ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP)' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(10000, 120000), ) class CItpTcTimerMtp3T32(TextualConvention, Unsigned32): reference = 'ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP)' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(5000, 120000), ) class CItpTcTimerMtp3T33(TextualConvention, Unsigned32): reference = 'ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP)' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(60000, 600000), ) class CItpTcTimerMtp3T34(TextualConvention, Unsigned32): reference = 'ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP)' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(5000, 120000), ) class CItpTcTimerLinkTest(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(4000, 12000), ) class CItpTcTimerLinkMessage(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(30000, 90000), ) class CItpTcTimerLinkActRetry(TextualConvention, Unsigned32): reference = 'ITU Q.704 Signalling network functions and messages. ANSI T1.111 Telecommunications - Signalling system No. 7 (SS7)-Message Transfer Part (MTP).' status = 'current' subtypeSpec = Unsigned32.subtypeSpec + ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(60000, 90000), ) class CItpTcTranslationType(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2)) namedValues = NamedValues(("tt", 1), ("ssn", 2)) class CItpTcURL(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 255) class CItpTcXuaName(TextualConvention, OctetString): status = 'current' subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 12) mibBuilder.exportSymbols("CISCO-ITP-TC-MIB", CItpTcPointCodeMask=CItpTcPointCodeMask, CItpTcTimerMtp3T13=CItpTcTimerMtp3T13, CItpTcTimerMtp3T32=CItpTcTimerMtp3T32, CItpTcTimerMtp3T05=CItpTcTimerMtp3T05, CItpTcLinkType=CItpTcLinkType, CItpTcTimerMtp3T15=CItpTcTimerMtp3T15, CItpTcTimerMtp3T20=CItpTcTimerMtp3T20, CItpTcXuaName=CItpTcXuaName, CItpTcTimerMtp3T28=CItpTcTimerMtp3T28, CItpTcTimerMtp3T17=CItpTcTimerMtp3T17, CItpTcTimerMtp3T08=CItpTcTimerMtp3T08, CItpTcNumberingPlan=CItpTcNumberingPlan, CItpTcGlobalTitleSelector=CItpTcGlobalTitleSelector, CItpTcTimerMtp3T06=CItpTcTimerMtp3T06, CItpTcTimerMtp3T11=CItpTcTimerMtp3T11, CItpTcGtaDisplayZB=CItpTcGtaDisplayZB, CItpTcTimerMtp2T02=CItpTcTimerMtp2T02, CItpTcDisplayPC=CItpTcDisplayPC, CItpTcTimerMtp3T19=CItpTcTimerMtp3T19, CItpTcRouteTableName=CItpTcRouteTableName, CItpTcTimerMtp3T24=CItpTcTimerMtp3T24, CItpTcTimerMtp3T01=CItpTcTimerMtp3T01, CItpTcTimerMtp3T16=CItpTcTimerMtp3T16, CItpTcTimerMtp3T07=CItpTcTimerMtp3T07, CItpTcTimerMtp3T12=CItpTcTimerMtp3T12, CItpTcTimerMtp3T22=CItpTcTimerMtp3T22, CItpTcLinkSLC=CItpTcLinkSLC, CItpTcTimerMtp3T03=CItpTcTimerMtp3T03, CItpTcTimerMtp2T05=CItpTcTimerMtp2T05, CItpTcTimerMtp3T18=CItpTcTimerMtp3T18, CItpTcPointCode=CItpTcPointCode, CItpTcSubSystemNumber=CItpTcSubSystemNumber, CItpTcSubSystemNumberMask=CItpTcSubSystemNumberMask, ciscoItpTextualConventions=ciscoItpTextualConventions, CItpTcSls=CItpTcSls, CItpTcSs7Variant=CItpTcSs7Variant, CItpTcLinksetId=CItpTcLinksetId, CItpTcTableLoadStatus=CItpTcTableLoadStatus, CItpTcTimerMtp3T04=CItpTcTimerMtp3T04, CItpTcAclId=CItpTcAclId, CItpTcTimerMtp3T23=CItpTcTimerMtp3T23, CItpTcInstanceNumber=CItpTcInstanceNumber, CItpTcTimerMtp3T02=CItpTcTimerMtp3T02, CItpTcTimerMtp3T31=CItpTcTimerMtp3T31, CItpTcPointCodeType=CItpTcPointCodeType, CItpTcTimerLinkTest=CItpTcTimerLinkTest, CItpTcTimerMtp3T29=CItpTcTimerMtp3T29, CItpTcTimerMtp2T04N=CItpTcTimerMtp2T04N, CItpTcTimerMtp3T26=CItpTcTimerMtp3T26, CItpTcTimerMtp3T14=CItpTcTimerMtp3T14, CItpTcTimerLinkMessage=CItpTcTimerLinkMessage, CItpTcNetworkIndicator=CItpTcNetworkIndicator, CItpTcEncodingSchemeValue=CItpTcEncodingSchemeValue, CItpTcTimerLinkActRetry=CItpTcTimerLinkActRetry, CItpTcTimerMtp3T34=CItpTcTimerMtp3T34, CItpTcTimerMtp3T30=CItpTcTimerMtp3T30, CItpTcCLLI=CItpTcCLLI, CItpTcServiceIndicator=CItpTcServiceIndicator, CItpTcTimerMtp2T07=CItpTcTimerMtp2T07, CItpTcNetworkName=CItpTcNetworkName, CItpTcTimerMtp2T01=CItpTcTimerMtp2T01, CItpTcTranslationType=CItpTcTranslationType, CItpTcGlobalTitleSelectorName=CItpTcGlobalTitleSelectorName, CItpTcTimerMtp3T21=CItpTcTimerMtp3T21, CItpTcGtaLongDisplayLen=CItpTcGtaLongDisplayLen, CItpTcGtaDisplayLen=CItpTcGtaDisplayLen, CItpTcGtaLongDisplay=CItpTcGtaLongDisplay, CItpTcGtaLongAddr=CItpTcGtaLongAddr, CItpTcTimerMtp2T06=CItpTcTimerMtp2T06, CItpTcGtaDisplay=CItpTcGtaDisplay, CItpTcURL=CItpTcURL, CItpTcTimerMtp2T03=CItpTcTimerMtp2T03, CItpTcTimerMtp3T10=CItpTcTimerMtp3T10, CItpTcGtaAddr=CItpTcGtaAddr, CItpTcNAI=CItpTcNAI, CItpTcTimerMtp3T27=CItpTcTimerMtp3T27, CItpTcQos=CItpTcQos, CItpTcTimerMtp3T33=CItpTcTimerMtp3T33, CItpTcTimerMtp3T25=CItpTcTimerMtp3T25, PYSNMP_MODULE_ID=ciscoItpTextualConventions, CItpTcTimerMtp2T04E=CItpTcTimerMtp2T04E)
nums = [1, 2, 3, 4, 5] for num in nums: print(num+1) print('-------------') for i in range(3): print(i)
"""20. Valid Parentheses https://leetcode.com/problems/valid-parentheses Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. Note that an empty string is also considered valid. Example 1: Input: "()" Output: true Example 2: Input: "()[]{}" Output: true Example 3: Input: "(]" Output: false Example 4: Input: "([)]" Output: false Example 5: Input: "{[]}" Output: true """ class Solution: def is_valid(self, s: str) -> bool: pairs = {'(': ')', '[': ']', '{': '}'} stack = [] for c in s: if c in pairs: stack.append(c) else: if not stack: return False if c != pairs.get(stack.pop(-1)): return False if stack: return False return True
class Node: def __init__(self, data: int): self.data: int = data self.next: Node = None class LinkedList: def __init__(self, head: Node = None): self.head = head def push(self, data: int): node = Node(data) if not self.head: self.head = node else: h = self.head while h.next: h = h.next h.next = node return self def __len__(self): head: Node = self.head count: int = 0 while head: count += 1 head = head.next return count
# <html><body><pre> # RLinterface module """ This module provides a standard interface for computational experiments with reinforcement-learning agents and environments. The interface is designed to facilitate comparison of different agent designs and their application to different problems (environments). See http://abee.cs.ualberta.ca:7777/rl-twiki/bin/view/RLAI/RLI5. Class: RLinterface initialize with: rli = RLinterface(agentFunction, envFunction) where agentStartFunction(s) -> a agentStepFunction(s, r) -> a envStartFunction() -> s envStepFunction(a) -> s, r Methods: step() --> r, s, a steps(numSteps) --> r, s, a, r, s, a, r, s, a, ... episode([maxSteps]) --> s0, a0, r1, s1, a1, ..., rT, 'terminal' episodes(num, maxSteps [,maxStepsTotal]) --> s0, a0, r1, s1, a1, ..., rT, 'terminal', s0, a0 ... stepsQ(numSteps) like steps but no returned value (quicker and quieter) episodeQ([maxSteps]) like episode but no returned value (quicker and quieter) episodesQ(num, maxSteps [,maxTotal]) like episodes but no returned value (quicker and quieter) """ class RLinterface: # <a name="RLinterface"></a>[<a href="RLdoc.html#RLinterface">Doc</a>] """Object associating a reinforcement learning agent with its environment; stores next action; see http://rlai.cs.ualberta.ca/RLAI/RLinterface.html.""" def __init__(self, agentStartFn, agentStepFn, envStartFn, envStepFn): """Store functions defining agent and environment""" self.agentStartFunction = agentStartFn self.environmentStartFunction = envStartFn self.agentStepFunction = agentStepFn self.environmentStepFunction = envStepFn self.s = 'terminal' # force start of new episode self.action = None # the action to be used in the next step def step(self): # <a name="step"></a>[<a href="RLdoc.html#step">Doc</a>] """Run one step; this is the core function, used by all the others in RLinterface module.""" if self.s == 'terminal': # first step of an episode return self.startEpisode() else: return self.stepnext() def stepnext( self): # <a name="stepnext"></a>[<a href="RLdoc.html#stepnext">Doc</a>] """Run one step which is not a first step in an episode.""" self.s, r = self.environmentStepFunction(self.action) self.action = self.agentStepFunction(self.s, r) if self.s == 'terminal': # last step of an episode return r, self.s # no action but agent learned else: # regular step return r, self.s, self.action # action and learning def steps(self, numSteps): # <a name="steps"></a>[<a href="RLdoc.html#steps">Doc</a>] """Run for numSteps steps, regardless of episode endings. return the sequence of sensations, rewards and actions.""" oaseq = [] for step in range(numSteps): # run for numSteps steps new = self.step() oaseq.extend(new) return oaseq def startEpisode(self): "Call the environment and agent start functions" self.s = self.environmentStartFunction() self.action = self.agentStartFunction(self.s) return [self.s, self.action] def episode(self, maxSteps=1000000): # <a name="episode"></a>[<a href="RLdoc.html#episode">Doc</a>] """Run for one episode, to a maximum of maxSteps steps, and return the episode.""" oaseq = self.startEpisode() step = 1 while self.s != 'terminal' and step < maxSteps: # stop at end of episode or maxsteps new = self.stepnext() oaseq.extend(new) step += 1 return oaseq def episodes(self, numEpisodes, maxSteps=1000000, maxStepsTotal=1000000): # <a name="episodes"></a>[<a href="RLdoc.html#episodes">Doc</a>] """Generate numEpisodes episodes, each no more than maxSteps steps, with no more than maxStepsTotal total; return episodesin one sequence.""" totsteps = 0 oaseq = [] episodeNum = 0 while episodeNum < numEpisodes and totsteps < maxStepsTotal: # run for numEpisodes episodes oaseq = self.startEpisode() # start new episode steps = 1 totsteps += 1 episodeNum += 1 while self.s != 'terminal' and \ steps < maxSteps and totsteps < maxStepsTotal: # stop at end or too many steps new = self.stepnext() oaseq.extend(new) totsteps += 1 steps += 1 return oaseq def stepsQ(self, numSteps): # <a name="stepsQ"></a>[<a href="RLdoc.html#stepsQ">Doc</a>] """Same as steps but quicker, quieter, and returns nothing.""" for step in range(numSteps): # run for numSteps steps self.step() def episodeQ(self, maxSteps=1000000): # <a name="episodeQ"></a>[<a href="RLdoc.html#episodeQ">Doc</a>] """Same as episode but quicker, quieter, and returns nothing.""" self.startEpisode() step = 1 while self.s != 'terminal' and step < maxSteps: # stop at end of episode or maxsteps self.stepnext() step += 1 def episodesQ(self, numEpisodes, maxSteps=1000000, maxStepsTotal=1000000): # <a name="episodesQ"></a>[<a href="RLdoc.html#episodesQ">Doc</a>] """Same as episodes but quicker, quieter, and returns nothing.""" totsteps = 0 episodeNum = 0 while episodeNum < numEpisodes and totsteps < maxStepsTotal: # run for numEpisodes episodes self.startEpisode() # start new episode steps = 1 totsteps += 1 episodeNum += 1 while self.s != 'terminal' and \ steps < maxSteps and totsteps < maxStepsTotal: # stop at end or too many steps self.stepnext() totsteps += 1 steps += 1 def stepstaken(elist): "Returns the number of steps given the list of states, actions and rewards" return elist // 3 # </pre></body></html>
def convert(file_1, file_2, file_out): def read_origin(file_in): # Dumps from sfrolov are raw arrays of bytes strictly following the internal address space of 1/2 of BRP unit. return file_in.read() if file_in is not None else bytes(2048) def write_derivative(bytes_4096, file_out): s = bytes_4096.hex('\t').expandtabs(2) # Writes bytes in rows of 8. file_out.write(''.join([s[i:i + 8*4].strip() + '\n' for i in range(0, len(s), 8*4)])) write_derivative(read_origin(file_1) + read_origin(file_2), file_out) convert(open('BRP2-1.BIN', 'rb'), open('BRP2-2.BIN', 'rb'), open('brp-2-directly.hex', 'w')) convert(open('BRP2-1A.BIN', 'rb'), open('BRP2-2A.BIN', 'rb'), open('brp-2-directly-bis.hex', 'w')) convert(open('brp3-0005-P2-1.BIN', 'rb'), open('brp3-0005-P2-2.BIN', 'rb'), open('brp-2.hex', 'w')) convert(open('brp3-0005-P2A-1.BIN', 'rb'), open('brp3-0005-P2A-2.BIN', 'rb'), open('brp-2-bis.hex', 'w')) convert(open('brp3-0005-P1-1.BIN', 'rb'), open('brp3-0005-P1-2.BIN', 'rb'), open('brp-3.hex', 'w')) convert(open('brp3-0005-P1A-1.BIN', 'rb'), open('brp3-0005-P1A-2.BIN', 'rb'), open('brp-3-bis.hex', 'w')) convert(open('BRP4-0006-P2-1.BIN', 'rb'), open('BRP4-0006-P2-2.BIN', 'rb'), open('brp-4.hex', 'w')) convert(open('BRP4-0006-P2-1A.BIN', 'rb'), open('BRP4-0006-P2-2A.BIN', 'rb'), open('brp-4-bis.hex', 'w')) convert(open('BRP4-0006-P1-1.BIN', 'rb'), open('BRP4-0006-P1-2.BIN', 'rb'), open('brp-5.hex', 'w')) convert(open('BRP4-0006-P1-1A.BIN', 'rb'), open('BRP4-0006-P1-2A.BIN', 'rb'), open('brp-5-bis.hex', 'w'))
""" Python - Binary Tree Tree represents the nodes connected by edges. It is a non-linear data structure. It has the following properties. One node is marked as Root node. Every node other than the root is associated with one parent node. Each node can have an arbiatry number of chid node. We create a tree data structure in python by using the concept os node discussed earlier. We designate one node as root node and then add more nodes as child nodes. Below is program to create the root node. Create Root We just create a Node class and add assign a value to the node. This becomes tree with only a root node. """ class Node: def __init__(self, data): self.left = None self.right = None self.data = data def PrintTree(self): print(self.data) root = Node(10) root.PrintTree() """ When the above code is executed, it produces the following result − 10 """
def binSearchClosest(list, key): if list==[]: return None elif len(list)==1: return 0 left=0; right=len(list)-1 # binary search while left<right: mid = (left + right) // 2 if list[mid]==key: # found return mid elif list[mid]>key: right=mid-1 else: left=mid+1 # left==right if left<=0: return 0 if left>=len(list)-1: return len(list)-1 if key > list[left]: if abs(list[left] - key) <= abs(list[left + 1] - key): return left else: return left + 1 else: if abs(list[left-1] - key) <= abs(list[left]-key): return left-1 else: return left # if left>right: # if abs(list[right]-key)<=abs(list[left]-key): # return right # else: # return left print(binSearchClosest([],3)) # None print(binSearchClosest([3],3)) # 0 print(binSearchClosest([1,2,5,7,8],3)) # 1 print(binSearchClosest([1,2,5,7,8],5)) # 2 print(binSearchClosest([1,2,5,7,8],6)) # 2 print(binSearchClosest([1,2,5,9,10],8)) # 3 print(binSearchClosest([1,2,5,9,10],4)) # 2 # while True: # n = int(input()) # print(binSearchClosest([1,2,5,9,10],n)) # import sys # # def binSearchClosest(list, key): # if list==[]: # return None # elif len(list)==1: # return 0 # left=0; right=len(list)-1 # # # binary search # while left<right: # mid = (left + right) // 2 # if list[mid]==key: # found # return mid # elif list[mid]>key: # right=mid-1 # else: # left=mid+1 # min=sys.maxsize; idx=-1 # for i in list: # if abs(i-key)<min: # min=abs(i-key) # idx=list.index(i) # return idx
""" Created by 七月 on 2018-1-29. """ __author__ = '七月' class TradeInfo: def __init__(self, trades): self.total = 0 self.trades = [] self.__parse(trades) def __parse(self, trades): self.total = len(trades) self.trades = [self.__map_to_trade(gift) for gift in trades] def __map_to_trade(self, single): if single.create_datetime: time = single.create_datetime.strftime('%Y-%m-%d') else: time = '未知' return dict( user_name=single.user.nickname, time=time, id=single.id )
harmonization_table = { "Trees": ["Trees", "CEO_Trees", "GO_Trees"], "Shrubland": ["Shrubland", "CEO_Shrubland", "GO_Shrub"], "Grassland": ["Grassland", "CEO_Grassland", "GO_Grass"], "Cropland": ["Cropland", "CEO_Cropland", "GO_Cultivated"], "Built-up": ["Built-up", "CEO_BuiltUp", "GO_BuiltUp"], "Barren": ["Barren / Sparse Vegetation", "CEO_Barren", "GO_Barren"], "Water": ["Open Water", "CEO_Water", "GO_Water"], } harmonization_table_lookup = {"World Cover": 0, "CEO": 1, "GLOBE": 2} ceo_to_worldcover_lookup = { "Trees_CanopyCover": "Trees", "bush/scrub": "Shrubland", "grass": "Grassland", "cultivated vegetation": "Cropland", "Water>lake/ponded/container": "Open Water", "Water>rivers/stream": "Open Water", "Water>irrigation ditch": "Open Water", "Water>treated pool": "Open Water", "Bare Ground": "Barren / Sparse Vegetation", "Building": "Built-up", "Impervious Surface (no building)": "Built-up", } def ceo_harmonization(df): df["CEO_BuiltUp"] = ( df["Land Cover Elements:Building"] + df["Land Cover Elements:Impervious Surface (no building)"] ) df["CEO_Trees"] = df["Land Cover Elements:Trees_CanopyCover"] df["CEO_Shrubland"] = df["Land Cover Elements:bush/scrub"] df["CEO_Grassland"] = df["Land Cover Elements:grass"] df["CEO_Cropland"] = df["Land Cover Elements:cultivated vegetation"] df["CEO_Water"] = ( df["Land Cover Elements:Water>treated pool"] + df["Land Cover Elements:Water>rivers/stream"] + df["Land Cover Elements:Water>irrigation ditch"] + df["Land Cover Elements:Water>lake/ponded/container"] ) df["CEO_Barren"] = df["Land Cover Elements:Bare Ground"]
""" talking clock returns word version of 24hour time wisemonkey [email protected] 20181219 github.com/wisehackermonkey run tests with command python -m nose """ hour_names = ["twelve","one","two","three","four","five","six","seven", "eight","nine","ten","eleven","twelve","thirteen","fourteen", "fifteen","sixteen","seventeen","eighteen","nineteen"] tens = ["XX","ten", "twenty", "thirty", "fourty", "fifty"] def talking_clock(time_str): hour,minute = time_str.split(":") return [int(hour[0:2]),int(minute[0:2])] def time_in_words(time_str): hour,minute = talking_clock(time_str) # 24:32 # thirty two daycycle = "" hour_word = "" min_word = "" if hour < 13 and hour >=0: daycycle = "am" if hour > 12 and hour <= 24: hour -= 12 daycycle = "pm" if hour == 0 and minute == 0 : return f"{hour_names[hour]} {daycycle}" elif minute == 0 : return f"{hour_names[hour]} {daycycle}" elif minute <=9: min_word = f"oh {hour_names[minute]}" elif minute > 19: digit_one = int(str(minute)[0]) digit_two = minute - (digit_one * 10) if digit_two == 0: min_word = f"{tens[digit_one]}" else: min_word = f"{tens[digit_one]} {hour_names[digit_two]}" else: min_word = hour_names[minute] return f"{hour_names[hour]} {min_word} {daycycle}" def time_sentense(time_str): return time_in_words(time_str) # print(time_in_words("15:30")) # if # print("pm") # elif x < 13 and x >=0: # print("am") # if x < 60 and x >= 0: def handle(req): """handle a request to the function Args: req (str): request body """ return time_in_words(req)
# 우현이는 어린 시절, 지구 외의 다른 행성에서도 인류들이 살아갈 수 있는 미래가 오리라 믿었다. 그리고 그가 지구라는 세상에 발을 내려 놓은 지 23년이 지난 지금, 세계 최연소 ASNA 우주 비행사가 되어 새로운 세계에 발을 내려 놓는 영광의 순간을 기다리고 있다. # # 그가 탑승하게 될 우주선은 Alpha Centauri라는 새로운 인류의 보금자리를 개척하기 위한 대규모 생활 유지 시스템을 탑재하고 있기 때문에, 그 크기와 질량이 엄청난 이유로 최신기술력을 총 동원하여 개발한 공간이동 장치를 탑재하였다. 하지만 이 공간이동 장치는 이동 거리를 급격하게 늘릴 경우 기계에 심각한 결함이 발생하는 단점이 있어서, 이전 작동시기에 k광년을 이동하였을 때는 k-1 , k 혹은 k+1 광년만을 다시 이동할 수 있다. 예를 들어, 이 장치를 처음 작동시킬 경우 -1 , 0 , 1 광년을 이론상 이동할 수 있으나 사실상 음수 혹은 0 거리만큼의 이동은 의미가 없으므로 1 광년을 이동할 수 있으며, 그 다음에는 0 , 1 , 2 광년을 이동할 수 있는 것이다. ( 여기서 다시 2광년을 이동한다면 다음 시기엔 1, 2, 3 광년을 이동할 수 있다. ) # 김우현은 공간이동 장치 작동시의 에너지 소모가 크다는 점을 잘 알고 있기 때문에 x지점에서 y지점을 향해 최소한의 작동 횟수로 이동하려 한다. 하지만 y지점에 도착해서도 공간 이동장치의 안전성을 위하여 y지점에 도착하기 바로 직전의 이동거리는 반드시 1광년으로 하려 한다. # # 김우현을 위해 x지점부터 정확히 y지점으로 이동하는데 필요한 공간 이동 장치 작동 횟수의 최솟값을 구하는 프로그램을 작성하라. def c(d): i=1 while i<=d: if(d>=i*i and d<i*i+i): return 2*i elif(d<(i+1)*(i+1)): return i*2+1 i+=1 return i t=int(input()) for _ in range(t): a,b=map(int,input().split()) print(c(b-a-1))
#!/usr/bin/env python # coding: utf-8 _JOINT_NAMES_1 = [ 'Waist', 'Torso', 'Neck', 'Head', 'LeftShoulder', 'LeftElbow', 'LeftWrist', 'LeftHand', 'RightShoulder', 'RightElbow', 'RightWrist', 'RightHand', 'LeftHip', 'LeftKnee', 'LeftAnkle', 'LeftFoot', 'RightHip', 'RightKnee', 'RightAnkle', 'RightFoot', ] _ARTICULATED_FIGURE_ANGLES_1 = { 'rshldr_theta': ("RightShoulder", "Neck", "RightElbow", 1, True), ## Right Shoulder 'lshldr_theta': ("LeftShoulder", "Neck", "LeftElbow", -1, True), ## Left Shoulder 'relbw_theta': ("RightElbow", "RightShoulder", "RightWrist", 1, True), ## Right Elbow 'lelbw_theta': ("LeftElbow", "LeftShoulder", "LeftWrist", -1, True), ## Left Elbow 'rwrst_theta': ("RightWrist", "RightElbow", "RightHand", 1, True), ## Right Wrist 'lwrst_theta': ("LeftWrist", "LeftElbow", "LeftHand", -1, True), ## Left Wrist 'rhip_theta': ("RightHip", "Waist", "RightKnee", 1, True), ## Right Hip 'lhip_theta': ("LeftHip", "Waist", "LeftKnee", -1, True), ## Left Hip 'rkn_theta': ("RightKnee", "RightHip", "RightAnkle", 1, True), ## Right Knee 'lkn_theta': ("LeftKnee", "LeftHip", "LeftAnkle", -1, True), ## Left knee 'rankl_theta': ("RightAnkle", "RightKnee", "RightFoot", 1, True), ## Right Ankle 'lankl_theta': ("LeftAnkle", "LeftKnee", "LeftFoot", -1, True), ## Left Ankle 'rnck_theta': ("Neck", "Head", "RightShoulder", 1, True), ## Neck/Right Shoulder 'lnck_theta': ("Neck", "Head", "LeftShoulder", -1, True), ## Neck/Left Shoulder 'rwst_theta': ("Waist", "Neck", "RightHip", 1, True), ## Waist/Right Hip 'lwst_theta': ("Waist", "Neck", "LeftHip", -1, True), ## Waist/Left Hip 'trso_theta': ("Torso", "Neck", "Waist", 1, True), ## Torso } _JOINT_NAMES_2 = [ 'nose', 'leye', 'reye', 'lear', 'rear', 'lshldr', 'rshldr', 'lelbw', 'relbw', 'lwrst', 'rwrst', 'lhip', 'rhip', 'lkn', 'rkn', 'lankl', 'rankl' ] _EXTENDED_JOINT_NAMES_2 = { 'neck': ('lshldr', 'rshldr', 'lshldr', 'rshldr'), ## Neck 'torso': ('lhip', 'rhip', 'lhip', 'rhip'), ## Torso 'vaxis': ('lhip', 'rhip', 'lshldr', 'rshldr'), ## Vertical Axis } _ARTICULATED_FIGURE_ANGLES_2 = { 'rswt_theta': ("neck", "rwrst", "torso", -1, True), ## Right Wrist->Neck->Torso 'lswt_theta': ("neck", "lwrst", "torso", 1, True), ## Left Wrist->Neck->Torso 'rahn_theta': ("rhip", "rankl", "nose", -1, True), ## Right Ankle->Hip->Nose 'lahn_theta': ("lhip", "lankl", "nose", 1, True), ## Left Ankle->Hip->Nose 'ratk_theta': ("torso", "rankl", "neck", -1, True), ## Right Ankle->Torso->Neck 'latk_theta': ("torso", "lankl", "neck", 1, True), ## Left Ankle->Torso->Neck 'tkf_theta': ("torso", "vaxis", "neck", 1, False), ## Neck->Torso->VerticalAxis (Backbone) } _JOINT_NAMES_3 = [ 'Head', 'Neck', 'SpineB', # Spine base - pelvis (waist) 'SpineM', # Spine mid - mid point (torso) 'SpineSh', # Spine shoulder - spine point in between the clavicles 'LeftShoulder', 'LeftElbow', 'LeftWrist', 'LeftHand', 'RightShoulder', 'RightElbow', 'RightWrist', 'RightHand', 'LeftHip', 'LeftKnee', 'LeftAnkle', 'LeftFoot', 'RightHip', 'RightKnee', 'RightAnkle', 'RightFoot', ] _EXTENDED_JOINT_NAMES_3 = { 'spinem_at_neck': ('SpineM', 'SpineM', 'Neck', 'Neck', 'SpineM', 'SpineM'), ## SpineM (torso) at neck height } _ARTICULATED_FIGURE_ANGLES_3 = { 'rshldr_theta': ("RightShoulder", "Neck", "RightElbow", 1, True), ## Right Shoulder 'lshldr_theta': ("LeftShoulder", "Neck", "LeftElbow", -1, True), ## Left Shoulder 'relbw_theta': ("RightElbow", "RightShoulder", "RightWrist", 1, True), ## Right Elbow 'lelbw_theta': ("LeftElbow", "LeftShoulder", "LeftWrist", -1, True), ## Left Elbow 'rwrst_theta': ("RightWrist", "RightElbow", "RightHand", 1, True), ## Right Wrist 'lwrst_theta': ("LeftWrist", "LeftElbow", "LeftHand", -1, True), ## Left Wrist 'rhip_theta': ("RightHip", "SpineB", "RightKnee", 1, True), ## Right Hip 'lhip_theta': ("LeftHip", "SpineB", "LeftKnee", -1, True), ## Left Hip 'rkn_theta': ("RightKnee", "RightHip", "RightAnkle", 1, True), ## Right Knee 'lkn_theta': ("LeftKnee", "LeftHip", "LeftAnkle", -1, True), ## Left knee 'rankl_theta': ("RightAnkle", "RightKnee", "RightFoot", 1, True), ## Right Ankle 'lankl_theta': ("LeftAnkle", "LeftKnee", "LeftFoot", -1, True), ## Left Ankle 'rnck_theta': ("Neck", "Head", "RightShoulder", 1, True), ## Neck/Right Shoulder 'lnck_theta': ("Neck", "Head", "LeftShoulder", -1, True), ## Neck/Left Shoulder 'rwst_theta': ("SpineB", "Neck", "RightHip", 1, True), ## SpineB/Right Hip 'lwst_theta': ("SpineB", "Neck", "LeftHip", -1, True), ## SpineB/Left Hip 'trso_theta': ("SpineM", "Neck", "SpineB", 1, True), ## SpineM 'tkf_theta': ("SpineM", "spinem_at_neck", "Neck", 1, False), ## Neck->Torso->TorsoAtNeckHeight }
F_BOIL_TEMP = 212.0 F_FREEZE_TEMP = 32.0 C_BOIL_TEMP = 100.0 C_FREEZE_TEMP = 0.0 F_RANGE = F_BOIL_TEMP - F_FREEZE_TEMP C_RANGE = C_BOIL_TEMP - C_FREEZE_TEMP F_C_RATIO = C_RANGE / F_RANGE def ftoc(f_temp): "Convert Fahrenheit temperature <f_temp> to Celsius and return it." c_temp = (f_temp - F_FREEZE_TEMP) * F_C_RATIO + C_FREEZE_TEMP return c_temp if __name__ == '__main__': for f_temp in [-40.0, 0.0, 32.0, 100.0, 212.0]: c_temp = ftoc(f_temp) print('%f F => %f C' % (f_temp, c_temp))
class Solution: def isAnagram(self, s, t): """ :type s: str :type t: str :rtype: bool """ dict_s = {} dict_t = {} for c in s: if c not in dict_s: dict_s[c] = 1 else: dict_s[c] += 1 for c in t: if c not in dict_t: dict_t[c] = 1 else: dict_t[c] += 1 return dict_s == dict_t
S = input() t = 0 for i in range(0, len(S), 5): if S[i:i + 5] == '(^^*)': t += 1 print(t, len(S) // 5 - t)
""" Insert sort O(n**2) """ def insert_sort(a): n = len(a) for top in range(1, n): k = top while k > 0 and a[k-1] > a[k]: a[k], a[k-1] = a[k-1], a[k] k -= 1 return a def test_insert_sort(): """ Tests """ assert(insert_sort([3, 2, 5, 7, 3, 4, 7, 0, 3, 1, 3, 6]) == [0, 1, 2, 3, 3, 3, 3, 4, 5, 6, 7, 7]) if __name__ == '__main__': print('Insert sort for [3,2,5,7,3,4,7,0,3,1,3,6]: ', insert_sort([3, 2, 5, 7, 3, 4, 7, 0, 3, 1, 3, 6]))
class DotDict(dict): """A class that extends dict to allow accessing keys as attributes.""" def __init__(self, *args, **kwargs): """Initalize the DotDict. This method does nothing other that initialize the parent dict with the passed args and kwargs. """ super(DotDict, self).__init__(*args, **kwargs) def __getattr__(self, attribute_name): """Get the dict value of the key where the attribute_name == key.""" try: return self[attribute_name] except AttributeError: raise KeyError( f'KeyError: \'{attribute_name}\'' ) def __setattr__(self, attribute_name, attribute_value): """Set the dict value of the key where the attribute_name == key.""" self[attribute_name] = attribute_value class DefaultDotDict(dict): """A class that extends dict to allow accessing keys as attributes, with a default values for keys when they are accessed but not assigned. """ def __init__(self, default_value=None, *args, **kwargs): """Initalize the DefaultDotDict. This method sets the default value with the first argument then initialize the parent dict with the remaining passed args and kwargs. """ super(DefaultDotDict, self).__init__(*args, **kwargs) self.__default_value = default_value def __getattr__(self, attribute_name): """Get the dict value of the key where the attribute_name == key.""" if '_DefaultDotDict__default_value' == attribute_name: super.__setattr__(self, attribute_name, attribute_value) else: return self[attribute_name] def __setattr__(self, attribute_name, attribute_value): """Set the dict value of the key where the attribute_name == key.""" if '_DefaultDotDict__default_value' == attribute_name: super.__setattr__(self, attribute_name, attribute_value) else: self[attribute_name] = attribute_value def __missing__(self, key): """Set the missing key to the default value if it does not exist.""" self[key] = self.__default_value return self[key] class NestingDotDict(dict): """A class that extends dict to allow accessing keys as attributes. This class automatically converts and dict class to NestingDotDicts when accessed from this class. """ def __init__(self, *args, **kwargs): """Initalize the NestingDotDict. This method does nothing other that initialize the parent dict with the passed args and kwargs. """ super(NestingDotDict, self).__init__(*args, **kwargs) def __getattr__(self, attribute_name): """Get the dict value of the key where the attribute_name == key.""" try: value = self[attribute_name] if ( not isinstance(value, NestingDotDict) and isinstance(value, dict) ): # If the attribute is a dict, but not already a # NestingDotDict, then convert it to a NestingDotDict # and override the current attribute. value = NestingDotDict(value) self[attribute_name] = value return value except AttributeError: raise KeyError( f'KeyError: \'{attribute_name}\'' ) def __setattr__(self, attribute_name, attribute_value): """Set the dict value of the key where the attribute_name == key.""" if ( not isinstance(attribute_value, NestingDotDict) and isinstance(attribute_value, dict) ): attribute_value = NestingDotDict(attribute_value) self[attribute_name] = attribute_value
class BasePayload(object): _name = "Default" _code = None _activated = False _conf = None _stager_path = "" def setHandler(self, IP, PORT): d = dict() d['SERVER'] = IP d['PORT'] = PORT self.setCode(d) def setActivated(self, status): self._activated = status def getActivated(self): return self._activated def readStager(self): with open(self._stager_path, 'r') as my_stage: return my_stage.read() def setCode(self, d=dict): self._code = self.readStager() self._code = self._code.format(**d) def getCode(self): return self._code
n = int(input()) registered_users = dict() for i in range(n): command = input() tokens = command.split(' ') action = tokens[0] if action == 'register': username = tokens[1] licence_plate = tokens[2] if username not in registered_users: registered_users[username] = licence_plate print(f"{username} registered {licence_plate} successfully") else: print(f"ERROR: already registered with plate number {registered_users[username]}") elif action == 'unregister': username = tokens[1] if username not in registered_users: print(f"ERROR: user {username} not found") else: print(f"{username} unregistered successfully") registered_users.pop(username) for users, plates in registered_users.items(): print(f"{users} => {plates}")
# How do you read and write to a specific file : # We have a few different ways to do that using a file stream : # To open a file, you create a stream object # we determine the file name and the mode, most of time we leave the buffer_size ti the default stream = open(file_name, mode, buffer_size) # Modes : # r - Read (default) # w - truncate and write # W will overwrite the existing contents in the file # a - append if file exists # we use a (append) to add more lines without overwriting what is already there # x - write, fail if file exists # x allows you to write to the file, but this should be a new file that I am creating, and if the file exist i want to get an error back # + - Updating (read/write) # updating the file # t - Text (default) # b - Binary # for binary fiiles like images ## The most common scenario is to read from a file # Reading a file : # stream = open('demo.txt') # by default it is txt file and the mode assuming that I need to read the file print(stream.readable()) # Can we read ? print(stream.readable(1)) # Read the first charachter print(stream.readline()) # read a line stream.close() # Close the stream # How to write to a file ? # here we specify the mode 'w' for writing and t cause I am writing a text to the file (the default mode is 'r' reading) stream = open('output.txt', 'wt') # write txt stream.write('H') # using the write() method to one or more charachters # write a single string stream.writelines(['ello', 'World']) # write multiple strings stream.write('\n') # write new line names = ['Ali', 'Hani'] # You can creat a list of strings and pass it to the writelines stream.writelines(names) # write to the file the name list stream.close() # close the stream and flush the data ## Managing the stream : # You do not actually write to the file, you write to a file stream and then that stream goes to the file stream = open('output.txt', 'wt') stream.write('demo!') # I am writing this to the file stream # You can use the seek command to reposition where you are in the stream, so moving the cursor around for where things are being written stream.seek(0) # put the cursor right back at the beginning of the stream stream.write('cool') # So here if we do another write it is gonna overwrite cool instead of demo (so the demo word got overwritten by cool) # Flush command, flushes the data of the stream to the file stream.flush() # write the data to file stream.close() # flush and close the stream
number_employee = int(input('')) hours = int(input()) value_work_hour = float(input()) salary = hours * value_work_hour print('NUMBER = {}'.format(number_employee)) print('SALARY = U$ {:.2f}'.format(salary))
# dummy request object class DummyReq: # constructor def __init__(self,env,): # environ self.subprocess_env = env # header self.headers_in = {} # content-length if self.subprocess_env.has_key('CONTENT_LENGTH'): self.headers_in["content-length"] = self.subprocess_env['CONTENT_LENGTH'] # get remote host def get_remote_host(self): if self.subprocess_env.has_key('REMOTE_HOST'): return self.subprocess_env['REMOTE_HOST'] return "" # check key words def checkKeyWords(kwd,https=False,isBulk=False): if not https: if not 'secretKey' in kwd: return False,None,None,'no secretKey' secretKey = kwd['secretKey'] del kwd['secretKey'] else: # dummy secret key for https secretKey = None if isBulk: return True,secretKey,None,kwd elif 'baseURL' in kwd: baseURL = kwd['baseURL'] del kwd['baseURL'] return True,secretKey,baseURL,kwd elif 'url' in kwd: url = kwd['url'] del kwd['url'] return True,secretKey,url,kwd else: return False,None,'no URL or baseURL' # get FQANs def getFQANs(req): fqans = [] for tmpKey,tmpVal in req.subprocess_env.iteritems(): # compact credentials if tmpKey.startswith('GRST_CRED_'): # VOMS attribute if tmpVal.startswith('VOMS'): # FQAN fqan = tmpVal.split()[-1] # append fqans.append(fqan) # old style elif tmpKey.startswith('GRST_CONN_'): tmpItems = tmpVal.split(':') # FQAN if len(tmpItems)==2 and tmpItems[0]=='fqan': fqans.append(tmpItems[-1]) # return return fqans # check permission def hasPermission(req): # check hosts # TOBEDONE # host = req.get_remote_host() # check SSL if not req.subprocess_env.has_key('SSL_CLIENT_S_DN'): return False # check role fqans = getFQANs(req) for fqan in fqans: for rolePat in ['/atlas/Role=production']: if fqan.startswith(rolePat): return True return False
#!/usr/bin/env python3 """Enumerates primes using the sieve of Eratosthenes. Verification: [0009](https://onlinejudge.u-aizu.ac.jp/status/users/hamukichi/submissions/1/0009/judge/4571021/Python3) """ def sieve_of_eratosthenes(end): """Enumerates prime numbers below the given integer `end`. Returns (as a tuple): - `is_prime`: a list of bool values. If an integer `i` is a prime number, then `is_prime[i]` is True. Otherwise `is_prime[i]` is False. - `primes`: a list of prime numbers below `end`. """ if end <= 1: raise ValueError("The integer `end` must be greater than one") is_prime = [True for _ in range(end)] is_prime[0] = False is_prime[1] = False primes = [] for i in range(2, end): if is_prime[i]: primes.append(i) for j in range(2 * i, end, i): is_prime[j] = False return is_prime, primes
''' Listas em Python - fatiamento, append, insert, pop, del, clear, extend, + min, max range nome_da_lista = [] "declaração" ''' # índice 0 1 2 3 4 lista = ['A', 'Bacana', 'C', 'D', 'E'] # - 5 4 3 2 1 string = 'ABCD' print(string[1]) print('-'*10) print(lista[1]) print('-'*10) print(lista) lista[4] = 'Trocou Valor' print('-'*10) print(lista) print('-'*10) print(lista[0:5:2]) print('-'*10) print(lista[-1]) print('-'*10) print(lista[::-1]) print('-'*10) lista1 = [1,2,3] lista2 = [4,5,6] lista3 = lista1 + lista2 print(lista1) print(lista2) print(lista3) lista1.extend(lista2) #lista1 estendeu seu tamanho com a lista2 print(lista1,'Com função extend') lista3.extend('A') print(lista3,'Com com a função extend') lista3.append('A') print(lista3,'Com append') print('-'*10) lista1.insert(2, 'maçã') print(lista1) lista1.pop() # remove o último elemento print(lista1) print('-'*10) lista4 = [1,2,3,4,5,6,7,8,9] print(lista4) del(lista4[3:5]) print(lista4) print('-'*10) print(lista2) print(max(lista2)) print(lista4) print(min(lista4)) print('-'*10) lista5 = list(range(1,101,1)) # lsista é iterável print(lista5) for item in lista5: print(item) print('-'*10) soma = 0 for item in lista5: soma = soma + item print(soma) print('-'*10) lista6 = ['string', True, 1, 20.5] for elem in lista6: print(f'O tipo do elemento >> {elem} << é {type(elem)}.')
class Person(object): def __init__(self, fn, ln): self.first_name = fn self.last_name = ln
""" Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum to target. You may return the combinations in any order. The same number may be chosen from candidates an unlimited number of times. Two combinations are unique if the frequency of at least one of the chosen numbers is different. It is guaranteed that the number of unique combinations that sum up to target is less than 150 combinations for the given input. Example 1: Input: candidates = [2,3,6,7], target = 7 Output: [[2,2,3],[7]] Explanation: 2 and 3 are candidates, and 2 + 2 + 3 = 7. Note that 2 can be used multiple times. 7 is a candidate, and 7 = 7. These are the only two combinations. Example 2: Input: candidates = [2,3,5], target = 8 Output: [[2,2,2,2],[2,3,3],[3,5]] Example 3: Input: candidates = [2], target = 1 Output: [] Example 4: Input: candidates = [1], target = 1 Output: [[1]] Example 5: Input: candidates = [1], target = 2 Output: [[1,1]] Constraints: 1 <= candidates.length <= 30 1 <= candidates[i] <= 200 All elements of candidates are distinct. 1 <= target <= 500 """ class Solution: def combinationSum(self, candidates: List[int], target: int) -> List[List[int]]: def find_combination(candidates, idx, target, curr, ret): if target < 0: return if target == 0: ret.append(list(curr)) return if idx >= len(candidates): return n = candidates[idx] i = 0 while i * n <= target: find_combination(candidates, idx + 1, target - i * n, curr + [n] * i, ret) i += 1 candidates.sort() ret = [] curr = [] find_combination(candidates, 0, target, curr, ret) return ret
class Solution: def minCostToMoveChips(self, chips: List[int]) -> int: count = [0] * 2 for chip in chips: count[chip % 2] += 1 return min(count[0], count[1])
#!/usr/bin/env python # encoding: utf-8 """ symmetric_tree.py Created by Shengwei on 2014-07-04. """ # https://oj.leetcode.com/problems/symmetric-tree/ # tags: medium, tree, recursion """ Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \ 3 4 4 3 But the following is not: 1 / \ 2 2 \ \ 3 3 Note: Bonus points if you could solve it both recursively and iteratively. confused what "{1,#,2,3}" means? > read more on how binary tree is serialized on OJ. """ # TODO: use iterative approach instead of recusive one # https://oj.leetcode.com/discuss/456/recusive-solution-symmetric-optimal-solution-inordertraversal # Definition for a binary tree node # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: # @param root, a tree node # @return a boolean def isSymmetric(self, root): if root is None: return True def check_symmetry(left, right): if left is None and right is None: return True if not left or not right or left.val != right.val: return False return ( check_symmetry(left.left, right.right) and check_symmetry(left.right, right.left) ) return check_symmetry(root.left, root.right)
""" .. _compas_fea.app: ******************************************************************************** app ******************************************************************************** .. module:: compas_fea.app The compas_fea package PyQt and Vtk application. app === .. currentmodule:: compas_fea.app.app :mod:`compas_fea.app.app` .. autosummary:: :toctree: generated/ App """ __all__ = []
test = { 'name': 'q2_1', 'points': 1, 'suites': [ { 'cases': [ { 'code': r""" >>> prof_names.num_columns 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> prof_names.num_rows 71 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> # Make sure that you have the correct column labels!; >>> np.asarray(prof_names.labels).item(1) != "name identity" True """, 'hidden': False, 'locked': False }, { 'code': r""" >>> # Make sure that you have the correct column labels!; >>> np.asarray(prof_names.labels).item(1) == "faculty" True """, 'hidden': False, 'locked': False } ], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest' } ] }
print("Welcome to the professor quality calculator by MillenniumWare!") print("Follow the prompts below to calculate how good your professor is!!!") print("************************") print("") name = input("Enter your professor's name! >") print("") print("On a scale of 1-5 (1 being horrible, 2 tolerable, 3 adequate, 4 pretty decent, 5 God-tier):") print("") diff = input("How difficult is your professor? >") diff = int(diff) if not diff in range(1,6): print("Invalid input") exit() nice = input("How nice of a person is your professor? >") nice = int(nice) if not nice in range(1,6): print("Invalid input") exit() clarity = input("How clear are your professor's explanations and other teaching aspects? >") clarity = int(clarity) if not clarity in range(1,6): print("Invalid input") exit() excite = input("How exciting does the professor make the class content? >") excite = int(excite) if not excite in range(1,6): print("Invalid input") exit() score = (excite + clarity +nice +diff)/4 print("Professor", name,"scored", score, "stars!")
""" Remove Duplicates from Sorted List II Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Given 1->1->1->2->3, return 2->3. """ class ListNode(object): def __init__(self, x): self.val = x self.next = None #First solution, in-place class Solution(object): def deleteDuplicates(self, head): """ :type head: ListNode :rtype: ListNode """ if not head or not head.next: return head while head and head.next and head.val==head.next.val: temp=head.val changed=False while head.next and head.next.val==temp: head=head.next changed=True if changed and head and head.val==temp: head=head.next if head and head.next: p1,p2=head,head.next else: return head while p1 and p2 and p2.next: changed=False while p2.val==p2.next.val: temp=p2.val changed=True p2=p2.next p1.next=p2.next p2=p2.next if not p2: return head if not p2.next: if p2.val==temp: p1.next=None return head else: return head if changed: if p2.val==temp: p1.next=p2.next p2=p2.next else: p1=p1.next p2=p2.next return head #Second solution, with dummy head class Solution(object): def deleteDuplicates(self, head): """ :type head: ListNode :rtype: ListNode """ if not head or not head.next: return head dummy=ListNode(0) dummy.next=head pos=dummy dval=None while head: if head.next and head.val==head.next.val: dval=head.val if dval==None or head.val!=dval: pos.next=head pos=pos.next head=head.next pos.next=None return dummy.next
def convert_fasta_to_string(filename): """Takes a genome FASTA and outputs a string of that genome Args: filename: fasta file Returns: string of the genome sequence """ assert filename.split('.')[-1] == 'fasta' # assert correct file type with open(filename) as f: sequence = ''.join(f.read().split('\n')[1:]).lower() # splits by lines, removes first line, joins lines return sequence
# -*- coding: utf-8 -*- """ Created on Sat Jan 27 16:27:44 2018 @author: positiveoutlier Guess the Number Game! The user thinks of an integer between 0 (inclusive) and 100 (not inclusive). The computer makes guesses, and the user will give it input - is its guess too high or too low? Using bisection search, the computer will guess the user's secret number! """ low = 0 high = 100 hint = 'l' print("Please think of a number between 0 and 100!") while hint != 'c': average = int((low + high)/2) print("Is your secret number " + str(average) + "?") print("Enter 'h' to indicate the guess is too high. Enter 'l' to indicate the guess is too low. Enter 'c' to indicate I guessed correctly.", end=' ') hint = input() if hint == 'l': low = average elif hint == 'h': high = average elif hint == 'c': print("Game over. Your secret number was: " + str(average)) break else: print("Sorry, I did not understand your input.")
""" 49. How to filter every nth row in a dataframe? """ """ Difficulty Level: L1 """ """ From df, filter the 'Manufacturer', 'Model' and 'Type' for every 20th row starting from 1st (row 0). """ """ Input """ """ df = pd.read_csv('https://raw.githubusercontent.com/selva86/datasets/master/Cars93_miss.csv') """
""" # Gallery .. include:: ../gallery/legend/README.md .. include:: ../gallery/colorbar/README.md .. include:: ../gallery/subplots/README.md """
def test_empty(): """ I should learn how to write tests """ pass
class Solution(object): def atMostNGivenDigitSet(self, D, N): B = len(D) # bijective-base B S = str(N) K = len(S) A = [] # The largest valid number in bijective-base-B. for c in S: if c in D: A.append(D.index(c) + 1) else: i = bisect.bisect(D, c) A.append(i) # i = 1 + (largest index j with c >= D[j], or -1 if impossible) if i == 0: # subtract 1 for j in xrange(len(A) - 1, 0, -1): if A[j]: break A[j] += B A[j-1] -= 1 A.extend([B] * (K - len(A))) break ans = 0 for x in A: ans = ans * B + x return ans
""" 0528. Random Pick with Weight Given an array w of positive integers, where w[i] describes the weight of index i, write a function pickIndex which randomly picks an index in proportion to its weight. Note: 1 <= w.length <= 10000 1 <= w[i] <= 10^5 pickIndex will be called at most 10000 times. Example 1: Input: ["Solution","pickIndex"] [[[1]],[]] Output: [null,0] Example 2: Input: ["Solution","pickIndex","pickIndex","pickIndex","pickIndex","pickIndex"] [[[1,3]],[],[],[],[],[]] Output: [null,0,1,1,1,0] """ class Solution: def __init__(self, w: List[int]): self.w = w self.nums = range(len(w)) def pickIndex(self) -> int: return random.choices(self.nums, weights=self.w)[0] # Your Solution object will be instantiated and called as such: # obj = Solution(w) # param_1 = obj.pickIndex()
#!/usr/bin/python3 def check(dx,dy): f=open("input","r") l=f.readlines() l=[l.strip('\n\r') for l in l] x=0 y=0 c=0 while(y<len(l)): if l[y][x]=='#': c+=1 x+=dx if x>=len(l[0]): x-=len(l[0]) y+=dy return (c) print("1: "+str( check(3,1))) print("2: "+str(check(1,1)*check(3,1)*check(5,1)*check(7,1)*check(1,2)))
Import("env") # Access to global construction environment build_tag = env['PIOENV'] # Dump construction environment (for debug purpose) # print(env.Dump()) # Rename binary according to environnement/board # ex: firmware_esp32dev.bin or firmware_nodemcuv2.bin env.Replace(PROGNAME="firmware_%s" % build_tag)
class Solution: def findRepeatedDnaSequences(self, s: str) -> List[str]: res = set() dic = {} for i in range(len(s)): temp = s[i:i+10] if temp not in dic: dic[temp]=1 else: res.add(temp) return res
def make_exchange_name(namespace, exchange_type, extra=""): return "{}.{}".format(namespace, exchange_type) if not extra else "{}.{}@{}".format(namespace, exchange_type, extra) def make_channel_name(namespace, exchange_type): return "channel_on_{}.{}".format(namespace, exchange_type) def make_queue_name(namespace, exchange_type): return "queue_for_{}.{}".format(namespace, exchange_type) def make_direct_key(namespace): return "key_for_{}.direct".format(namespace) def make_rabbit_url(username, password, host, port): return f'amqp://{username}:{password}@{host}:{port}'