content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import re from django.core.exceptions import ValidationError
[ 11748, 302, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 628, 198 ]
3.705882
17
from apiclient.discovery import build from oauth2client.service_account import ServiceAccountCredentials SCOPES = ['https://www.googleapis.com/auth/analytics.readonly']
[ 6738, 2471, 291, 75, 1153, 13, 67, 40821, 1330, 1382, 198, 6738, 267, 18439, 17, 16366, 13, 15271, 62, 23317, 1330, 4809, 30116, 34, 445, 14817, 198, 198, 6173, 3185, 1546, 796, 37250, 5450, 1378, 2503, 13, 13297, 499, 271, 13, 785, ...
3.269231
52
import cv2 import os face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_default.xml') cam = cv2.VideoCapture(0) id = input('enter Name: ') createFolder('./'+str(id)+'/') FaceCount=1 while(True): ret,img = cam.read() gray=cv2.cvtColor(img,cv2.COLOR_B...
[ 11748, 269, 85, 17, 198, 11748, 28686, 198, 198, 2550, 62, 66, 28966, 796, 269, 85, 17, 13, 34, 28966, 9487, 7483, 7, 33967, 17, 13, 7890, 13, 3099, 5605, 3372, 2367, 1343, 705, 3099, 5605, 28966, 62, 8534, 1604, 558, 62, 12286, 1...
1.959641
446
"""Main entrypoint for DRS processing.""" import os import argparse from datetime import datetime from uuid import uuid4 import xarray as xr import axiom.utilities as au import axiom.drs.utilities as adu from axiom.drs.domain import Domain import axiom_schemas as axs import json import sys from distributed import Clien...
[ 37811, 13383, 5726, 4122, 329, 360, 6998, 7587, 526, 15931, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 334, 27112, 1330, 334, 27112, 19, 198, 11748, 2124, 18747, 355, 2124, 81, 198, 1...
2.571825
5,764
from argparse import ArgumentParser from typing import Any from django.core.management.base import CommandError from zerver.actions.users import do_delete_user from zerver.lib.management import ZulipBaseCommand from zerver.lib.users import get_active_bots_owned_by_user
[ 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 19720, 1330, 4377, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 9455, 12331, 198, 198, 6738, 1976, 18497, 13, 4658, 13, 18417, 1330, 466, 62, 33678, 62, 7220, 198, ...
3.64
75
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yandex/cloud/containerregistry/v1/repository_service.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import...
[ 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, 331, 392, 1069, 14, 17721, 14, 34924, 2301, 4592, 14, 85, 16, 14, 260, ...
2.456487
6,837
# coding: utf8 # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve. # # 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 requ...
[ 2, 19617, 25, 3384, 69, 23, 198, 2, 15069, 357, 66, 8, 13130, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 12224, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, ...
3.458955
268
import os from os.path import join from django import forms from django.conf import settings from farm_food_project.product.models import Product
[ 11748, 28686, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, 5318, 62, 19425, 62, 16302, 13, 11167, 13, 27530, 1330, 8721, 628 ]
3.820513
39
"""Module describing the planemo ``profile_create`` command.""" from __future__ import print_function import click from planemo import options from planemo.cli import command_function from planemo.galaxy import profiles @click.command('profile_create') @options.profile_name_argument() @options.profile_database_opti...
[ 37811, 26796, 12059, 262, 1410, 41903, 7559, 13317, 62, 17953, 15506, 3141, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 3904, 198, 198, 6738, 1410, 41903, 1330, 3689, 198, 6738, 1410, 41903, 13, 44506,...
3.199052
211
n=int(input());a=set(int(i) for i in input().split());x=int(input());b=[int(i) for i in input().split()];r="" for i in range(x): if b[i] in a: r+="1\n" else: r+="0\n" print(r,end="")
[ 77, 28, 600, 7, 15414, 35430, 64, 28, 2617, 7, 600, 7, 72, 8, 329, 1312, 287, 5128, 22446, 35312, 35430, 87, 28, 600, 7, 15414, 35430, 65, 41888, 600, 7, 72, 8, 329, 1312, 287, 5128, 22446, 35312, 3419, 11208, 81, 33151, 198, 16...
1.916667
108
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: name.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflecti...
[ 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 1438, 13, 1676, 1462, 198, 198, 11748, 25064, 198, 62, 65, 28, 17597, 13, 9641, 62, 10951, 58, 15, 60, 27, 18, 290, 357, 50033, 2124, 2...
2.445235
1,826
from __future__ import print_function import FWCore.ParameterSet.Config as cms import sys import os # arguments if (len(sys.argv)>1) : key=str(sys.argv[2]) else : key='Default' print("Generating LUT files for GCT key %s" % (key)) if (not ("TNS_ADMIN" in os.environ.keys())): print("Please set TNS_ADMIN u...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 2, 7159, 198, 361, 357, 11925, 7, 17597, 13, 853, 85, 8, 29, 16...
2.544
1,000
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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 from . import _utilities...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
2.764286
420
from ..storage import source_utils from ..storage.caching import cache from .. import config from .storage import FeatureConstructor from ..storage import dataframe from IPython.display import display from glob import glob import os def preview(df, sizes=(2, 4, 6)): """ Applies function to heads of particular...
[ 6738, 11485, 35350, 1330, 2723, 62, 26791, 198, 6738, 11485, 35350, 13, 66, 8103, 1330, 12940, 198, 6738, 11485, 1330, 4566, 198, 6738, 764, 35350, 1330, 27018, 42316, 273, 198, 6738, 11485, 35350, 1330, 1366, 14535, 198, 6738, 6101, 7535...
2.54437
1,341
import FWCore.ParameterSet.Config as cms process = cms.Process("Test") process.load("Configuration.StandardSequences.Services_cff") process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') process.source = cms.Source("EmptySource") process.maxEvents = cms.untracked.PSet( input = cms.untr...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 14681, 796, 269, 907, 13, 18709, 7203, 14402, 4943, 198, 198, 14681, 13, 2220, 7203, 38149, 13, 23615, 44015, 3007, 13, 31007, 62, 66, 487, 4943, 198, 14681, 13...
2.919753
162
import logging import random from common.timing_wrapper import TimingWrapper from locust import User, task, between from common.workload_config import workload_config """ A simple workload that selects single rows """
[ 11748, 18931, 198, 11748, 4738, 198, 6738, 2219, 13, 16514, 278, 62, 48553, 1330, 5045, 278, 36918, 2848, 198, 6738, 1179, 436, 1330, 11787, 11, 4876, 11, 1022, 198, 6738, 2219, 13, 1818, 2220, 62, 11250, 1330, 26211, 62, 11250, 198, ...
4.192308
52
#!/usr/bin/env python import math import numpy as np from xform import * if __name__ == '__main__': test_axis_angle_conversion() test_quat_conversion() test_euler_conversion() test_dcm_conversion() test_rot_shift_axis_angle() test_rot_shift_quat() test_rot_shift_euler() test...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2124, 687, 1330, 1635, 628, 628, 628, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 19...
2.342657
143
from rest_framework import serializers from .models import Photo
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 764, 27530, 1330, 5555, 628, 628, 628 ]
4.176471
17
import saopy.model from saopy.model import ssn___Accuracy as Accuracy from saopy.model import ssn___BatteryLifetime as BatteryLifetime from saopy.model import ssn___Condition as Condition from saopy.model import ssn___Deployment as Deployment from saopy.model import ssn___DeploymentRelatedProcess as DeploymentRelatedP...
[ 11748, 473, 11081, 13, 19849, 198, 198, 6738, 473, 11081, 13, 19849, 1330, 264, 16184, 17569, 17320, 23843, 355, 33222, 198, 6738, 473, 11081, 13, 19849, 1330, 264, 16184, 17569, 47006, 43, 361, 8079, 355, 23490, 43, 361, 8079, 198, 673...
3.780031
641
from datetime import timedelta from django.core.validators import MinValueValidator from django.db import models from django.contrib.auth.models import User
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 1855, 11395, 47139, 1352, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, ...
3.586957
46
from functools import reduce from typing import Callable, Dict, List, Tuple constraints, my_ticket, nearby_tickets = parse('16.in') valid_nearby_tickets = [] invalid_number_per_ticket = [] for nearby_ticket in nearby_tickets: invalid_ticket = False for number in nearby_ticket: at_least_one...
[ 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 19720, 1330, 4889, 540, 11, 360, 713, 11, 7343, 11, 309, 29291, 628, 628, 628, 628, 628, 628, 198, 198, 1102, 2536, 6003, 11, 616, 62, 43350, 11, 6716, 62, 83, 15970, 796, 21136, 10786,...
2.458333
408
import warnings from typing import Iterable, Optional, Union, Tuple, List ArraysetsRef = Union['ArraysetDataReader', Iterable['ArraysetDataReader']] class GroupedAsets(object): """Groups hangar arraysets and validate suitability for usage in dataloaders. It can choose a subset of samples in the hangar arra...
[ 11748, 14601, 198, 6738, 19720, 1330, 40806, 540, 11, 32233, 11, 4479, 11, 309, 29291, 11, 7343, 628, 198, 3163, 20477, 1039, 8134, 796, 4479, 17816, 3163, 20477, 316, 6601, 33634, 3256, 40806, 540, 17816, 3163, 20477, 316, 6601, 33634, ...
2.420273
878
import matplotlib.pyplot as plt import torch import torchvision import numpy as np from torch import nn from torch import optim import torch.nn.functional as F from torchvision import datasets, transforms, models from torch.utils.data.sampler import SubsetRandomSampler import warnings warnings.filterwarnings('ignore')...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 28034, 198, 11748, 28034, 10178, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 1330, 6436, 198, 11748, 28034, 13, 20471, 13, 4...
2.546914
810
from typing import List
[ 6738, 19720, 1330, 7343 ]
5.75
4
from pathlib import Path import os from PIL import Image, ImageFont import numpy as np
[ 6738, 3108, 8019, 1330, 10644, 198, 11748, 28686, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 23252, 198, 11748, 299, 32152, 355, 45941, 628, 198 ]
3.56
25
from SortBase import SortBase
[ 6738, 33947, 14881, 1330, 33947, 14881, 628 ]
4.428571
7
from pytest_check import check import numpy as np import firedrake import firedrake_adjoint import ufl import fdm from fecr import evaluate_primal, evaluate_pullback, evaluate_pushforward mesh = firedrake.UnitSquareMesh(3, 2) V = firedrake.FunctionSpace(mesh, "P", 1) templates = (firedrake.Function(V), firedrak...
[ 6738, 12972, 9288, 62, 9122, 1330, 2198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 6294, 33788, 198, 11748, 6294, 33788, 62, 41255, 1563, 198, 11748, 334, 2704, 198, 198, 11748, 277, 36020, 198, 198, 6738, 27685, 81, 1330, 13...
2.496429
280
# coding: utf-8 from PIL import Image import sys import pyocr import pyocr.builders import os from tqdm import trange # Set Netflix subtitle image directory. img_dir = '../data/planetes/PLANETES.S01E02.WEBRip.Netflix/' #img_dir = '../data/' # Get a tool. tools = pyocr.get_available_tools() if len(tools) == 0: print(...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 25064, 198, 11748, 12972, 1696, 198, 11748, 12972, 1696, 13, 50034, 198, 11748, 28686, 198, 6738, 256, 80, 36020, 1330, 491, 858, 198, 198, 2, 5345, 12074, ...
2.494872
390
from unittest import TestCase import numpy as np from pandas_ml_utils.utils.functions import unfold_parameter_space from pandas_ml_utils.utils.classes import ReScaler
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 19798, 292, 62, 4029, 62, 26791, 13, 26791, 13, 12543, 2733, 1330, 16631, 62, 17143, 2357, 62, 13200, 198, 6738, 19798, 292, 62, 4029, 62...
3.269231
52
from invenio_db import db from scoap3.utils.nations import find_country from scoap3.modules.analysis.models import CountryCache
[ 6738, 287, 574, 952, 62, 9945, 1330, 20613, 198, 198, 6738, 629, 78, 499, 18, 13, 26791, 13, 77, 602, 1330, 1064, 62, 19315, 198, 6738, 629, 78, 499, 18, 13, 18170, 13, 20930, 13, 27530, 1330, 12946, 30562, 628, 198 ]
3.195122
41
""" Created on 22.09.2009 @author: alen """ import uuid # from oauth import oauth # not used from django.conf import settings from django.template import RequestContext from django.core.urlresolvers import reverse from django.shortcuts import render_to_response from django.utils.translation import gettext as _ # from...
[ 37811, 198, 41972, 319, 2534, 13, 2931, 13, 10531, 198, 198, 31, 9800, 25, 435, 268, 198, 37811, 198, 11748, 334, 27112, 198, 2, 422, 267, 18439, 1330, 267, 18439, 1303, 407, 973, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, ...
2.571429
3,612
import numpy as np import pandas as pd import matplotlib matplotlib.use("TkAgg") from matplotlib import pyplot as plt import glob, os LOAD_MOTION_DIR = './data/preprocessed/motion/' LOAD_PROB_DIST = 'prob_dist/' LOAD_CUMUL_DIST = 'cumul_dist/' LOAD_COMPACT = 'compact/' LOAD_VIDEO_DIR = './data/preprocessed/video/' SA...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 7203, 51, 74, 46384, 4943, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 11748,...
1.927606
1,036
#!/usr/bin/env python # -*- coding: utf-8 -*- #__author__ = 'Medici.Yan' #Rsync弱口令检测 import socket,struct,hashlib,base64,time def initialisation(host,port): ''' 初始化并获得版本信息,每次会话前都要发送版本信息 ''' flag=False s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) rsync={"MagicHeader":"@RSYNCD:","HeaderVersion...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 834, 9800, 834, 796, 705, 39112, 72, 13, 49664, 6, 201, 198, 2, 49, 27261, 28156, 109, 20998, 96, 2001...
1.862374
792
#!/usr/bin/python # -*- coding: utf-8 -*- #- Author : (DEK) Devendra Kavthekar # program065: # Write a program to compute: # f(n)=f(n-1)+100 when n>0 # and f(0)=0 # with a given n input by console (n>0). # Example: # If the following n is given as input to the program: # 5 # Then, the output of the p...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 12, 6434, 1058, 357, 7206, 42, 8, 6245, 48286, 509, 615, 1169, 21070, 201, 198, 201, 198, 2, 1430, 15, 2996, ...
2.519651
229
# coding=utf-8 # -------------------------------------------------------------------------- # -------------------------------------------------------------------------- from msrest.serialization import Model class StorageAccountProperties(Model): """StorageAccountProperties. :param provisioning_state: Gets ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 16529, 35937, 198, 198, 6738, 13845, 2118, 13, 46911, 1634, 1330, 9104, 628, 198, 4871, 20514, 30116, 2964, 18200, 7, 17633, 2599, 198, 220, 220, 220, 37227, 31425, 30116, 296...
3.187994
1,266
from quicksort_first_pivot import read_input if __name__ == "__main__": input_arr = read_input('quicksort.txt') cmp_cnt = quicksort_last_pivot(input_arr, 0, len(input_arr)) # print(input_arr) print(cmp_cnt)
[ 6738, 627, 3378, 419, 62, 11085, 62, 79, 45785, 1330, 1100, 62, 15414, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 5128, 62, 3258, 796, 1100, 62, 15414, 10786, 421, 3378, 419, 13, 1411...
2.306122
98
# from copy import deepcopy # from inicheck.tools import get_user_config, check_config, cast_all_variables # # from smrf.framework.model_framework import can_i_run_smrf # from tests.test_configurations import SMRFTestCase # class TestSpatialMethods(SMRFTestCase): # # def test_station_spatial_config(self): # ...
[ 2, 422, 4866, 1330, 2769, 30073, 198, 2, 422, 287, 14234, 694, 13, 31391, 1330, 651, 62, 7220, 62, 11250, 11, 2198, 62, 11250, 11, 3350, 62, 439, 62, 25641, 2977, 198, 2, 198, 2, 422, 895, 41871, 13, 30604, 13, 19849, 62, 30604, ...
2.226207
725
""" Django accounts management made easy. """ VERSION = (1, 0, 2) __version__ = '.'.join((str(each) for each in VERSION[:4])) def get_version(): """ Returns string with digit parts only as version. """ return '.'.join((str(each) for each in VERSION[:3]))
[ 37811, 198, 35, 73, 14208, 5504, 4542, 925, 2562, 13, 198, 198, 37811, 198, 43717, 796, 357, 16, 11, 657, 11, 362, 8, 198, 198, 834, 9641, 834, 796, 705, 2637, 13, 22179, 19510, 2536, 7, 27379, 8, 329, 1123, 287, 44156, 2849, 58, ...
2.669903
103
#!/usr/bin/env python # -*- coding: utf-8 -*- import mysql.connector import config dbconfig = { 'host': '127.0.0.1', 'port': 3306, 'database': 'invoicerepo2', 'user': 'invoicerepo', 'password': 'invoicerepo', 'charset': 'utf8', 'use_unicode': True, 'get_warnings': True } cnx = mysql....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 48761, 13, 8443, 273, 198, 198, 11748, 4566, 198, 198, 9945, 11250, 796, 1391, 198, 220, 220, 220, 705, 4...
1.636364
341
from __future__ import absolute_import from __future__ import unicode_literals __author__ = """Ayush Pallav""" __email__ = 'ayushpallav@gmail.com' __version__ = '1.0.3'
[ 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 834, 9800, 834, 796, 37227, 42012, 1530, 39651, 615, 37811, 198, 834, 12888, 834, 796, 705, 323, 1530, 79, ...
2.803279
61
# https://www.hackerrank.com/challenges/non-divisible-subset/problem #!/bin/python3 import math import os import random import re import sys # # Complete the 'nonDivisibleSubset' function below. # # The function is expected to return an INTEGER. # The function accepts following parameters: # 1. INTEGER k # 2. INTE...
[ 2, 3740, 1378, 2503, 13, 31153, 8056, 962, 13, 785, 14, 36747, 34120, 14, 13159, 12, 7146, 12843, 12, 7266, 2617, 14, 45573, 198, 198, 2, 48443, 8800, 14, 29412, 18, 198, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 4738, 198, ...
2.639535
258
from operator import itemgetter original = {1: 2, 2: 3, 3: 1} ordered = dict(sorted(original.items(), key=itemgetter(1))) print(ordered)
[ 6738, 10088, 1330, 2378, 1136, 353, 198, 14986, 796, 1391, 16, 25, 362, 11, 362, 25, 513, 11, 513, 25, 352, 92, 198, 24071, 796, 8633, 7, 82, 9741, 7, 14986, 13, 23814, 22784, 1994, 28, 9186, 1136, 353, 7, 16, 22305, 198, 4798, ...
2.854167
48
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 628, 628, 628, 198 ]
3.111111
9
# -*- coding: utf-8 -*- """ Create Time: 6/14/2021 4:16 PM Author: Zhou Generate the officials_list from officials.txt """ with open("officials.txt", encoding="utf-8") as file: officials_raw = file.readlines() officials_renew1 = [] print(officials_raw) for item in officials_raw: if "#" in ite...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 16447, 3862, 25, 718, 14, 1415, 14, 1238, 2481, 604, 25, 1433, 3122, 201, 198, 13838, 25, 32222, 201, 198, 201, 198, 8645, 378, 262, 2828, 62, ...
2.373665
281
class Observer(object): """docstring for Observer"""
[ 4871, 27058, 7, 15252, 2599, 198, 220, 220, 220, 37227, 15390, 8841, 329, 27058, 37811, 198 ]
3.5625
16
"""Boxes with integer size.""" # Copyright 2016-2018 by California Institute of Technology # All rights reserved. Licensed under 3-clause BSD. # import logging import natsort from omega.logic import syntax as stx from omega.symbolic.prime import support_issubset from omega.symbolic.prime import joint_support from ome...
[ 37811, 14253, 274, 351, 18253, 2546, 526, 15931, 198, 2, 15069, 1584, 12, 7908, 416, 3442, 5136, 286, 8987, 198, 2, 1439, 2489, 10395, 13, 49962, 739, 513, 12, 565, 682, 347, 10305, 13, 198, 2, 198, 11748, 18931, 198, 198, 11748, 29...
1.895293
7,564
# Prints which 3rd party libraries are desired for the given configuration. from components import requiredLibrariesFor from configurations import getConfiguration from libraries import allDependencies, librariesByName from packages import iterDownloadablePackages if __name__ == '__main__': import sys if len(sys.ar...
[ 2, 12578, 82, 543, 513, 4372, 2151, 12782, 389, 10348, 329, 262, 1813, 8398, 13, 198, 198, 6738, 6805, 1330, 2672, 43, 11127, 1890, 198, 6738, 25412, 1330, 651, 38149, 198, 6738, 12782, 1330, 477, 35, 2690, 3976, 11, 12782, 3886, 5376...
2.840206
194
import typing from abc import abstractmethod from typing import TYPE_CHECKING from bxcommon.connections.connection_type import ConnectionType from bxcommon.services.transaction_service import TransactionService from bxcommon.utils.object_hash import Sha256Hash from bxgateway.messages.ont.block_ont_message import Bloc...
[ 11748, 19720, 198, 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 198, 6738, 275, 87, 11321, 13, 8443, 507, 13, 38659, 62, 4906, 1330, 26923, 6030, 198, 6738, 275, 87, 11321, 13, 30416, 13, 764...
3.128395
405
#---------------------------------------------------------------------------- # Created By : Leonardo Citraro leonardo.citraro@epfl.ch # Date: 2021 # --------------------------------------------------------------------------- import os import sys import json import yaml import re import os import ast import glob impor...
[ 2, 10097, 10541, 198, 2, 15622, 2750, 220, 1058, 38083, 15792, 81, 12022, 443, 261, 13109, 13, 47992, 81, 12022, 31, 538, 2704, 13, 354, 198, 2, 7536, 25, 33448, 198, 2, 16529, 32284, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, ...
2.968421
285
from flask import render_template, request from . import main @main.errorhandler(404)
[ 6738, 42903, 1330, 8543, 62, 28243, 11, 2581, 198, 6738, 764, 1330, 1388, 198, 198, 31, 12417, 13, 18224, 30281, 7, 26429, 8 ]
3.73913
23
''' In this module, we determine if two given strings are anagrams ''' def is_anagram_sort(string_1, string_2): ''' Return True if the two given strings are anagrams using sorting ''' return sorted(string_1) == sorted(string_2) def is_anagram_counter(string_1, string_2): ''' Return True if the two given strin...
[ 7061, 6, 198, 818, 428, 8265, 11, 356, 5004, 611, 734, 1813, 13042, 389, 281, 6713, 82, 198, 198, 7061, 6, 198, 198, 4299, 318, 62, 272, 6713, 62, 30619, 7, 8841, 62, 16, 11, 4731, 62, 17, 2599, 198, 197, 7061, 6, 198, 197, 13...
2.735669
314
# # wayne_django_rest copyright © 2020 - all rights reserved # Created at: 28/10/2020 # By: mauromarini # License: MIT # Repository: https://github.com/marinimau/wayne_django_rest # Credits: @marinimau (https://github.com/marinimau) # from rest_framework import serializers from contents.messages.get_messag...
[ 2, 198, 2, 220, 220, 835, 710, 62, 28241, 14208, 62, 2118, 6634, 10673, 12131, 532, 477, 2489, 10395, 198, 2, 220, 220, 15622, 379, 25, 2579, 14, 940, 14, 42334, 198, 2, 220, 220, 2750, 25, 285, 2899, 296, 283, 5362, 198, 2, 220...
4.011429
175
import cv2 import numpy as np import matplotlib.pyplot as plt img = cv2.imread("imori.jpg").astype(np.float) H,W,C=img.shape # Nearest Neighbor a = 1.5 aH = int(a * H) aW = int(a * W) y = np.arange(aH).repeat(aW).reshape(aW,aH) y = (y / a) x = np.tile(np.arange(aW),(aH,1)) x = (x / a) fy = np.floor(y).astype(np.int)...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 9600, 796, 269, 85, 17, 13, 320, 961, 7203, 320, 10145, 13, 9479, 11074, 459, 2981, 7, 37659, 13, 22468, 8, ...
1.745333
750
from django.conf import settings from afriproperty.property.models import City, Property, PropertyCompare from afriproperty.tips.models import Tip def settings_context(_request): """Settings available by default to the templates context.""" # Note: we intentionally do NOT expose the entire settings # to ...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, 6580, 380, 26745, 13, 26745, 13, 27530, 1330, 2254, 11, 14161, 11, 14161, 41488, 198, 6738, 6580, 380, 26745, 13, 41315, 13, 27530, 1330, 23095, 628, 198, 4299, 6460, 62, 22866,...
2.866822
428
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
[ 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 12131, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 13, 921, 743, 198, 2, 7330, 257, 486...
3.005384
743
import os from pathlib import Path scripts_dir = Path(__file__).parent.absolute() repo_dir = scripts_dir.parent.absolute() python_exe = os.path.join(repo_dir, "msanalyzer_venv", "Scripts", "python.exe") dist_folder = scripts_dir / "dist" main_py = os.path.join(repo_dir, "local_api.py") # mpl data matplotlibrc = script...
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 46521, 62, 15908, 796, 10644, 7, 834, 7753, 834, 737, 8000, 13, 48546, 3419, 198, 260, 7501, 62, 15908, 796, 14750, 62, 15908, 13, 8000, 13, 48546, 3419, 198, 29412, 62, 1349...
2.477816
293
"""Training wrapper: script to be executed when running Training Step.""" import json from logging import INFO, Formatter, StreamHandler, getLogger from pathlib import Path, PurePath import click import joblib import pandas as pd from azureml.core import Run from sklearn.linear_model import LinearRegression from skle...
[ 37811, 44357, 29908, 25, 4226, 284, 307, 10945, 618, 2491, 13614, 5012, 526, 15931, 198, 198, 11748, 33918, 198, 6738, 18931, 1330, 24890, 11, 5178, 1436, 11, 13860, 25060, 11, 651, 11187, 1362, 198, 6738, 3108, 8019, 1330, 10644, 11, 1...
2.625137
915
""" sockets server """ import socket with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as socket_server: socket_server.bind( ('127.0.0.1', 5025) ) socket_server.listen() print("server is listening on 127.0.0.1:5025") conn, addr = socket_server.accept() # accept is the blocking call pr...
[ 37811, 37037, 4382, 37227, 198, 198, 11748, 17802, 198, 198, 4480, 17802, 13, 44971, 7, 44971, 13, 8579, 62, 1268, 2767, 11, 17802, 13, 50, 11290, 62, 2257, 32235, 8, 355, 17802, 62, 15388, 25, 198, 220, 220, 220, 220, 198, 220, 220...
2.358209
268
# -*- coding: utf-8 -*- ################################################################################ # # # Copyright 1997 - 2019 by IXIA Keysight # # All Rights Reserved. ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 29113, 29113, 14468, 201, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.595089
35,025
from .models import ReviewRating, Brand
[ 6738, 764, 27530, 1330, 6602, 29321, 11, 13512, 628, 198 ]
4.2
10
from datetime import datetime, timedelta from typing import Callable from aiohttp import web from neuro_sdk import Bucket, Client, Cluster from tests import _TestServerFactory _MakeClient = Callable[..., Client]
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 19720, 1330, 4889, 540, 198, 198, 6738, 257, 952, 4023, 1330, 3992, 198, 198, 6738, 7669, 62, 21282, 74, 1330, 48353, 11, 20985, 11, 38279, 198, 198, 6738, 5254, 1330, 4...
3.580645
62
import sys backoff_models = { "UD_Breton-KEB": "ga_idt", "UD_Czech-PUD": "cs_pdt", "UD_English-PUD": "en_ewt", "UD_Faroese-OFT": "nn_nynorsk", "UD_Finnish-PUD": "fi_tdt", "UD_Japanese-Modern": "ja_gsd", "U...
[ 11748, 25064, 198, 198, 1891, 2364, 62, 27530, 796, 1391, 366, 8322, 62, 12679, 1122, 12, 7336, 33, 1298, 366, 4908, 62, 312, 83, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
1.488449
303
from os import getenv, environ from os.path import exists, join, expanduser from random import seed, sample, randint, uniform from subprocess import run from tqdm.notebook import tqdm as log_progress import torch from torch import optim from naeval.ner.datasets import ( load_factru, load_ne5, ) from slovne...
[ 198, 6738, 28686, 1330, 651, 24330, 11, 551, 2268, 198, 6738, 28686, 13, 6978, 1330, 7160, 11, 4654, 11, 4292, 7220, 198, 6738, 4738, 1330, 9403, 11, 6291, 11, 43720, 600, 11, 8187, 198, 6738, 850, 14681, 1330, 1057, 198, 198, 6738, ...
2.148079
1,067
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import networkx as nx from .exceptions import UnweightedGraphError, InvalidGraphError def assert_is_graph(graph: nx.Graph): """ Asserts that an object is a networkx graph :param graph: Graph to check :raises TypeError: If graph...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 198, 2, 49962, 739, 262, 17168, 5964, 13, 198, 198, 11748, 3127, 87, 355, 299, 87, 198, 6738, 764, 1069, 11755, 1330, 791, 6551, 276, 37065, 12331, 11, 17665, 37065, 12331, 628, 198, 4299, 6818...
2.832765
1,172
from typing import List
[ 6738, 19720, 1330, 7343, 198 ]
4.8
5
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import os from ooi_data_explorations.common import inputs, m2m_collect, m2m_request, get_deployment_dates, \ get_vocabulary, dt64_epoch, update_dataset, ENCODINGS from gsw.conversions import SP_from_C def metbk_hourly(ds): """ Takes METBK h...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 198, 6738, 267, 23013, 62, 7890, 62, 20676, 273, 602, 13, 11321,...
2.478363
2,542
# Ingresa el texto a encriptar texto= input("Ingresa un mensaje: ") # Ingresa un valor de cambio válido (repitelo hasta que tengas éxito) shift = 0 while shift == 0: try: shift = int(input("Ingresa el valor de cambio del cifrado (1..25): ")) if shift not in range(1,26): raise ValueEr...
[ 171, 119, 123, 2, 17589, 14625, 1288, 2420, 78, 257, 2207, 1968, 283, 198, 5239, 78, 28, 5128, 7203, 27682, 14625, 555, 285, 641, 1228, 68, 25, 366, 8, 198, 198, 2, 17589, 14625, 555, 1188, 273, 390, 269, 4131, 952, 410, 6557, 75,...
2.008147
491
from slugify import slugify from .schedules import * # noqa from .generator_base import GeneratorBase from .utilities import steps
[ 6738, 31065, 1958, 1330, 31065, 1958, 198, 198, 6738, 764, 1416, 704, 5028, 1330, 1635, 1303, 645, 20402, 198, 6738, 764, 8612, 1352, 62, 8692, 1330, 35986, 14881, 198, 6738, 764, 315, 2410, 1330, 4831, 198 ]
3.666667
36
''' >>> from exception_translator_ext import * >>> try: ... throw_error(); ... except RuntimeError, x: ... print x ... else: ... print 'Expected a RuntimeError!' !!!error!!! ''' if __name__ == '__main__': print "running..." import sys sys.exit(run()[0])
[ 7061, 6, 201, 198, 33409, 422, 6631, 62, 7645, 41880, 62, 2302, 1330, 1635, 201, 198, 33409, 1949, 25, 201, 198, 986, 220, 220, 220, 220, 3714, 62, 18224, 9783, 201, 198, 986, 2845, 43160, 12331, 11, 2124, 25, 201, 198, 986, 220, ...
2.346457
127
#!/usr/bin/env python """ api/rest_organization.py Copyright 2021 Triple Dot Engineering LLC Defines the RestOrg class used to interact with organizations via the API. """ import json from .. import util from ._abc_rest_obj import RestObject from .api import TriviumApi class RestOrg(RestObject): """Class for in...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 15042, 14, 2118, 62, 9971, 1634, 13, 9078, 198, 198, 15269, 33448, 19817, 22875, 14044, 11419, 198, 198, 7469, 1127, 262, 8324, 46808, 1398, 973, 284, 9427, 351, 5745, 2884, ...
2.183969
1,310
from pytest_mock import MockerFixture from gopredict.__main__ import main_loop
[ 6738, 12972, 9288, 62, 76, 735, 1330, 337, 12721, 37, 9602, 198, 6738, 308, 404, 17407, 13, 834, 12417, 834, 1330, 1388, 62, 26268, 628, 220, 220, 220, 220, 628, 628, 220, 220, 220, 220, 198, 220, 220, 220 ]
2.461538
39
# coding=utf-8 from everglade.tokens import TokenType, Token ALLOWED_CHARS = "abcdefghijklmnopqrstuvwxyz_"
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 1683, 4743, 671, 13, 83, 482, 641, 1330, 29130, 6030, 11, 29130, 198, 198, 7036, 3913, 1961, 62, 3398, 27415, 796, 366, 39305, 4299, 456, 2926, 41582, 10295, 404, 80, 81, 301, 14795, 86, 5431,...
2.291667
48
import collections import csv import dataclasses import datetime import io import itertools import json import logging import os import random import typing import uuid import faker import numpy as np from google.cloud import storage fake = faker.Faker() # final datasets orders = list() users = list() order_items = l...
[ 11748, 17268, 198, 11748, 269, 21370, 198, 11748, 4818, 330, 28958, 198, 11748, 4818, 8079, 198, 11748, 33245, 198, 11748, 340, 861, 10141, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 19720, 198, ...
2.835088
570
# coding: utf-8 import io from . import bl from . import exporter from pymeshio import pmx from pymeshio import common from pymeshio.pmx import writer import bpy import bpy_extras.io_utils # pylint: disable=E0401 def create_pmx(ex, enable_bdef4=True): """ PMX 出力 """ model=pmx.Model() o=ex.root....
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 33245, 198, 6738, 764, 1330, 698, 198, 6738, 764, 1330, 1033, 4337, 198, 6738, 279, 4948, 5069, 952, 1330, 9114, 87, 198, 6738, 279, 4948, 5069, 952, 1330, 2219, 198, 6738, 279, 4948,...
1.810502
5,694
# MIT License # # Copyright (c) 2020-2021 Parakoopa and the SkyTemple Contributors # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the...
[ 2, 220, 17168, 13789, 198, 2, 198, 2, 220, 15069, 357, 66, 8, 12131, 12, 1238, 2481, 2547, 461, 11224, 64, 290, 262, 5274, 12966, 1154, 25767, 669, 198, 2, 198, 2, 220, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, ...
3.542587
634
#!/usr/bin/python import socket import time import sys import urllib2 import os import base64 auth = "jude:sniff" hostname = sys.argv[1] port = int(sys.argv[2] ) filename = sys.argv[3] data_fd = None data_path = None if len(sys.argv) > 4: data_path = sys.argv[4] data_fd = open( data_path, "r" ) mode = '0644' ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 17802, 198, 11748, 640, 198, 11748, 25064, 198, 11748, 2956, 297, 571, 17, 198, 11748, 28686, 198, 11748, 2779, 2414, 198, 198, 18439, 796, 366, 73, 2507, 25, 16184, 733, 1, 198, ...
2.29434
530
#!/usr/bin/python import sys import argparse from pathlib import Path import urllib.request import git if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 17606, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417,...
2.88
50
import numpy as np import predict import os import pandas as pd directory = os.path.join(os.path.dirname(__file__), '..', 'chainsaw') predictions = [] for file_name in os.listdir(directory): (predicted_class, predicted_proba, le) = predict.predict(os.path.join(directory, file_name)) predictions.append(predicted_...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4331, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 34945, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 705, 492, 3256, 7...
2.86755
151
import json, datetime from confluent_kafka import Consumer, TopicPartition from confluent_kafka.cimpl import KafkaError, KafkaException import frappe from frappe.utils.logger import get_logger from spine.spine_adapter.scheduler.message_processor import process_message, skip_message logger = None
[ 11748, 33918, 11, 4818, 8079, 198, 198, 6738, 1013, 28216, 62, 74, 1878, 4914, 1330, 18110, 11, 47373, 7841, 653, 198, 6738, 1013, 28216, 62, 74, 1878, 4914, 13, 66, 23928, 1330, 46906, 12331, 11, 46906, 16922, 198, 198, 11748, 5306, ...
3.420455
88
from __future__ import print_function from unittest import TestCase from indexdigest.linters.linter_0094_generic_primary_key import check_generic_primary_key from indexdigest.test import DatabaseTestMixin
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 6376, 12894, 395, 13, 2815, 1010, 13, 2815, 353, 62, 405, 5824, 62, 41357, 62, 39754, 62, 2539, 1330, 2198, 62, 41357, ...
3.525424
59
import logging from typing import Union from xml.dom.minidom import Element import requests from huaweisms.api.config import MODEM_HOST from huaweisms.xml.util import get_child_text, parse_xml_string, get_dictionary_from_children logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 6738, 19720, 1330, 4479, 198, 6738, 35555, 13, 3438, 13, 1084, 312, 296, 1330, 11703, 198, 198, 11748, 7007, 198, 6738, 289, 84, 707, 68, 6583, 13, 15042, 13, 11250, 1330, 19164, 3620, 62, 39, 10892, 198, 198, 6738,...
3.032609
92
# 대신증권 API # 종목정보 구하는 예제 import win32com.client # 연결 여부 체크 objCpCybos = win32com.client.Dispatch("CpUtil.CpCybos") bConnect = objCpCybos.IsConnect if (bConnect == 0): print("PLUS가 정상적으로 연결되지 않음. ") exit() # 종목코드 리스트 구하기 objCpCodeMgr = win32com.client.Dispatch("CpUtil.CpCodeMgr") codeList = objC...
[ 2, 31619, 234, 222, 168, 233, 254, 168, 99, 251, 166, 114, 234, 7824, 201, 198, 2, 23821, 95, 227, 167, 103, 102, 168, 254, 243, 167, 111, 112, 220, 166, 113, 105, 47991, 246, 167, 232, 242, 23821, 246, 230, 168, 254, 250, 201, ...
1.661789
615
from django.contrib import admin from .models import Announcement admin.site.register(Announcement, AnnouncementAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 43470, 434, 628, 198, 198, 28482, 13, 15654, 13, 30238, 7, 18858, 8652, 434, 11, 43470, 434, 46787, 8, 198 ]
3.617647
34
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------------------- @ Author : pengj @ date : 2019/12/8 16:30 @ IDE : PyCharm @ GitHub : https://github.com/JackyPJB @ Contact : pengjianbiao@hotmail.com ----------------...
[ 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, 47232, 12, 628, 220, 220, 220, 2488, 220, 220, 6434, 220, 1058, 220, 220, 220, 220, 220, 220, 279, 1516, ...
2.283784
296
from ._hsvideo import *
[ 6738, 47540, 11994, 15588, 1330, 1635 ]
3.833333
6
# Copyright (c) 2016-2018 Koninklijke Philips N.V. All rights reserved. A # copyright license for redistribution and use in source and binary forms, # with or without modification, is hereby granted for non-commercial, # experimental and research purposes, provided that the following conditions # are met: # - Redistrib...
[ 2, 15069, 357, 66, 8, 1584, 12, 7908, 17431, 676, 75, 2926, 365, 46905, 399, 13, 53, 13, 1439, 2489, 10395, 13, 317, 198, 2, 6634, 5964, 329, 41425, 290, 779, 287, 2723, 290, 13934, 5107, 11, 198, 2, 351, 393, 1231, 17613, 11, 3...
2.361282
2,278
#!/usr/bin/env python #-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- import errno from .criteria import criteria from bes.fs import file_type class file_type_criteria(criteria): 'match the file type.'
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 26, 4235, 25, 29412, 26, 33793, 12, 8658, 82, 12, 14171, 25, 18038, 26, 269, 12, 35487, 12, 28968, 25, 362, 26, 7400, 12, 10394, 25, 362, ...
2.736264
91
import pytest import random from asyncio_queue_rotation import RotationQueue @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio
[ 11748, 12972, 9288, 198, 11748, 4738, 198, 6738, 30351, 952, 62, 36560, 62, 10599, 341, 1330, 371, 14221, 34991, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, ...
2.754717
53
# -*- coding: utf-8 -*- """Helper functions and classes for the LTA CLI and parser."""
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 47429, 5499, 290, 6097, 329, 262, 406, 5603, 43749, 290, 30751, 526, 15931, 198 ]
3
29
from django import forms from cal.models import CFPBCalendar from sheerlike.templates import get_date_string from v1.util.util import ERROR_MESSAGES
[ 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 2386, 13, 27530, 1330, 327, 5837, 2749, 282, 9239, 198, 6738, 15163, 2339, 13, 11498, 17041, 1330, 651, 62, 4475, 62, 8841, 198, 6738, 410, 16, 13, 22602, 13, 22602, 1330, 33854, 62, 44,...
3.229167
48
# coding: utf-8 # # Filter By Sequence Regex Demo # # This example shows how to filter poteins by their sequence regualar expression. # # [More about regular expression](https://www.regular-expressions.info) # # ## Imports # In[1]: from pyspark import SparkConf, SparkContext from mmtfPyspark.io import mmtfRead...
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1303, 25853, 2750, 45835, 797, 25636, 34588, 198, 2, 220, 198, 2, 770, 1672, 2523, 703, 284, 8106, 279, 1258, 1040, 416, 511, 8379, 842, 723, 283, 5408, 13, 220, 198, 2, 220, 198...
2.704365
504
# Leetcode 57. Insert Interval # # Link: https://leetcode.com/problems/insert-interval/ # Difficulty: Medium # Solution using DP. # Complexity: # O(N) time | where N represent the number of intervals # O(1) space
[ 2, 1004, 316, 8189, 7632, 13, 35835, 4225, 2100, 198, 2, 198, 2, 7502, 25, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 28463, 12, 3849, 2100, 14, 198, 2, 27419, 25, 13398, 198, 198, 2, 28186, 1262, 27704, 13, 198, ...
2.906667
75
# This Python file uses the following encoding: utf-8 # ############################################################################## # KOLIBRI CLOUD API DAEMON EXAMPLE WITH ACCESS TOKEN # # # # Needs: ...
[ 2, 770, 11361, 2393, 3544, 262, 1708, 21004, 25, 3384, 69, 12, 23, 198, 2, 1303, 29113, 29113, 7804, 4242, 2, 198, 2, 509, 3535, 9865, 7112, 7852, 2606, 35, 7824, 17051, 3620, 1340, 7788, 2390, 16437, 13315, 15859, 7597, 5390, 43959, ...
2.339113
1,961
#!/usr/bin/env python3 ''' File: template_filters.py Author: Zachary King Implements custom Django template filters to be used in Django templates. ''' from django.template.defaultfilters import register from datetime import date, datetime from decimal import Decimal @register.simple_tag @register.simple_tag @...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 7061, 6, 198, 8979, 25, 11055, 62, 10379, 1010, 13, 9078, 198, 13838, 25, 18825, 560, 2677, 198, 198, 3546, 1154, 902, 2183, 37770, 11055, 16628, 284, 307, 973, 198, 259, 37770, ...
2.838013
463
#!/usr/bin/env python # -*- coding: utf-8 -*- """Visualize validation curve.""" import pandas as pd import matplotlib.pyplot as plt Y_SCALE_FACTOR = 100 # Prepare dataframe df = pd.read_csv('log.csv', sep=';') df = df[['epoch', 'acc', 'val_acc']] df[['acc', 'val_acc']] = df[['acc', 'val_acc']] * Y_SCALE_FACTOR df =...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 36259, 1096, 21201, 12133, 526, 15931, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, ...
2.132626
377
# Copyright 2014, Red Hat, 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, 1946, 11, 2297, 10983, 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, 23...
2.263972
1,163
"""Datasafe module for the labinform package. The datasafe is a key feature of labinform which serves to safely store data. Functionality includes directory generation and checksum creation. """ import os import hashlib import shutil class Error(Exception): """Base class for exceptions in this module.""" p...
[ 37811, 27354, 292, 8635, 8265, 329, 262, 2248, 259, 687, 5301, 13, 198, 198, 464, 19395, 8635, 318, 257, 1994, 3895, 286, 2248, 259, 687, 543, 9179, 284, 11512, 3650, 1366, 13, 198, 22203, 1483, 3407, 8619, 5270, 290, 8794, 388, 6282,...
2.364252
4,431
from flask import Flask, render_template, url_for, request import numpy as np from sklearn.externals import joblib app = Flask(__name__) filename = './data/model.sav' model = joblib.load(filename) @app.route("/") @app.route("/index.html") @app.route("/", methods=['POST'])
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 19016, 62, 1640, 11, 2581, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 1069, 759, 874, 1330, 1693, 8019, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 3...
2.816327
98
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2018, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...worksheet import Worksheet from ...shareds...
[ 29113, 29113, 7804, 4242, 21017, 198, 2, 198, 2, 30307, 329, 1395, 7278, 87, 34379, 13, 198, 2, 198, 2, 15069, 357, 66, 828, 2211, 12, 7908, 11, 1757, 22586, 47848, 11, 474, 23209, 7402, 3301, 31, 66, 6839, 13, 2398, 198, 2, 198, ...
1.983857
2,354
import pytest @pytest.fixture(scope='module') def test_module_scope_simple_fixture(module_scope_simple_fixture): """ >>> allure_report = getfixture('allure_report') >>> assert_that(allure_report, ... has_test_case('test_module_scope_simple_fixture', ... has_...
[ 11748, 12972, 9288, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 11639, 21412, 11537, 628, 198, 4299, 1332, 62, 21412, 62, 29982, 62, 36439, 62, 69, 9602, 7, 21412, 62, 29982, 62, 36439, 62, 69, 9602, 2599, 198, 220, 220, 220, ...
1.816689
731