content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/usr/bin/env python3 import os import argparse import re import lhtmlLib meta_default = { 'wrap-auto': False, 'add_title_id': False, 'title': 'Webpage', 'css': [], 'js': [], 'wrap-custom-pre': '', 'wrap-custom-post': '', 'directory_include': [os.getcwd()+'/'], } if __name__== '__main__...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 302, 198, 198, 11748, 300, 6494, 25835, 628, 220, 220, 198, 28961, 62, 12286, 796, 1391, 198, 220, 705, 37150, 12, 23736, 10...
2.26461
616
import random import re from PIL import Image from nonebot import on_command, on_message, on_notice, require, get_driver, on_regex from nonebot.typing import T_State from nonebot.adapters.cqhttp import Message, Event, Bot from src.libraries.maimaidx.image import * from random import randint from src.libraries.dbutil i...
[ 11748, 4738, 198, 11748, 302, 198, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 4844, 13645, 1330, 319, 62, 21812, 11, 319, 62, 20500, 11, 319, 62, 42138, 11, 2421, 11, 651, 62, 26230, 11, 319, 62, 260, 25636, 198, 6738, 4844, 13645...
3.018987
158
import sys from typing import Any, Dict WIN = sys.platform.startswith("win") # Versions of all packages possibly used in our tests # Only apply _exe_if_win to entry_points, NOT scripts PKG: Dict[str, Dict[str, Any]] = { "ansible": { "spec": "ansible==2.9.13", "apps": [ "ansible", ...
[ 11748, 25064, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 198, 198, 37620, 796, 25064, 13, 24254, 13, 9688, 2032, 342, 7203, 5404, 4943, 628, 198, 198, 2, 18535, 507, 286, 477, 10392, 5457, 973, 287, 674, 5254, 198, 2, 5514, 4174, 4...
1.587806
16,434
from __future__ import division import torch import torch.nn.functional as F from torch.nn import Parameter from torch_geometric.nn.conv import MessagePassing from torch_geometric.utils import add_remaining_self_loops from torch_geometric.laf import ElementAggregationLayer, FractionalElementAggregationLayer, ScatterAgg...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 20471, 1330, 25139, 2357, 198, 6738, 28034, 62, 469, 16996, 13, 20471, 13, 42946, 1330, 16000, 14478, 278, ...
2.194805
1,617
# 3rd party import numpy # type: ignore import pytest # this package from si_unit_pandas import CelsiusType, TemperatureArray _non_empty_sets = [ {1}, {1, 2}, {1, 2, 3}, {1, 2, 3, 4}, {1, 2, 3, 4, 5}, ] _non_empty_lists = [ [1], [1, 2], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5], ] _non_empty...
[ 2, 513, 4372, 2151, 198, 11748, 299, 32152, 220, 1303, 2099, 25, 8856, 198, 11748, 12972, 9288, 198, 198, 2, 428, 5301, 198, 6738, 33721, 62, 20850, 62, 79, 392, 292, 1330, 34186, 6030, 11, 34467, 19182, 198, 198, 62, 13159, 62, 289...
1.883721
602
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), 'helpers')) myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath + '/../')
[ 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 16794, 364, 6, 4008, 198, 1820, 15235, 796, 28686, 13, 6978, 13, 15908, ...
2.444444
72
import requests import sys import random from time import sleep from collections import deque from lxml import html # The class that handles craigslist item monitoring and parsing. # Flushes the stdout of the scraper (a file) so that output is live. # Interface for creating the scraper.
[ 11748, 7007, 198, 11748, 25064, 198, 11748, 4738, 198, 6738, 640, 1330, 3993, 198, 6738, 17268, 1330, 390, 4188, 198, 6738, 300, 19875, 1330, 27711, 628, 198, 2, 383, 1398, 326, 17105, 15671, 40704, 2378, 9904, 290, 32096, 13, 628, 198,...
4.083333
72
import os from django.shortcuts import render, HttpResponse, redirect from django.http import Http404 from django.contrib import messages from django.utils import timezone from django.contrib.auth import logout from . import forms from . import models MUSIC_TYPES = ['mp3', 'ogg', 'm4a', 'wav', 'opus'] VIDEO_TYPES = ['...
[ 11748, 28686, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 367, 29281, 31077, 11, 18941, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 42625, 14208...
2.824427
131
import construct as cs import construct_typed as cst import dataclasses import typing as t from . import GalleryItem constr = cs.Struct( "permissions" / cs.FlagsEnum(cs.Int8ul, R=4, W=2, X=1), ) gallery_item = GalleryItem( construct=constr, example_binarys={ "read": bytes([4]), "read_wri...
[ 11748, 5678, 355, 50115, 198, 11748, 5678, 62, 774, 9124, 355, 269, 301, 198, 11748, 4818, 330, 28958, 198, 11748, 19720, 355, 256, 198, 6738, 764, 1330, 12917, 7449, 628, 198, 1102, 2536, 796, 50115, 13, 44909, 7, 198, 220, 220, 220,...
2.482014
139
nums = [12,100,14,27,33] for num in nums: if num%5 == 0: print(num) break else: print("Not found")
[ 77, 5700, 796, 685, 1065, 11, 3064, 11, 1415, 11, 1983, 11, 2091, 60, 198, 198, 1640, 997, 287, 997, 82, 25, 198, 220, 220, 220, 611, 997, 4, 20, 6624, 657, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 22510, 8, 198, ...
1.734177
79
import glob import multiprocessing import os import json from django.core.exceptions import ImproperlyConfigured # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # Load Secrets secrets = load_secrets() # Get a secret proc_name = 'dis...
[ 11748, 15095, 198, 11748, 18540, 305, 919, 278, 198, 11748, 28686, 198, 11748, 33918, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 12205, 525, 306, 16934, 1522, 198, 198, 2, 10934, 13532, 2641, 262, 1628, 588, 428, 25,...
2.568562
299
fat=1 n=5 while n>=1: fat = fat * n n-=1 print(f"O fatoria de 5! = {fat}")
[ 17359, 28, 16, 198, 77, 28, 20, 198, 4514, 299, 29, 28, 16, 25, 198, 220, 220, 220, 3735, 796, 3735, 1635, 299, 198, 220, 220, 220, 299, 12, 28, 16, 198, 198, 4798, 7, 69, 1, 46, 277, 1352, 544, 390, 642, 0, 796, 1391, 17359...
1.693878
49
from django.contrib import admin from .models import Movie
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 15875, 198 ]
3.933333
15
# Copyright 2019 Ivan Bondarenko # # 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 writi...
[ 2, 15069, 13130, 21798, 12812, 5757, 7204, 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, ...
3.380117
342
# Generated by Django 2.0 on 2018-08-10 16:28 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 319, 2864, 12, 2919, 12, 940, 1467, 25, 2078, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.892857
28
"""This module provide multiple test of ingestion services""" import shutil from time import sleep from conftest import ValueStorage import logging import json from server_automation.configuration import config from discrete_kit.validator.json_compare_pycsw import * from discrete_kit.functions.shape_functions import Sh...
[ 37811, 1212, 8265, 2148, 3294, 1332, 286, 38382, 2594, 37811, 198, 11748, 4423, 346, 198, 6738, 640, 1330, 3993, 198, 6738, 369, 701, 395, 1330, 11052, 31425, 198, 11748, 18931, 198, 11748, 33918, 198, 6738, 4382, 62, 2306, 296, 341, 13...
2.405714
5,425
import sympy, random, pygame from sympy import * from pygame.locals import * from Files import Var, Sprite, Thing x, y = symbols("x y") pygame.font.init() WHITE = (255, 255, 255) frames = 0 waiting = 'done' derivatives = [x + 3, x**2 + 5, x**2 + 6*x, tan(x), sec(x)] integrals = [x + 5, x + 2, 1/(1 +...
[ 11748, 10558, 88, 11, 4738, 11, 12972, 6057, 201, 198, 6738, 10558, 88, 1330, 1635, 201, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 201, 198, 6738, 13283, 1330, 12372, 11, 33132, 11, 21561, 201, 198, 201, 198, 87, 11, 331, ...
2.585139
323
# Copyright 2014 Cisco Systems, 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 requi...
[ 2, 15069, 1946, 28289, 11998, 11, 3457, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, ...
2.127448
2,911
//中止条件 if i>=m or j>=n: return; if i==m-1 and j==n-1: res.append(ans) return //递归调用 dfs(i+1,j,ans,res) ans.append([i+1,j]) dfs(i,j+1,ans,res) ans.pop() ans.append([i,j+1]) ans=[] ...
[ 1003, 40792, 29826, 95, 30266, 94, 20015, 114, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1312, 29, 28, 76, 393, 474, 29, 28, 77, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.329897
291
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Openstack Client Test code. ''' import unittest import credentials import osnetwork_client as neutronclient class OSTest(unittest.TestCase): ''' Test Openstack client handlers. ''' def get_openstack_credentials(self, rcfile): ''' Get ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 11505, 25558, 20985, 6208, 2438, 13, 198, 7061, 6, 198, 198, 11748, 555, 715, 395, 198, 11748, 180...
1.971545
1,476
#!/usr/bin/env python import sys from django.conf import settings settings.configure( DATABASES={ 'default': {'ENGINE': 'django.db.backends.sqlite3'} }, INSTALLED_APPS=[ 'htpayway', ], MIDDLEWARE_CLASSES=[], ) if __name__ == '__main__': from django.test.simple import run_test...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 628, 198, 33692, 13, 11250, 495, 7, 198, 220, 220, 220, 360, 1404, 6242, 1921, 1546, 34758, 198, 220, 220, 220, 220, 220, ...
2.268571
175
from django.shortcuts import render
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543 ]
4.375
8
from __future__ import absolute_import import annoy from ann_benchmarks.algorithms.base import BaseANN
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 10072, 198, 6738, 1529, 62, 26968, 14306, 13, 282, 7727, 907, 13, 8692, 1330, 7308, 22846, 628 ]
3.851852
27
from typing import List import webbrowser import sys import requests import bs4 if __name__ == "__main__": main() # https://www.google.com/search?q=dfs&tbm=nws # rso > div:nth-child(2) > g-card > div > div > div.dbsr > a # rso > div:nth-child(1) > g-card > div > div > div.dbsr > a
[ 6738, 19720, 1330, 7343, 198, 11748, 3992, 40259, 198, 11748, 25064, 198, 11748, 7007, 198, 11748, 275, 82, 19, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198, 198, 2, 3740,...
2.377049
122
from .logic_parser import logicparse
[ 6738, 764, 6404, 291, 62, 48610, 1330, 9156, 29572 ]
4
9
import random while True: print('1. Lancia il dado\n2. Esci') user = int(input()) if user == 1: num = random.randint(1,6) print('Numero generato : ',num) else: break
[ 11748, 4738, 201, 198, 201, 198, 4514, 6407, 25, 201, 198, 220, 220, 220, 3601, 10786, 16, 13, 21534, 544, 4229, 288, 4533, 59, 77, 17, 13, 8678, 979, 11537, 201, 198, 220, 220, 220, 2836, 796, 493, 7, 15414, 28955, 201, 198, 220,...
2.009346
107
from fcfs import FCFS
[ 6738, 277, 66, 9501, 1330, 10029, 10652, 198 ]
2.75
8
import model import config import torch import time import tools import json import _pickle import os import copy import numpy as np import random import math import pprint from torch.utils.data import BatchSampler, SequentialSampler, RandomSampler from transformers import AutoTokenizer, AutoModel, AdamW torch.backend...
[ 11748, 2746, 198, 11748, 4566, 198, 11748, 28034, 198, 11748, 640, 198, 11748, 4899, 198, 11748, 33918, 198, 11748, 4808, 27729, 293, 198, 11748, 28686, 198, 11748, 4866, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 11748, 1...
2.428571
252
from typing import Dict, List, Optional import torch import torch.nn as nn from torch import Tensor import torch.nn.functional as F import numpy as np from omegaconf import OmegaConf, DictConfig from torch_utils import persistence from torch_utils.ops import bias_act from torch_utils import misc from torch_utils.ops....
[ 6738, 19720, 1330, 360, 713, 11, 7343, 11, 32233, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 1330, 309, 22854, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 299, 32152, 355, ...
2.330012
4,215
from tools.tools import setup_data_loaders from VariationalAutoEncoder.utils import evaluate_vae, train_vae from VariationalAutoEncoder.VariationalAutoEncoder import VAE import torch import pyro import pyro.distributions as dist from pyro.infer import SVI, Trace_ELBO from pyro.optim import Adam from tqdm import tqdm...
[ 6738, 4899, 13, 31391, 1330, 9058, 62, 7890, 62, 2220, 364, 198, 198, 6738, 15965, 864, 27722, 27195, 12342, 13, 26791, 1330, 13446, 62, 33353, 11, 4512, 62, 33353, 198, 6738, 15965, 864, 27722, 27195, 12342, 13, 23907, 864, 27722, 2719...
2.805732
1,256
import pytest import torch from torchstruct import TensorStruct
[ 11748, 12972, 9288, 201, 198, 11748, 28034, 201, 198, 201, 198, 6738, 28034, 7249, 1330, 309, 22854, 44909, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201,...
1.942308
52
from sklearn.naive_bayes import GaussianNB as GNB from sklearn.svm import SVC from preprocessor import preprocess learn()
[ 6738, 1341, 35720, 13, 2616, 425, 62, 24406, 274, 1330, 12822, 31562, 32819, 355, 15484, 33, 198, 6738, 1341, 35720, 13, 82, 14761, 1330, 311, 15922, 198, 6738, 662, 41341, 1330, 662, 14681, 198, 198, 35720, 3419 ]
3.297297
37
# Copyright 2015 NetApp, 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 by applicable law or...
[ 2, 15069, 1853, 3433, 4677, 11, 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, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 26...
2.866667
750
# coding: utf-8 """ Idfy.Signature Sign contracts, declarations, forms and other documents using digital signatures. ## Last update Last build date for this endpoint: 18.03.2019 """ import pprint import re from typing import List, Dict from datetime import datetime as datetime class Link(object): ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 5121, 24928, 13, 11712, 1300, 628, 220, 220, 220, 5865, 8592, 11, 31713, 11, 5107, 290, 584, 4963, 1262, 4875, 17239, 13, 220, 220, 22492, 4586, 4296, 220, 220, ...
2.176296
2,025
# Copyright 2015 Christian Aichinger <Greek0@gmx.net> # # 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 ...
[ 2, 15069, 1853, 4302, 317, 488, 3889, 1279, 44059, 15, 31, 70, 36802, 13, 3262, 29, 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, ...
2.480162
2,470
# Na identação do python utilizar apenas 4 espaços como convenção print("Olá meu caro seja bem-vindo ao seu programa PYTHON\n") num_1=int(input("Digite um número interiro :")) print("Vamos trabalhar com soma agora ") num_2=int(input("\nDigite outro número interiro :")) total=num_1+num_2 if total <=5: print(f" A som...
[ 2, 11013, 1852, 64, 16175, 28749, 466, 21015, 7736, 528, 283, 2471, 268, 292, 604, 1658, 8957, 16175, 418, 401, 78, 7292, 16175, 28749, 198, 4798, 7203, 30098, 6557, 502, 84, 1097, 78, 384, 6592, 307, 76, 12, 50172, 78, 257, 78, 384...
2.304659
279
# !/usr/bin/env python3 # Author: C.K # Email: theck17@163.com # DateTime:2021-01-21 21:30:34 # Description: import os, sys if __name__ == "__main__": pass
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 6434, 25, 327, 13, 42, 198, 2, 9570, 25, 262, 694, 1558, 31, 24136, 13, 785, 198, 2, 7536, 7575, 25, 1238, 2481, 12, 486, 12, 2481, 2310, 25, 1270, 25, 2682, 198, 2, ...
2.246575
73
# -*- coding:utf-8 -*- # -*- author:ZuoJianHao -*- # -*- coding:utf-8 -*- # -*- author:ZuoJianHao -*- import tensorflow as tf import cv2 import numpy as np weights = "./yolov3_tiny_widerface_boxes_int8.tflite" image_path = "./416_416.jpg" original_image = cv2.imread(image_path) original_image = cv2.cvtColor(original_i...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 532, 9, 12, 1772, 25, 57, 20895, 41, 666, 39, 5488, 532, 9, 12, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 532, 9, 12, 1772, 25, 57, 2...
2.548387
341
# -*- coding: utf-8 -*- import copy # Build the dictionaries to transliterate Serbian cyrillic to latin and vice versa. # This dictionary is to transliterate from cyrillic to latin. SR_CYR_TO_LAT_DICT = { u'А': u'A', u'а': u'a', u'Б': u'B', u'б': u'b', u'В': u'V', u'в': u'v', u'Г': u'G', u'г': u'g', ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 4866, 198, 2, 10934, 262, 48589, 3166, 284, 4779, 2676, 378, 39619, 269, 2417, 359, 291, 284, 3042, 259, 290, 7927, 25470, 13, 198, 198, 2, 770, 22155, 318, 284...
1.677592
5,797
##################################################################################### ##################################################################################### #### --------------------------------------------------------------------------- #### #### ASSIGNING 1992 NLCD CATEGORIES to 2010 TRAC...
[ 201, 198, 29113, 29113, 14468, 4242, 2, 201, 198, 29113, 29113, 14468, 4242, 2, 201, 198, 4242, 16529, 32284, 1303, 21017, 201, 198, 4242, 220, 220, 220, 220, 220, 220, 220, 220, 220, 24994, 3528, 15871, 9768, 399, 5639, 35, 327, 6158...
2.767148
1,662
import os import shlex import subprocess from typing import List import shutil from jinja2 import Environment, FileSystemLoader from pesto.cli import PROCESSING_FACTORY_PATH from pesto.cli.core.build_config import BuildConfig from pesto.cli.core.utils import PESTO_LOG
[ 11748, 28686, 198, 11748, 427, 2588, 198, 11748, 850, 14681, 198, 6738, 19720, 1330, 7343, 198, 11748, 4423, 346, 198, 198, 6738, 474, 259, 6592, 17, 1330, 9344, 11, 9220, 11964, 17401, 198, 198, 6738, 28064, 78, 13, 44506, 1330, 41755,...
3.358025
81
import unittest from unittest.mock import MagicMock import os import cv2 import numpy as np from subt.octomap import Octomap, data2maplevel, frontiers # vim: expandtab sw=4 ts=4
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 198, 11748, 28686, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 13284, 13, 38441, 296, 499, 1330, 2556, 296, 499,...
2.815385
65
from ..waterframe import WaterFrame def read_df(df, index_time, index_depth=None, metadata={}, vocabulary={}): """ Get a WaterFrame from a pandas DataFrame. Parameters ---------- df: Pandas.DataFrame index_time: str Column with the TIME index index_depth: str ...
[ 6738, 11485, 7050, 14535, 1330, 5638, 19778, 198, 198, 4299, 1100, 62, 7568, 7, 7568, 11, 6376, 62, 2435, 11, 6376, 62, 18053, 28, 14202, 11, 20150, 34758, 5512, 25818, 34758, 92, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, ...
2.147117
503
#!/usr/bin/env python # pylint: disable=too-complex,no-name-in-module,import-error,relative-import,missing-returns-doc,too-many-instance-attributes,too-many-branches,too-many-statements,too-many-arguments,too-many-locals,no-member,invalid-name """Appetite Main. Parent appetite class """ import os import sys import tr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 279, 2645, 600, 25, 15560, 28, 18820, 12, 41887, 11, 3919, 12, 3672, 12, 259, 12, 21412, 11, 11748, 12, 18224, 11, 43762, 12, 11748, 11, 45688, 12, 7783, 82, 12, 15390, 11, 1882...
1.865093
18,257
expected_output = { "interfaces": { "GigabitEthernet2.390": { "ipv4": { "neighbors": { "10.12.90.1": { "age": "-", "ip": "10.12.90.1", "link_layer_address": "fa16.3eff.9c9e", ...
[ 40319, 62, 22915, 796, 1391, 198, 220, 220, 220, 366, 3849, 32186, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 38, 328, 29968, 36, 490, 3262, 17, 13, 25964, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220...
1.352156
974
from webpie import WPApp, WPHandler WPApp(Handler).run_server(8080)
[ 6738, 3992, 21749, 1330, 370, 4537, 381, 11, 370, 11909, 392, 1754, 198, 198, 54, 4537, 381, 7, 25060, 737, 5143, 62, 15388, 7, 1795, 1795, 8, 198 ]
2.464286
28
n = int(input("n=")) for a in range(n+1): continue lst = [] i = 2 while i <= n: if a[i] != 0: lst.append(a[i]) for j in range(i, n+1, i): a[j] = 0 i += 1 print(lst)
[ 77, 796, 493, 7, 15414, 7203, 77, 2625, 4008, 628, 198, 1640, 257, 287, 2837, 7, 77, 10, 16, 2599, 198, 220, 220, 220, 2555, 198, 75, 301, 796, 17635, 198, 72, 796, 362, 198, 4514, 1312, 19841, 299, 25, 198, 220, 220, 220, 611, ...
1.702479
121
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ ADJECTIVES = { 'colorful': _('colorful'), 'hairy': _('hairy'), 'wet': _('wet'), 'flying': _('flying'), 'burning': _('burning'), 'dirty': _('dirty'), } NOUNS = { 'cat': ...
[ 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, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 628, 198...
2.241237
485
from rest_framework import serializers from quotes.models import Quote from quotes.models import QuoteCategory
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 13386, 13, 27530, 1330, 19879, 198, 6738, 13386, 13, 27530, 1330, 19879, 27313, 220 ]
4.666667
24
# косяк, мой подсчет метрик не работает если там нет трушных 1 """ CDSDSDS """ from sklearn.model_selection import train_test_split import numpy as np import pandas as pd import matplotlib.pyplot as plt import torch device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") def ts_train_test_split(df, l...
[ 2, 12466, 118, 15166, 21727, 40623, 31583, 11, 12466, 120, 25443, 117, 12466, 123, 25443, 112, 21727, 141, 229, 16843, 20375, 12466, 120, 16843, 20375, 21169, 18849, 31583, 12466, 121, 16843, 220, 21169, 16142, 140, 109, 15166, 20375, 16142...
1.609406
6,613
from django.core.cache import cache from django.db.models.signals import post_save def treenav_save_other_object_handler(sender, instance, created, **kwargs): """ This signal attempts to update the HREF of any menu items that point to another model object, when that objects is saved. """ # import ...
[ 6738, 42625, 14208, 13, 7295, 13, 23870, 1330, 12940, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 628, 198, 4299, 256, 1361, 615, 62, 21928, 62, 847, 62, 15252, 62, 30281, 7, 82, 2194, 11, 45...
2.83237
692
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may...
[ 2, 220, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 220, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 220, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 220, 5115, 6634, 9238,...
3.938967
213
from django.db import models from django.conf import settings from posts.models import Post
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, 6851, 13, 27530, 1330, 2947, 628 ]
3.916667
24
from model.group import Group import random
[ 6738, 2746, 13, 8094, 1330, 4912, 198, 11748, 4738, 628, 628 ]
4.272727
11
import pandas as pd
[ 11748, 19798, 292, 355, 279, 67, 628 ]
3
7
import datetime import glob import os import sys import tempfile from decimal import ROUND_HALF_UP, Decimal from pathlib import Path from django.conf import settings from django.core.management.base import BaseCommand from django.utils import timezone from laske_export.models import LaskePaymentsLog from leasing.mode...
[ 11748, 4818, 8079, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 20218, 7753, 198, 6738, 32465, 1330, 371, 15919, 62, 39, 1847, 37, 62, 8577, 11, 4280, 4402, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 426...
3.623853
109
"""Cryptopals Set 1. Basics """ from base64 import b64decode from dataclasses import dataclass from itertools import zip_longest import cryptopalsolutions.algorithms.binary as binary_helper import cryptopalsolutions.algorithms.language as language_helper import cryptopalsolutions.models.solutions as cryptopal_solutio...
[ 37811, 23919, 404, 874, 5345, 352, 13, 198, 198, 15522, 873, 198, 37811, 198, 6738, 2779, 2414, 1330, 275, 2414, 12501, 1098, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 340, 861, 10141, 1330, 19974, 62, 6511, 395, ...
2.38416
3,548
import pandas as pd import pyflux as pf import sys import date_util import common if __name__ == "__main__": fn = sys.argv[1] start_date = sys.argv[2] end_date = sys.argv[3] predict_start = sys.argv[4] predict_end = sys.argv[5] action_count = common.load_action_stat(fn) count, date, real_v...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 69, 22564, 355, 279, 69, 198, 11748, 25064, 198, 11748, 3128, 62, 22602, 198, 11748, 2219, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 2471...
2.413386
254
# TODO: Test verbose name and plural needed for translation. # TODO: Incorporate HTML process to send message as text/html content type.
[ 2, 16926, 46, 25, 6208, 15942, 577, 1438, 290, 22801, 2622, 329, 11059, 13, 198, 2, 16926, 46, 25, 3457, 31150, 378, 11532, 1429, 284, 3758, 3275, 355, 2420, 14, 6494, 2695, 2099, 13, 198 ]
3.914286
35
import nep import time client = nep.client('127.0.0.1', 8000) # Create a new client instance while True: msg = {"message":"client request"} # Message to send as request client.send_info(msg) # Send request print (client.listen_info()) # Wait for server response time.sleep(1) # Wait one second
[ 11748, 25919, 220, 198, 11748, 640, 220, 198, 198, 16366, 796, 25919, 13, 16366, 10786, 16799, 13, 15, 13, 15, 13, 16, 3256, 38055, 8, 1303, 13610, 257, 649, 5456, 4554, 198, 198, 4514, 6407, 25, 198, 220, 220, 220, 31456, 796, 1977...
3.038462
104
from glob import glob import os import h5py import resnet_one import torch from tqdm import tqdm import torch.nn as nn from flags import FLAGS import json from get_dataloaders import get_data from training_functions import train_function, validation_function, validation_summary, test_function from scoring_functions imp...
[ 6738, 15095, 1330, 15095, 198, 11748, 28686, 198, 11748, 289, 20, 9078, 198, 11748, 581, 3262, 62, 505, 198, 11748, 28034, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 9701, 1...
3.318966
116
from cfr.input_structures.utility_matrix import UtilMatrix
[ 6738, 269, 8310, 13, 15414, 62, 7249, 942, 13, 315, 879, 62, 6759, 8609, 1330, 7273, 346, 46912, 628 ]
3.157895
19
# -*- coding: utf-8 -*- import re import scrapy import json from locations.items import GeojsonPointItem
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 302, 198, 198, 11748, 15881, 88, 198, 11748, 33918, 198, 198, 6738, 7064, 13, 23814, 1330, 2269, 13210, 1559, 12727, 7449, 628 ]
2.918919
37
from pathlib import Path import numpy as np import pandas as pd if __name__ == '__main__': main()
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.717949
39
""" A module to show off a native coroutine pipeline. This pipe allows us to send messages back-and-forth between coroutines, simulating what we can do with the yield statement/expression. However, it is very arcane it shows with the native coroutines are not as useful for animation or other modern applications. In f...
[ 37811, 198, 32, 8265, 284, 905, 572, 257, 6868, 1162, 28399, 11523, 13, 198, 198, 1212, 12656, 3578, 514, 284, 3758, 6218, 736, 12, 392, 12, 25718, 1022, 1162, 448, 1127, 11, 198, 14323, 8306, 644, 356, 460, 466, 351, 262, 7800, 264...
2.691002
1,178
from wallpaper_downloader import site_parser from bs4 import BeautifulSoup def test_good_page_url(): """ Test '_get_page_html' function of site_parser module. Function is tested with the good URL of the page. """ page_html = site_parser._get_page_html( "https://www.smashingmagazine.com/ca...
[ 6738, 39328, 62, 15002, 263, 1330, 2524, 62, 48610, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628, 198, 4299, 1332, 62, 11274, 62, 7700, 62, 6371, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6208, 705, 62, 1136, 62, ...
2.547945
292
#!/usr/bin/python3 # Mirrorscript v2 By Hazmirul Afiq import subprocess, requests, re, sys import operator import argparse, apt, os import threading from shutil import copyfile result_url = [] ping_result = [] mirrors = {} headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, l...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 7381, 5965, 6519, 410, 17, 2750, 17064, 10793, 377, 2483, 25011, 198, 11748, 850, 14681, 11, 7007, 11, 302, 11, 25064, 198, 11748, 10088, 198, 11748, 1822, 29572, 11, 15409, 11, 28686,...
2.577485
2,123
import os import re
[ 11748, 28686, 198, 11748, 302, 628 ]
3.5
6
""" Created on July 02, 2018 @author: Alejandro Molina """ from spn.algorithms.MPE import get_mpe_top_down_leaf, add_node_mpe from spn.structure.leaves.parametric.Inference import continuous_log_likelihood, gamma_log_likelihood, \ discrete_log_likelihood, categorical_log_likelihood, categorical_dictionary_log_like...
[ 37811, 198, 41972, 319, 2901, 7816, 11, 2864, 198, 198, 31, 9800, 25, 9300, 47983, 17958, 1437, 198, 37811, 198, 6738, 599, 77, 13, 282, 7727, 907, 13, 7378, 36, 1330, 651, 62, 76, 431, 62, 4852, 62, 2902, 62, 33201, 11, 751, 62, ...
2.7
240
# coding: utf-8 """ SimScale API The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from simscale_sdk.configuration import Configuration class PressureInletBC(object): """NOTE: This class is auto generated ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 3184, 29990, 7824, 628, 220, 220, 220, 383, 2196, 286, 262, 4946, 17614, 3188, 25, 657, 13, 15, 13, 15, 198, 220, 220, 220, 2980, 515, 416, 25, 3740, 1378, 965...
2.312037
5,259
import time import uuid import re from pathlib import Path import subprocess import requests import base64 from netaddr import * from urllib3.exceptions import InsecureRequestWarning from core import settings, helpers, audit, db, storage from core.models import action from plugins.inga.models import inga from plugins....
[ 11748, 640, 198, 11748, 334, 27112, 198, 11748, 302, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 850, 14681, 198, 11748, 7007, 198, 11748, 2779, 2414, 198, 6738, 2010, 29851, 1330, 1635, 198, 6738, 2956, 297, 571, 18, 13, 1069, 1175...
3.989899
99
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import os import typing import deepdiff import pytest import pytest_mock import fair.configuration as fdp_conf import fair.identifiers as fdp_id @pytest.mark.configuration @pytest.mark.configuration @pytest.mark.configuration @pytest.mark.configuration @pytest.mark.configuration @pytest.mark.configuration...
[ 11748, 28686, 198, 11748, 19720, 198, 198, 11748, 2769, 26069, 198, 11748, 12972, 9288, 198, 11748, 12972, 9288, 62, 76, 735, 198, 198, 11748, 3148, 13, 11250, 3924, 355, 277, 26059, 62, 10414, 198, 11748, 3148, 13, 738, 13350, 355, 277...
2.980488
205
from collections import OrderedDict import hashlib from django.db import models from django.conf import settings from django.urls import reverse from django.utils.safestring import mark_safe import jsonfield from model_utils.models import TimeStampedModel from tworaven_apps.utils.basic_response import (ok_resp, err_...
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 12234, 8019, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 1...
2.062418
9,196
import os import pandas as pd import numpy as np import gin import shutil from sklearn.model_selection import train_test_split @gin.configurable
[ 11748, 28686, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 39733, 201, 198, 11748, 4423, 346, 201, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, ...
2.888889
54
from unittest import TestCase from Blackjack.blackjack import Hand, Card, Deck
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 2619, 19650, 13, 13424, 19650, 1330, 7157, 11, 5172, 11, 20961, 628, 628 ]
3.608696
23
import MySQLdb import urllib2, urllib, re, sys import xml from datetime import datetime ##removes all records older than 30 days.. run as cron job #main file, run as parseweather(woeid) if __name__ == '__main__': cleandb()
[ 11748, 33476, 9945, 198, 11748, 2956, 297, 571, 17, 11, 2956, 297, 571, 11, 302, 11, 25064, 198, 11748, 35555, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 2235, 2787, 5241, 477, 4406, 4697, 621, 1542, 1528, 492, 1057, 355, 1067...
2.898734
79
from Model import * from numpy import sign
[ 6738, 9104, 1330, 1635, 198, 6738, 299, 32152, 1330, 1051, 198 ]
3.909091
11
"""BlockDAG generator This package contains code to build and compare BlockDAG in a lightweight-as-possible manner. The main method (build_block_dag) performs a Kahn topological sort of the vertices (dict) and edges (list of (u, v) tuples) building blocks for each vertex as needed. """ import json import hashlib impo...
[ 37811, 12235, 35, 4760, 17301, 198, 198, 1212, 5301, 4909, 2438, 284, 1382, 290, 8996, 9726, 35, 4760, 287, 257, 18700, 12, 292, 12, 79, 4733, 5642, 13, 198, 464, 1388, 2446, 357, 11249, 62, 9967, 62, 67, 363, 8, 17706, 257, 42264, ...
2.478184
2,842
from pathlib import Path calib_set_json_path = (Path(__file__).parent / 'databases/geometry_calibration/calibration_set.json')
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 9948, 571, 62, 2617, 62, 17752, 62, 6978, 796, 357, 15235, 7, 834, 7753, 834, 737, 8000, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.220588
68
from datetime import datetime, date import sys if sys.version_info >= (2, 7): from nose.tools import assert_dict_equal import xlwings as xw try: import numpy as np from numpy.testing import assert_array_equal except ImportError: np = None try: import pandas as pd from pandas import DataFrame, S...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 3128, 198, 11748, 25064, 198, 361, 25064, 13, 9641, 62, 10951, 18189, 357, 17, 11, 767, 2599, 198, 220, 220, 220, 422, 9686, 13, 31391, 1330, 6818, 62, 11600, 62, 40496, 198, 11748, 2124, 75, ...
2.019305
2,590
# -*- coding: utf-8 -*- # @Time : 2021/08/14 16:30 # @Author : srcrs # @Email : srcrs@foxmail.com import requests,json,time,re,login,logging,traceback,os,random,notify,datetime from lxml.html import fromstring #每日签到,1积分 ,第七天得到 1G 日包 #位置: 我的 --> 我的金币
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 33448, 14, 2919, 14, 1415, 1467, 25, 1270, 198, 2, 2488, 13838, 220, 1058, 12351, 3808, 198, 2, 2488, 15333, 220, 220, 1058, 12351,...
1.706667
150
import komand from .schema import ConnectionSchema, Input # Custom imports below import jbxapi from komand.exceptions import ConnectionTestException
[ 11748, 479, 296, 392, 198, 6738, 764, 15952, 2611, 1330, 26923, 27054, 2611, 11, 23412, 198, 198, 2, 8562, 17944, 2174, 198, 11748, 474, 65, 87, 15042, 198, 6738, 479, 296, 392, 13, 1069, 11755, 1330, 26923, 14402, 16922, 628 ]
3.775
40
import struct import unittest import zstandard as zstd ss = struct.Struct("=QQ")
[ 11748, 2878, 198, 11748, 555, 715, 395, 198, 198, 11748, 1976, 20307, 355, 1976, 19282, 198, 198, 824, 796, 2878, 13, 44909, 7203, 28, 48, 48, 4943, 628, 198 ]
2.931034
29
import inspect import typing from typing import Callable, Dict, Any from flask_resql import resql as rs from flask_resql.resql import gen_args_from_params
[ 11748, 10104, 198, 11748, 19720, 198, 6738, 19720, 1330, 4889, 540, 11, 360, 713, 11, 4377, 198, 198, 6738, 42903, 62, 411, 13976, 1330, 581, 13976, 355, 44608, 198, 6738, 42903, 62, 411, 13976, 13, 411, 13976, 1330, 2429, 62, 22046, ...
3.333333
48
# coding: utf-8 """ Canopy.Api No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa:...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 1680, 11081, 13, 32, 14415, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 4946, 15042, 35986, 3740, 1378, 12567, 13, 785, 14, 9654, 499, 270, 10141, 14, ...
2.142215
15,582
# Generated by Django 2.1.1 on 2019-02-05 10:16 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 16, 319, 13130, 12, 2999, 12, 2713, 838, 25, 1433, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import numpy as np class FuzzyKmeans(): """ Fuzzy Kmeans calculates cluster probabilities in regards to euclidian distance Equivalent to vanilla Kmeans if we assign a given point to the cluster with the highest fuzzy probability Parameters: X: numpy array() data matrix U: cluster probab...
[ 11748, 299, 32152, 355, 45941, 198, 198, 4871, 376, 4715, 88, 42, 1326, 504, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 376, 4715, 88, 509, 1326, 504, 43707, 13946, 39522, 287, 13957, 284, 304, 36616, 19825, 5253, 198, 220,...
2.248313
741
Python 2.7.9 (default, Sep 17 2016, 20:26:04) [GCC 4.9.2] on linux2 Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> Initializing... 1 Primary SAM3X8E Serial Connected 00 f1 31 32 2e 33 34 35 36 37 20 20 ff 55 34 35 36 3...
[ 37906, 362, 13, 22, 13, 24, 357, 12286, 11, 8621, 1596, 1584, 11, 1160, 25, 2075, 25, 3023, 8, 220, 198, 58, 38, 4093, 604, 13, 24, 13, 17, 60, 319, 32639, 17, 198, 6030, 366, 22163, 4766, 1600, 366, 66, 20696, 1, 393, 366, 43...
2.016181
309
import numpy import seaborn as sns from matplotlib.ticker import PercentFormatter from pandas.api.types import is_numeric_dtype, is_object_dtype, is_categorical_dtype from grplot.features.plot.packedbubbles import plot as pb from grplot.features.plot.treemaps import plot as tms
[ 11748, 299, 32152, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 6738, 2603, 29487, 8019, 13, 83, 15799, 1330, 22512, 8479, 1436, 198, 6738, 19798, 292, 13, 15042, 13, 19199, 1330, 318, 62, 77, 39223, 62, 67, 4906, 11, 318, 62, 15...
3.1
90
"""Testing facility for conkit.core.distance.Distance""" import unittest import numpy as np from conkit.core.distance import Distance from conkit.core.distogram import Distogram if __name__ == "__main__": unittest.main(verbosity=2)
[ 37811, 44154, 6841, 329, 369, 15813, 13, 7295, 13, 30246, 13, 45767, 37811, 198, 198, 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 369, 15813, 13, 7295, 13, 30246, 1330, 34600, 198, 6738, 369, 15813, 13, 7295, ...
3.157895
76
# Copyright (C) 2018-2021 OpenMMLab # SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2020-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # from .dist_utils import (DistOptimizerHook, all_reduce_dict, allreduce_grads, reduce_mean) from .lr_updater import CosineAnnealingUntil...
[ 2, 15069, 357, 34, 8, 2864, 12, 1238, 2481, 4946, 44, 5805, 397, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 2, 15069, 357, 34, 8, 12131, 12, 1238, 2481, 8180, 10501, 198, 2, 30628, 5...
2.393305
239
""" Testing that the request/response content limit policy limits the content-length of the response body """ import pytest from packaging.version import Version # noqa # pylint: disable=unused-import from testsuite import rawobj, TESTED_VERSION # noqa # pylint: disable=unused-import pytestmark = [pytest.mark.issue...
[ 37811, 198, 44154, 326, 262, 2581, 14, 26209, 2695, 4179, 2450, 7095, 262, 2695, 12, 13664, 286, 262, 198, 26209, 1767, 198, 37811, 198, 11748, 12972, 9288, 198, 6738, 16846, 13, 9641, 1330, 10628, 220, 1303, 645, 20402, 1303, 279, 2645...
2.68006
672
""" Tests output file handling. """ from importlib import import_module from typing import Any from os.path import join from unittest.mock import patch import pytest builder = import_module("build-export") # type: Any CFG = """ [Source] type = "directory" srctype = 'xml' cspdir = 'csp' datadir = 'data' srcdir = 's...
[ 37811, 30307, 5072, 2393, 9041, 13, 198, 37811, 198, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 6738, 19720, 1330, 4377, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 1174...
2.599493
789
from datetime import datetime import pytest from ..parse_mission_log_line import parse, UnexpectedATypeWarning
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 11485, 29572, 62, 3411, 62, 6404, 62, 1370, 1330, 21136, 11, 471, 42072, 1404, 2981, 20361, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, ...
2.980769
52
""" Scrabble Hand Given an array of scrabble tiles, create a function that outputs the maximum possible score a player can achieve by summing up the total number of points for all the tiles in their hand. Each hand contains 7 scrabble tiles. """ from unittest import TestCase tile, score = 'tile', ...
[ 37811, 201, 198, 3351, 25619, 903, 7157, 201, 198, 15056, 281, 7177, 286, 6040, 397, 903, 19867, 11, 201, 198, 220, 220, 220, 2251, 257, 2163, 326, 23862, 262, 5415, 1744, 4776, 257, 2137, 460, 4620, 201, 198, 220, 220, 220, 416, 21...
3.172414
116
features_data = np.array(sentences) # แบ่งข้อมูลเป็น 10 ชุด โดยไม่เรียง k_fold = KFold(n_splits=10, random_state=1992, shuffle=True) word_features = None accuracy_scores = [] for train_set, test_set in k_fold.split(features_data): word_features = get_word_features(get_words_in_sentences(features_data[train_set].tol...
[ 40890, 62, 7890, 796, 45941, 13, 18747, 7, 34086, 3007, 8, 198, 2, 220, 31479, 223, 19567, 248, 31479, 230, 19567, 229, 19567, 224, 31479, 231, 19567, 255, 19567, 94, 19567, 117, 19567, 98, 31479, 222, 19567, 249, 31479, 229, 19567, 2...
2.315938
709
# coding: utf-8 from dateutil.parser import parse from pycti import OpenCTIApiClient # Variables api_url = "https://demo.opencti.io" api_token = "YOUR_TOKEN" # OpenCTI initialization opencti_api_client = OpenCTIApiClient(api_url, api_token) # Define the date date = parse("2019-12-01").strftime("%Y-%m-%dT%H:%M:%SZ"...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136, 198, 198, 6738, 12972, 310, 72, 1330, 4946, 4177, 3539, 14415, 11792, 198, 198, 2, 15965, 2977, 198, 15042, 62, 6371, 796, 366, 5450, 1378, 9536, 7...
2.768707
294
#!/usr/bin/env python # -*- coding: utf-8 -*- # 基础模块 import os import sys print ('filter_useless_data') os.system('python filter_useless_data.py') print ('gen_imprs') os.system('python gen_imprs.py') print ('gen_samples') os.system('python gen_samples.py')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 10263, 253, 118, 163, 94, 222, 162, 101, 94, 161, 251, 245, 198, 11748, 28686, 198, 11748, 25064, 198, 198, ...
2.258621
116
from wolverine.module.service import MicroService, ServiceMessage, ServiceDef from wolverine.test import TestMicroApp #class TestService(object): # def test_micro_service(event_loop): # app = TestMicroApp(loop=event_loop) # options = {'op_1': 'test', 'op_2': True} # service = MicroService(app...
[ 6738, 266, 14375, 500, 13, 21412, 13, 15271, 1330, 4527, 16177, 11, 4809, 12837, 11, 4809, 7469, 198, 6738, 266, 14375, 500, 13, 9288, 1330, 6208, 13031, 4677, 628, 198, 2, 4871, 6208, 16177, 7, 15252, 2599, 198, 198, 2, 220, 220, 2...
2.255137
584