content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- import sympy as sp x = sp.symbols('x') assert 1 == sp.limit(sp.exp(x), x, 0) assert 1 == sp.limit(sp.sin(x) / x, x, 0) assert sp.oo == sp.limit(1.0 / x, x, 0) assert sp.E.evalf() == sp.limit((1 + 1.0 / x) ** x, x, sp.oo)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 10558, 88, 355, 599, 198, 198, 87, 796, 599, 13, 1837, 2022, 10220, 10786, 87, 11537, 198, 198, 30493, 352, 6624, 599, 13, 32374, 7, 2777, 13, 11201, 7, 87, 8...
1.984127
126
# train eshte skripta permes se ciles formohet .pkl fajlli pra classifier permes training import numpy as np import matplotlib.pyplot as plt from sklearn.neural_network import MLPClassifier # from sklearn.metrics import accuracy_score, classification_report # from sklearn import metrics import joblib from sklearn.me...
[ 2, 4512, 1658, 71, 660, 1341, 1968, 64, 583, 6880, 384, 269, 2915, 1296, 78, 3202, 764, 79, 41582, 277, 1228, 15516, 7201, 1398, 7483, 583, 6880, 3047, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, ...
2.619573
1,451
#!/usr/bin/env python3 #This sample demonstrates reading the IR and UV Index. #Install Sensor uHAT library with "pip3 install turta-sensoruhat" from time import sleep from turta_sensoruhat import Turta_UV_Light #Initialize light = Turta_UV_Light.UVAmbientLightSensor() try: while True: #Read UV Index ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 1212, 6291, 15687, 3555, 262, 14826, 290, 22033, 12901, 13, 198, 2, 15798, 35367, 334, 39, 1404, 5888, 351, 366, 79, 541, 18, 2721, 256, 3325, 64, 12, 82, 22854, 84, 51...
2.342105
266
#!/usr/bin/env python3 import pfnet import numpy as np from tqdm import tqdm import tensorflow as tf from tensorflow import keras from datetime import datetime from utils import datautils, arguments, pfnet_loss def run_training(params): """ run training with the parsed arguments """ batch_size = para...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 279, 69, 3262, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11...
2.295432
3,087
import os from django.core.wsgi import get_wsgi_application try: import newrelic.agent newrelic.agent.initialize() newrelic.agent.capture_request_params() except Exception as e: print("newrelic couldn't be initialized:", e) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "web.settings") application...
[ 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 18504, 12397, 1330, 651, 62, 18504, 12397, 62, 31438, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 649, 260, 677, 13, 25781, 628, 220, 220, 220, 649, 260, 677, 13, 25781, 1...
2.790323
124
# Copyright © 2018 Stanislav Hnatiuk. All rights reserved. """The tests module from the pages app.""" from django.test import TestCase from django.urls import reverse from generic.tests import ViewTestMixin class AboutViewTest(TestCase, ViewTestMixin): """Tests for AboutView.""" template = 'pages/about.htm...
[ 2, 15069, 10673, 2864, 7299, 3044, 615, 367, 77, 7246, 2724, 13, 1439, 2489, 10395, 13, 198, 198, 37811, 464, 5254, 8265, 422, 262, 5468, 598, 526, 15931, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14...
2.912088
273
import requests # Create a function for Get_collections() or Get_Collections_HSI() to call the api url = "https://api.howrare.is/v0.1/collections" #check what format collection name does response = requests.request("GET", url) print(response.text) # Shortened sample of successful response: showing only 2 collect...
[ 11748, 7007, 198, 198, 2, 13610, 257, 2163, 329, 3497, 62, 4033, 26448, 3419, 393, 3497, 62, 5216, 26448, 62, 7998, 40, 3419, 284, 869, 262, 40391, 198, 198, 6371, 796, 366, 5450, 1378, 15042, 13, 4919, 430, 260, 13, 271, 14, 85, ...
2.014458
415
# -*- coding: utf-8 -*- import sys from PyQt4 import QtGui from PyQt4 import QtCore import sip import xml.etree.ElementTree as ET from functools import lru_cache from ctypes import windll list_of_db_types = ['XML', 'SQLite', 'MS SQL Server'] def indentXML(elem, level=0): """ Функция для создания отступов ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 198, 6738, 9485, 48, 83, 19, 1330, 33734, 8205, 72, 198, 6738, 9485, 48, 83, 19, 1330, 33734, 14055, 198, 11748, 31145, 198, 11748, 35555, 13, 316, ...
1.837651
579
import torch import langpractice as lp from langpractice.utils.training import run_training import torch.multiprocessing as mp torch.autograd.set_detect_anomaly(True) if __name__ == "__main__": mp.set_start_method('forkserver') run_training(lp.training.train)
[ 11748, 28034, 198, 11748, 42392, 39541, 355, 300, 79, 198, 6738, 42392, 39541, 13, 26791, 13, 34409, 1330, 1057, 62, 34409, 198, 11748, 28034, 13, 16680, 541, 305, 919, 278, 355, 29034, 198, 198, 13165, 354, 13, 2306, 519, 6335, 13, 2...
2.882979
94
# MIT License # # Copyright (c) 2018 Evgeny Medvedev, evge.medvedev@gmail.com # # 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, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 2864, 4319, 5235, 88, 2019, 1079, 1990, 11, 819, 469, 13, 1150, 1079, 1990, 31, 14816, 13, 785, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597,...
3.493304
448
# Generated by Django 3.1.7 on 2021-03-17 12:28 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 3070, 12, 1558, 1105, 25, 2078, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
import rflib dataset_aliases = { 'coco': ['coco', 'mscoco', 'ms_coco'], } def get_classes(dataset): """Get class names of a dataset.""" alias2name = {} for name, aliases in dataset_aliases.items(): for alias in aliases: alias2name[alias] = name if rflib.is_str(dataset): ...
[ 11748, 374, 2704, 571, 628, 198, 19608, 292, 316, 62, 7344, 1386, 796, 1391, 198, 220, 220, 220, 705, 66, 25634, 10354, 37250, 66, 25634, 3256, 705, 907, 66, 25634, 3256, 705, 907, 62, 66, 25634, 6, 4357, 198, 92, 628, 198, 4299, ...
2.213483
267
import sys sys.path.append("../..") import random import hashlib from MyCrypto.algorithms.power import quick_power from MyCrypto.algorithms.exgcd import gcd, inverse if __name__ == '__main__': message = b'message' dsa = ElGamal(q=19, a=10) sk, pk = dsa.genKey() sign = dsa.sign(message, sk) pri...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 492, 4943, 198, 11748, 4738, 198, 11748, 12234, 8019, 198, 6738, 2011, 23919, 78, 13, 282, 7727, 907, 13, 6477, 1330, 2068, 62, 6477, 198, 6738, 2011, 23919, 78, 13, 282, 772...
2.3375
160
from iridauploader.parsers.parsers import Parser from iridauploader.parsers.parsers import supported_parsers from iridauploader.parsers import exceptions
[ 6738, 4173, 312, 559, 7304, 263, 13, 79, 945, 364, 13, 79, 945, 364, 1330, 23042, 263, 198, 6738, 4173, 312, 559, 7304, 263, 13, 79, 945, 364, 13, 79, 945, 364, 1330, 4855, 62, 79, 945, 364, 198, 6738, 4173, 312, 559, 7304, 263,...
2.961538
52
from django.contrib import admin from .models import Post, Category # Register your models here. @admin.register(Post) @admin.register(Category)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 2947, 11, 21743, 198, 198, 2, 17296, 534, 4981, 994, 13, 628, 198, 31, 28482, 13, 30238, 7, 6307, 8, 628, 198, 31, 28482, 13, 30238, 7, 27313, 8, 198 ]
3.488372
43
import argparse import hypothesis import numpy as np import pickle import torch from ratio_estimation import Classifier from sklearn import svm, datasets from sklearn.metrics import roc_auc_score from sklearn.metrics import roc_curve, auc from tqdm import tqdm from sklearn.model_selection import train_test_split from ...
[ 11748, 1822, 29572, 198, 11748, 14078, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 11748, 28034, 198, 198, 6738, 8064, 62, 395, 18991, 1330, 5016, 7483, 198, 6738, 1341, 35720, 1330, 264, 14761, 11, 40522, 198, 6738, ...
3.156566
198
#!/bin/python3 """ You’re given the pointer to the head node of a doubly linked list. Reverse the order of the nodes in the list. The head node might be NULL to indicate that the list is empty. Change the next and prev pointers of all the nodes so that the direction of the list is reversed. Return a reference to the he...
[ 2, 48443, 8800, 14, 29412, 18, 198, 37811, 198, 1639, 447, 247, 260, 1813, 262, 17562, 284, 262, 1182, 10139, 286, 257, 3385, 306, 6692, 1351, 13, 198, 49, 964, 325, 262, 1502, 286, 262, 13760, 287, 262, 1351, 13, 198, 464, 1182, ...
2.986087
575
from wechat_sdk import WechatConf conf = WechatConf( token='$token', appid='$appid', appsecret='$appsecret', encrypt_mode='safe', )
[ 6738, 356, 17006, 62, 21282, 74, 1330, 775, 17006, 18546, 198, 198, 10414, 796, 775, 17006, 18546, 7, 198, 220, 220, 220, 220, 220, 220, 220, 11241, 11639, 3, 30001, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 598, 312, 11639, 3, ...
2.035294
85
from __future__ import absolute_import from vertica_python.vertica.messages.message import BackendMessage from vertica_python.vertica.messages.backend_messages.notice_response import NoticeResponse ErrorResponse._message_id('E')
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 9421, 3970, 62, 29412, 13, 1851, 3970, 13, 37348, 1095, 13, 20500, 1330, 5157, 437, 12837, 198, 6738, 9421, 3970, 62, 29412, 13, 1851, 3970, 13, 37348, 1095, 13, 1891, 43...
3.584615
65
from maya.api import OpenMaya __all__ = [ "average_matrix", ] def average_matrix(matrices): """ Get the average matrix of the all of the provided matrix. All matrices multiplier by the multiplier of matrices and multiplied. :param list[OpenMaya.MMatrix] matrices: :return: Average matrix ...
[ 6738, 743, 64, 13, 15042, 1330, 4946, 6747, 64, 628, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 23913, 62, 6759, 8609, 1600, 198, 60, 628, 198, 4299, 2811, 62, 6759, 8609, 7, 6759, 45977, 2599, 198, 220, 220, 220, 3722...
2.526316
228
from db_methods.users import UsersJobs from models.user import User with UsersJobs() as uj: if not uj.exists(123456): uj.insert_user(User(123456, "AraSH")) user = uj.get_user(123456) print(user.name) else: uj.delete_user(123456)
[ 6738, 20613, 62, 24396, 82, 13, 18417, 1330, 18987, 41, 8158, 198, 6738, 4981, 13, 7220, 1330, 11787, 628, 198, 4480, 18987, 41, 8158, 3419, 355, 334, 73, 25, 198, 220, 220, 220, 611, 407, 334, 73, 13, 1069, 1023, 7, 10163, 29228, ...
2.125
128
from math import radians, sin, cos, tan ang=float(input('Diga o ângulo: ')) print('Seno: {:.2f}'.format(sin(radians(ang)))) print('Cosseno: {:.2f}'.format(cos(radians(ang)))) print('Tangente: {:.2f}'.format(tan(radians(ang))))
[ 6738, 10688, 1330, 2511, 1547, 11, 7813, 11, 8615, 11, 25706, 198, 648, 28, 22468, 7, 15414, 10786, 35, 13827, 267, 6184, 95, 782, 43348, 25, 705, 4008, 198, 4798, 10786, 10445, 78, 25, 46110, 13, 17, 69, 92, 4458, 18982, 7, 31369, ...
2.456522
92
"""Query utils.""" class Q(metaclass=_MetaQuery): """Allow for query: >>> Q['persons_count'] > 5 >>> Q['persons'][0]['name'] == 'thomas' >>> Q['l'].contains(10) >>> Q['persons'].contains(Q['name'] == 'thomas') """
[ 37811, 20746, 3384, 4487, 526, 15931, 628, 628, 628, 628, 628, 628, 198, 4871, 1195, 7, 4164, 330, 31172, 28, 62, 48526, 20746, 2599, 198, 220, 220, 220, 37227, 35265, 329, 12405, 25, 628, 220, 220, 220, 13163, 1195, 17816, 19276, 684...
2.25
112
from fastapi import APIRouter from extensions import Route, ErrorSchema from apps.api_admin.entities import CreateTokenParser, TokenSchema from apps.api_admin.logics import LoginResolver router = APIRouter(route_class=Route, responses=ErrorSchema) @router.post('', response_model=TokenSchema, status_code=201) async ...
[ 6738, 3049, 15042, 1330, 3486, 4663, 39605, 198, 198, 6738, 18366, 1330, 18956, 11, 13047, 27054, 2611, 198, 6738, 6725, 13, 15042, 62, 28482, 13, 298, 871, 1330, 13610, 30642, 46677, 11, 29130, 27054, 2611, 198, 6738, 6725, 13, 15042, ...
3.267081
161
#!/usr/bin/env python # -*- coding:utf-8 -*- # build index of pali words into JavaScript Array variables import os, sys import shutil import xml.dom.minidom import json import urllib prefix_code = { # "°" : "uc", # "-" : "dash", "a" : "a", "ā" : "aa", "b" : "b", "c" : "c", "d" : "d", "ḍ" : "dotd", "e...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 2, 1382, 6376, 286, 6340, 72, 2456, 656, 11933, 15690, 9633, 198, 198, 11748, 28686, 11, 25064, 198, 11748, 4423, 346...
2.0123
813
#!/usr/bin/env python # -*- coding: utf-8 -*- ' test.py ' __author__ = 'Hyman Lee' ############## main code ############### import const from pprint import pprint if __name__ == '__main__': pprint(vars(const)) print const.SOURCE
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6, 1332, 13, 9078, 705, 198, 198, 834, 9800, 834, 796, 705, 21217, 805, 5741, 6, 628, 198, 7804, 4242, 2235, 1...
2.5625
96
import tensorflow as tf import os,random import cv2 as cv import numpy as np import glob from tensorflow.keras import datasets, layers, models from tensorflow.keras.utils import Sequence from tensorflow.keras.applications import ResNet101,ResNet50 from tensorflow.keras.preprocessing.image import load_img impor...
[ 11748, 11192, 273, 11125, 355, 48700, 201, 198, 11748, 28686, 11, 25120, 201, 198, 11748, 269, 85, 17, 355, 269, 85, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 15095, 201, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13...
3.306667
150
# -*- coding: utf-8 -*- from .card import Card # ユニット情報
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 764, 9517, 1330, 5172, 628, 198, 2, 14524, 99, 30165, 35799, 46349, 227, 161, 254, 109, 198 ]
1.8125
32
#! /usr/bin/env python import rospy import time import actionlib from hamdan_actions.msg import TimerAction, TimerResult, TimerFeedback rospy.init_node('timer_action_server') server = actionlib.SimpleActionServer('timer', TimerAction, do_timer, False) server.start() rospy.spin()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 686, 2777, 88, 198, 198, 11748, 640, 198, 11748, 2223, 8019, 198, 6738, 8891, 25604, 62, 4658, 13, 19662, 1330, 5045, 263, 12502, 11, 5045, 263, 23004, 11, 5045, 263, 1...
2.96875
96
# coding: utf-8 from copy import deepcopy import os from supervisely_lib import logger from supervisely_lib.annotation.annotation import Annotation from supervisely_lib.imaging import image as sly_image from supervisely_lib.io.json import load_json_file from supervisely_lib.nn.config import AlwaysPassingConfigValidat...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 4866, 1330, 2769, 30073, 198, 11748, 28686, 198, 198, 6738, 29745, 786, 306, 62, 8019, 1330, 49706, 198, 6738, 29745, 786, 306, 62, 8019, 13, 1236, 14221, 13, 1236, 14221, 1330, 1052, ...
3.418605
301
from .rman_ui_base import _RManPanelHeader from .rman_ui_base import CollectionPanel from .rman_ui_base import PRManButtonsPanel from ..rman_utils.draw_utils import _draw_ui_from_rman_config from ..rman_utils.draw_utils import _draw_props from ..rman_constants import NODE_LAYOUT_SPLIT from ..rman_render import RmanRend...
[ 6738, 764, 81, 805, 62, 9019, 62, 8692, 1330, 4808, 49, 5124, 26639, 39681, 198, 6738, 764, 81, 805, 62, 9019, 62, 8692, 1330, 12251, 26639, 198, 6738, 764, 81, 805, 62, 9019, 62, 8692, 1330, 4810, 5124, 1537, 27288, 26639, 198, 673...
2.775401
187
import torch import torch.nn as nn import torch.nn.parallel
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 1845, 29363, 628, 628, 628, 628, 628, 628, 628 ]
2.92
25
import numpy as np from scipy.stats import rankdata import torch def events_to_image(xs, ys, ps, sensor_size=(180, 240), interpolation=None, padding=False, meanval=False, default=0): """ Place events into an image using numpy @param xs x coords of events @param ys y coords of events @param ps Event...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 34242, 1330, 4279, 7890, 198, 11748, 28034, 198, 198, 4299, 2995, 62, 1462, 62, 9060, 7, 34223, 11, 331, 82, 11, 26692, 11, 12694, 62, 7857, 16193, 15259, 11, 14956, 828, 3...
2.374425
6,952
# Copyright 2022 Garda Technologies, LLC. 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 applic...
[ 2, 15069, 33160, 12790, 64, 21852, 11, 11419, 13, 1439, 2489, 10395, 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, ...
2.225787
1,683
import sys sys.setrecursionlimit(100000) n,m=map(int,input().split()) p=list(map(int,input().split())) uf=UnionFind(n) for i in range(m): x,y=map(int,input().split()) uf.uni(p[x-1]-1,p[y-1]-1) count=0 for i in range(n): if uf.same(i,p[i]-1): count+=1 print(count)
[ 11748, 25064, 198, 17597, 13, 2617, 8344, 24197, 32374, 7, 3064, 830, 8, 198, 198, 77, 11, 76, 28, 8899, 7, 600, 11, 15414, 22446, 35312, 28955, 198, 79, 28, 4868, 7, 8899, 7, 600, 11, 15414, 22446, 35312, 3419, 4008, 198, 3046, 2...
1.972222
144
import os import random from pathlib import Path from typing import Tuple import glob import numpy as np import cv2 import torch from torch.utils.data import Dataset import torchvision.transforms as transforms import torchvision.transforms.functional as TF from ganslate.utils.io import make_dataset_of_files # Config...
[ 11748, 28686, 198, 11748, 4738, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, ...
2.461922
1,405
from django import template from django.utils.safestring import mark_safe try: from django.utils.encoding import force_text except ImportError: from django.utils.encoding import force_unicode as force_text import markdown_tag from markdown_tag.conf import settings register = template.Library() @register.fil...
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 198, 28311, 25, 198, 220, 220, 220, 422, 42625, 14208, 13, 26791, 13, 12685, 7656, 1330, 2700, 62, 5239, 198, 16341, 17267...
2.771739
368
from __future__ import print_function, absolute_import import os import torch import shutil from torchvision.datasets import ImageFolder from torchvision.datasets.utils import check_integrity, download_and_extract_archive, extract_archive, verify_str_arg ARCHIVE_DICT = { 'data': { 'url': 'http://cs231n....
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 4112, 62, 11748, 198, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 4423, 346, 198, 6738, 28034, 10178, 13, 19608, 292, 1039, 1330, 7412, 41092, 198, 6738, 28034, 10178, 13, 19608, ...
2.717608
602
from logging import config from .rp1interface import RP1Controller from typing import Dict from .typings import Odrive as Odrv, Axis #For type checking etc import odrive from odrive.enums import * import time from time import perf_counter, sleep import logging import threading import math def d...
[ 6738, 18931, 1330, 4566, 201, 198, 6738, 764, 81, 79, 16, 39994, 1330, 25812, 16, 22130, 201, 198, 6738, 19720, 1330, 360, 713, 201, 198, 6738, 764, 28004, 654, 1330, 440, 19472, 355, 440, 7109, 85, 11, 38349, 1303, 1890, 2099, 10627,...
2.349925
663
import tensorflow as tf from MCQ.Consts import Consts # [batch, K, D], int, [batch, K]
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 13122, 48, 13, 3103, 6448, 1330, 4757, 82, 628, 628, 628, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 43501, 11, 509, 11, 36...
2.017544
57
import torch import numpy as np from functools import partial def hbbox2rbboxRec_v2(hbboxes): ''' :param hbboxes: Tensor, (xmin, ymin, xmax, ymax) :return: rbboxes:Tensor, (x, y, w, h, theta) ''' if hbboxes is None: return None num_hbboxes = hbboxes.size(0) w = hbboxes[....
[ 11748, 28034, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 1257, 310, 10141, 1330, 13027, 201, 198, 201, 198, 4299, 289, 65, 3524, 17, 26145, 3524, 6690, 62, 85, 17, 7, 71, 65, 29305, 2599, 201, 198, 220, 220, 220, 705, ...
1.856359
2,186
from __future__ import absolute_import from __future__ import division from __future__ import print_function from collections import namedtuple import logging from ray.rllib.evaluation.sample_batch import MultiAgentBatch from ray.rllib.utils.annotations import DeveloperAPI logger = logging.getLogger(__name__) OffPo...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 11748, 18931, 198, 198, 6738, 26842, 13, 81...
2.394554
1,579
import wave import math soundFileName = input("Input sound file (insert path or name):") messageFileName = input("Output file (insert path or name):") sound = wave.open(soundFileName,"rb") soundFrames = [bytearray(4)]*sound.getnframes() for i in range(sound.getnframes()): soundFrames[i] = bytearray(sou...
[ 11748, 6769, 201, 198, 11748, 10688, 201, 198, 201, 198, 23661, 8979, 5376, 796, 5128, 7203, 20560, 2128, 2393, 357, 28463, 3108, 393, 1438, 2599, 4943, 201, 198, 20500, 8979, 5376, 796, 5128, 7203, 26410, 2393, 357, 28463, 3108, 393, 1...
2.553719
363
from pymusicFP.profileProcessing import * import pymusicFP.knowledgeBase as kb
[ 6738, 279, 4948, 385, 291, 5837, 13, 13317, 18709, 278, 1330, 1635, 198, 11748, 279, 4948, 385, 291, 5837, 13, 45066, 14881, 355, 47823, 628 ]
3.2
25
""" Django settings for example project. """ import os from pathlib import Path # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = Path.cwd() # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = "a_not_so_secret_key" # SECURITY WARNING: don't run with debug ...
[ 37811, 198, 35, 73, 14208, 6460, 329, 1672, 1628, 13, 198, 37811, 198, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 2, 10934, 13532, 2641, 262, 1628, 588, 428, 25, 28686, 13, 6978, 13, 22179, 7, 33, 11159, 62, 34...
2.064286
1,680
import csv num = 0 with open('../datasets/fixed_spam.csv', newline='') as old_spam_csv, open('../datasets/new_spam.csv', newline='') as new_spam_csv, open( '../datasets/new_spam_final.csv', 'w', newline='') as new_spam_final_csv: cs...
[ 11748, 269, 21370, 198, 198, 22510, 796, 657, 198, 198, 4480, 1280, 10786, 40720, 19608, 292, 1039, 14, 34021, 62, 2777, 321, 13, 40664, 3256, 649, 1370, 28, 7061, 8, 355, 1468, 62, 2777, 321, 62, 40664, 11, 1280, 10786, 40720, 19608,...
1.857884
964
# # @lc app=leetcode id=21 lang=python3 # # [21] Merge Two Sorted Lists # # @lc code=start # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next # @lc code=end
[ 198, 198, 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 2481, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 2481, 60, 39407, 4930, 311, 9741, 44968, 198, 2, 198, 198, 2, 2488, 44601, 2438, 28, 9688, 198, 2, 30396, 329,...
2.247863
117
# Copyright 2021 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 33448, 3012, 11419, 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, 733...
2.678304
1,604
# -*- coding: utf-8 -*- import numpy as np import pandas as pd from bio_hansel.metadata import read_metadata_table, merge_results_with_metadata from bio_hansel.utils import df_field_fillna
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 13401, 62, 7637, 741, 13, 38993, 1330, 1100, 62, 38993, 62, 11487, 11, 20121, ...
2.880597
67
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC. 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 requir...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 1303, 198, 2, 15069, 13130, 3012, 11419, 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.786374
2,598
import pandas as pd import numpy as np import random debugging = False
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 628, 198, 24442, 2667, 796, 10352, 628, 628, 628, 198 ]
3.16
25
import socket if __name__ == '__main__': main()
[ 11748, 17802, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.5
22
import torch import torch.utils.data as data import numpy as np import os from PIL import Image import logging import matplotlib.pyplot as plt logging.basicConfig(format='%(asctime)s : %(levelname)s - %(message)s', datefmt='%d/%m/%Y %I:%M:%S %p', level=logging.INFO) logger = lo...
[ 11748, 28034, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 18931, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 6...
2.225
160
# Copyright (c) 2021 Alethea Katherine Flowers. # Published under the standard MIT License. # Full text available at: https://opensource.org/licenses/MIT import pyvisa from . import config _resource_manager = None
[ 2, 15069, 357, 66, 8, 33448, 9300, 1169, 64, 32719, 30036, 13, 198, 2, 26372, 739, 262, 3210, 17168, 13789, 13, 198, 2, 6462, 2420, 1695, 379, 25, 3740, 1378, 44813, 1668, 13, 2398, 14, 677, 4541, 14, 36393, 198, 198, 11748, 12972, ...
3.590164
61
import boto3 import numpy import sklearn import scipy s3_client = boto3.client('s3') def run_mrp_lambda(event, context): """ Process a file upload. """ # Get the uploaded file's information bucket = event['Records'][0]['s3']['bucket']['name'] # Will be `my-bucket` key = event['Records'][0]['...
[ 11748, 275, 2069, 18, 198, 198, 11748, 299, 32152, 198, 11748, 1341, 35720, 198, 11748, 629, 541, 88, 198, 198, 82, 18, 62, 16366, 796, 275, 2069, 18, 13, 16366, 10786, 82, 18, 11537, 198, 198, 4299, 1057, 62, 43395, 79, 62, 50033, ...
2.622047
254
# -*- coding: utf-8 -*- """ Created on Tue Mar 9 12:00:18 2021 @author: vlro """ import rasterio import geopandas as gpd import rasterio.mask import numpy as np import os import numpy as np from shapely.geometry import box, Point, shape def transform_shape_raster(infile): """Reads raster AOI bounds and reproj...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 1526, 220, 860, 1105, 25, 405, 25, 1507, 33448, 198, 198, 31, 9800, 25, 410, 75, 305, 198, 37811, 198, 198, 11748, 374, 1603, 952, 198, ...
2.169458
2,508
# Creates and prints items sold and quantity of each from gmail messages for sold eBay items import httplib2 import base64 import re import email.parser from apiclient.discovery import build from apiclient import errors from oauth2client.client import flow_from_clientsecrets from oauth2client.file import Storage fr...
[ 2, 7921, 274, 290, 20842, 3709, 2702, 290, 12040, 286, 1123, 422, 308, 4529, 6218, 329, 2702, 21698, 3709, 628, 198, 11748, 1841, 489, 571, 17, 198, 11748, 2779, 2414, 198, 11748, 302, 198, 11748, 3053, 13, 48610, 628, 198, 6738, 2471...
3.103283
1,249
# Copyright (c) 2021 MIT # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR(S) DISCLAIM ALL WARRANTIES ...
[ 2, 15069, 357, 66, 8, 33448, 17168, 198, 2, 220, 198, 2, 2448, 3411, 284, 779, 11, 4866, 11, 13096, 11, 290, 14983, 428, 3788, 329, 597, 198, 2, 4007, 351, 393, 1231, 6838, 318, 29376, 7520, 11, 2810, 326, 262, 2029, 198, 2, 663...
3.127536
345
from datetime import date from floorist.config import get_config from os import environ from sqlalchemy import create_engine import awswrangler as wr import boto3 import logging import pandas as pd import yaml
[ 6738, 4818, 8079, 1330, 3128, 198, 6738, 4314, 396, 13, 11250, 1330, 651, 62, 11250, 198, 6738, 28686, 1330, 551, 2268, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 198, 11748, 3253, 2032, 36985, 1754, 355, 1319, 198, 11748...
3.576271
59
import random result = '' message = '' choice = '' print(' ') print(' ______ _ ______ ______ _ _ ______ ______ ______ ______') print('| ____| | \ || | ____| | __ | | | | | | __ | |__ __| | __ | | __ |') print('| |____ ||\\ || | | | |__| | | |__| | | |_...
[ 11748, 4738, 198, 198, 20274, 796, 10148, 198, 20500, 796, 10148, 198, 25541, 796, 10148, 198, 198, 4798, 10786, 705, 8, 198, 4798, 10786, 44435, 220, 220, 220, 4808, 220, 220, 220, 220, 220, 220, 220, 220, 44435, 220, 220, 220, 44435...
2.075309
810
from diet_simple_package.schemas import input_schema, solution_schema try: # if you don't have gurobipy installed, the code will still load and then fail on solve import gurobipy as gu except: gu = None # ------------------------ create a solve function -------------------------------- def solve(dat): """...
[ 6738, 5496, 62, 36439, 62, 26495, 13, 1416, 4411, 292, 1330, 5128, 62, 15952, 2611, 11, 4610, 62, 15952, 2611, 198, 198, 28311, 25, 1303, 611, 345, 836, 470, 423, 915, 22609, 541, 88, 6589, 11, 262, 2438, 481, 991, 3440, 290, 788, ...
2.374566
865
""" Custom Bert model pretrained on Portuguese. """ import os import shutil from urllib.parse import urlparse import requests from h2oaicore.models import TextBERTModel, CustomModel from h2oaicore.systemutils import make_experiment_logger, temporary_files_path, atomic_move, loggerinfo class CustomBertModel(Text...
[ 37811, 198, 15022, 22108, 2746, 2181, 13363, 319, 21813, 13, 198, 37811, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 198, 11748, 7007, 198, 198, 6738, 289, 17, 12162, 291, 382...
2.873035
827
# -*- coding: utf-8 -*- """ Created on Mon May 31 11:20:31 2021 @author: SONG """ import numpy as np import pandas as pd import tensorflow as tf from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn import metrics from statsmodels.stats.outl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 1737, 3261, 1367, 25, 1238, 25, 3132, 33448, 201, 198, 201, 198, 31, 9800, 25, 311, 18494, 201, 198, 37811, 201, 198, 201, 198,...
2.180212
849
from django.urls import path from django.conf.urls import url, include from administrador import views from .views import * import repartidor from repartidor import views app_name = "administrador" urlpatterns = [ # temporal, no se llamarán así las vistas path("", index, name="IndexAdministrador"), # r...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 11, 2291, 198, 198, 6738, 2719, 40368, 1330, 5009, 198, 6738, 764, 33571, 1330, 1635, 198, 11748, 1128, 433, 312, 273, 220, 1...
2.70318
283
"""Тестирует функцию quick_sort с заданными границами""" import pytest from ..sort_func import quick_sort if __name__ == '__main__': pytest.main()
[ 37811, 140, 95, 16843, 21727, 20375, 18849, 21169, 35072, 16843, 20375, 220, 141, 226, 35072, 22177, 31583, 141, 228, 18849, 141, 236, 2068, 62, 30619, 220, 21727, 12466, 115, 16142, 43666, 16142, 22177, 22177, 45035, 43108, 18849, 12466, 1...
1.793103
87
# WEB SCRAPING GFG WEBSITE AND GETTING INFO ABOUT ALL THE # DP PROBLEMS , CONTENT AND THE COMMENTS from bs4 import BeautifulSoup import requests import csv source = requests.get('https://www.geeksforgeeks.org/category/dynamic-programming/').text csv_file = open('dp.csv','w') csv_writer = csv.writer(csv_file) csv_wri...
[ 2, 12887, 33, 6374, 49, 2969, 2751, 402, 30386, 12887, 4462, 12709, 5357, 17151, 48996, 24890, 33478, 11096, 3336, 220, 198, 2, 27704, 4810, 9864, 2538, 5653, 837, 22904, 3525, 5357, 3336, 9440, 28957, 198, 198, 6738, 275, 82, 19, 1330,...
2.405573
646
# -*- coding: utf-8 -*- """ @file person.py @author Jakob Erdmann @date 2015-02-06 @version $Id$ Python implementation of the TraCI interface. SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ Copyright (C) 2011-2017 DLR (http://www.dlr.de/) and contributors This file is part of SUMO. SUMO is free s...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 7753, 220, 220, 220, 1048, 13, 9078, 198, 31, 9800, 220, 25845, 672, 16455, 9038, 198, 31, 4475, 220, 220, 220, 1853, 12, 2999, 12, 3312, 198, 31, 96...
2.025082
917
from flask_sqlalchemy import SQLAlchemy from flask.testing import FlaskClient import json
[ 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 42903, 13, 33407, 1330, 46947, 11792, 198, 11748, 33918, 628 ]
4.136364
22
#!/usr/bin/env python """ Aggregates features per partner, for further retrieval from HDFS. """ import argparse import datetime import glob import os import sys import shutil import time import numpy as np import multiprocessing from shutil import copyfileobj from pid import PidFile #import bz2 import gzip import mat...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 19015, 2301, 689, 3033, 583, 5212, 11, 329, 2252, 45069, 422, 5572, 10652, 13, 37227, 198, 198, 11748, 1822, 29572, 198, 11748, 4818, 8079, 198, 11748, 15095, 198, 11748, 286...
3.322581
310
from celery_tasks.main import celery_app from celery_tasks.sms.yuntongxun.ccp_sms import CCP import logging from . import constants logger = logging.getLogger("django") # bind:保证task对象会作为第一个参数自动传入 # name:异步任务别名 # retry_backoff:异常自动重试的时间间隔 第n次(retry_backoff×2^(n-1))s # max_retries:异常自动重试次数的上限 @celery_app.task(bind=Tru...
[ 6738, 18725, 1924, 62, 83, 6791, 13, 12417, 1330, 18725, 1924, 62, 1324, 198, 6738, 18725, 1924, 62, 83, 6791, 13, 82, 907, 13, 88, 2797, 506, 87, 403, 13, 535, 79, 62, 82, 907, 1330, 37963, 198, 11748, 18931, 198, 6738, 764, 1330...
1.581712
514
#!/usr/bin/env python from __future__ import print_function __author__ = 'joon' import sys sys.path.insert(0, 'src') from imports.basic_modules import * from imports.ResearchTools import * if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 834, 9800, 834, 796, 705, 73, 2049, 6, 198, 198, 11748, 25064, 198, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 10677, ...
2.835294
85
# I mapped the outcome variables as follows to get a better understanding of which all target variables got misclassified y = y.map({'Still Birth' : 0, 'Abortion' : 1, 'Live Birth': 2, 'Infant Death' : 3, 'Miscarriage' : 4}) #Now lets take a look at the no. of instances of each class present in the entire dataset: #N...
[ 2, 314, 27661, 262, 8055, 9633, 355, 5679, 284, 651, 257, 1365, 4547, 286, 543, 477, 2496, 9633, 1392, 2984, 31691, 198, 198, 88, 796, 331, 13, 8899, 15090, 6, 9590, 17647, 6, 1058, 657, 11, 705, 4826, 5817, 6, 1058, 352, 11, 705,...
2.407654
1,202
import datetime as _datetime import importlib as _importlib import inspect as _inspect import json as _json import os as _os import sys as _sys import six as _six from google.protobuf import json_format as _json_format from google.protobuf import text_format as _text_format from flytekit import __version__ from flyte...
[ 11748, 4818, 8079, 355, 4808, 19608, 8079, 198, 11748, 1330, 8019, 355, 4808, 11748, 8019, 198, 11748, 10104, 355, 4808, 1040, 806, 198, 11748, 33918, 355, 4808, 17752, 198, 11748, 28686, 355, 4808, 418, 198, 11748, 25064, 355, 4808, 1759...
2.286224
5,604
from functions import html_parse_tree, xpath_parse, regex_strip_array, array2csv import numpy as np import csv weeks_url = "http://www.atpworldtour.com/en/rankings/singles" weeks_tree = html_parse_tree(weeks_url) weeks_xpath = "//ul[@data-value = 'rankDate']/li/@data-value" weeks_parsed = xpath_parse(weeks_tree, weeks...
[ 6738, 5499, 1330, 27711, 62, 29572, 62, 21048, 11, 2124, 6978, 62, 29572, 11, 40364, 62, 36311, 62, 18747, 11, 7177, 17, 40664, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 21370, 198, 198, 732, 2573, 62, 6371, 796, 366, 4023,...
2.483092
207
import dateutil.parser import pytz import random from datetime import datetime, timedelta from gitlab_attendant.api_calls import ( add_note_to_issue, add_note_to_merge_request, assign_issue, assign_user_to_merge_request, delete_merged_branches, get_all_open_merge_requests, get_all_project_...
[ 11748, 3128, 22602, 13, 48610, 198, 11748, 12972, 22877, 198, 11748, 4738, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 6738, 17606, 23912, 62, 1078, 23048, 13, 15042, 62, 66, 5691, 1330, 357, 198, 220, 220,...
2.267312
4,130
# coding=utf-8 # Copyright 2017 The Tensor2Tensor Authors. # # 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...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2177, 383, 309, 22854, 17, 51, 22854, 46665, 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, 2...
3.566802
247
import cv2 import itertools import numpy as np import pathlib
[ 11748, 269, 85, 17, 198, 11748, 340, 861, 10141, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 3108, 8019, 628, 628, 198 ]
3
22
from typing import Tuple, List
[ 6738, 19720, 1330, 309, 29291, 11, 7343, 628, 628, 198 ]
3.5
10
import argparse import torch import torch.nn as nn from simplecv.module.model_builder import make_model from simplecv.data.data_loader import make_dataloader from simplecv.opt.optimizer import make_optimizer from simplecv.opt.learning_rate import make_learningrate from simplecv.util import config from simplecv.core imp...
[ 11748, 1822, 29572, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 2829, 33967, 13, 21412, 13, 19849, 62, 38272, 1330, 787, 62, 19849, 198, 6738, 2829, 33967, 13, 7890, 13, 7890, 62, 29356, 1330, 787, 62, 67...
2.781106
434
import csv import json # Reading a CSV file: # #with open("res/fileName.csv") as f: # reader = csv.DictReader(f) # data = [row for row in reader] # Writing to a JSON file: # #with open("res/fileName.json", "w") as f: # outdata = json.dumps(data, indent=2) # f.write(outdata) with open("res/fa2014copy.csv...
[ 11748, 269, 21370, 198, 11748, 33918, 198, 198, 2, 11725, 257, 44189, 2393, 25, 198, 2, 198, 2, 4480, 1280, 7203, 411, 14, 7753, 5376, 13, 40664, 4943, 355, 277, 25, 198, 2, 220, 220, 220, 9173, 796, 269, 21370, 13, 35, 713, 33634...
2.241558
1,540
import itertools import sys from simple_tree import Node # This class specifies a "decision tree" through «inheritance» from the # "Node" class, re-implementing some of the "Node" properties to # change its behaviour. class DecisionNode(Node): """ Ref: https://en.wikipedia.org/wiki/Decision_tree """ ...
[ 11748, 340, 861, 10141, 198, 11748, 25064, 198, 198, 6738, 2829, 62, 21048, 1330, 19081, 198, 198, 2, 770, 1398, 26052, 257, 366, 12501, 1166, 5509, 1, 832, 21110, 259, 372, 42942, 17730, 422, 262, 220, 198, 2, 366, 19667, 1, 1398, ...
2.582451
661
import typing def join(models: typing.Sequence[Model]) -> Model: """ Join all models into one :param models: :return: """ pass def code(obj, target, format): """ Generate code for specific target :param obj: :param target: :param format: :return: "...
[ 11748, 19720, 628, 628, 628, 628, 628, 628, 628, 198, 198, 4299, 4654, 7, 27530, 25, 19720, 13, 44015, 594, 58, 17633, 12962, 4613, 9104, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 15251, 477, 4981, 656, 530, 198, 220, 220, ...
2.605809
241
from django.urls import path from weather.apps.api.climate.viewsets import weather_home, city_weather from weather.apps.api.climate.chart import WeatherChartView app_name = 'city_weather' urlpatterns = [ path('', ...
[ 198, 6738, 42625, 14208, 13, 6371, 82, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
1.825503
298
__author__ = 'zhouguangfu' # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: from PyQt4.QtCore import * from PyQt4.QtGui import * import numpy as np import matplotlib.pyplot as plt from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as Figur...
[ 834, 9800, 834, 796, 705, 38536, 5162, 648, 20942, 6, 198, 2, 795, 16436, 25, 532, 9, 12, 4235, 25, 21015, 26, 12972, 12, 521, 298, 12, 28968, 25, 604, 26, 33793, 12, 8658, 82, 12, 14171, 25, 18038, 532, 9, 12, 198, 2, 25357, ...
2.146328
1,770
#!/usr/bin/env python #============================================================================== # author : Pavel Polishchuk # date : 08-06-2017 # version : 0.1 # python_version : 3.2 # copyright : Pavel Polishchuk 2017 # license : GPL3 #==================================...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 23926, 25609, 855, 198, 2, 1772, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 49612, 15945, 46019, 198, 2, 3128, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 105...
3.215827
139
# -*- coding: utf-8 -*- import torch import torch.nn as nn from torch.nn.utils.rnn import pack_padded_sequence
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 13, 26791, 13, 81, 20471, 1330, 2353, 62, 79, 29373, 62, 43167, 628 ]
2.627907
43
from flask import Flask, render_template import platform app = Flask(__name__) @app.route('/') if __name__ == "__main__": app.run(host="0.0.0.0")
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 198, 11748, 3859, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 31, 1324, 13, 38629, 10786, 14, 11537, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 1...
2.540984
61
# Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import unittest from mixbox.vendor.six import BytesIO, text_type from stix.threat_actor import ThreatActor import stix.extensions.identity.ciq_identity_3_0 as ciq from stix.test import EntityTestCase from stix.core...
[ 2, 15069, 357, 66, 8, 2177, 11, 383, 17168, 2200, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 4091, 38559, 24290, 13, 14116, 329, 1844, 2846, 13, 198, 198, 11748, 555, 715, 395, 198, 6738, 5022, 3524, 13, 85, 18738, 13, 19412, 1330, ...
3.031008
129
"""The AMS HAN meter integration.""" from __future__ import annotations import asyncio from dataclasses import dataclass import datetime as dt from enum import Enum import logging from typing import Callable, Mapping, cast from han import common as han_type, meter_connection, obis_map from homeassistant import const ...
[ 37811, 464, 3001, 50, 367, 1565, 16430, 11812, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 30351, 952, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 11748, 4818, 8079, 355, 288, 83, 198, 6738, 338...
2.363585
3,526
import datetime from django.conf import settings from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from dataworkspace.apps.core.utils import ( db_role_schema_suffix_for_user, new_private_database_credentials, postgres_user, source_tables_for_user, w...
[ 11748, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, ...
2.76378
127
from unittest import TestCase from leaguepedia_parser.leaguepedia_parser import LeaguepediaParser
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 4652, 50235, 62, 48610, 13, 19316, 50235, 62, 48610, 1330, 4041, 50235, 46677, 628 ]
4.304348
23
# Generated by Django 3.0.8 on 2020-08-29 14:04 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 23, 319, 12131, 12, 2919, 12, 1959, 1478, 25, 3023, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import os import pytest from manorm.exceptions import FileFormatError, FormatModeConflictError from manorm.read import load_reads
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 582, 579, 13, 1069, 11755, 1330, 9220, 26227, 12331, 11, 18980, 19076, 18546, 13758, 12331, 198, 6738, 582, 579, 13, 961, 1330, 3440, 62, 40779, 628, 628, 198 ]
3.578947
38
#!/usr/bin/env python3 #-------------------------------------------------------------------+ # # Advent of Code - Day 1 - Part 1 # #-------------------------------------------------------------------+ #-------------------------------------------------------------------+ # dependencies #-------------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 10097, 6329, 10, 198, 2, 198, 2, 33732, 286, 6127, 532, 3596, 352, 532, 2142, 352, 198, 2, 198, 2, 10097, 6329, 10, 198, 198, 2, 10097, 6329, 10, 198, 2, 197, 45841, ...
5.080214
187
__author__ = 'alessandror'
[ 834, 9800, 834, 796, 705, 282, 408, 392, 1472, 6, 198 ]
2.454545
11
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # import re from unittest.mock import MagicMock import pytest from source_flexport.source import SourceFlexport from source_flexport.streams import FlexportStream @pytest.mark.parametrize( ("status_code", "response", "expected"), [ (200, {},...
[ 2, 198, 2, 15069, 357, 66, 8, 33448, 3701, 26327, 11, 3457, 1539, 477, 2489, 10395, 13, 198, 2, 198, 198, 11748, 302, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 198, 198, 11748, 12972, 9288, 198, 6738, 2723, 62, ...
2.696335
191
import shutil import os from pdr_python_sdk.tools.create import create_pandora_app from pdr_python_sdk.tools.create import TEMP_SDK_DIR
[ 11748, 4423, 346, 198, 11748, 28686, 198, 6738, 279, 7109, 62, 29412, 62, 21282, 74, 13, 31391, 13, 17953, 1330, 2251, 62, 79, 392, 5799, 62, 1324, 198, 6738, 279, 7109, 62, 29412, 62, 21282, 74, 13, 31391, 13, 17953, 1330, 309, 394...
2.795918
49
import torch.nn as nn
[ 11748, 28034, 13, 20471, 355, 299, 77, 198 ]
2.75
8
from scapy.packet import Raw import numpy.random as random2 import random import string from numpy.random import bytes from random import getrandbits from scapy.layers.inet import IP, Ether, UDP, TCP from scapy.packet import Raw from ID2TLib.Botnet.Message import MessageType from . import IPv4 as ip ###############...
[ 6738, 629, 12826, 13, 8002, 316, 1330, 16089, 198, 198, 11748, 299, 32152, 13, 25120, 355, 4738, 17, 198, 11748, 4738, 198, 11748, 4731, 198, 198, 6738, 299, 32152, 13, 25120, 1330, 9881, 198, 6738, 4738, 1330, 651, 25192, 9895, 198, ...
2.560886
4,336
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of visvalingamwyatt. # https://github.com/fitnr/visvalingamwyatt # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT-license # Copyright (c) 2015, fitnr <contact@fakeisthenewreal.org> from setuptools import setup try: readm...
[ 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, 770, 2393, 318, 636, 286, 1490, 2100, 278, 321, 21768, 1078, 13, 198, 2, 3740, 1378, 12567, 13, 785, 14, 11...
2.411189
715