content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/usr/bin/env python3 ########################################## ######## DO NOT MODIFY THIS FILE! ######## ## CONFIGURE API INFO THROUGH NZBGET UI ## ########################################## ##################################### ### NZBGET POST-PROCESSING SCRIPT ### # Script to send post-processing info # to Wat...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 29113, 7804, 2235, 198, 7804, 8410, 5626, 19164, 5064, 56, 12680, 45811, 0, 46424, 21017, 198, 2235, 25626, 11335, 7824, 24890, 35383, 32632, 26905, 33, 18851, 12454, 22492, 198, ...
2.67806
907
import pickle import numpy as np
[ 11748, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198 ]
3.3
10
import time import pytest import sys from unittest import mock from aioredis import ReplyError from _testutils import redis_version @pytest.mark.run_loop @pytest.mark.run_loop @pytest.mark.skipif(sys.platform == 'win32', reason="No unixsocket on Windows") @pytest.mark.run_loop @redis_version...
[ 11748, 640, 198, 11748, 12972, 9288, 198, 11748, 25064, 198, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 6738, 257, 72, 1850, 271, 1330, 14883, 12331, 198, 6738, 4808, 9288, 26791, 1330, 2266, 271, 62, 9641, 628, 198, 31, 9078, 9...
2.412969
586
# coding: utf-8 from __future__ import unicode_literals from ..util import get_doc import pytest @pytest.mark.skip @pytest.mark.models('en') def test_issue514(EN): """Test serializing after adding entity""" text = ["This", "is", "a", "sentence", "about", "pasta", "."] vocab = EN.entity.vocab doc = g...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 11485, 22602, 1330, 651, 62, 15390, 198, 198, 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 4102, 13, 48267, 198, 3...
2.425532
282
#!/usr/bin/env python # -*- coding: utf-8 -*- """ python modules for data processing utilities: dataworkshop: main GUI framework for data post-processing Author: Tong Zhang Created: Sep. 23rd, 2015 """ from __future__ import print_function import wx import time import threading import numpy as np import matplotli...
[ 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, 29412, 13103, 329, 1366, 7587, 20081, 25, 198, 220, 220, 220, 4818, 707, 3647, 8548, 25, 1388, 25757, 9355,...
2.853846
260
from django.conf import settings from django.urls import include from django.conf.urls.static import static from django.contrib import admin from django.urls import path, re_path from django.views.generic.base import TemplateView from core import __version__ from core.apiv1 import apiv1_gone from homepage.views import...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 2291, 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...
2.680404
1,189
"""Utilities for unit testing.""" from importlib import __import__ import pytest import sys class Mocktoday(object): """A context manager for to fake out datetime.date.today. Monkeypatches the given module to swap out today with our own function so that we can say that "today" is any date we want. ...
[ 37811, 18274, 2410, 329, 4326, 4856, 526, 15931, 198, 198, 6738, 1330, 8019, 1330, 11593, 11748, 834, 198, 11748, 12972, 9288, 198, 11748, 25064, 628, 198, 4871, 44123, 40838, 7, 15252, 2599, 198, 220, 220, 220, 37227, 32, 4732, 4706, 3...
2.501038
1,445
#!/usr/bin/env python3 # Invoked by: Cloudformation custom actions # Returns: Error or status message # # deletes the resources assocated with lambda like eni import boto3 import http.client import urllib import json import uuid import threading from time import sleep
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 10001, 6545, 416, 25, 10130, 1161, 2183, 4028, 198, 2, 16409, 25, 13047, 393, 3722, 3275, 198, 2, 198, 2, 28128, 274, 262, 4133, 840, 10533, 351, 37456, 588, 551, 72, 198, 1...
3.635135
74
from copy import copy from ..device.lasercommandconstants import ( COMMAND_BEEP, COMMAND_FUNCTION, COMMAND_HOME, COMMAND_MODE_RAPID, COMMAND_MOVE, COMMAND_SET_ABSOLUTE, COMMAND_SET_POSITION, COMMAND_UNLOCK, COMMAND_WAIT, COMMAND_WAIT_FINISH, ) from ..kernel import Modifier from ...
[ 6738, 4866, 1330, 4866, 198, 198, 6738, 11485, 25202, 13, 75, 6005, 21812, 9979, 1187, 1330, 357, 198, 220, 220, 220, 22240, 6981, 62, 33, 35238, 11, 198, 220, 220, 220, 22240, 6981, 62, 42296, 4177, 2849, 11, 198, 220, 220, 220, 22...
2.404971
684
# Example taken from: # https://stackoverflow.com/questions/39561560/getting-gradient-of-model-output-w-r-t-weights-using-keras from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense from tensorflow.keras import backend as K import tensorflow as tf import numpy as np model = Sequen...
[ 2, 17934, 2077, 422, 25, 198, 2, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 2670, 3980, 1314, 1899, 14, 37210, 12, 49607, 12, 1659, 12, 19849, 12, 22915, 12, 86, 12, 81, 12, 83, 12, 43775, 12, 3500, 12, 6122, 29...
2.982332
283
#!/usr/bin/python import os import sys import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0, parentdir) from Engine.engine import VenueBaseCmdProcessor, ClientBaseCmdProcessor, ClientBaseCmdTraits, VenueBaseCmd...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 10104, 198, 198, 14421, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 1040, 806, 13, 1136, 7753, 7, 104...
3.564516
186
#!/usr/bin/python import json import re import requests try: from BeautifulSoup import BeautifulSoup except ImportError: from bs4 import BeautifulSoup try: inputFile = open("input.json") except Exception, e: print e exit() try: urls = json.load(inputFile)['urls'] except Exception, e: prin...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 7007, 198, 28311, 25, 198, 220, 220, 220, 422, 23762, 50, 10486, 1330, 23762, 50, 10486, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422,...
2.403292
972
""" Basic functions for working with images. """ from __future__ import division, print_function, absolute_import import itertools as itr import numpy as np def _import_skimage(): """Import scikit-image, with slightly modified `ImportError` message""" try: import skimage except ImportError: ...
[ 37811, 198, 26416, 5499, 329, 1762, 351, 4263, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 11, 4112, 62, 11748, 198, 11748, 340, 861, 10141, 355, 340, 81, 198, 11748, 299, 32152, 355, 45941, 198, 198,...
2.510616
3,815
from SeleniumLibrary.base import LibraryComponent, keyword
[ 6738, 15300, 47477, 23377, 13, 8692, 1330, 10074, 21950, 11, 21179, 628 ]
5
12
# Copyright 2018 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
[ 2, 15069, 2864, 2297, 10983, 11, 3457, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846...
3.836735
196
# Generated by Django 3.2.5 on 2021-08-04 11:38 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 20, 319, 33448, 12, 2919, 12, 3023, 1367, 25, 2548, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest from concurrent.futures.thread import ThreadPoolExecutor from src.common.log import log from src.core.path_settings import TEST_CASES def run_thread(suits, thread_num: int = 8): """ 多线程运行所有用例 :param suits: 测试用例 :param thread_num: 线程数 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 555, 715, 395, 198, 6738, 24580, 13, 69, 315, 942, 13, 16663, 1330, 14122, 27201, 23002, 38409, 198, ...
1.963446
383
import multiprocessing as mp import time import random random.seed() send_queue = mp.Queue() receive_queue = mp.Queue() proc = mp.Process(target=send_fast, args=(send_queue, receive_queue,)) proc.start() send_slow(send_queue, receive_queue)
[ 11748, 18540, 305, 919, 278, 355, 29034, 198, 11748, 640, 198, 11748, 4738, 198, 198, 25120, 13, 28826, 3419, 628, 628, 198, 198, 21280, 62, 36560, 796, 29034, 13, 34991, 3419, 198, 260, 15164, 62, 36560, 796, 29034, 13, 34991, 3419, ...
2.917647
85
import json from datetime import datetime from pathlib import Path import numpy as np import requests def download_file(url: str, path: Path): """Download file from the given url and store it to path.""" response = requests.get(url, stream=True) with path.open('wb') as file: for data in response....
[ 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 7007, 628, 198, 4299, 4321, 62, 7753, 7, 6371, 25, 965, 11, 3108, 25, 10644, 2599, 198, 22...
3.025926
270
# -*- coding: UTF-8 -*- v = 14 if type(v) != int: print("Error: Only Support Integer!") elif v % 2 == 0: print(0) elif v % 2 == 1: print(v) v = 12 print(type(v)) v = 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 85, 796, 1478, 198, 198, 361, 2099, 7, 85, 8, 14512, 493, 25, 198, 220, 220, 220, 3601, 7203, 12331, 25, 5514, 7929, 34142, 2474, 8, 198, 417, 361, 410, 4064, 362,...
2.888158
152
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed May 5 13:17:22 2021 @author: trduong """ # import os, sys; # sys.path.append(os.path.dirname(os.path.realpath(__file__))) import pandas as pd import numpy as np import logging import yaml import pyro import torch import pyro.distributions as dist im...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 1737, 220, 642, 1511, 25, 1558, 25, 1828, 33448, 198, 198, 31, 9800, 25, 491, 646, ...
2.399675
1,231
""" [2015-09-09] Challenge #231 [Intermediate] Set Game Solver https://www.reddit.com/r/dailyprogrammer/comments/3ke4l6/20150909_challenge_231_intermediate_set_game/ Our apologies for the delay in getting this posted, there was some technical difficulties behind the scenes. # Description Set is a card game where eac...
[ 37811, 198, 58, 4626, 12, 2931, 12, 2931, 60, 13879, 1303, 25667, 685, 9492, 13857, 60, 5345, 3776, 4294, 332, 198, 198, 5450, 1378, 2503, 13, 10748, 13, 785, 14, 81, 14, 29468, 23065, 647, 14, 15944, 14, 18, 365, 19, 75, 21, 14, ...
2.700246
814
from torch.nn import Module from torch import nn ##### Part forward without last classification layer for the purpose of FID computing
[ 6738, 28034, 13, 20471, 1330, 19937, 198, 6738, 28034, 1330, 299, 77, 628, 198, 220, 220, 220, 46424, 2142, 2651, 1231, 938, 17923, 7679, 329, 262, 4007, 286, 376, 2389, 14492, 198 ]
4.40625
32
import simplejson as json from decimal import Decimal import datetime from unittest import TestCase from unittest.mock import patch, MagicMock from requests import HTTPError from web_payments_paypal import PaypalProvider, PaypalCardProvider from web_payments import RedirectNeeded, PaymentError, PaymentStatus from web_...
[ 11748, 2829, 17752, 355, 33918, 198, 6738, 32465, 1330, 4280, 4402, 198, 11748, 4818, 8079, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, 6139, 44, 735, 198, 6738, 7007, 1330, 1462...
2.482143
392
import nltk import numpy as np import pandas as pd from nltk.sentiment.vader import SentimentIntensityAnalyzer from sklearn.metrics import accuracy_score, classification_report, confusion_matrix nltk.download('vader_lexicon') sid = SentimentIntensityAnalyzer() a = 'This was a good movie' score = sid.polarity_scores(a...
[ 11748, 299, 2528, 74, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 299, 2528, 74, 13, 34086, 3681, 13, 85, 5067, 1330, 11352, 3681, 5317, 6377, 37702, 9107, 198, 6738, 1341, 35720, 13, 4164, 104...
2.549157
712
import numpy as np import torch import torch.nn as nn
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 628, 628, 628 ]
3.105263
19
# ref: https://tutorials-raspberrypi.com/raspberry-pi-servo-motor-control/ import RPi.GPIO as GPIO import time servoPIN = 17 GPIO.setmode(GPIO.BCM) GPIO.setup(servoPIN, GPIO.OUT)
[ 2, 1006, 25, 3740, 1378, 83, 44917, 82, 12, 81, 17653, 14415, 13, 785, 14, 81, 17653, 12, 14415, 12, 3168, 78, 12, 76, 20965, 12, 13716, 14, 198, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 11748, 640, 198, 198, 3168,...
2.394737
76
#!/usr/bin/env python from distutils.core import setup setup(name='Project.Euler', version='0.0.1', description='Python3 implementation of Project Euler problems.', author='Jonathan Madden', )
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 40406, 7, 3672, 11639, 16775, 13, 36, 18173, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 15, 13, 16, 3256, 198, ...
2.772152
79
from rest_framework.views import APIView, Response from .models import Transaction from rest_framework.permissions import AllowAny from .click_authorization import click_authorization from .serializer import ClickUzSerializer from .status import *
[ 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 11, 18261, 198, 6738, 764, 27530, 1330, 45389, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 22507, 7149, 198, 6738, 764, 12976, 62, 9800, 1634, 1330, 3904, 62, 9800, 1634, 1...
4.220339
59
from collections import defaultdict instruction_list = lambda:defaultdict(instruction_list) instruction_table = instruction_list() # RV32I ## Branch instruction_table['0x18']['0'] = 'beq' instruction_table['0x18']['1'] = 'bne' instruction_table['0x18']['4'] = 'blt' instruction_table['0x18']['5'] = 'bge' instruction_t...
[ 6738, 17268, 1330, 4277, 11600, 198, 198, 8625, 2762, 62, 4868, 796, 37456, 25, 12286, 11600, 7, 8625, 2762, 62, 4868, 8, 198, 8625, 2762, 62, 11487, 796, 12064, 62, 4868, 3419, 198, 198, 2, 31367, 2624, 40, 198, 2235, 20551, 198, 8...
1.918107
4,225
# Podemos modificar a saídas dos números sem modificar os valores reais # Ex: Número 2 => Valor é 2. Saída => 2.00 => Valor ainda é 2 # Número 2.5 => Valor é 2.5 Saída => 2 => Valor ainda é 2.5 numero = 1.61 print(numero) # Para inteiros uso o 'd' e para floats uso o 'f' # para numeros quebrados ele arredonda print(...
[ 2, 17437, 368, 418, 953, 811, 283, 257, 473, 8836, 67, 292, 23430, 299, 21356, 647, 418, 5026, 953, 811, 283, 28686, 1188, 2850, 302, 15152, 198, 2, 1475, 25, 399, 21356, 647, 78, 362, 5218, 3254, 273, 38251, 362, 13, 10318, 8836, ...
2.129464
224
from rest_framework import viewsets from rest_framework.response import Response from . serializers import * from . models import * from . api_renderers import GeoJsonRenderer from rest_framework.settings import api_settings
[ 6738, 1334, 62, 30604, 1330, 5009, 1039, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 764, 11389, 11341, 1330, 1635, 198, 6738, 764, 4981, 1330, 1635, 198, 6738, 764, 40391, 62, 10920, 19288, 1330, 32960, 41, 1559, 49,...
4.017544
57
import os import tornado.ioloop import tornado.web port = os.environ.get('PORT', 8080) if __name__ == "__main__": app = make_app() app.listen(port) tornado.ioloop.IOLoop.current().start()
[ 11748, 28686, 198, 198, 11748, 33718, 13, 1669, 11224, 198, 11748, 33718, 13, 12384, 198, 198, 634, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 15490, 3256, 4019, 1795, 8, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1...
2.506173
81
""" backend URL Configuration See the voter_validation folder for more details. """ import backend.settings as settings from django.conf.urls import include, url from django.contrib import admin from django.views.generic import RedirectView urlpatterns = [ url(r'^private/admin/', include(admin.site.urls)), url...
[ 37811, 198, 1891, 437, 10289, 28373, 198, 6214, 262, 10765, 62, 12102, 341, 9483, 329, 517, 3307, 13, 198, 37811, 198, 11748, 30203, 13, 33692, 355, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6...
2.57
300
import requests from bs4 import BeautifulSoup
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486 ]
4.090909
11
from .models import WALL, EMPTY from .a_star_search import reconstruct_path, end_reached START = 100 GOAL = 200 HORIZONTAL_PATH = 300 VERTICAL_PATH = 400 CHAR_MAPPING = { WALL: '#', EMPTY: ' ', GOAL: 'E', HORIZONTAL_PATH: '-', VERTICAL_PATH: '|', ...
[ 6738, 764, 27530, 1330, 370, 7036, 11, 38144, 9936, 198, 6738, 764, 64, 62, 7364, 62, 12947, 1330, 31081, 62, 6978, 11, 886, 62, 260, 2317, 628, 198, 2257, 7227, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 796, 1802, 198, 11...
1.882022
178
if __name__ == "__main__": generator = parrot() generator.send(None) generator.send("Hello") generator.send("World")
[ 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 17301, 796, 1582, 10599, 3419, 198, 220, 220, 220, 17301, 13, 21280, 7, 14202, 8, 198, 220, 220, 220, 17301, 13, 21280, 7203, 15496, 4943, 198, 2...
2.596154
52
from typing import Optional import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.checkpoint import checkpoint from .mlp_layer import MLP from cogdl.utils import get_activation, mul_edge_softmax, get_norm_layer class ResGNNLayer(nn.Module): """ Implementation of DeeperGCN in p...
[ 6738, 19720, 1330, 32233, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 26791, 13, 9122, 4122, 1330, 26954, 198, 198, 6738, 764, 4029, 79, ...
2.817829
258
import sys import os import threading import matplotlib.pyplot as plt sys.path.append(os.path.abspath("../../IoTPy/multiprocessing")) sys.path.append(os.path.abspath("../../IoTPy/core")) sys.path.append(os.path.abspath("../../IoTPy/agent_types")) sys.path.append(os.path.abspath("../../IoTPy/helper_functions")) sys.path...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 4704, 278, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 397, 2777, 776, 7203, 40720, 40720, 40, 78, 7250, 88, 14, 1...
2.93733
367
import tensorflow as tf from customParameters import * import myMethod as myMethod import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sn import argparse # use method: # python predict.py --model myModel --type whole_history_epoch # python predict.py --model myVGG --type whole --lo...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 2183, 48944, 1330, 1635, 198, 11748, 616, 17410, 355, 616, 17410, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, ...
2.70649
678
class LinkConversionData(object,IDisposable): """ This class contains the information necessary to re-create a Revit document from an external source. """ def Dispose(self): """ Dispose(self: LinkConversionData) """ pass def GetOptions(self): """ GetOptions(self: LinkConversionData) -> IDict...
[ 4871, 7502, 3103, 9641, 6601, 7, 15252, 11, 2389, 271, 1930, 540, 2599, 201, 198, 37227, 201, 198, 770, 1398, 4909, 262, 1321, 3306, 284, 302, 12, 17953, 257, 5416, 270, 3188, 201, 201, 198, 220, 220, 220, 422, 281, 7097, 2723, 13, ...
2.985318
613
# Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ 2, 220, 220, 220, 15069, 1853, 7381, 20836, 11, 3457, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, ...
2.508972
613
import os #图像分类 from cv2 import cv2 from PIL import Image,ImageDraw from datetime import datetime import time from pytesseract import image_to_string #detectFaces()返回图像中所有人脸的矩形坐标(矩形左上、右下顶点) #使用haar特征的级联分类器haarcascade_frontalface_default.xml,在haarcascades目录下还有其他的训练好的xml文件可供选择。 #注:haarcascades目录下训练好的分类器必须以灰度图...
[ 11748, 28686, 198, 2, 32368, 122, 161, 225, 237, 26344, 228, 163, 109, 119, 198, 6738, 269, 85, 17, 1330, 269, 85, 17, 198, 6738, 350, 4146, 1330, 7412, 11, 5159, 25302, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 640, 198,...
0.882289
926
import re from utils.rules.base import Base
[ 11748, 302, 198, 198, 6738, 3384, 4487, 13, 38785, 13, 8692, 1330, 7308, 628 ]
3.285714
14
__version__ = "0.1.0" import os import discord from dotenv import load_dotenv load_dotenv() bot = AutoDisconnect() token = os.environ.get("TOKEN", None) if token is None or len(token.strip()) == 0: print("\nA bot token is necessary for the bot to function.\n") raise RuntimeError else: bot.run(token)
[ 834, 9641, 834, 796, 366, 15, 13, 16, 13, 15, 1, 198, 198, 11748, 28686, 198, 198, 11748, 36446, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 198, 2220, 62, 26518, 24330, 3419, 628, 198, 198, 13645, 796, 11160, 7279, ...
2.711864
118
from typing import Callable, Tuple
[ 6738, 19720, 1330, 4889, 540, 11, 309, 29291, 628 ]
4
9
"""Add titles to charts and tables This is in preparation for storing the titles of charts and tables in a separate database column, rather than as part of the JSON objects. Revision ID: 2019_03_21_add_titles Revises: 2019_03_20_tidy_up_dimension Create Date: 2019-03-14 15:11:33.560576 """ from alembic import op imp...
[ 37811, 4550, 8714, 284, 15907, 290, 8893, 198, 198, 1212, 318, 287, 11824, 329, 23069, 262, 8714, 286, 15907, 290, 8893, 287, 198, 64, 4553, 6831, 5721, 11, 2138, 621, 355, 636, 286, 262, 19449, 5563, 13, 198, 198, 18009, 1166, 4522, ...
3.017857
168
#!/usr/bin/env python # -*- coding: utf-8 -*- # Step2 : BLAST hits were parsed to retrieve associated taxonomic information # using the NCBI's taxonomy database. # Downloaded resource: # wget ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz # tar -zxvf taxdump.tar.gz # https://www.biostars.org/p/222183/ # ...
[ 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, 5012, 17, 1058, 9878, 11262, 7127, 547, 44267, 284, 19818, 3917, 1687, 40036, 1321, 220, 198, 2, 220, 197, 19...
2.459064
684
from whylabs.logs.proto import InferredType from whylabs.logs.core.statistics import SchemaTracker Type = InferredType.Type
[ 6738, 1521, 75, 8937, 13, 6404, 82, 13, 1676, 1462, 1330, 554, 18186, 6030, 198, 6738, 1521, 75, 8937, 13, 6404, 82, 13, 7295, 13, 14269, 3969, 1330, 10011, 2611, 35694, 198, 6030, 796, 554, 18186, 6030, 13, 6030, 628, 628, 628, 628...
3
45
import msgpack from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware import settings app = FastAPI() origins = [ 'http://localhost:3000', ] app.add_middleware( CORSMiddleware, allow_origins=origins, allow_credentials=True, allow_methods=['*'], allow_headers=['*'] ) @...
[ 11748, 31456, 8002, 198, 6738, 3049, 15042, 1330, 12549, 17614, 198, 6738, 3049, 15042, 13, 27171, 1574, 13, 66, 669, 1330, 23929, 12310, 2509, 1574, 198, 11748, 6460, 198, 198, 1324, 796, 12549, 17614, 3419, 198, 198, 11612, 1040, 796, ...
2.518248
137
import asyncio import os from threading import Timer import aiofiles import aiohttp import pandas as pd import untangle from aiohttp import ClientSession from progress.bar import Bar username = os.getenv("HAMQTH_USERNAME") password = os.getenv("HAMQTH_PASSWORD") api_root = "https://www.hamqth.com/xml.php" auth_uri = ...
[ 11748, 30351, 952, 198, 11748, 28686, 198, 6738, 4704, 278, 1330, 5045, 263, 198, 198, 11748, 257, 952, 16624, 198, 11748, 257, 952, 4023, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 1418, 9248, 198, 6738, 257, 952, 4023, 1330, ...
2.771676
346
""" Question Source:Leetcode Level: Easy Topic: Math Solver: Tayyrov Date: 28.05.2022 """ from typing import List
[ 37811, 201, 198, 24361, 8090, 25, 3123, 316, 8189, 201, 198, 4971, 25, 16789, 201, 198, 33221, 25, 16320, 201, 198, 50, 14375, 25, 25569, 88, 18657, 201, 198, 10430, 25, 2579, 13, 2713, 13, 1238, 1828, 201, 198, 37811, 201, 198, 673...
2.574468
47
from django.conf.urls import url from django.contrib import admin from . import views urlpatterns = [ url(r'^$', views.GeneralSettingsView.as_view(), name='general'), url(r'^technical/$', views.TechnicalSettingsView.as_view(), name='technical'), url(r'^teller/$', views.TellerSettingsView.as_view(), name='...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, 3256, ...
2.858156
141
# Copyright 2009 Yelp # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
[ 2, 15069, 3717, 44628, 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, 7330, 257,...
3.83913
230
from Database import Database_connection as db database = db() qy = """ INSERT INTO `berita_detail` (`judul`, `waktu`, `tag`, `isi`, `sumber`) VALUES ('Mentan harap tatanan normal baru pulihkan permintaan produk pertanian', '2020-06-07', '[normal baru,new normal,petani]', ' Dengan kebijakan normal baru utamanya di sekt...
[ 6738, 24047, 1330, 24047, 62, 38659, 355, 20613, 198, 48806, 796, 20613, 3419, 198, 80, 88, 796, 37227, 198, 20913, 17395, 39319, 4600, 527, 5350, 62, 49170, 63, 357, 63, 10456, 377, 47671, 4600, 86, 461, 28047, 47671, 4600, 12985, 4767...
2.737024
1,156
# coding: utf-8 """ @Topic: @Date: 2020/12/8 @Author: other.z @Copyright(C): 2020-2023 other.z Inc. All rights reserved. """ import py import os import json import yaml import warnings from dotenv import dotenv_values, find_dotenv
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 198, 2488, 33221, 25, 628, 2488, 10430, 25, 12131, 14, 1065, 14, 23, 628, 2488, 13838, 25, 584, 13, 89, 628, 2488, 15269, 171, 120, 230, 34, 171, 120, 231, 25, 12131, 12, 1238, 1954, 5...
2.666667
93
import pytest import numpy as np from astropy.wcs import WCS import astropy.units as u from astropy.coordinates import SkyCoord from astropy.wcs.utils import proj_plane_pixel_area from mosviz.viewers.mos_viewer import MOSVizViewer def construct_test_wcs(ra=0., dec=0., x=0., y=0., area=1.0): """ Constructs ...
[ 11748, 12972, 9288, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 6468, 28338, 13, 12712, 1330, 45410, 198, 11748, 6468, 28338, 13, 41667, 355, 334, 198, 6738, 6468, 28338, 13, 37652, 17540, 1330, 5274, 7222, 585, 198, 6738, ...
2.263493
2,983
from mmf.models.mmbt import MMBT from mmxai.interpretability.classification.lime.lime_multimodal import LimeMultimodalExplainer import numpy as np from PIL import Image from skimage.segmentation import mark_boundaries from skimage import img_as_ubyte import matplotlib.pyplot as plt import torch import json import re ...
[ 6738, 8085, 69, 13, 27530, 13, 76, 2022, 83, 1330, 337, 10744, 51, 198, 6738, 8085, 87, 1872, 13, 27381, 1799, 13, 4871, 2649, 13, 27299, 13, 27299, 62, 16680, 320, 375, 282, 1330, 43503, 15205, 320, 375, 282, 18438, 10613, 198, 117...
2.433107
441
""" stdarray.py The stdarray module defines functions related to creating, reading, and writing one- and two-dimensional arrays. """ import _10_02.Dog.stdio as stdio #======================================================================= # Array creation functions #==================================================...
[ 37811, 198, 19282, 18747, 13, 9078, 198, 198, 464, 14367, 18747, 8265, 15738, 5499, 3519, 284, 4441, 11, 3555, 11, 198, 392, 3597, 530, 12, 290, 734, 12, 19577, 26515, 13, 198, 37811, 198, 198, 11748, 4808, 940, 62, 2999, 13, 32942, ...
2.802885
1,872
from gork.palette import COLOR_TREE, PALETTE from gork.structs import RGB, Color DEFAULT_PIXEL_SIZE = 10 DEFAULT_N_CLUSTERS = 256
[ 6738, 308, 967, 13, 18596, 5857, 1330, 20444, 1581, 62, 51, 11587, 11, 40795, 2767, 9328, 198, 6738, 308, 967, 13, 7249, 82, 1330, 25228, 11, 5315, 198, 198, 7206, 38865, 62, 47, 10426, 3698, 62, 33489, 796, 838, 198, 7206, 38865, 6...
2.588235
51
from datetime import datetime from pathlib import Path from config_state.config_state import ConfigField from config_state.config_state import ConfigState from config_state.config_state import reference from config_state.config_state import stateproperty from config_state.config_state import StateVar ...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 4566, 62, 5219, 13, 11250, 62, 5219, 1330, 17056, 15878, 198, 6738, 4566, 62, 5219, 13, 11250, 62, 5219, 1330, 17056, 9012, 198, 6738, 4566, 62, 5...
3.926829
82
from requests.auth import AuthBase import hmac import base64 import hashlib import urlparse import urllib #add your custom auth handler class to this module #template #example of adding a client certificate #example of adding a client certificate #cloudstack auth example
[ 6738, 7007, 13, 18439, 1330, 26828, 14881, 198, 11748, 289, 20285, 198, 11748, 2779, 2414, 198, 11748, 12234, 8019, 198, 11748, 19016, 29572, 198, 11748, 2956, 297, 571, 198, 198, 2, 2860, 534, 2183, 6284, 21360, 1398, 284, 428, 8265, 1...
2.934579
107
""" This lists a raw balances response from the API """ from kivy.uix.gridlayout import GridLayout from kivy.uix.label import Label from kivy.properties import NumericProperty from kivy.graphics import Color, Rectangle from ..buttons import SingleMarketButton, RemoveNotificationButton, ActionDoButton from ...notifi...
[ 37811, 198, 1212, 8341, 257, 8246, 25223, 2882, 422, 262, 7824, 198, 37811, 198, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 25928, 39786, 1330, 24846, 32517, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 18242, 1330, 36052, 198, 6738, 47...
2.153206
2,043
#!/usr/bin/env python #-*- coding: utf-8 -*- # # Modules to import # import csv, json # # Custom functions # def nbSyllables(word, sep): """ Counts the number of syllables in a word @param String word: the word @param String sep: the separator to use """ return len(word.split(s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 198, 2, 220, 220, 3401, 5028, 284, 1330, 198, 2, 198, 11748, 269, 21370, 11, 33918, 198, 198, 2, 198, 2, 2...
2.272727
726
# coding: UTF-8 import os import json import re in_path = "/disk/mysql/law_data/final_data/" out_path = "/disk/mysql/law_data/temp_data/" mid_text = u"\t" num_process = 4 num_file = 20 accusation_file = "/home/zhx/law_pre/data_processor/accusation_list2.txt" f = open(accusation_file, "r") accusation_list = json.loa...
[ 2, 19617, 25, 41002, 12, 23, 198, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 302, 628, 198, 259, 62, 6978, 796, 12813, 39531, 14, 28744, 13976, 14, 6270, 62, 7890, 14, 20311, 62, 7890, 30487, 198, 448, 62, 6978, 796, 12813, 3...
2.374302
358
#!/usr/bin/env python # -*- coding: utf-8 -*- """ IBM Containerized Forecasting Workflow DESCRIPTION This file contains the class representing the different sources of input data sets. AUTHOR Timothy Lynar <timlynar@au1.ibm.com>, IBM Research, Melbourne, Australia Frank Suits <frankst@au1.ibm.com>, IBM ...
[ 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, 9865, 44, 43101, 1143, 4558, 19913, 5521, 11125, 198, 198, 30910, 40165, 628, 220, 220, 220, 770, 2393, 490...
2.411765
3,400
from math import floor import cv2 as cv from conf import DATA_MODEL_DIR from readers.base import BaseReader GREEN = (0, 255, 0) BLACK = (0, 0, 0)
[ 6738, 10688, 1330, 4314, 198, 198, 11748, 269, 85, 17, 355, 269, 85, 198, 198, 6738, 1013, 1330, 42865, 62, 33365, 3698, 62, 34720, 198, 6738, 7183, 13, 8692, 1330, 7308, 33634, 628, 198, 43016, 796, 357, 15, 11, 14280, 11, 657, 8, ...
2.745455
55
#17 Heat Capacity #Asking for masss of water. m = float(input("Enter the mass of water in grams = ")) T = float(input("Enter the temperature change in degree celsius = ")) C = 4.186 * (2.7777e-7) q = m * T * C print("Total energy required to raise ",m," grams of a material by ",T," degrees Celsius is ",q," kilowa...
[ 2, 1558, 12308, 29765, 201, 198, 2, 1722, 3364, 329, 2347, 82, 286, 1660, 13, 201, 198, 76, 796, 12178, 7, 15414, 7203, 17469, 262, 2347, 286, 1660, 287, 16379, 796, 366, 4008, 201, 198, 51, 796, 12178, 7, 15414, 7203, 17469, 262, ...
2.979866
149
# -*- coding: utf-8 -*- # Copyright (C) 2018 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Tests for the MappingColumnHandler class""" import unittest from mock import MagicMock from mock import patch from ggrc.converters.handlers.handlers import MappingColumnHandler ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 34, 8, 2864, 3012, 3457, 13, 198, 2, 49962, 739, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 127...
2.78749
1,247
# Generated by Django 3.0.5 on 2020-06-07 11:05 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 20, 319, 12131, 12, 3312, 12, 2998, 1367, 25, 2713, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.019231
52
import os import sys import tempfile import unittest from io import StringIO import numpy as np import pytest from mdgo.forcefield import * test_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "test_files") if __name__ == "__main__": unittest.main()
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 20218, 7753, 198, 11748, 555, 715, 395, 198, 6738, 33245, 1330, 10903, 9399, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 6738, 45243, 2188, 13, 3174, 3245, 1330,...
2.732673
101
"""Provides support for django-tenat-schemas and django-tenants.""" try: from django_tenants.utils import schema_context # NOQA: F401 except ImportError: from tenant_schemas.utils import schema_context # NOQA: F401
[ 37811, 15946, 1460, 1104, 329, 42625, 14208, 12, 1452, 265, 12, 1416, 4411, 292, 290, 42625, 14208, 12, 1452, 1187, 526, 15931, 198, 28311, 25, 198, 220, 220, 220, 422, 42625, 14208, 62, 1452, 1187, 13, 26791, 1330, 32815, 62, 22866, ...
2.848101
79
''' isolve.py Single variable inequality solver ''' from sympy import Symbol, sympify, SympifyError from sympy import solve_poly_inequality, solve_rational_inequalities from sympy import solve_univariate_inequality, Poly from sympy.core.relational import Relational, Equality if __name__ == '__main__': ineq = inp...
[ 7061, 6, 198, 271, 6442, 13, 9078, 198, 198, 28008, 7885, 12791, 1540, 332, 198, 7061, 6, 198, 198, 6738, 10558, 88, 1330, 38357, 11, 10558, 1958, 11, 1632, 3149, 1958, 12331, 198, 6738, 10558, 88, 1330, 8494, 62, 35428, 62, 500, 13...
2.69962
263
from Compiler.types import sint, sfix from Compiler.rabbit_lib import rabbit_sint, Mode as rabbit_mode # in this case, for complex types, a register of type string would make sense. # returns RELUX(x) on sfix as in pytorch # X is a 3D matrix # returns RELU(X) as in pytorch # returns Matrices as it is the r...
[ 6738, 3082, 5329, 13, 19199, 1330, 264, 600, 11, 264, 13049, 198, 6738, 3082, 5329, 13, 81, 14229, 62, 8019, 1330, 22746, 62, 82, 600, 11, 10363, 355, 22746, 62, 14171, 628, 628, 198, 220, 220, 220, 1303, 287, 428, 1339, 11, 329, ...
3.014085
142
import contextlib import copy import functools import logging import threading import torch from torchdynamo.utils import checkpoint_params from torchdynamo.utils import clone_inputs from . import config from . import convert_frame from . import skipfiles from . import utils from .mutation_guard import install_gener...
[ 11748, 4732, 8019, 198, 11748, 4866, 198, 11748, 1257, 310, 10141, 198, 11748, 18931, 198, 11748, 4704, 278, 198, 198, 11748, 28034, 198, 198, 6738, 28034, 67, 4989, 78, 13, 26791, 1330, 26954, 62, 37266, 198, 6738, 28034, 67, 4989, 78,...
2.66968
1,217
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/grid/messages/dataset_messages.proto """Generated protocol buffer code.""" # third party from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import re...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 44876, 14, 25928, 14, 37348, 1095, 14, 19608, 292, 316, 62, 37348, 1095, ...
1.886207
26,021
# coding=utf-8 # Copyright 2019-present, the HuggingFace Inc. team, The Google AI Language Team and Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.or...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 13130, 12, 25579, 11, 262, 12905, 2667, 32388, 3457, 13, 1074, 11, 383, 3012, 9552, 15417, 4816, 290, 3203, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 1...
2.770107
2,984
""" JSON 2 HTML convertor ===================== (c) Varun Malhotra 2013 http://softvar.github.io Original Source Code: https://github.com/softvar/json2html-flask ------------ LICENSE: MIT -------- """ # -*- coding: utf-8 -*- import json import collections import html.parser from flask import json from flask import...
[ 37811, 198, 40386, 362, 11532, 10385, 273, 198, 4770, 1421, 28, 198, 198, 7, 66, 8, 12372, 403, 4434, 8940, 430, 2211, 198, 4023, 1378, 4215, 7785, 13, 12567, 13, 952, 198, 198, 20556, 8090, 6127, 25, 3740, 1378, 12567, 13, 785, 14,...
2.764211
475
from django.contrib.auth.models import User from django.db import models
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 220, 628, 628 ]
3.347826
23
ord_names = { 2:'SysAllocString', 3:'SysReAllocString', 4:'SysAllocStringLen', 5:'SysReAllocStringLen', 6:'SysFreeString', 7:'SysStringLen', 8:'VariantInit', 9:'VariantClear', 10:'VariantCopy', 11:'VariantCopyInd', 12:'VariantChangeType', 13:'VariantTimeToDosDateTime', ...
[ 585, 62, 14933, 796, 1391, 198, 220, 220, 220, 362, 32105, 44387, 3237, 420, 10100, 3256, 198, 220, 220, 220, 513, 32105, 44387, 3041, 3237, 420, 10100, 3256, 198, 220, 220, 220, 604, 32105, 44387, 3237, 420, 10100, 30659, 3256, 198, ...
2.085868
4,833
import os import music21 as m21 KERN_DATASET_PATH = "path/to/dataset" # durations are expressed in quarter length ACCEPTABLE_DURATIONS = [ 0.25, # 16th note 0.5, # 8th note 0.75, 1.0, # quarter note 1.5, 2, # half note 3, 4 # whole note ] def load_songs_in_kern(dataset_path): """...
[ 11748, 28686, 198, 11748, 2647, 2481, 355, 285, 2481, 198, 198, 42, 28778, 62, 35, 1404, 1921, 2767, 62, 34219, 796, 366, 6978, 14, 1462, 14, 19608, 292, 316, 1, 198, 198, 2, 288, 20074, 389, 6241, 287, 3860, 4129, 198, 2246, 5222, ...
2.526263
990
from adapters.bigdata.spark.spark_submit.cli_main import register_adapter_impl register_adapter_impl()
[ 6738, 46363, 13, 14261, 7890, 13, 2777, 668, 13, 2777, 668, 62, 46002, 13, 44506, 62, 12417, 1330, 7881, 62, 324, 3429, 62, 23928, 198, 198, 30238, 62, 324, 3429, 62, 23928, 3419 ]
3.121212
33
#!/usr/bin/env python from sys import argv result = 0 for c in argv[1]: result += ord(c) print(result)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 25064, 1330, 1822, 85, 198, 198, 20274, 796, 657, 198, 1640, 269, 287, 1822, 85, 58, 16, 5974, 198, 220, 220, 220, 1255, 15853, 2760, 7, 66, 8, 198, 198, 4798, 7, 20274, 8, ...
2.422222
45
from pydemic.testing import en
[ 6738, 279, 5173, 5314, 13, 33407, 1330, 551, 628 ]
3.555556
9
from unittest import mock import pytest from account import schema def test_log_in_invalid_credentials(db): """ If the provided credentials don't match a user, an exception should be raised. """ mutation = schema.LogIn() with pytest.raises(Exception): mutation.mutate(None, email="f...
[ 6738, 555, 715, 395, 1330, 15290, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 1848, 1330, 32815, 628, 198, 198, 4299, 1332, 62, 6404, 62, 259, 62, 259, 12102, 62, 66, 445, 14817, 7, 9945, 2599, 198, 220, 220, 220, 37227, 198, 220,...
2.868339
319
import sys from UnitTest import UnitTest, IN_BROWSER # syntax check # import a, b, c if True: import imports.circ1 from imports import exec_order, imports as IMPORTS from imports import exec_order as EXEC_ORDER import I18N from imports.classes import WithAttribute import imports.decors # must be in this form gl...
[ 11748, 25064, 198, 6738, 11801, 14402, 1330, 11801, 14402, 11, 3268, 62, 11473, 22845, 1137, 198, 198, 2, 15582, 2198, 198, 2, 1330, 257, 11, 275, 11, 269, 198, 361, 6407, 25, 198, 220, 220, 220, 1330, 17944, 13, 21170, 16, 198, 673...
3.708556
374
from .nms import boxes_nms
[ 6738, 764, 77, 907, 1330, 10559, 62, 77, 907 ]
2.888889
9
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Aug 5 21:46:50 2020 @author: pengning """ import numpy as np import scipy.special as sp import matplotlib.pyplot as plt from .shell_domain import shell_rho_M, shell_rho_N import mpmath from mpmath import mp from .dipole_field import mp_spherical_jn, m...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 2447, 220, 642, 2310, 25, 3510, 25, 1120, 12131, 198, 198, 31, 9800, 25, 279, 1516,...
2.270524
3,301
# Generated by Django 3.1.4 on 2021-03-06 12:10 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 19, 319, 33448, 12, 3070, 12, 3312, 1105, 25, 940, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from model import ModelStep, Group
[ 6738, 2746, 1330, 9104, 8600, 11, 4912, 628, 198 ]
4.111111
9
import warnings import torch warnings.filterwarnings('ignore') import os from fastNLP.core.dataset import DataSet from fastNLP.api.utils import load_url from fastNLP.api.processor import ModelProcessor from reproduction.chinese_word_segment.cws_io.cws_reader import ConllCWSReader from reproduction.pos_tag_model.pos...
[ 11748, 14601, 198, 198, 11748, 28034, 198, 198, 40539, 654, 13, 24455, 40539, 654, 10786, 46430, 11537, 198, 11748, 28686, 198, 198, 6738, 3049, 45, 19930, 13, 7295, 13, 19608, 292, 316, 1330, 6060, 7248, 198, 198, 6738, 3049, 45, 19930...
2.420991
848
import decimal import logging import os import smtplib import time import warnings from datetime import datetime import pandas as pd import zmq from binance.client import Client from coinmarketcap import Market from colorama import init, Fore, Back, Style # noinspection PyUnresolvedReferences from sentimentAnalyse impo...
[ 11748, 32465, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 895, 83, 489, 571, 198, 11748, 640, 198, 11748, 14601, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 1976, 76, 80, 198, 6738, ...
2.90411
292
from flask import Blueprint main = Blueprint('main', __name__) # try: from app.main import views # except: # print('*'*50,"Error","*"*50)
[ 6738, 42903, 1330, 39932, 198, 198, 12417, 796, 39932, 10786, 12417, 3256, 11593, 3672, 834, 8, 198, 2, 1949, 25, 198, 6738, 598, 13, 12417, 1330, 5009, 198, 2, 2845, 25, 198, 2, 220, 220, 220, 220, 3601, 10786, 9, 6, 9, 1120, 553...
2.769231
52
""" this module contains the neccesary datastructures that are used by the utility functions in the cruds module Contents -------- Expression This class is used to construct a function with the specified expression """ #types used to give type hintings wherever possible import typing #the sqlalchemy DeclarativeM...
[ 37811, 198, 5661, 8265, 4909, 262, 497, 535, 274, 560, 4818, 459, 1356, 942, 326, 389, 973, 416, 262, 10361, 5499, 287, 262, 1067, 24786, 8265, 198, 198, 15842, 198, 982, 198, 16870, 2234, 198, 220, 220, 220, 220, 770, 1398, 318, 97...
2.265572
6,149
# Copyright (c) 2021, NVIDIA CORPORATION. # # 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, 357, 66, 8, 33448, 11, 15127, 23929, 44680, 6234, 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...
3.18961
385
import copy import random # Consider using the modules imported above.
[ 11748, 4866, 198, 11748, 4738, 198, 2, 12642, 1262, 262, 13103, 17392, 2029, 13, 628, 628, 220, 220, 220, 220, 628 ]
3.809524
21
from __future__ import absolute_import from sentry.testutils import AcceptanceTestCase
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 1908, 563, 13, 9288, 26791, 1330, 21699, 590, 14402, 20448, 628 ]
4.045455
22
''' uix.stacklayout tests ===================== ''' import unittest from kivy.uix.stacklayout import StackLayout from kivy.uix.widget import Widget
[ 7061, 6, 198, 84, 844, 13, 25558, 39786, 5254, 198, 4770, 1421, 28, 198, 7061, 6, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 25558, 39786, 1330, 23881, 32517, 198, 6738, 479, 452, 88, 13, 84, ...
2.960784
51
import logging from django.contrib import auth from django.urls import reverse from django.utils.deprecation import MiddlewareMixin # https://stackoverflow.com/questions/42232606/django # -exception-middleware-typeerror-object-takes-no-parameters from django.conf ...
[ 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6284, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 26791, 13, 10378, 8344, 341, 1330, 6046, 1574, 35608, 259, 220, 1303, 3740, 1378, 255...
2.66035
686
''' Copyright (C) 2020 Link Shortener Authors (see AUTHORS in Documentation). Licensed under the MIT (Expat) License (see LICENSE in Documentation). ''' from decouple import config from unittest import TestCase from json import loads from link_shortener.server import create_app
[ 7061, 6, 198, 15269, 357, 34, 8, 12131, 7502, 10073, 877, 46665, 357, 3826, 37195, 20673, 287, 43925, 737, 198, 26656, 15385, 739, 262, 17168, 357, 3109, 8071, 8, 13789, 357, 3826, 38559, 24290, 287, 43925, 737, 198, 7061, 6, 198, 673...
3.773333
75