content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# ***************************************************************************** # # Copyright (c) 2020, the pyEX authors. # # This file is part of the jupyterlab_templates library, distributed under the terms of # the Apache License 2.0. The full license can be found in the LICENSE file. # # for Coverage from mock im...
[ 2, 41906, 17174, 4557, 35625, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 11, 262, 12972, 6369, 7035, 13, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 262, 474, 929, 88, 353, 23912, 62, 11498, 17041, 5888, 11, 9387, 739, 262, 2846, 2...
4.083333
84
from grouper.fe.handlers.template_variables import get_user_view_template_vars from grouper.fe.util import GrouperHandler from grouper.models.user import User
[ 6738, 1132, 525, 13, 5036, 13, 4993, 8116, 13, 28243, 62, 25641, 2977, 1330, 651, 62, 7220, 62, 1177, 62, 28243, 62, 85, 945, 198, 6738, 1132, 525, 13, 5036, 13, 22602, 1330, 402, 472, 525, 25060, 198, 6738, 1132, 525, 13, 27530, ...
3.333333
48
import requests from bs4 import BeautifulSoup url = "http://scholar.google.com/citations?hl=en&user=B7vSqZsAAAAJ&view_op=list_works&pagesize=100" request = requests.get(url) soup = BeautifulSoup(request.text, 'lxml') table = soup.find("table", attrs={"id" : "gsc_a_t"}) for paper in table.findAll("td", attrs={"class...
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 198, 6371, 796, 366, 4023, 1378, 20601, 6192, 13, 13297, 13, 785, 14, 66, 20597, 30, 18519, 28, 268, 5, 7220, 28, 33, 22, 85, 50, 80, 57, 82, 17922, 41, 5, 1177, ...
2.42953
149
"""Websocket subscriber handler functions.""" import asyncio import logging from asyncio import CancelledError from typing import List from starlette.websockets import WebSocket, WebSocketDisconnect from notify_server.clients.serdes import TopicEvent from notify_server.clients.subscriber import Subscriber, create fr...
[ 37811, 1135, 1443, 5459, 32944, 21360, 5499, 526, 15931, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 6738, 30351, 952, 1330, 43780, 3353, 12331, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 3491, 21348, 13, 732, 1443, 11603, 1330, 53...
2.909774
532
import torch from naslib.search_spaces.core.primitives import AbstractPrimitive, Identity class DropPathWrapper(AbstractPrimitive): """ A wrapper for the drop path training regularization. """
[ 11748, 28034, 198, 198, 6738, 25221, 8019, 13, 12947, 62, 2777, 2114, 13, 7295, 13, 19795, 20288, 1330, 27741, 23828, 1800, 11, 27207, 628, 198, 4871, 14258, 15235, 36918, 2848, 7, 23839, 23828, 1800, 2599, 198, 220, 220, 220, 37227, 19...
3.466667
60
from version import get_version __version__ = get_version(pep440=False)
[ 6738, 2196, 1330, 651, 62, 9641, 201, 198, 201, 198, 834, 9641, 834, 796, 651, 62, 9641, 7, 431, 79, 25644, 28, 25101, 8, 201, 198 ]
2.923077
26
import logging from typing import List import yaml from kubeluigi.k8s import ( clean_job_resources, job_definition, pod_spec_from_dict, run_and_track_job, kubernetes_client, attach_volume_to_spec, FailedJob, ) from kubeluigi.volumes import AttachableVolume from kubernetes.client import Ap...
[ 11748, 18931, 198, 6738, 19720, 1330, 7343, 198, 11748, 331, 43695, 198, 198, 6738, 479, 549, 417, 84, 25754, 13, 74, 23, 82, 1330, 357, 198, 220, 220, 220, 3424, 62, 21858, 62, 37540, 11, 198, 220, 220, 220, 1693, 62, 46758, 11, ...
2.586957
184
from raiden.utils import ( is_minified_address, is_supported_client, )
[ 6738, 9513, 268, 13, 26791, 1330, 357, 198, 220, 220, 220, 318, 62, 1084, 1431, 62, 21975, 11, 198, 220, 220, 220, 318, 62, 15999, 62, 16366, 11, 198, 8, 628, 628, 628, 198 ]
2.5
34
from numpy import number from settings import NORMALIZATION_NUMBER_OF_BUCKETS from dataset.raw_dataset import RawDataset from normalization.price_normalizer import PriceNormalizer if __name__ == "__main__": raw_dataset = RawDataset() size = raw_dataset.load() number_of_buckets = NORMALIZATION_NUMBER_OF_B...
[ 6738, 299, 32152, 1330, 1271, 198, 6738, 6460, 1330, 25273, 42126, 14887, 6234, 62, 41359, 13246, 62, 19238, 62, 33, 16696, 32716, 198, 6738, 27039, 13, 1831, 62, 19608, 292, 316, 1330, 16089, 27354, 292, 316, 198, 6738, 3487, 1634, 13,...
2.79878
164
import datetime from bson.json_util import dumps
[ 11748, 4818, 8079, 198, 6738, 275, 1559, 13, 17752, 62, 22602, 1330, 45514, 628 ]
3.571429
14
# coding=utf-8 from __future__ import absolute_import, division, print_function from oct.cli.version import VERSION from oct.tests.unit.playbook_runner_test_case import PlaybookRunnerTestCase, TestCaseParameters, show_stack_trace if not show_stack_trace: __unittest = True
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 6738, 19318, 13, 44506, 13, 9641, 1330, 44156, 2849, 198, 6738, 19318, 13, 41989, 13, 20850, 13, 1759, 2070, 6...
3.294118
85
import numpy as np import cv2 import random face_cascade = cv2.CascadeClassifier('D:\python36\Lib\site-packages\cv2\data\haarcascade_frontalface_default.xml') eye_cascade = cv2.CascadeClassifier('D:\python36\Lib\site-packages\cv2\data\haarcascade_eye.xml') #先检测人脸,存到face.jpg中 cap=cv2.VideoCapture(0) while(T...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 269, 85, 17, 201, 198, 11748, 4738, 201, 198, 201, 198, 2550, 62, 66, 28966, 796, 269, 85, 17, 13, 34, 28966, 9487, 7483, 10786, 35, 7479, 29412, 2623, 59, 25835, 59, 15654, 12, 43789,...
1.546157
2,589
# Copyright IBM Corp. 2016 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 ag...
[ 2, 15069, 19764, 11421, 13, 1584, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
2.591928
5,352
from itertools import product import matplotlib.pyplot as plt import tpsim as tp import numpy as np # --------------------------------------------------------------------------- # # Simulation parameters # --------------------------------------------------------------------------- # ## -----...
[ 6738, 340, 861, 10141, 1330, 1720, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 256, 862, 320, 355, 256, 79, 198, 11748, 299, 32152, 355, 45941, 628, 198, 2, 16529, 32284, 1303, 198, 2, 220, 220, 220, 22...
2.356314
1,552
""" The :class:`.Session` class provides TinyAPI's core functionality. It manages the authentication cookies and token for all requests to TinyLetter's undocumented API. """ import requests import re import json from .draft import Draft URL = "https://app.tinyletter.com/__svcbus__/" DEFAULT_MESSAGE_STATUSES = [ ...
[ 37811, 198, 464, 1058, 4871, 25, 44646, 36044, 63, 1398, 3769, 20443, 17614, 338, 4755, 11244, 13, 632, 15314, 262, 18239, 14746, 290, 11241, 329, 477, 7007, 284, 20443, 45708, 338, 21829, 7824, 13, 198, 37811, 198, 198, 11748, 7007, 19...
2.585736
1,977
from flask import Flask, request, abort, jsonify from pyspark import SparkContext from pyspark.sql import SQLContext from pyspark.sql.types import * import os from itertools import combinations from pyspark.sql.functions import monotonically_increasing_id app = Flask(__name__) sc = SparkContext() sqlContext = SQLConte...
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 15614, 11, 33918, 1958, 198, 6738, 279, 893, 20928, 1330, 17732, 21947, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 16363, 21947, 198, 6738, 279, 893, 20928, 13, 25410, 13, 19199, 1330, 1635, 198...
2.725191
262
""" This is the project's main file, it has a function for each of the main classes, as well as the wikidata uploader file. The imports are above, as well as split into each file. There is a simple logger to track any critical errors. """ import logging import pandas as pd import datetime from grao_table_processing.ma...
[ 37811, 198, 1212, 318, 262, 1628, 338, 1388, 2393, 11, 340, 468, 257, 2163, 329, 1123, 286, 262, 1388, 6097, 11, 355, 880, 198, 292, 262, 47145, 312, 1045, 9516, 263, 2393, 13, 383, 17944, 389, 2029, 11, 355, 880, 355, 6626, 656, ...
2.540384
2,761
import requests from bs4 import BeautifulSoup import requests url = 'https://www.imdb.com/search/title/?series=tt0285335&view=simple&sort=release_date,asc&start=1' bru = 'https://www.imdb.com/search/title/?series=tt0285335&view=simple&sort=release_date,asc&start=51' for pg in range(1, 362, 50): page = reque...
[ 11748, 7007, 201, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 201, 198, 11748, 7007, 201, 198, 201, 198, 6371, 796, 705, 5450, 1378, 2503, 13, 320, 9945, 13, 785, 14, 12947, 14, 7839, 20924, 25076, 28, 926, 15, 26279, 27326, 5, ...
2.661111
180
from __future__ import division, print_function, absolute_import import sys import math import numpy as np from numpy import sqrt, cos, sin, arctan, exp, log, pi, Inf from numpy.testing import (assert_, assert_allclose, assert_array_less, assert_almost_equal, assert_raises) import pytest from scipy.integrate ...
[ 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 11, 4112, 62, 11748, 198, 198, 11748, 25064, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 1330, 19862, 17034, 11, 8615, 11, 7813, 11, 610, 310, ...
2.959596
198
dist = 4 print(prCountDP(dist))
[ 17080, 796, 604, 198, 4798, 7, 1050, 12332, 6322, 7, 17080, 4008, 198 ]
2.461538
13
# Copyright 2020 Makani Technologies 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...
[ 2, 15069, 12131, 15841, 3216, 21852, 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, ...
2.525918
926
#!/usr/bin/env python3 # # SPDX-License-Identifier: MIT import glob import itertools import json import os import sys import urllib.parse import urllib.request try: from lxml import etree except ImportError: import xml.etree.ElementTree as etree URI = 'https://www.gnu.org/licenses/license-list.html' TAGS =...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 198, 11748, 15095, 198, 11748, 340, 861, 10141, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 25064, 198, 1174...
1.747017
4,609
# -*- coding: utf-8 -*- # # 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 #...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351,...
3.639344
366
#!/usr/bin/env python # remoteobj v0.4, best yet! # TODO: This will get wrecked by recursive sets/lists/dicts; need a more picklish method. # TODO: Dict/sets/lists should get unpacked to wrappers that are local for read-only access, # but update the remote for write access. Note that __eq__ will be an interesting...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 6569, 26801, 410, 15, 13, 19, 11, 1266, 1865, 0, 198, 2, 16926, 46, 25, 770, 481, 651, 44770, 416, 45115, 5621, 14, 20713, 14, 11600, 82, 26, 761, 257, 517, 2298, 1836, 2446, ...
2.75997
1,354
from .voc import VOC
[ 6738, 764, 18893, 1330, 569, 4503, 198 ]
3
7
import pandas as pd from unittest import mock import fhirpipe.transform.dataframe as transform from fhirpipe.analyze.attribute import Attribute from fhirpipe.analyze.sql_column import SqlColumn from fhirpipe.analyze.concept_map import ConceptMap from fhirpipe.analyze.cleaning_script import CleaningScript from fhirpipe...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 11748, 277, 71, 343, 34360, 13, 35636, 13, 7890, 14535, 355, 6121, 198, 6738, 277, 71, 343, 34360, 13, 38200, 2736, 13, 42348, 1330, 3460, 4163, 198, ...
2.847273
275
import sdi_utils.gensolution as gs import sdi_utils.set_logging as slog import sdi_utils.textfield_parser as tfp import pandas as pd import numpy as np try: api except NameError: inports = [{'name': 'inData', 'type': 'message.DataFrame'}, {'name': 'inCoef', 'type': 'message.DataFrame'}] outports = [{'name': ...
[ 11748, 264, 10989, 62, 26791, 13, 70, 641, 2122, 355, 308, 82, 198, 11748, 264, 10989, 62, 26791, 13, 2617, 62, 6404, 2667, 355, 25801, 198, 11748, 264, 10989, 62, 26791, 13, 5239, 3245, 62, 48610, 355, 256, 46428, 198, 198, 11748, ...
2.586957
184
message = "Hello Python World!" print(message)
[ 20500, 796, 366, 15496, 11361, 2159, 171, 120, 223, 1, 198, 4798, 7, 20500, 8, 198 ]
2.9375
16
from django.shortcuts import render from django.http import HttpResponse from django.http import HttpResponseRedirect import json from django.http import JsonResponse from urllib import urlencode from urllib import quote import requests from django.template import RequestContext, loader import re from django.shortcuts ...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 7738, 1060, 198, 11748, 33918, 198, 6738, 42625, 14208, 13, 4023, 13...
3.101167
257
"""SINDy-BVP Logic collection.""" # Import Python packages import pickle import warnings # Third-Party Imports from sklearn.model_selection import train_test_split # Package Imports from sindy_bvp.variables import DependentVariable, IndependentVariable from sindy_bvp.library_builders import TermBuilder, NoiseMaker f...
[ 37811, 50, 12115, 88, 12, 33, 8859, 30146, 4947, 526, 15931, 198, 198, 2, 17267, 11361, 10392, 198, 11748, 2298, 293, 198, 11748, 14601, 198, 198, 2, 10467, 12, 33553, 1846, 3742, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 45...
2.320574
2,717
#INSERTION SORT - PART 2 #!/bin/python3 import math import os import random import re import sys # Complete the insertionSort2 function below. if __name__ == '__main__': n = int(input()) arr = list(map(int, input().rstrip().split())) insertionSort2(n, arr) #INSERTION SORT - PART 2 ...
[ 2, 20913, 17395, 2849, 311, 9863, 532, 16652, 362, 201, 198, 2, 48443, 8800, 14, 29412, 18, 201, 198, 201, 198, 11748, 10688, 201, 198, 11748, 28686, 201, 198, 11748, 4738, 201, 198, 11748, 302, 201, 198, 11748, 25064, 201, 198, 201, ...
2.166358
11,337
import json from termcolor import colored from dcplib.component_entities import EntityBase class Project(EntityBase): """ Model an Ingest Project entity """ @classmethod @classmethod @property @property @property @property @property @property """ Yields [...
[ 11748, 33918, 198, 198, 6738, 3381, 8043, 1330, 16396, 198, 198, 6738, 30736, 489, 571, 13, 42895, 62, 298, 871, 1330, 20885, 14881, 628, 198, 4871, 4935, 7, 32398, 14881, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 9104, 281...
2.680982
652
#!/usr/bin/python import numpy as np import time import matplotlib.pyplot as plt import random NUM = 30 if __name__ == '__main__': XX,YY,dx,dy = gen_lattice(1.0,1.0,NUM) vmin = 0.0 vmax = 2.0 #start = 2.0*np.exp(-10.0*(np.power(XX-0.5,2)+np.power(YY-0.5,2))) start = np.zeros((NUM,NUM)) ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 4738, 198, 198, 41359, 796, 1542, 220, 198, 197, 198, 197, 198, ...
1.936869
396
# mathematical imports - import numpy as np from matplotlib import pyplot as plt from sklearn import metrics from math import sqrt import seaborn as sns sns.set() import torch # load network imports - import os import sys sys.path.insert(0, '/Users/chanaross/dev/Thesis/MachineLearning/forGPU/') from CNN_LSTM_NeuralNe...
[ 2, 18069, 17944, 532, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 220, 12972, 29487, 355, 458, 83, 198, 6738, 1341, 35720, 1330, 20731, 198, 6738, 10688, 1330, 19862, 17034, 198, 11748, 384, 397, 1211, 355, 3...
2.457379
1,091
#!/usr/bin/env python import chainercv # import cv2 import fcis from fcis.datasets.coco import COCOInstanceSegmentationDataset import numpy as np from train import get_keep_indices from train import remove_zero_bbox if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 6333, 2798, 85, 198, 2, 1330, 269, 85, 17, 198, 11748, 277, 66, 271, 198, 6738, 277, 66, 271, 13, 19608, 292, 1039, 13, 66, 25634, 1330, 327, 4503, 46, 33384, 41030, 14...
2.784946
93
import zlib import io from .datatypes import * from .utils import * class TypeString: """Representation of `qtype`.""" def __getitem__(self, x): """Index/slice typestring""" if isinstance(x, slice): if x.step is not None: raise NotImplementedError( ...
[ 11748, 1976, 8019, 198, 11748, 33245, 198, 6738, 764, 19608, 265, 9497, 1330, 1635, 198, 6738, 764, 26791, 1330, 1635, 628, 198, 4871, 5994, 10100, 25, 198, 220, 220, 220, 37227, 40171, 341, 286, 4600, 80, 4906, 63, 526, 15931, 628, 2...
1.93919
5,213
# -*- mode: python; encoding: utf-8 -*- # # Copyright 2012 Jens Lindström, Opera Software ASA # # 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...
[ 2, 532, 9, 12, 4235, 25, 21015, 26, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 2321, 449, 641, 9329, 2536, 9101, 76, 11, 26049, 10442, 49599, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, ...
3.646048
291
# -*- coding: utf-8 -*- """ Defines the the logger object to track execution Logs are stored into logs/emotion_YYYY-mm-dd.log files Default logger level is set to INFO, use --logger-level DEBUG tag to get more information about execution trace. To setup logger : >>> from log import stetup_custom_logger >>> logger = s...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 7469, 1127, 262, 262, 49706, 2134, 284, 2610, 9706, 198, 198, 11187, 82, 389, 8574, 656, 17259, 14, 368, 9650, 62, 26314, 26314, 12, 3020, 12, 1860, 13, 64...
3.118644
177
############################################################################### ## Jesse Engreitz ## September 29, 2021 import pybedtools from pybedtools import BedTool import pandas as pd import numpy as np import argparse from pandas.io.parsers import read_table from Bio.SeqFeature import FeatureLocation from collec...
[ 29113, 29113, 7804, 4242, 21017, 198, 2235, 18033, 1985, 260, 4224, 198, 2235, 2693, 2808, 11, 33448, 198, 198, 11748, 12972, 3077, 31391, 198, 6738, 12972, 3077, 31391, 1330, 15585, 25391, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748...
4.28
150
from lib.types import * from lib.graph import * from lib.command import * from lib.parser import * import inspect import os import doctest import sys def parser_tests(): ''' >>> variable.parseString('?a', parseAll=True)[0] ?a >>> literal.parseString('1.0', parseAll=True)[0] 1.0 >>> literal.pa...
[ 6738, 9195, 13, 19199, 1330, 1635, 198, 6738, 9195, 13, 34960, 1330, 1635, 198, 6738, 9195, 13, 21812, 1330, 1635, 198, 6738, 9195, 13, 48610, 1330, 1635, 198, 11748, 10104, 198, 11748, 28686, 198, 11748, 10412, 395, 198, 11748, 25064, ...
2.166522
2,306
"""Python 3 Unicode test."""
[ 37811, 37906, 513, 34371, 1332, 526, 15931, 628 ]
3.75
8
"""Represent the IPX800V5 base entity.""" from pypx800v5 import IPX800 from pypx800v5.const import EXTENSIONS, IPX from voluptuous.util import Upper from homeassistant.const import ( CONF_DEVICE_CLASS, CONF_ENTITY_CATEGORY, CONF_ICON, CONF_ID, CONF_NAME, CONF_UNIT_OF_MEASUREMENT, ) from homeass...
[ 37811, 40171, 262, 6101, 55, 7410, 53, 20, 2779, 9312, 526, 15931, 198, 6738, 279, 4464, 87, 7410, 85, 20, 1330, 6101, 55, 7410, 198, 6738, 279, 4464, 87, 7410, 85, 20, 13, 9979, 1330, 27489, 16938, 11053, 11, 6101, 55, 198, 6738, ...
2.090062
1,610
# generic, util import click import logging from pathlib import Path import random # website download and parsing import json import requests from bs4 import BeautifulSoup from lxml.html.soupparser import fromstring # reading and writing files import sys import csv import os import pandas as pd # # Classify posts #...
[ 2, 14276, 11, 7736, 198, 11748, 3904, 198, 11748, 18931, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 4738, 198, 198, 2, 3052, 4321, 290, 32096, 198, 11748, 33918, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 1...
2.847046
948
import websocket import thread import json import requests import urllib import wave import audioop from time import sleep import StringIO import struct import sys import codecs from xml.etree import ElementTree doItAgain = "yes" #Control While loop #End GetToken #End GetTextAndTranslate() if __name__ == "__main_...
[ 11748, 2639, 5459, 198, 11748, 4704, 198, 11748, 33918, 198, 11748, 7007, 198, 11748, 2956, 297, 571, 198, 11748, 6769, 198, 11748, 6597, 404, 198, 6738, 640, 1330, 3993, 198, 11748, 10903, 9399, 198, 11748, 2878, 198, 11748, 25064, 198, ...
3.022422
223
__version__ = "3.9.0"
[ 834, 9641, 834, 796, 366, 18, 13, 24, 13, 15, 1 ]
1.909091
11
# Numpy_functions # (Own code) # Why use Numpy? # Because it's quicker (python libraries can be writen in C which can be much faster) # It also makes the code much cleaner # I still tried to recreate some Numpy function # Dotproduct vector # Transposition # Dotproduct with matrices # Adding vector...
[ 2, 399, 32152, 62, 12543, 2733, 201, 198, 201, 198, 2, 357, 23858, 2438, 8, 201, 198, 2, 4162, 779, 399, 32152, 30, 220, 201, 198, 2, 4362, 340, 338, 20061, 357, 29412, 12782, 460, 307, 1991, 268, 287, 327, 543, 460, 307, 881, 5...
3.104558
373
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2020, empress development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
[ 2, 16529, 10541, 198, 2, 15069, 357, 66, 8, 1584, 12, 42334, 11, 795, 8439, 2478, 1074, 13, 198, 2, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 10305, 13789, 13, 198, 2, 198, 2, 383, 1336, 5964, 318, 287, 262, 2393...
3.32622
328
""" Используя цифры 1, 2, 3, 4, 5, 6, 7, 8, 9 по одному разу, составить два натуральных числа А и В, таких, что A корень из B. Найти все решения. """ second_exercise()
[ 37811, 201, 198, 140, 246, 21727, 140, 123, 25443, 119, 45367, 140, 115, 35072, 40623, 220, 141, 228, 18849, 141, 226, 21169, 45035, 352, 11, 362, 11, 513, 11, 604, 11, 642, 11, 718, 11, 767, 11, 807, 11, 860, 12466, 123, 15166, 1...
1.084337
166
import unittest import numpy as np from numpy.testing import assert_array_equal from pixeldrift import Cells, tile_size if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 18747, 62, 40496, 198, 6738, 279, 844, 68, 335, 35357, 1330, 39794, 11, 17763, 62, 7857, 628, 198, 361, 11593, 3672, 834, 6624...
2.913793
58
import sys import json import requests from flask import Flask, jsonify from flask import request from tracing import init_tracer, flask_to_scope, parse_baggage import opentracing from opentracing_instrumentation.client_hooks import install_all_patches from flask_opentracing import FlaskTracer from flask_cors import CO...
[ 11748, 25064, 198, 11748, 33918, 198, 11748, 7007, 198, 6738, 42903, 1330, 46947, 11, 33918, 1958, 198, 6738, 42903, 1330, 2581, 198, 6738, 35328, 1330, 2315, 62, 2213, 11736, 11, 42903, 62, 1462, 62, 29982, 11, 21136, 62, 65, 9460, 496...
2.909953
211
import pytest from os.path import join from webtest.debugapp import debug_app from restiro import DocumentationRoot, clean_examples_dir from restiro.tests.helpers import package_dir, mockup_resources examples_dir = join(package_dir, 'examples') @pytest.fixture('session', autouse=True)
[ 11748, 12972, 9288, 198, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 198, 6738, 3992, 9288, 13, 24442, 1324, 1330, 14257, 62, 1324, 198, 198, 6738, 1334, 7058, 1330, 43925, 30016, 11, 3424, 62, 1069, 12629, 62, 15908, 198, 6738, 1334, ...
3.255556
90
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: run_params.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports...
[ 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 1057, 62, 37266, 13, 1676, 1462, 198, 198, 6738, 23645, 13, 11235, 672, 3046, 1330, 43087, 355, 4808, 20147, 1968, 273, 198, 6738, 23645, 1...
2.27533
2,724
#!/usr/bin/env python3 from setuptools import setup import setuptools setup_dict = dict( name="feititfy", version="0.0.2a0", author="cjsoft", author_email="egwcyh@gmail.com", description="Notify you using feishu custom bot by webhook", long_description="""Notify you using feishu custom bot by ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 11748, 900, 37623, 10141, 198, 198, 40406, 62, 11600, 796, 8633, 7, 198, 220, 220, 220, 1438, 2625, 5036, 270, 270, 24928, 1600, 198,...
2.683761
234
import ldap from .. import auth # Required when using self-signed certificates. ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)
[ 11748, 300, 67, 499, 198, 198, 6738, 11485, 1330, 6284, 198, 198, 2, 20906, 618, 1262, 2116, 12, 32696, 20835, 13, 198, 335, 499, 13, 2617, 62, 18076, 7, 335, 499, 13, 3185, 51, 62, 55, 62, 51, 6561, 62, 2200, 49128, 62, 34, 173...
2.396825
63
total = totmil = cont = menor = 0 barato = '' while True: produto = str(input('Nome do produto: ')) preco = float(input('Preço: R$ ')) cont += 1 total += preco if preco > 1000: totmil += 1 if cont == 1 or preco < menor: barato = produto menor = preco resp = ' ' ...
[ 23350, 796, 2006, 25433, 796, 542, 796, 1450, 273, 796, 657, 198, 5657, 5549, 796, 10148, 198, 4514, 6407, 25, 198, 220, 220, 220, 40426, 9390, 796, 965, 7, 15414, 10786, 45, 462, 466, 40426, 9390, 25, 705, 4008, 198, 220, 220, 220,...
2.15935
615
import sys import traceback from contextlib import suppress from discord.ext.commands import *
[ 11748, 25064, 198, 11748, 12854, 1891, 198, 6738, 4732, 8019, 1330, 18175, 198, 198, 6738, 36446, 13, 2302, 13, 9503, 1746, 1330, 1635 ]
4.130435
23
"""Support for monitoring juicenet/juicepoint/juicebox based EVSE sensors.""" from __future__ import annotations from homeassistant.components.sensor import ( STATE_CLASS_MEASUREMENT, SensorEntity, SensorEntityDescription, ) from homeassistant.const import ( DEVICE_CLASS_CURRENT, DEVICE_CLASS_ENERG...
[ 37811, 15514, 329, 9904, 7544, 291, 268, 316, 14, 14396, 501, 4122, 14, 14396, 501, 3524, 1912, 8696, 5188, 15736, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 1363, 562, 10167, 13, 5589, 3906, 13, 82, 22854, ...
2.282523
1,522
import numpy as np import matplotlib.pyplot as plt from PyNomaly import loop import pandas as pd # import the multiple gaussian data # df = pd.read_csv('../data/multiple-gaussian-2d-data-only.csv') print(df) # fit LoOP according to the original settings outlined in the paper # m = loop.LocalOutlierProbability(df[['x'...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 9485, 45, 24335, 1330, 9052, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 1330, 262, 3294, 31986, 31562, 1366, 1303, 198, 75...
2.524457
368
""" TENSIONS ON THE CABLE CAR TRANSPORTATION SYSTEM - This interactive web app computes the cable tensions of the cable car system for a user defined axial location of the carriage car Created on Tue Jun 1 22:53:14 2021 @author: Ramsubramanian Pazhanisamy """ ################################# ## IMPORTS ...
[ 37811, 198, 51, 16938, 11053, 6177, 3336, 327, 17534, 17368, 48213, 4303, 9863, 6234, 36230, 532, 770, 14333, 3992, 598, 220, 198, 5589, 1769, 262, 7862, 15733, 286, 262, 7862, 1097, 1080, 329, 257, 2836, 5447, 7877, 498, 198, 24886, 28...
2.564781
5,673
from GPnet import logpdf import math import numpy as np import os import sys from time import time sys.path.append('Probabilistic-Backpropagation-master/c/PBP_net') import PBP_net # pass the name of the UCI Dataset directory as argument try: data_directory = sys.argv[1] except: data_directory = 'bostonHousing'...
[ 6738, 14714, 3262, 1330, 2604, 12315, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 640, 1330, 640, 198, 17597, 13, 6978, 13, 33295, 10786, 2964, 65, 14991, 2569, 12, 7282, 22930, ...
2.297888
1,373
import pygame, random from random import randint from pygame.locals import * UP = 0 RIGHT = 1 DOWN = 2 LEFT = 3 pygame.init() screen = pygame.display.set_mode((600, 600)) pygame.display.set_caption('Snake') snake = [(200, 200, (210, 210), (200, 200))] snake_skin = pygame.Surface((10, 10)) snake_skin.fill((255, 255, ...
[ 11748, 12972, 6057, 11, 4738, 198, 6738, 4738, 1330, 43720, 600, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 198, 8577, 796, 657, 198, 49, 9947, 796, 352, 198, 41925, 796, 362, 198, 2538, 9792, 796, 513, 198, 198, 9078, ...
2.176583
521
from __future__ import print_function """ Simple routines that provide a uniform interface for reading fits hdus via either astropy.io.fits or fitsio. Three functions are provided: read_image, read_table, read_metadata Warning: A copy of data is returned to detach any backreference to t...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 37811, 198, 220, 220, 220, 17427, 31878, 326, 2148, 257, 8187, 7071, 329, 3555, 198, 220, 220, 220, 11414, 289, 67, 385, 2884, 2035, 6468, 28338, 13, 952, 13, 21013, 393, 11414,...
2.334776
1,849
#!/usr/bin/env python3 import logging from pathlib import Path from datetime import datetime from Pegasus.api import * logging.basicConfig(level=logging.DEBUG) PEGASUS_LOCATION = "/usr/bin/pegasus-keg" # --- Work Dir Setup ----------------------------------------------------------- RUN_ID = "black-diamond-metadata...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 18931, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 48188, 13, 15042, 1330, 1635, 198, 198, 6404, 2667, 13, 35487, 16934, ...
2.100201
1,986
import os import pickle from PIL import Image import torch import torch.utils.data as data
[ 11748, 28686, 198, 11748, 2298, 293, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 28034, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 198 ]
3.64
25
import uuid import discord import logging from discord.ext import commands from asyncio import TimeoutError logger = logging.getLogger(__name__)
[ 11748, 334, 27112, 198, 11748, 36446, 198, 11748, 18931, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 30351, 952, 1330, 3862, 448, 12331, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198 ]
3.609756
41
# Generated by Django 2.2.10 on 2020-05-12 08:44 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 940, 319, 12131, 12, 2713, 12, 1065, 8487, 25, 2598, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.935484
31
import logging from flask_restx import Resource, fields, marshal logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 198, 6738, 42903, 62, 2118, 87, 1330, 20857, 11, 7032, 11, 22397, 282, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628 ]
3.28125
32
A=[] print("Enter array(exit to end)") while 1: x=input() if x=='exit': break A.append(int(x)) best=0 tempsum=0 for x in A: tempsum=max(tempsum+x,x) best=max(best,tempsum) print("Max sum="+str(best)) #complexity is O(n)
[ 32, 28, 21737, 198, 4798, 7203, 17469, 7177, 7, 37023, 284, 886, 8, 4943, 198, 4514, 352, 25, 198, 220, 220, 220, 2124, 28, 15414, 3419, 198, 220, 220, 220, 611, 2124, 855, 6, 37023, 10354, 198, 220, 220, 220, 220, 220, 220, 220, ...
1.968254
126
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
2.91507
10,750
"""Provides convenience functions for interacting with files and directories """ import os def file_is_not_readable(file_path: str) -> bool: """Returns True if the given file is not readable """ if os.access(file_path, os.R_OK): return False return True def directory_is_not_readable(directo...
[ 37811, 15946, 1460, 15607, 5499, 329, 24986, 351, 3696, 290, 29196, 198, 37811, 198, 11748, 28686, 628, 198, 4299, 2393, 62, 271, 62, 1662, 62, 46155, 7, 7753, 62, 6978, 25, 965, 8, 4613, 20512, 25, 198, 220, 220, 220, 37227, 35561, ...
2.917012
241
# -*- coding:utf-8 -*- # Copyright (c) 2020 Huawei Technologies Co.,Ltd. # # openGauss is licensed under Mulan PSL v2. # You can use this software according to the terms # and conditions of the Mulan PSL v2. # You may obtain a copy of Mulan PSL v2 at: # # http://license.coscl.org.cn/MulanPSL2 # # THIS SOFTWARE...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 12131, 43208, 21852, 1766, 1539, 43, 8671, 13, 198, 2, 198, 2, 1280, 35389, 1046, 318, 11971, 739, 17996, 272, 6599, 43, 410, 17, 13, 198, 2, 921,...
3.213439
253
#!/usr/bin/python3 #imports import os,json,urllib.request,urllib.parse,glob,zipfile,sys,shutil from os.path import expanduser #functions #Variablen brautecversion='3' mcversion='1.6.4' forgeversion='9.11.1.953' modpackdownload='http://users.minecraft.name/maha' modpackversiondownload=modpackdownload+'/Brautec'+brautec...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2, 320, 3742, 198, 11748, 28686, 11, 17752, 11, 333, 297, 571, 13, 25927, 11, 333, 297, 571, 13, 29572, 11, 4743, 672, 11, 13344, 7753, 11, 17597, 11, 1477, 22602, 198, 6738, 286...
2.38383
3,723
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.11.2) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x12\x61\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\xe1\x...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 20857, 2134, 2438, 198, 2, 198, 2, 15622, 416, 25, 383, 20857, 3082, 5329, 329, 9485, 48, 83, 20, 357, 48, 83, 410, 20, 13, 1157, 13, 17, 8, 198, 2, 198,...
1.241386
186,780
"""Constants for the Logbook Cache integration.""" DOMAIN = "logbook_cache" NAME = "Logbook Cache" CACHE_DAYS = "cache_days" ONLY_CACHE = "only_cache" DEFAULT_CACHE_DAYS = 2 DEFAULT_ONLY_CACHE = False
[ 37811, 34184, 1187, 329, 262, 5972, 2070, 34088, 11812, 526, 15931, 198, 198, 39170, 29833, 796, 366, 6404, 2070, 62, 23870, 1, 198, 20608, 796, 366, 11187, 2070, 34088, 1, 198, 198, 34, 2246, 13909, 62, 26442, 50, 796, 366, 23870, 62...
2.457831
83
#!/usr/bin/python3 # coding: utf-8 # # Project: freesas # https://github.com/kif/freesas # # Copyright (C) 2020 European Synchrotron Radiation Facility, Grenoble, France # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation fi...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 220, 220, 220, 4935, 25, 2030, 274, 292, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3740, 1378, 12567, 13,...
2.561978
4,187
from CosmoHammer_21CMMC.likelihood.ChainConstants import * class ChainContext(object): """ Context holding a dict to store data and information durring the computation of the likelihood """ def __init__(self, parent, params): """ Constructor of the context """ ...
[ 6738, 10437, 5908, 21281, 647, 62, 2481, 24187, 9655, 13, 2339, 11935, 13, 35491, 34184, 1187, 1330, 1635, 198, 198, 4871, 21853, 21947, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 30532, 4769, 257, 8633, 284, 3650, ...
2.07438
1,089
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import include, path from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView # API URLS urlpatterns = [ # API base url path(settings.ADMIN_URL, admin.site.urls), ...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 2291, 11, 3108, 198, ...
2.736544
353
from sklearn.base import BaseEstimator, TransformerMixin from tomotopy import LDAModel import numpy as np from scipy.sparse import csr_matrix, csc_matrix """ tw=TermWeight.ONE, min_cf=0, min_df=0, rm_top=0, k=1, alpha=0.1, eta=0.01, seed=None, corpus=None, transform=None """
[ 6738, 1341, 35720, 13, 8692, 1330, 7308, 22362, 320, 1352, 11, 3602, 16354, 35608, 259, 198, 6738, 16667, 313, 11081, 1330, 27178, 2390, 375, 417, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 82, 29572, 1330, 269, ...
2.469027
113
content = "my pride was beatufil"
[ 198, 198, 11299, 796, 366, 1820, 11293, 373, 4405, 3046, 346, 1, 198 ]
2.769231
13
from ray.rllib.agents.trainer import Trainer, with_common_config __all__ = ["Trainer", "with_common_config"]
[ 6738, 26842, 13, 81, 297, 571, 13, 49638, 13, 2213, 10613, 1330, 31924, 11, 351, 62, 11321, 62, 11250, 198, 198, 834, 439, 834, 796, 14631, 2898, 10613, 1600, 366, 4480, 62, 11321, 62, 11250, 8973, 198 ]
2.972973
37
from unittest import TestCase from unittest.mock import patch, Mock from sklearn.pipeline import Pipeline from sklearn.preprocessing import OneHotEncoder from .. import generate_preprocessing_steps
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, 44123, 198, 6738, 1341, 35720, 13, 79, 541, 4470, 1330, 37709, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 1881, 21352, 27195, 12342, 19...
3.826923
52
from collections import OrderedDict import mock from paperspace.commands.common import CommandBase output_response = ""
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 11748, 15290, 198, 198, 6738, 9473, 10223, 13, 9503, 1746, 13, 11321, 1330, 9455, 14881, 198, 198, 22915, 62, 26209, 796, 13538, 628 ]
3.875
32
# -*- coding:utf-8 -*- from wencai.core.crawler import Wencai global_cn_col = False global_proxies = None verify = False
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 6738, 266, 12685, 1872, 13, 7295, 13, 66, 39464, 1330, 370, 12685, 1872, 198, 198, 20541, 62, 31522, 62, 4033, 796, 10352, 198, 20541, 62, 1676, 87, 444, 796, 6045, 198, ...
2.490196
51
from turtle import* import turtle setup(600,490) bgcolor("white") title("Curie") estructuraquimica(5) hideturtle() turtle.exitonclick()
[ 6738, 28699, 1330, 9, 201, 198, 11748, 28699, 201, 198, 201, 198, 40406, 7, 8054, 11, 31503, 8, 201, 198, 35904, 8043, 7203, 11186, 4943, 201, 198, 7839, 7203, 26628, 494, 4943, 201, 198, 201, 198, 395, 1356, 5330, 421, 320, 3970, 7...
2.433333
60
from flask import Flask from flask import request, redirect, render_template from fastai.learner import load_learner import pathlib from fastai.vision.core import PILImage import platform application = Flask(__name__) application.config['MAX_CONTENT_LENGTH'] = 12 * 1024 * 1024 MIN_STANDARD = 0.9 # Workaround pytorch...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 1330, 2581, 11, 18941, 11, 8543, 62, 28243, 198, 6738, 3049, 1872, 13, 3238, 1008, 1330, 3440, 62, 3238, 1008, 198, 11748, 3108, 8019, 198, 6738, 3049, 1872, 13, 10178, 13, 7295, 1330, 350, ...
3.091703
229
""" Functions that automate expressive functions of tcrdist3. These use sensible defaults but users should consider flexibile elements of these functions that might better suit their specific data or research questions. """ import os import pandas as pd import numpy as np import warnings from progress.bar import I...
[ 37811, 198, 24629, 2733, 326, 43511, 38084, 5499, 286, 37096, 4372, 396, 18, 13, 220, 198, 198, 4711, 779, 20586, 26235, 475, 2985, 815, 2074, 220, 198, 32880, 571, 576, 4847, 286, 777, 5499, 326, 1244, 1365, 220, 198, 6063, 511, 2176...
2.708181
1,919
from django.db import models from django.contrib.auth.models import User
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 628, 628 ]
3.454545
22
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'item_list.ui' # # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be lost! from tank.platform.qt import QtCore, QtGui from . import resources_rc
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 9186, 62, 4868, 13, 9019, 6, 198, 2, 198, 2, 220, 220, 220, 220, 220, 416, 25, 279, 893, 485, 12, 84, 29...
2.715686
102
""" *War* Parameters that govern the evaluation process that compares the current neural network with the best one seen so far (which is used to generate data). """ from dataclasses import dataclass """ # Explanation (two-player games) * The two competing networks are instantiated into two MCTS player...
[ 37811, 628, 220, 220, 220, 1635, 13195, 9, 628, 220, 40117, 326, 1089, 262, 12660, 1429, 326, 23008, 198, 220, 262, 1459, 17019, 3127, 351, 262, 1266, 530, 1775, 523, 1290, 198, 220, 357, 4758, 318, 973, 284, 7716, 1366, 737, 198, 1...
3.782007
289
import numbers import pytest TESTSET = [ ( {'blob': {'$types': ['string']}}, lambda x: isinstance(x['blob'], str) ), ( {'blob': {'$types': ['number']}}, lambda x: isinstance(x['blob'], numbers.Number) ), ( {'blob': {'$types': ['boolean']}}, lambda x: isinstan...
[ 11748, 3146, 198, 11748, 12972, 9288, 198, 198, 51, 1546, 4694, 2767, 796, 685, 198, 220, 220, 220, 357, 198, 220, 220, 220, 220, 220, 220, 220, 1391, 6, 2436, 672, 10354, 1391, 6, 3, 19199, 10354, 37250, 8841, 20520, 92, 5512, 198,...
1.939063
640
import click from esque.cli.options import State, default_options from .consumergroup import create_consumergroup from .topic import create_topic @click.group(help="Create a new instance of a resource.", no_args_is_help=True) @default_options create.add_command(create_consumergroup) create.add_command(create_topi...
[ 11748, 3904, 198, 198, 6738, 1658, 4188, 13, 44506, 13, 25811, 1330, 1812, 11, 4277, 62, 25811, 198, 198, 6738, 764, 5936, 388, 6422, 3233, 1330, 2251, 62, 5936, 388, 6422, 3233, 198, 6738, 764, 26652, 1330, 2251, 62, 26652, 628, 198,...
3.262626
99
######################################## # Automatically generated, do not edit. ######################################## from pyvisdk.thirdparty import Enum NetBIOSConfigInfoMode = Enum( 'disabled', 'enabled', 'enabledViaDHCP', 'unknown', )
[ 198, 29113, 7804, 198, 2, 17406, 4142, 7560, 11, 466, 407, 4370, 13, 198, 29113, 7804, 628, 198, 6738, 12972, 4703, 34388, 13, 17089, 10608, 1330, 2039, 388, 198, 198, 7934, 3483, 2640, 16934, 12360, 19076, 796, 2039, 388, 7, 198, 220...
3.506667
75
""" """ from sklearn.model_selection import train_test_split from memobuilder import mtrainer as memotrainer from memobuilder.mdb import memomodel
[ 37811, 37227, 201, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 201, 198, 201, 198, 6738, 1066, 672, 3547, 263, 1330, 285, 2213, 10613, 355, 1066, 313, 3201, 263, 201, 198, 6738, 1066, 672, 3547, 263,...
2.803571
56
# -*- coding: utf-8 -*- #!/usr/bin/env python3 # # Copyright (C) 2019 Intel Corporation. All rights reserved. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # import ctypes from wamr.ffi import * if __name__ == "__main__": main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 15069, 357, 34, 8, 13130, 8180, 10501, 13, 220, 1439, 2489, 10395, 13, 198, 2, 30628, 55, 12, 34156,...
2.561224
98
import click from calm.dsl.api import get_api_client from .main import main, get, describe, delete, run, watch, download, create from .utils import Display, FeatureFlagGroup from .apps import ( get_apps, describe_app, run_actions, watch_action, watch_app, delete_app, download_runlog, c...
[ 11748, 3904, 198, 198, 6738, 9480, 13, 67, 6649, 13, 15042, 1330, 651, 62, 15042, 62, 16366, 198, 198, 6738, 764, 12417, 1330, 1388, 11, 651, 11, 6901, 11, 12233, 11, 1057, 11, 2342, 11, 4321, 11, 2251, 198, 6738, 764, 26791, 1330, ...
2.660125
2,395
from django.db import models from users.models import CustomUser
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 2985, 13, 27530, 1330, 8562, 12982, 628 ]
3.941176
17
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Window manager Coordinates in (y, x) to be consistent with curses """ from soundground import metadata, utils import curses import time class Value(object): """ Defines a number used for relative calculations """ def apply(self, target): """ ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 27703, 4706, 198, 7222, 585, 17540, 287, 357, 88, 11, 2124, 8, 284, 307, 6414, 351, 43878, 198, 37811, 19...
2.103957
4,069
from .interactive_image import InteractiveImage from .graph_inspect_widget import CustomInspectTool from .graph_assets import calc_connected_edges
[ 6738, 764, 3849, 5275, 62, 9060, 1330, 21365, 5159, 198, 6738, 764, 34960, 62, 1040, 806, 62, 42655, 1330, 8562, 818, 4443, 25391, 198, 6738, 764, 34960, 62, 19668, 1330, 42302, 62, 15236, 62, 276, 3212, 198 ]
3.972973
37
#!usr/bin/env python # -*- coding: utf-8 -*- # author: kuangdd # date: 2019/12/15 """ 语音处理工具箱。 生成whl格式安装包:python setup.py bdist_wheel 直接上传pypi:python setup.py sdist upload 用twine上传pypi: 生成安装包:python setup.py bdist_wheel 上传安装包:twine upload dist/phkit-0.3.0-py3-none-any.whl 注意:需要在home目录下建立.pypirc配置文件,文件内容格式: [distutil...
[ 2, 0, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 1772, 25, 479, 84, 648, 1860, 198, 2, 3128, 25, 13130, 14, 1065, 14, 1314, 198, 37811, 198, 46237, 255, 165, 253, ...
1.989119
919
import torch from torch.autograd import Variable import torch.nn as nn import torch.optim as optim import torchvision.transforms as transforms import torchvision.datasets as datasets from convex_adversarial import robust_loss
[ 11748, 28034, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 198, 11748, 28034, 10178, 13, ...
3.864407
59