content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import numpy as np from pytest import raises from numpy.testing import assert_allclose from menpo.shape import PointCloud from menpo.image import MaskedImage, BooleanImage
[ 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 9288, 1330, 12073, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 439, 19836, 198, 198, 6738, 1450, 7501, 13, 43358, 1330, 6252, 18839, 198, 6738, 1450, 7501, 13, 9060, 1330, 18007, 27...
3.54717
53
# coding: utf-8 # # Project: Azimuthal integration # https://github.com/silx-kit/pyFAI # # Copyright (C) 2015-2018 European Synchrotron Radiation Facility, Grenoble, France # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 220, 220, 220, 4935, 25, 7578, 320, 1071, 282, 11812, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3740, 1378, 12567, 13, 785, 14, 18217, 87, 12, 15813, 14...
2.64837
1,840
aes_passphrase = "Palantir_is_the_best1337" aes_iv = b'wtf1sd1sw4t1sd1s'
[ 64, 274, 62, 6603, 34675, 796, 366, 11531, 415, 343, 62, 271, 62, 1169, 62, 13466, 1485, 2718, 1, 198, 64, 274, 62, 452, 796, 275, 6, 86, 27110, 16, 21282, 16, 2032, 19, 83, 16, 21282, 16, 82, 6, 198 ]
1.780488
41
import numpy as np import torch from lifelong_rl.policies.mpc.mpc import MPCPolicy class PolicyMPCController(MPCPolicy): """ Perform MPC planning over a policy that takes in an additional latent. """
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 6738, 25837, 62, 45895, 13, 79, 4160, 444, 13, 3149, 66, 13, 3149, 66, 1330, 4904, 8697, 21424, 628, 198, 4871, 7820, 7378, 4093, 756, 10646, 7, 44, 5662, 36727, 2599, 628, ...
3.085714
70
from .main import ConstContextFilter, ContextVarFilter __all__ = ("ContextVarFilter", "ConstContextFilter")
[ 6738, 764, 12417, 1330, 4757, 21947, 22417, 11, 30532, 19852, 22417, 198, 198, 834, 439, 834, 796, 5855, 21947, 19852, 22417, 1600, 366, 34184, 21947, 22417, 4943, 198 ]
3.892857
28
import time import os from select import select import pyqrcode import subprocess import re from magic import Magic from audio_extract import convert2mkv from termcolor import colored import threading import itertools import sys def wait_until_error(f, timeout=0.5): """ Wait for timeout seconds until the function...
[ 11748, 640, 198, 11748, 28686, 198, 6738, 2922, 1330, 2922, 198, 11748, 12972, 80, 6015, 1098, 198, 11748, 850, 14681, 198, 11748, 302, 198, 6738, 5536, 1330, 6139, 198, 6738, 6597, 62, 2302, 974, 1330, 10385, 17, 28015, 85, 198, 6738, ...
3.034398
407
"""Validate NZ bank account number. Refer to document: [RWT and NRWT Certificates / 2020 / Version 1.0](https://www.ird.govt.nz/-/media/project/ir/home/documents/income-tax/withholding-taxes/rwt-nrwt-withholding-tax-certificate/2020-rwt-and-nrwt-certificate-filing-specification.pdf) charpter 8. Bank account number vali...
[ 37811, 7762, 20540, 26905, 3331, 1848, 1271, 13, 198, 46238, 284, 3188, 25, 685, 49, 39386, 290, 23057, 39386, 14965, 811, 689, 1220, 12131, 1220, 10628, 352, 13, 15, 16151, 5450, 1378, 2503, 13, 1447, 13, 9567, 83, 13, 27305, 16327, ...
2.210639
3,722
from __future__ import absolute_import, print_function from django.db import models from django.utils import timezone from sentry.db.models import FlexibleForeignKey, Model, sane_repr from sentry.models.search_common import SearchType DEFAULT_SAVED_SEARCHES = [ { 'name': 'Unresolved Issues', 'qu...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 3601, 62, 8818, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 198, 6738, 1908, 563, 13, 9945, 13, 27530, 1330, 26719, ...
2.619647
794
import itertools import time import h5py import sys import os import scipy.special import numpy as np sys.path.append('partools') sys.path.append('scitools') sys.path.append('util') import parallel as par from filters import boxFilter2D, upSample2D import tensorflow as tf import tensorflowUtils as tfu from tensorflow.k...
[ 11748, 340, 861, 10141, 198, 11748, 640, 198, 11748, 289, 20, 9078, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 629, 541, 88, 13, 20887, 198, 11748, 299, 32152, 355, 45941, 198, 17597, 13, 6978, 13, 33295, 10786, 3911, 10141, 1153...
2.373039
1,402
from typing import List, Tuple, Optional import numpy as np from banditpylib.arms import PseudoArm from .utils import OrdinaryLearner class EpsGreedy(OrdinaryLearner): r"""Epsilon-Greedy policy With probability :math:`\frac{\epsilon}{t}` do uniform sampling and with the remaining probability play the arm wit...
[ 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 32233, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 4097, 270, 79, 2645, 571, 13, 8357, 1330, 49693, 12003, 26560, 198, 6738, 764, 26791, 1330, 14230, 3219, 14961, 1008, 628, 198,...
2.462963
918
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse from django.contrib.auth.models import User from django.shortcuts import get_object_or_404, render, redirect from .models import CarDealer, DealerReview, CarModel, CarMake from .restapis import get_dealers_from_cf,get_dealer_...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 7738, 1060, 11, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, ...
3.365672
268
from django.conf.urls import url from . import views from django.contrib.auth.views import LoginView,LogoutView app_name='accounts' urlpatterns = [ url(r'^$', views.home , name='home'), url(r'^login/$', LoginView.as_view(template_name='login.html'), name="login"), url(r'^logout$', LogoutView), url(r'^s...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 764, 1330, 5009, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 33571, 1330, 23093, 7680, 11, 11187, 448, 7680, 198, 1324, 62, 3672, 11639, 23317, 82, 6, 198...
2.458937
207
from unittest import TestCase from remoteappmanager.docker.container import Container from remoteappmanager.docker.docker_labels import ( SIMPHONY_NS, SIMPHONY_NS_RUNINFO) from remoteappmanager.tests.mocking.virtual.docker_client import \ VirtualDockerClient from remoteappmanager.tests.utils import assert_cont...
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 6569, 1324, 37153, 13, 45986, 13, 34924, 1330, 43101, 198, 6738, 6569, 1324, 37153, 13, 45986, 13, 45986, 62, 23912, 1424, 1330, 357, 198, 220, 220, 220, 23749, 11909, 40508, 62, ...
3.479167
96
#!/usr/bin/env python # encoding: utf-8 import os import numpy as np import knn def valu_result(pre_y, real_y): """ 效果评估 """ pre_count = {} all_count = {} for pre, real in zip(pre_y, real_y): if real not in pre_count: pre_count[real] = {} all_count[real] = all_count...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 638, 77, 198, 198, 4299, 1188, 84, 62, 20274, 7, 3866, 62, 88, 11, 1103, 62,...
1.787037
432
import os import shutil import tempfile import uuid from collections.abc import AsyncIterator, Iterable, Iterator from pathlib import Path, PurePath from typing import Any, Callable, Coroutine from unittest import mock import pytest import pytest_asyncio from platform_storage_api.fs.local import ( FileStatus, ...
[ 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 11748, 334, 27112, 198, 6738, 17268, 13, 39305, 1330, 1081, 13361, 37787, 11, 40806, 540, 11, 40806, 1352, 198, 6738, 3108, 8019, 1330, 10644, 11, 17129, 15235, 198, 6738,...
3.132075
159
#!python3 import os from algoliasearch.search_client import SearchClient from dotenv import load_dotenv, find_dotenv import json import requests load_dotenv(find_dotenv()) METADATA_URL = 'https://webhooks.mongodb-stitch.com/api/client/v2.0/app/covid-19-qppza/service/REST-API/incoming_webhook/metadata' REST_URL = 'ht...
[ 2, 0, 29412, 18, 198, 11748, 28686, 198, 198, 6738, 435, 70, 349, 4448, 3679, 13, 12947, 62, 16366, 1330, 11140, 11792, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 11, 1064, 62, 26518, 24330, 198, 11748, 33918, 198, 11748, ...
2.45641
195
from pwn import * #context.log_level = 'debug' #http://4ngelboy.blogspot.com/2016/10/hitcon-ctf-qual-2016-house-of-orange.html #http://4ngelboy.blogspot.tw/2017/11/play-with-file-structure-yet-another.html p = remote('securewebinc.jet', 5555) #p = process('./membermanager') binary = ELF('./membermanager') libc = EL...
[ 6738, 279, 675, 1330, 1635, 198, 220, 198, 2, 22866, 13, 6404, 62, 5715, 796, 705, 24442, 6, 198, 2, 4023, 1378, 19, 782, 417, 7081, 13, 35217, 13, 785, 14, 5304, 14, 940, 14, 17945, 1102, 12, 310, 69, 12, 13255, 12, 5304, 12, ...
2.554247
1,189
#!/usr/bin/env python # coding: utf-8 ############################################# # File Name: setup.py # Author: whzcorcd # Mail: whzcorcd@gmail.com # Created Time: 2020-06-08 ############################################# from setuptools import setup, find_packages with open("README.md", "r") as fh: long_des...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 29113, 7804, 4242, 2, 198, 2, 9220, 6530, 25, 9058, 13, 9078, 198, 2, 6434, 25, 348, 89, 10215, 10210, 198, 2, 11099, 25, 348, 89, 10215...
2.515086
464
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org) # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including witho...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 2321, 449, 2634, 29350, 44871, 27196, 11290, 357, 4023, 1378, 2503, 13, 73, 67, 24831,...
3.090909
715
#!/usr/bin/python3 -d # Copyright (c) 2020 Johannes Findeisen <you@hanez.org> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights #...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 532, 67, 198, 198, 2, 15069, 357, 66, 8, 12131, 38579, 9938, 68, 13254, 1279, 5832, 31, 71, 1531, 89, 13, 2398, 29, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11,...
2.751479
1,183
# -*- coding: utf-8 -*- """ Funkcije na grafih. V ocenah časovne zahtevnosti je n število vozlišč v grafu, m število povezav v grafu, d(u) pa število sosedov vozlišča u. Pri tem predpostavljamo, da velja n = O(m) (graf ima O(1) povezanih komponent). Podane časovne zahtevnosti veljajo za predstavitev grafa s seznami so...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 37, 2954, 979, 18015, 12385, 7933, 69, 4449, 13, 198, 198, 53, 267, 66, 268, 993, 34754, 235, 292, 709, 710, 1976, 993, 660, 85, 77, 455, 72, 11223, 299,...
1.717534
1,979
import os.path as osp import yaml import logging log = logging.getLogger("discordbot") features_path = "features.yml" def get_extensions() -> list: """ Gets extensions from the `features.yml` to be loaded into the bot :return: list """ log.info("Getting extensions...") exts = [] ...
[ 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 331, 43695, 198, 11748, 18931, 628, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7203, 15410, 585, 13645, 4943, 628, 198, 40890, 62, 6978, 796, 366, 40890, 13, 88, 4029, 1, 198, 198...
1.944321
1,347
# coding:utf-8 import sys reload(sys) sys.setdefaultencoding( "utf-8" ) from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf flags = tf.app.flags FLAGS = flags.FLAGS flags.DEFINE_string('data_dir', './', 'Directory for storing data') mnist = input_data.read_data_sets(FLAGS.data_dir, on...
[ 2, 19617, 25, 40477, 12, 23, 198, 198, 11748, 25064, 198, 260, 2220, 7, 17597, 8, 198, 17597, 13, 2617, 12286, 12685, 7656, 7, 366, 40477, 12, 23, 1, 1267, 198, 198, 6738, 11192, 273, 11125, 13, 1069, 12629, 13, 83, 44917, 82, 13,...
2.393736
447
import random f1 = random.uniform(1.0, 100.0) f2 = random.uniform(1.0, 100-f1) f3 = random.uniform(1.0, 100-f1-f2) f4 = random.uniform(1.0, 100-f1-f2-f3) f5 = random.uniform(1.0, 100-f1-f2-f3-f4) print(f1, f2, f3, f4, f5)
[ 198, 11748, 4738, 198, 198, 69, 16, 796, 4738, 13, 403, 6933, 7, 16, 13, 15, 11, 1802, 13, 15, 8, 198, 69, 17, 796, 4738, 13, 403, 6933, 7, 16, 13, 15, 11, 1802, 12, 69, 16, 8, 198, 69, 18, 796, 4738, 13, 403, 6933, 7, 1...
1.717557
131
from django.shortcuts import render,redirect,get_object_or_404 from django.views import View # models import from user.models import MovementReason,MovementPass, TimeSpend,\ MoveType from admin.models import IDtype, Gender, PassUser,District # essential imports from django.http import HttpResponseRedirect from dja...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 445, 1060, 11, 1136, 62, 15252, 62, 273, 62, 26429, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 198, 2, 4981, 1330, 220, 198, 6738, 2836, 13, 27530, 1330, 15477, 45008, 11, 217...
3.537037
216
FLAG = 'flag{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}'
[ 38948, 796, 705, 32109, 90, 24223, 24223, 24223, 24223, 5324, 92, 6 ]
4.083333
12
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 15069, 33160, 1058, 33, 6532, 12, 22405, 12, 12041, 25, 19935, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 4943, 198, 2, 345, 743,...
3.005859
1,024
# we use the normal Web Interface to logg in and execute our tests # alternative would be: https://www.home-assistant.io/integrations/rest/ from selenium import webdriver from selenium.webdriver.common.keys import Keys import time LOVELACE_USERNAME='user' LOVELACE_PASSWORD='1234' # This should be the nginx-docker co...
[ 2, 356, 779, 262, 3487, 5313, 26491, 284, 2604, 70, 287, 290, 12260, 674, 5254, 198, 2, 5559, 561, 307, 25, 3740, 1378, 2503, 13, 11195, 12, 562, 10167, 13, 952, 14, 18908, 9143, 14, 2118, 14, 198, 198, 6738, 384, 11925, 1505, 133...
2.609547
817
#/usr/bin/python3 # -*- coding: utf-8 -*- # Copyright (c) 2016 Red Hat, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights ...
[ 2, 14, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 2, 15069, 357, 66, 8, 1584, 220, 2297, 10983, 11, 3457, 13, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479...
3.378713
404
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import json import unittest import httpretty from pynodebb import Client
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 33918, 198, 11748, 555, 715, 395, 198, 117...
2.892857
56
# matchball + Выигрышные номера нескольких тиражей
[ 2, 2872, 1894, 1343, 12466, 240, 45035, 18849, 140, 111, 21169, 45035, 141, 230, 22177, 45035, 16843, 12466, 121, 25443, 120, 16843, 21169, 16142, 12466, 121, 16843, 21727, 31583, 25443, 119, 45367, 31583, 18849, 141, 227, 220, 20375, 18849...
1.106383
47
import os
[ 11748, 28686, 628 ]
3.666667
3
import argparse import pprint import time from pathlib import Path import torch import random import numpy as np from tag2pix import tag2pix root_path = Path(__file__).resolve().parent dataset_path = root_path / "dataset" tag_dump_path = root_path / "loader" / "tag_dump.pkl" pretrain_path = root_path / "model.pth" ...
[ 11748, 1822, 29572, 198, 11748, 279, 4798, 198, 11748, 640, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 28034, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 7621, 17, 79, 844, 1330, 7621, 17, 79, 844, ...
2.721805
133
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
[ 2, 15069, 1853, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
3.862416
298
#05-Aug-2016 # Script to specifically parse Wan et al 2015 http://www.nature.com/nature/journal/v525/n7569/full/nature14877.html supplementary table 4, # formatting the table for insertion into RAINET DB. workingFolder = "/home/diogo/Documents/RAINET_data/macromolecular_complex_datasets/Wan2015/" inputFile = working...
[ 198, 2, 2713, 12, 12512, 12, 5304, 198, 2, 12327, 284, 5734, 21136, 33242, 2123, 435, 1853, 2638, 1378, 2503, 13, 21353, 13, 785, 14, 21353, 14, 24891, 14, 85, 39088, 14, 77, 2425, 3388, 14, 12853, 14, 21353, 18294, 3324, 13, 6494, ...
2.10856
2,091
from config import * import matplotlib.pyplot as plt import numpy as np import math from scripts import * if __name__ == '__main__': main()
[ 6738, 4566, 1330, 1635, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 10688, 201, 198, 6738, 14750, 1330, 1635, 201, 198, 201, 198, 201, 198, 361, 11593, 3...
2.672414
58
# -*- coding: utf-8 -*- """ @brief test log(time=50s) """ import sys import unittest import warnings from pyquickhelper.loghelper import fLOG from pyquickhelper.pycode import get_temp_folder, add_missing_development_version from pyquickhelper.pycode import fix_tkinter_issues_virtualenv from pyquickhelper.ipythonhe...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 65, 3796, 220, 220, 220, 220, 220, 1332, 2604, 7, 2435, 28, 1120, 82, 8, 198, 37811, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 11748, 14601, ...
2.875817
153
import sys import os import pandas as pd import numpy as np import datetime from shutil import copy from yahoo_earnings_calendar import YahooEarningsCalendar from zipline.data import bundles as bundles_module from zipline.data.bundles.core import load, bundles import imp ext = imp.load_source('ext', '/root/.zipline/ex...
[ 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4818, 8079, 198, 6738, 4423, 346, 1330, 4866, 198, 6738, 331, 12992, 62, 451, 23400, 62, 9948, 9239, 1330, 16551...
2.752044
367
# Copyright 2020 Google LLC. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
[ 2, 15069, 12131, 3012, 11419, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743,...
2.622043
1,733
""" Name: lagrange.py Goal: interpolation of newton Author: HOUNSI Madouvi antoine-sebastien Date: 02/03/2022 """ import numpy as np import matplotlib.pyplot as plt import sys from math import pow from linearEq.utils.gaussForVal import gauss from os.path import dirname, join from interpolation.polynom i...
[ 37811, 198, 220, 220, 220, 6530, 25, 19470, 9521, 13, 9078, 198, 220, 220, 220, 25376, 25, 39555, 341, 286, 649, 1122, 198, 220, 220, 220, 6434, 25, 29068, 8035, 40, 4627, 280, 8903, 281, 1462, 500, 12, 325, 65, 459, 2013, 198, 22...
2.863248
117
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="timesias", version="0.0.4", author="Hanrui Zhang, Yuanfang Guan", author_email="rayezh@umich.edu, gyuanfan@umich.edu", description="A machine-learning framework for predi...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 1600, 21004, 2625, 40477, 12, 23, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 2617, ...
2.2751
498
lst1=[1,2,3,4] lst2=lst1 lst3=lst1.copy() lst1.append(5) lst1[0]=10 print(lst1,lst2,lst3) dict1={'aaa':1,'bbb':2} dict2=dict1 dict3=dict1.copy() dict1['ccc']=3 print(dict1,dict2,dict3) set1=set(['aaa','bbb','ccc']) set2=set1 set3=set1.copy() set1.add('ddd') print(set1,set2,set3)
[ 198, 75, 301, 16, 41888, 16, 11, 17, 11, 18, 11, 19, 60, 198, 75, 301, 17, 28, 75, 301, 16, 198, 75, 301, 18, 28, 75, 301, 16, 13, 30073, 3419, 198, 75, 301, 16, 13, 33295, 7, 20, 8, 198, 75, 301, 16, 58, 15, 22241, 940,...
1.674556
169
""" Fitting a random data using fully connected network with one hidden layer. """ import torch class MyRelu(torch.autograd.Function): """ Implement a custom made autograd function. """ @staticmethod @staticmethod device = torch.device('gpu:0' if torch.cuda.is_available() else 'cpu') # Defi...
[ 37811, 198, 37, 2535, 257, 4738, 1366, 1262, 3938, 5884, 3127, 351, 530, 7104, 7679, 13, 198, 37811, 628, 198, 11748, 28034, 628, 198, 4871, 2011, 6892, 84, 7, 13165, 354, 13, 2306, 519, 6335, 13, 22203, 2599, 198, 220, 220, 220, 37...
2.378049
574
import os from ament_index_python.packages import get_package_share_directory from launch_ros.actions import Node from launch import LaunchDescription from launch.actions import DeclareLaunchArgument from launch.substitutions import LaunchConfiguration
[ 11748, 28686, 198, 198, 6738, 257, 434, 62, 9630, 62, 29412, 13, 43789, 1330, 651, 62, 26495, 62, 20077, 62, 34945, 198, 6738, 4219, 62, 4951, 13, 4658, 1330, 19081, 198, 198, 6738, 4219, 1330, 21225, 11828, 198, 6738, 4219, 13, 4658,...
4.266667
60
"""This module contains handlers for the various supported URLs.""" from .ssh_git import SSHGitHandler __all__ = ["SSHGitHandler"] def find_handler(url): """Find a handler that will support a URL. Args: url: The URL to find a handler for. Returns: If a handler is found a class will be r...
[ 37811, 1212, 8265, 4909, 32847, 329, 262, 2972, 4855, 32336, 526, 15931, 198, 6738, 764, 45824, 62, 18300, 1330, 33825, 38, 270, 25060, 198, 198, 834, 439, 834, 796, 14631, 5432, 39, 38, 270, 25060, 8973, 628, 198, 4299, 1064, 62, 302...
2.669725
218
#!/usr/bin/env python # Copyright 2017 Google Inc. # # 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 o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 2177, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 284...
3.518519
297
product = input() times = int(input()) coffee = 1.50 water = 1 coke = 1.40 snacks = 2 print(f"{order():.2f}")
[ 11167, 796, 5128, 3419, 198, 22355, 796, 493, 7, 15414, 28955, 198, 198, 1073, 5853, 796, 352, 13, 1120, 198, 7050, 796, 352, 198, 1073, 365, 796, 352, 13, 1821, 198, 16184, 4595, 796, 362, 628, 198, 198, 4798, 7, 69, 1, 90, 2875,...
2.235294
51
# Generated by Django 3.1 on 2021-01-07 18:37 import django.db.models.deletion from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 319, 33448, 12, 486, 12, 2998, 1248, 25, 2718, 198, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.904762
42
# -*- coding: utf-8 -*- import logging from telegram import Chat from telegram.error import BadRequest from marvinbot.handlers import CommandHandler, MessageHandler, CommonFilters, CallbackQueryHandler from marvinbot.plugins import Plugin from topic_plugin.factory import TopicPluginFactory from topic_plugin.models im...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 18931, 198, 198, 6738, 573, 30536, 1330, 24101, 198, 6738, 573, 30536, 13, 18224, 1330, 7772, 18453, 198, 198, 6738, 1667, 7114, 13645, 13, 4993, 8116, 1330, 9455, ...
3.406504
123
import re from models.contact import Contact
[ 11748, 302, 198, 6738, 4981, 13, 32057, 1330, 14039, 198 ]
4.5
10
#!/usr/bin/env python3 # coding: utf-8 # Copyright 2019 Huawei Technologies Co., Ltd # # 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 13130, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34...
2.315248
1,751
# Hardware: ESP32, SSD1306 128x64 I2C screen # I2C(1): # scl: pin(25) # sda: pin(26) # Required modules: # ssd1306: official SSD1306 driver # microbmp # Required files: # img_LQ_48x48.bmp from machine import I2C from ssd1306 import SSD1306_I2C from microbmp import MicroBMP i2c = I2C(1) ssd = SSD...
[ 2, 28715, 25, 9428, 2624, 11, 21252, 12952, 21, 13108, 87, 2414, 314, 17, 34, 3159, 198, 2, 220, 220, 314, 17, 34, 7, 16, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 264, 565, 25, 6757, 7, 1495, 8, 198, 2, 220, 220, 220, 220...
1.973451
226
import os, subprocess, sys if __name__ == "__main__": ipa = sys.argv[1] main(f"{ipa}")
[ 11748, 28686, 11, 850, 14681, 11, 25064, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 20966, 64, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 220, 220, 220, 1388, 7, 69, 1, 90, 541, 64, 92,...
2.086957
46
import asyncio import logging from copy import deepcopy from any_board_game.validators import ValidationException
[ 11748, 30351, 952, 198, 11748, 18931, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 6738, 597, 62, 3526, 62, 6057, 13, 12102, 2024, 1330, 3254, 24765, 16922, 628, 198 ]
4.034483
29
#!/usr/bin/env python # -*-coding:utf-8-*- import random from math import sqrt def bulk_walk(num_steps, num_bulk, dClass): """ :param num_steps: 随机行走了多少步 :param num_bulk: 一批次进行了多少次实验 :param dClass: 醉汉类型 :return: distances 一批次里面每次开图的总共行走距离列表 """ drunk = dClass() origin = Location(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 66, 7656, 25, 40477, 12, 23, 12, 9, 12, 198, 198, 11748, 4738, 198, 6738, 10688, 1330, 19862, 17034, 628, 628, 628, 198, 198, 4299, 11963, 62, 11152, 7, 22510, 62, ...
1.863836
683
import operator from django.conf import settings from django.db.models import Q from django_elasticsearch_dsl import DocType, Index, fields from django_elasticsearch_dsl_drf.compat import KeywordField, StringField import six from muses.collection.models.item import Item from ..constants import VALUE_NOT_SPECIFIED ...
[ 11748, 10088, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 198, 6738, 42625, 14208, 62, 417, 3477, 12947, 62, 67, 6649, 1330, 14432, 6030, 11, 12901, 11, 7032, 198, ...
2.098694
10,872
# -*- coding: utf-8 -*- """ Created on Thu Sep 19 10:54:00 2019 @author: Jonathan van Leeuwen, Diederick Niehorster """ import numpy as np import math import scipy import scipy.interpolate as interp import scipy.signal from scipy.cluster.vq import vq, _vq from scipy.spatial.distance import cdist import copy import wa...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 8621, 678, 838, 25, 4051, 25, 405, 13130, 198, 198, 31, 9800, 25, 11232, 5719, 5741, 84, 21006, 11, 34288, 41556, 399, 494, 17899, 1706, ...
2.327887
22,462
""" Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. Example 1: Input: "Let's take LeetCode contest" Output: "s'teL ekat edoCteeL tsetnoc" Note: In the string, each word is separated by single space and there will not...
[ 37811, 198, 15056, 257, 4731, 11, 345, 761, 284, 9575, 262, 1502, 286, 3435, 287, 1123, 1573, 1626, 257, 6827, 981, 991, 23934, 13216, 10223, 290, 4238, 1573, 1502, 13, 198, 198, 16281, 352, 25, 198, 198, 20560, 25, 366, 5756, 338, ...
2.84
200
import ctypes import sys from typing import ClassVar, Type from .constants import * module = sys.modules["pyrtma.internal_types"] # RTMA INTERNAL MESSAGE TYPES MT = {} MT["Exit"] = 0 MT["Kill"] = 1 MT["Acknowledge"] = 2 MT["FailSubscribe"] = 6 MT["FailedMessage"] = 8 MT["Connect"] = 13 MT["Disconnect"] = 14 MT["Subs...
[ 11748, 269, 19199, 198, 11748, 25064, 198, 6738, 19720, 1330, 5016, 19852, 11, 5994, 198, 6738, 764, 9979, 1187, 1330, 1635, 198, 198, 21412, 796, 25064, 13, 18170, 14692, 79, 2417, 83, 2611, 13, 32538, 62, 19199, 8973, 198, 198, 2, 1...
2.666667
588
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2021 4Paradigm # # 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 33448, 604, 10044, 324, 17225, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, ...
3.36194
268
import struct import traceback from .util import compute_checksum """ tapextract.py - Extract the binary data from a TAP file """ def read_headerless_data(data_bytes): """only check the checksum and length here""" computed_checksum = compute_checksum(data_bytes[:-1]) checksum = struct.unpack_from('<B', da...
[ 11748, 2878, 198, 11748, 12854, 1891, 198, 6738, 764, 22602, 1330, 24061, 62, 42116, 388, 198, 198, 37811, 198, 83, 1758, 742, 974, 13, 9078, 532, 29677, 262, 13934, 1366, 422, 257, 309, 2969, 2393, 198, 37811, 198, 198, 4299, 1100, 6...
2.950355
141
import MolecularSystem msys=MolecularSystem.Universe() atom= for ii in xrange(300): msys.add_atom() msys._atomDB.df
[ 11748, 38275, 11964, 198, 198, 907, 893, 28, 44, 2305, 10440, 11964, 13, 3118, 3997, 3419, 198, 198, 37696, 28, 198, 198, 1640, 21065, 287, 2124, 9521, 7, 6200, 2599, 198, 220, 220, 220, 13845, 893, 13, 2860, 62, 37696, 3419, 198, 1...
2.431373
51
import re
[ 11748, 302, 628, 628, 198 ]
2.8
5
""" Market Watch View """ __docformat__ = "numpy" import argparse from typing import List import re import requests import pandas as pd from bs4 import BeautifulSoup import numpy as np from gamestonk_terminal.helper_funcs import ( check_positive, get_user_agent, clean_data_values_to_float, int_or_round...
[ 37811, 5991, 6305, 3582, 37227, 198, 834, 15390, 18982, 834, 796, 366, 77, 32152, 1, 198, 198, 11748, 1822, 29572, 198, 6738, 19720, 1330, 7343, 198, 11748, 302, 198, 11748, 7007, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 275, ...
1.985849
6,572
# TODO - redundant file, and functionality, as we use scipy! import math
[ 2, 16926, 46, 532, 30806, 2393, 11, 290, 11244, 11, 355, 356, 779, 629, 541, 88, 0, 198, 198, 11748, 10688, 628 ]
3.409091
22
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
[ 2, 15069, 1946, 3203, 11, 3457, 13, 198, 198, 2, 921, 389, 29376, 7520, 257, 1729, 12, 41195, 11, 8688, 11, 29359, 12, 5787, 5964, 284, 198, 2, 779, 11, 4866, 11, 13096, 11, 290, 14983, 428, 3788, 287, 2723, 2438, 393, 13934, 198,...
3.97
400
''' Evaluation of agent trajectories against the simulator (nav graph) ground truth ''' import os import sys import json import math from collections import defaultdict import networkx as nx import numpy as np from dtw import DTW BASE_DIR = 'src/vln_evaluation/' GT = BASE_DIR + 'data/R2R_coda.json' CONN = BASE...
[ 7061, 6, 34959, 286, 5797, 20134, 1749, 1028, 262, 35375, 357, 28341, 4823, 8, 220, 198, 220, 220, 220, 2323, 3872, 705, 7061, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 10688, 198, 6738, 17268, 1330, 4277...
2.202394
2,673
# # Group Chat Server # # Copyright (C) 2019 Internet Real-Time Laboratory # # Written by Jan Janak <janakj@cs.columbia.edu> # import re import os import shlex import types import time import json import sqlite3 import traceback import pjsua2 as pj import time from types import SimpleNamespace from email.utils impo...
[ 2, 198, 2, 4912, 24101, 9652, 198, 2, 198, 2, 15069, 357, 34, 8, 13130, 4455, 6416, 12, 7575, 18643, 198, 2, 198, 2, 22503, 416, 2365, 2365, 461, 1279, 13881, 461, 73, 31, 6359, 13, 4033, 2178, 544, 13, 15532, 29, 198, 2, 198, ...
2.38914
663
""" forecast.py author: Jonathan Tsai <hello@jontsai.com> Python interface to Forecast API Usage: python forecast.py LATITUDE LONGITUDE python forecast.py -t TIMESTAMP LATITUDE LONGITUDE Examples: $ python forecast.py 37.8267 -122.423 """ import getopt import json import requests import os import sys i...
[ 37811, 198, 754, 2701, 13, 9078, 198, 9800, 25, 11232, 13146, 1872, 1279, 31373, 31, 73, 756, 82, 1872, 13, 785, 29, 198, 198, 37906, 7071, 284, 4558, 2701, 7824, 198, 198, 28350, 25, 198, 220, 220, 220, 21015, 11092, 13, 9078, 4235...
2.495902
244
import time import numpy as np import argparse import cv2 pt = './pi-object-detection/MobileNetSSD_deploy.prototxt.txt' ca = './pi-object-detection/MobileNetSSD_deploy.caffemodel' CLASSES = ["background", "aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "h...
[ 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 198, 11748, 269, 85, 17, 198, 198, 457, 796, 705, 19571, 14415, 12, 15252, 12, 15255, 3213, 14, 17066, 7934, 5432, 35, 62, 2934, 1420, 13, 11235, 313, 742, 13, ...
2.227197
1,206
# Copyright 2019 The TensorFlow Hub Authors. All Rights Reserved. # # 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 app...
[ 2, 15069, 13130, 383, 309, 22854, 37535, 14699, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287,...
3.097059
680
"""Feature map based model interpretation methods in NvTK. """ import torch import logging import numpy as np from .Motif import normalize_pwm __all__ = ["get_activate_W", "get_fmap", "get_activate_W_from_fmap", "get_activate_sequence_from_fmap", "save_activate_seqlets"] def _get_W_from_conv(model, motif_width=...
[ 37811, 38816, 3975, 1912, 2746, 10794, 5050, 287, 399, 85, 51, 42, 13, 198, 37811, 198, 198, 11748, 28034, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 764, 47733, 361, 1330, 3487, 1096, 62, 79, 26377, 198, 1...
2.288073
3,270
"""Test cases for `Kernel.__call__`.""" from typing import Callable, Optional, Tuple, Union import numpy as np import pytest import probnum as pn from probnum.typing import ShapeType from ._utils import _shape_param_to_id_str D_IN = None @pytest.fixture( params=[ pytest.param( (x0_shape, ...
[ 37811, 14402, 2663, 329, 4600, 42, 7948, 13, 834, 13345, 834, 63, 526, 15931, 198, 198, 6738, 19720, 1330, 4889, 540, 11, 32233, 11, 309, 29291, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 117...
2.174958
2,372
import numpy as np import tensorflow as tf import scipy.misc as smc import config_res as config from common.cnn_utils_res import * from common import resnet_rgb_model as model from common import resnet_depth_model as model_depth from common import all_transformer as at3 from common import global_agg_net from common.L...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 629, 541, 88, 13, 44374, 355, 895, 66, 198, 198, 11748, 4566, 62, 411, 355, 4566, 198, 198, 6738, 2219, 13, 66, 20471, 62, 26791, 62, 411, 1330, 1...
2.404482
3,748
import random from art import logo, vs from utils import clear from game_data import data game()
[ 11748, 4738, 220, 198, 6738, 1242, 1330, 11112, 11, 3691, 198, 6738, 3384, 4487, 1330, 1598, 198, 6738, 983, 62, 7890, 1330, 1366, 628, 198, 198, 6057, 3419 ]
3.571429
28
from . import kernel_approximation # noqa from ._version import __version__ __all__ = ["__version__"]
[ 6738, 764, 1330, 9720, 62, 1324, 13907, 18991, 220, 1303, 645, 20402, 198, 198, 6738, 47540, 9641, 1330, 11593, 9641, 834, 198, 198, 834, 439, 834, 796, 14631, 834, 9641, 834, 8973, 198 ]
3.181818
33
"""Pending deprecation file. To view the actual content, go to: flow/envs/multiagent/ring/accel.py """ from flow.utils.flow_warnings import deprecated from flow.envs.multiagent.ring.accel import AdversarialAccelEnv as MAAEnv @deprecated('flow.multiagent_envs.loop.loop_accel', 'flow.envs.multiagent.ring.a...
[ 37811, 47, 1571, 1207, 8344, 341, 2393, 13, 198, 198, 2514, 1570, 262, 4036, 2695, 11, 467, 284, 25, 5202, 14, 268, 14259, 14, 41684, 25781, 14, 1806, 14, 330, 5276, 13, 9078, 198, 37811, 198, 6738, 5202, 13, 26791, 13, 11125, 62, ...
2.625
160
from .ucr import * from .ett_small import ETTSmall
[ 6738, 764, 1229, 81, 1330, 1635, 198, 6738, 764, 3087, 62, 17470, 1330, 12152, 4694, 76, 439, 198 ]
2.833333
18
# coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 1584, 11, 12131, 11, 18650, 290, 14, 273, 663, 29116, 13, 220, 1439, 2489, 10395, 13, 198, 2, 770, 3788, 318, 10668, 12, 36612, 284, 345, 739, 262, 14499, 2448, 33532, 1...
2.574674
3,301
# coding:utf-8 from django.core.cache import cache
[ 2, 19617, 25, 40477, 12, 23, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 23870, 1330, 12940, 628 ]
2.944444
18
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compliance with th...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 24893, 1087, 14573, 15708, 318, 10607, 284, 1104, 262, 1280, 2723, 2055, 416, 1642, 5525, 241, 251, 165, 110, 116, 162, 247, 118, 12859, 239, 12, 30266, 225,...
3.834646
254
from Crypto.Util.number import * import requests import json import codecs import base64
[ 6738, 36579, 13, 18274, 346, 13, 17618, 1330, 1635, 198, 11748, 7007, 198, 11748, 33918, 198, 11748, 40481, 82, 198, 11748, 2779, 2414 ]
3.826087
23
import unittest import random from day04 import Guard, get_guard_patterns,get_guard_most_asleep, guard_most_frequently_asleep if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 4738, 198, 6738, 1110, 3023, 1330, 4932, 11, 651, 62, 14864, 62, 33279, 82, 11, 1136, 62, 14864, 62, 1712, 62, 292, 8892, 11, 4860, 62, 1712, 62, 69, 37971, 62, 292, 8892, 628, 198, 198, 361, 1159...
2.809524
63
{ "targets": [ { "target_name": "shmnode", "sources": ["shm.cpp"] } ] }
[ 90, 198, 366, 83, 853, 1039, 1298, 685, 198, 220, 1391, 198, 220, 220, 366, 16793, 62, 3672, 1298, 366, 1477, 10295, 1098, 1600, 198, 220, 220, 366, 82, 2203, 1298, 14631, 1477, 76, 13, 20322, 8973, 198, 220, 1782, 198, 2361, 198, ...
1.866667
45
import hazelcast client = hazelcast.HazelcastClient( # Set up cluster name for authentication cluster_name="YOUR_CLUSTER_NAME", # Set the token of your cloud cluster cloud_discovery_token="YOUR_CLUSTER_DISCOVERY_TOKEN", # If you have enabled encryption for your cluster, also configure TLS/SSL for t...
[ 11748, 11595, 417, 2701, 198, 198, 16366, 796, 11595, 417, 2701, 13, 39, 41319, 2701, 11792, 7, 198, 220, 220, 220, 1303, 5345, 510, 13946, 1438, 329, 18239, 198, 220, 220, 220, 13946, 62, 3672, 2625, 56, 11698, 62, 5097, 7759, 1137, ...
2.555133
263
# importing libraries from keras.layers import Dense , Dropout ,Flatten , MaxPooling2D from keras.models import Model # define model # importing MobileNet_v2 for higher accuracy from keras.applications import MobileNetV2 mobile = MobileNetV2(input_shape=(224,224,3),include_top=False,weights='imagenet') #print(mobile....
[ 2, 33332, 12782, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 360, 1072, 837, 14258, 448, 837, 7414, 41769, 837, 5436, 27201, 278, 17, 35, 198, 6738, 41927, 292, 13, 27530, 1330, 9104, 198, 198, 2, 8160, 2746, 198, 2, 33332, 12173, 79...
2.833741
409
#!/usr/bin/python # Copyright (c) 2020, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. """Provide Module Description """ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# __author__ = ["And...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 15069, 357, 66, 8, 12131, 11, 18650, 290, 14, 273, 663, 29116, 13, 198, 2, 49962, 739, 262, 14499, 2448, 33532, 13789, 410, 352, 13, 15, 355, 3402, 379, 3740, 1378, 793, 13, 273, ...
3.839286
168
#!/bin/python3 # https://www.hackerrank.com/challenges/crush import sys if __name__ == "__main__": n, m = input().strip().split(' ') n, m = [int(n), int(m)] arr = [0] * (n+1) for a0 in range(m): a, b, k = input().strip().split(' ') a, b, k = [int(a), int(b), int(k)] arr[a-1] +...
[ 2, 48443, 8800, 14, 29412, 18, 198, 198, 2, 3740, 1378, 2503, 13, 31153, 8056, 962, 13, 785, 14, 36747, 34120, 14, 6098, 1530, 198, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220,...
1.82377
244
SITE = "https://www.google.com/" NAME = ["Michael", "Wayne", "Phelps"] KEYS = {1: 2, 3: 4} AGE = 1000 BIRTH_YEAR = 2050 if __name__ == '__main__': main()
[ 50, 12709, 796, 366, 5450, 1378, 2503, 13, 13297, 13, 785, 30487, 198, 20608, 796, 14631, 13256, 1600, 366, 25309, 710, 1600, 366, 47, 35194, 8973, 198, 7336, 16309, 796, 1391, 16, 25, 362, 11, 513, 25, 604, 92, 198, 11879, 796, 857...
2.25
72
# coding=utf-8 import numpy as np import time # Putil import data.augment as paug import base.logger as plog GaussianAugmentLogger = plog.PutilLogConfig('gaussian_augment').logger() GaussianAugmentLogger.setLevel(plog.DEBUG) class GaussianAugment(paug.Augment): ''' config: mu: [] sigma: [] ...
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 198, 2, 5930, 346, 198, 11748, 1366, 13, 559, 5154, 355, 279, 7493, 198, 11748, 2779, 13, 6404, 1362, 355, 458, 519, 628, 198, 35389, 31562, 1251...
1.949515
515
# coding: utf-8 """ Lightly API Lightly.ai enables you to do self-supervised learning in an easy and intuitive way. The lightly.ai OpenAPI spec defines how one can interact with our REST API to unleash the full potential of lightly.ai # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@lightly...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 4401, 306, 7824, 628, 220, 220, 220, 4401, 306, 13, 1872, 13536, 345, 284, 466, 2116, 12, 16668, 16149, 4673, 287, 281, 2562, 290, 19933, 835, 13, 383, 15376, 13...
2.447441
2,892
import glob import collections import os in_path = '/media/jayson/software/WS/preprocessed/preprocessed/*' vocab_root = '/media/jayson/study/graduation project/paper/experimens/moldes-May' pos_vocab_counter = collections.Counter() ner_vocab_counter = collections.Counter() file_list = glob.glob(in_path) for idx, fil...
[ 11748, 15095, 198, 11748, 17268, 198, 11748, 28686, 628, 198, 259, 62, 6978, 796, 31051, 11431, 14, 73, 34907, 14, 43776, 14, 19416, 14, 3866, 14681, 276, 14, 3866, 14681, 276, 15211, 6, 198, 18893, 397, 62, 15763, 796, 31051, 11431, ...
2.648707
464
#!/usr/bin/python # # Copyright 2015 Google Inc. All Rights Reserved. # # 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 b...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 15069, 1853, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, ...
3.527697
343
class MITCampus(Campus): """ A MITCampus is a Campus that contains tents """ def __init__(self, center_loc, tent_loc=Location(0, 0)): """ Assumes center_loc and tent_loc are Location objects Initializes a new Campus centered at location center_loc with a tent at location tent_loc """...
[ 628, 198, 4871, 17168, 21111, 385, 7, 21111, 385, 2599, 198, 220, 220, 220, 37227, 317, 17168, 21111, 385, 318, 257, 25005, 326, 4909, 29804, 37227, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 3641, 62, 17946, 11, 11105, ...
2.393424
882
import numpy as np import os # new change from sys import platform # new change from datasets import Dataset, load_dataset from itertools import groupby from overrides import overrides from sklearn.metrics import classification_report from tqdm import tqdm from transformers import AutoTokenizer from typing import Dict...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 2, 649, 1487, 220, 198, 6738, 25064, 1330, 3859, 198, 2, 649, 1487, 198, 6738, 40522, 1330, 16092, 292, 316, 11, 3440, 62, 19608, 292, 316, 198, 6738, 340, 861, 10141, 1330, 1448,...
2.381327
3,813
from PyQt5.QtCore import Qt from PyQt5.QtGui import QFont from PyQt5.QtWidgets import QWidget, QHBoxLayout, QLabel, QSlider class PsSliderParam(QWidget): """ Class defining slider QWidget comprehensive of slider name, activation checkbox and value label """
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 33734, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 1195, 23252, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 38300, 11, 1195, 39, 14253, 32517...
2.904255
94
from .page_handler import parse_xml import re
[ 6738, 764, 7700, 62, 30281, 1330, 21136, 62, 19875, 198, 11748, 302, 628, 628 ]
3.5
14
# coding: utf-8 # from uiautomator2 import utils
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 198, 6738, 334, 544, 315, 296, 1352, 17, 1330, 3384, 4487 ]
2.333333
21
from models.req.Req import Req from models.object_detection.ObjectDetection import ObjectDetection
[ 6738, 4981, 13, 42180, 13, 3041, 80, 1330, 797, 80, 198, 6738, 4981, 13, 15252, 62, 15255, 3213, 13, 10267, 11242, 3213, 1330, 9515, 11242, 3213, 628 ]
3.703704
27
import pyaudio import numpy as np import wave import time CHUNK = 2048 RATE = 32000 FORMAT = pyaudio.paInt16 CHANNEL = 1 SHIFT = 50 """ recording """ audio = pyaudio.PyAudio() stream = audio.open(format=FORMAT, channels=CHANNEL, rate=RATE, input=True, output=True, frames_per_buffer=CHUNK) print("start...
[ 11748, 12972, 24051, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 6769, 201, 198, 11748, 640, 201, 198, 201, 198, 3398, 4944, 42, 796, 36117, 201, 198, 49, 6158, 796, 3933, 830, 201, 198, 21389, 1404, 796, 12972, 24051, 1...
2.033959
1,119