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/python import re target = open ("linkage_mates.txt","w") with open ("mate_aligned.txt", "r") as f: fam={} fam_mate={} lines = f.readlines() for line in lines: line_split = line.split("\t", 1) try: fam[line_split[0]] fam[line_split[0]].append(line_split[1]) except KeyErr...
[ 2, 0, 14629, 14, 8800, 14, 29412, 220, 198, 198, 11748, 302, 220, 198, 198, 16793, 796, 1280, 5855, 8726, 496, 62, 7300, 13, 14116, 2430, 86, 4943, 198, 198, 4480, 1280, 5855, 9830, 62, 41634, 13, 14116, 1600, 366, 81, 4943, 355, ...
1.976861
994
x = False while x == False: value = input("Enter the number between 0-9 : ") try : value = int(value) if value > 9: print("Your value is over 9") elif value < 0: print("Your value is less than 0") else: print("Your value is ",value) ...
[ 87, 796, 10352, 198, 4514, 2124, 6624, 10352, 25, 198, 220, 220, 220, 1988, 796, 5128, 7203, 17469, 262, 1271, 1022, 657, 12, 24, 1058, 366, 8, 198, 220, 220, 220, 1949, 1058, 198, 220, 220, 220, 220, 220, 220, 220, 1988, 796, 493...
2.146739
184
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. #!/usr/bin/env python3 import multiprocessing import os import unittest from typing imp...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 30277, 19193, 82, 11, 3457, 13, 290, 29116, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 347, 10305, 12, 76...
3.152542
177
from typing import Any from typing import Dict
[ 6738, 19720, 1330, 4377, 198, 6738, 19720, 1330, 360, 713, 628 ]
4.363636
11
"""Test for asyncprawcore.auth.Authorizer classes.""" import pytest import asyncprawcore from ..conftest import two_factor_callback # noqa F401 from . import IntegrationTest
[ 37811, 14402, 329, 355, 2047, 13155, 1831, 7295, 13, 18439, 13, 13838, 7509, 6097, 526, 15931, 198, 11748, 12972, 9288, 198, 198, 11748, 355, 2047, 13155, 1831, 7295, 198, 198, 6738, 11485, 1102, 701, 395, 1330, 734, 62, 31412, 62, 4742...
3.25
56
# https://github.com/pratogab/batch-transforms import torch class Normalize: """Applies the :class:`~torchvision.transforms.Normalize` transform to a batch of images. .. note:: This transform acts out of place by default, i.e., it does not mutate the input tensor. Args: mean (sequence):...
[ 2, 3740, 1378, 12567, 13, 785, 14, 1050, 265, 519, 397, 14, 43501, 12, 7645, 23914, 198, 198, 11748, 28034, 628, 198, 4871, 14435, 1096, 25, 198, 220, 220, 220, 37227, 4677, 13508, 262, 1058, 4871, 25, 63, 93, 13165, 354, 10178, 13,...
2.358811
471
from flask import ( current_app, flash, Blueprint, render_template, request, redirect, url_for, abort, make_response, ) from ..models import Option, Page, User, Category, Tag, Post, Comment, Link from ..extensions import db from ..forms import ( LoginForm, PostForm, PageF...
[ 6738, 42903, 1330, 357, 198, 220, 220, 220, 1459, 62, 1324, 11, 198, 220, 220, 220, 7644, 11, 198, 220, 220, 220, 39932, 11, 198, 220, 220, 220, 8543, 62, 28243, 11, 198, 220, 220, 220, 2581, 11, 198, 220, 220, 220, 18941, 11, 1...
2.498118
797
import http import io from unittest import mock import pytest import requests_mock from django.conf import settings from requests.exceptions import HTTPError from core import helpers from core.tests.helpers import create_response @pytest.fixture(autouse=True) @mock.patch('core.helpers.boto3') @mock.patch('core....
[ 11748, 2638, 198, 11748, 33245, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 11748, 12972, 9288, 198, 11748, 7007, 62, 76, 735, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 7007, 13, 1069, 11755, 1330, 14626, 12331, 19...
2.994253
174
"""init file for py2nb""" from .py2nb import py2nb from .nb2py import nb2py
[ 37811, 15003, 2393, 329, 12972, 17, 46803, 37811, 198, 198, 6738, 764, 9078, 17, 46803, 1330, 12972, 17, 46803, 198, 6738, 764, 46803, 17, 9078, 1330, 299, 65, 17, 9078 ]
2.533333
30
import os import pytest import boto3 import base64 from moto import mock_s3 from firehose_replicator import firehose_replicator ECS_BUCKET_NAME = "the-ecs-bucket" ECS_OBJECT_PREFIX = "cv/wydot" os.environ["ECS_BUCKET_NAME"] = ECS_BUCKET_NAME os.environ["ECS_OBJECT_PREFIX"] = ECS_OBJECT_PREFIX @mock_s3
[ 11748, 28686, 198, 11748, 12972, 9288, 198, 11748, 275, 2069, 18, 198, 11748, 2779, 2414, 198, 6738, 285, 2069, 1330, 15290, 62, 82, 18, 198, 6738, 2046, 71, 577, 62, 35666, 26407, 1330, 2046, 71, 577, 62, 35666, 26407, 198, 198, 2943...
2.257353
136
from python_helper.api.src.service import LogHelper, ReflectionHelper from python_helper.api.src.domain import Constant as c
[ 6738, 21015, 62, 2978, 525, 13, 15042, 13, 10677, 13, 15271, 1330, 5972, 47429, 11, 6524, 1564, 47429, 198, 6738, 21015, 62, 2978, 525, 13, 15042, 13, 10677, 13, 27830, 1330, 20217, 355, 269, 198 ]
3.571429
35
###################THIS FILE DOES NOT WORK################# import requests import html_to_json #URL = "https://modelo-prueba.herokuapp.com/result" url = "http://127.0.0.1:8080/result" data = {'a':1, 'b':2, 'c':3, 'd':4} ####################Alternativa1############################### r = requests.post(url,data=data)...
[ 14468, 21017, 43559, 45811, 38359, 5626, 30936, 14468, 2, 198, 198, 11748, 7007, 198, 11748, 27711, 62, 1462, 62, 17752, 198, 198, 2, 21886, 796, 366, 5450, 1378, 19849, 78, 12, 1050, 518, 7012, 13, 11718, 23063, 1324, 13, 785, 14, 20...
2.516667
180
from chris_plugin.types import ParameterType import logging from typing import Union class Placeholders: """ The ChRIS store requires a default value to be provided for arguments which are optional, however argparse doesn't care. If the ChRIS plugin does not specify a default for an argument that ...
[ 6738, 442, 2442, 62, 33803, 13, 19199, 1330, 25139, 2357, 6030, 198, 11748, 18931, 198, 6738, 19720, 1330, 4479, 628, 198, 4871, 8474, 10476, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 383, 609, 49, 1797, 3650, 4433, 257, 4277...
2.849372
239
import numpy as np import random from collections import deque
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 6738, 17268, 1330, 390, 4188, 198 ]
4.2
15
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np if __name__ == '__main__': feature = torch.randn(1, 32, 128, 256) # canvas_transform(feature) # grid_test() # grid_canvas = create_grid_canvas(feature) # print(grid_canvas.shape) # grid_canvas = normalize_g...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 2...
2.640884
181
#! /usr/local/bin/python3.5 import socket import struct import textwrap import binascii import struct import sys TAB_1 = '\t - ' TAB_2 = '\t\t - ' TAB_3 = '\t\t\t - ' TAB_4 = '\t\t\t\t - ' DATA_TAB_1 = '\t ' DATA_TAB_2 = '\t\t ' DATA_TAB_3 = '\t\t\t ' DATA_TAB_4 = '\t\t\t\t ' # Unpack Ethernet Fram...
[ 2, 0, 1220, 14629, 14, 12001, 14, 8800, 14, 29412, 18, 13, 20, 198, 198, 11748, 17802, 198, 11748, 2878, 198, 11748, 2420, 37150, 198, 11748, 9874, 292, 979, 72, 198, 11748, 2878, 198, 11748, 25064, 198, 198, 5603, 33, 62, 16, 796, ...
2.187234
235
# Copyright 2016 Ericsson AB # 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 a...
[ 2, 15069, 1584, 7651, 16528, 9564, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, ...
2.578704
432
#!/usr/bin/python # # Generate test cases for version_test.go # # Herein lies my first ever python script... # import rpm versions = [ "", "0", "1", "2", "10", "100", "0.0", "0.1", "0.10", "0.99", "1.0", "1.99", "2.0", "0.0.0", "0.0.1", "0.0.2", "0.0.10", "0.0.99", "0.1.0", "0....
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 198, 2, 2980, 378, 1332, 2663, 329, 2196, 62, 9288, 13, 2188, 198, 2, 198, 2, 3423, 259, 7363, 616, 717, 1683, 21015, 4226, 986, 198, 2, 198, 11748, 37542, 198, 198, 47178, 796, ...
1.686016
758
import json import csv DISTRICT = 2 PARTY = 4 VOTE_PERCENTAGE = 8 WINNER = 11 PARTIES = ("NDP", "Liberal", "Conservative", "Bloc Quebecois", "Green") json_file = open("electoral_districts.json") districts = json.load(json_file) ## Parse csv file containing individual results csv_file = "output.csv" with open(csv_f...
[ 11748, 33918, 198, 11748, 269, 21370, 198, 198, 26288, 5446, 18379, 796, 362, 198, 30709, 56, 796, 604, 198, 53, 23051, 62, 18973, 43960, 11879, 796, 807, 198, 37620, 21479, 796, 1367, 198, 30709, 11015, 796, 5855, 45, 6322, 1600, 366, ...
2.409826
1,608
# Copyright 2020 Iguazio # # 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, soft...
[ 2, 15069, 12131, 314, 5162, 1031, 952, 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,...
2.911681
351
import pathlib import nibabel as nib import numpy as np import shutil import sys if __name__ == "__main__": main()
[ 11748, 3108, 8019, 198, 11748, 33272, 9608, 355, 33272, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4423, 346, 198, 198, 11748, 25064, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388,...
2.860465
43
# Copyright (c) 2018, NVIDIA CORPORATION. """ This file provide binding to the libgdf library. """ import contextlib import itertools import numpy as np import pandas as pd import pyarrow as pa from libgdf_cffi import ffi, libgdf from librmm_cffi import librmm as rmm from . import cudautils from .utils import calc_...
[ 2, 15069, 357, 66, 8, 2864, 11, 15127, 23929, 44680, 6234, 13, 198, 198, 37811, 198, 1212, 2393, 2148, 12765, 284, 262, 9195, 70, 7568, 5888, 13, 198, 37811, 198, 11748, 4732, 8019, 198, 11748, 340, 861, 10141, 198, 198, 11748, 299, ...
1.98216
5,157
""" Basic transformer, which cleans up the static calm data before sending it off to an elasticsearch index. The raw data can be obtained by running: python monitoring/scripts/download_oai_harvest.py from the root of this repo. This will create a file called `calm_records.json`. The elasticsearch credentials (u...
[ 37811, 198, 26416, 47385, 11, 543, 20658, 510, 262, 9037, 9480, 1366, 878, 7216, 340, 572, 198, 1462, 281, 27468, 12947, 6376, 13, 198, 198, 464, 8246, 1366, 460, 307, 6492, 416, 2491, 25, 628, 220, 220, 220, 21015, 9904, 14, 46521, ...
2.730689
479
from .extensions import db, resizer if resizer: for size in resizer.sizes.iterkeys(): setattr(Upload, size + '_name', db.Column(db.Unicode(255))) setattr(Upload, size + '_url', db.Column(db.Unicode(255)))
[ 6738, 764, 2302, 5736, 1330, 20613, 11, 581, 7509, 628, 198, 361, 581, 7509, 25, 198, 220, 220, 220, 329, 2546, 287, 581, 7509, 13, 82, 4340, 13, 2676, 13083, 33529, 198, 220, 220, 220, 220, 220, 220, 220, 900, 35226, 7, 41592, 11...
2.414894
94
""" Train job interacts with SageMaker """ import os import boto3 import numpy as np import pandas as pd import sagemaker # We use the Estimator from the SageMaker Python SDK from sagemaker.pytorch.estimator import PyTorch from ...sm_utils import get_sm_execution_role ON_SAGEMAKER_NOTEBOOK = False # preparation sm...
[ 37811, 198, 44077, 1693, 44020, 351, 28733, 48890, 198, 37811, 198, 11748, 28686, 198, 11748, 275, 2069, 18, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 45229, 32174, 198, 198, 2, 775, 779, 262,...
2.53507
499
# Internal from warnings import warn from contextlib import AsyncExitStack warn( "async_tools.context.async_context_manager is deprecated, use contextlib instead", DeprecationWarning, ) __all__ = ("AsyncExitStack",)
[ 2, 18628, 198, 6738, 14601, 1330, 9828, 198, 6738, 4732, 8019, 1330, 1081, 13361, 30337, 25896, 198, 198, 40539, 7, 198, 220, 220, 220, 366, 292, 13361, 62, 31391, 13, 22866, 13, 292, 13361, 62, 22866, 62, 37153, 318, 39224, 11, 779, ...
3.228571
70
#=============================================================================== # Imports #=============================================================================== from evn.util import ( Constant, ) #=============================================================================== # Constants #==============...
[ 2, 23926, 25609, 18604, 198, 2, 1846, 3742, 198, 2, 23926, 25609, 18604, 198, 6738, 819, 77, 13, 22602, 1330, 357, 198, 220, 220, 220, 20217, 11, 198, 8, 198, 198, 2, 23926, 25609, 18604, 198, 2, 4757, 1187, 198, 2, 23926, 25609, ...
7.172414
87
from .experiment_runner import ExperimentRunner if __name__ == '__main__': exp_runner = ExperimentRunner() print("Running Experiment\n") exp_runner.run() print("Experiment complete!.\n")
[ 6738, 764, 23100, 3681, 62, 16737, 1330, 29544, 49493, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1033, 62, 16737, 796, 29544, 49493, 3419, 628, 220, 220, 220, 3601, 7203, 28768, 29544, 59, ...
3.104478
67
from suds.client import Client client = Client('http://localhost:8000/?wsdl', cache=None) print(client.service.say_fibonacci(10))
[ 6738, 424, 9310, 13, 16366, 1330, 20985, 198, 198, 16366, 796, 20985, 10786, 4023, 1378, 36750, 25, 33942, 20924, 18504, 25404, 3256, 12940, 28, 14202, 8, 198, 198, 4798, 7, 16366, 13, 15271, 13, 16706, 62, 69, 571, 261, 44456, 7, 940...
3.046512
43
"""Stream type classes for tap-chromedata.""" import csv from pathlib import Path from typing import Any, Dict, Optional, Union, List, Iterable from singer_sdk import typing as th # JSON Schema typing helpers from singer_sdk.streams import Stream import re import ftplib import io import json from zipfile import Zip...
[ 37811, 12124, 2099, 6097, 329, 9814, 12, 28663, 276, 1045, 526, 15931, 198, 11748, 269, 21370, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 32233, 11, 4479, 11, 7343, 11, 40806, 540, 198, 19...
2.489974
2,643
input_dir = 'data/raw' output_dir = 'data/processed' TLHW = ['top', 'left', 'height', 'width'] XYXY = ['x1', 'y1', 'x2', 'y2'] OUT_HEADER = ['file', *XYXY, 'body', 'color'] mappings = { 'supercab': 'ute', 'cab': 'ute', 'minivan': 'people-mover', 'wagon': 'station-wagon', }
[ 15414, 62, 15908, 796, 705, 7890, 14, 1831, 6, 198, 22915, 62, 15908, 796, 705, 7890, 14, 14681, 276, 6, 198, 198, 14990, 39, 54, 796, 37250, 4852, 3256, 705, 9464, 3256, 705, 17015, 3256, 705, 10394, 20520, 198, 34278, 34278, 796, ...
2.171642
134
#!/Applications/anaconda/envs/Python3/bin import socket def main(): '''Example Creating a Simple Client Using the socket Module''' HOST = '127.0.0.1' PORT = 50002 incomingMessage = '' outgoingMessage = '' # s is socket object for IPv4, TCP s = socket.socket(socket.AF_INET , socket.SOCK_S...
[ 2, 48443, 41995, 14, 272, 330, 13533, 14, 268, 14259, 14, 37906, 18, 14, 8800, 198, 198, 11748, 17802, 198, 198, 4299, 1388, 33529, 198, 220, 220, 220, 705, 7061, 16281, 30481, 257, 17427, 20985, 8554, 262, 17802, 19937, 7061, 6, 628,...
2.498525
339
import numpy as np if __name__ == '__main__': main()
[ 11748, 299, 32152, 355, 45941, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.4
25
import pandas as pd import re import numpy as np import math import torch
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 302, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 28034, 628 ]
3.409091
22
# Zeit wird gezaehlt import pygame, math, random, time from pygame.locals import * import PIL.Image as Image import numpy as np import random import time import torch import torch.nn as nn from torch.autograd import Variable import os, sys os.environ["SDL_VIDEODRIVER"] = "dummy" #
[ 2, 47447, 266, 1447, 4903, 89, 3609, 71, 2528, 198, 11748, 12972, 6057, 11, 10688, 11, 4738, 11, 640, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 198, 11748, 350, 4146, 13, 5159, 355, 7412, 198, 11748, 299, 32152, 355, ...
2.798077
104
import asyncio import unittest from typing import Awaitable, Callable import asynctest from checklisting.result import MultiTaskResult, TaskResult from checklisting.result.status import TaskResultStatus from checklisting.tasks.services.zookeeper import (ZookeeperMntrResonseValidator, ...
[ 11748, 30351, 952, 198, 11748, 555, 715, 395, 198, 6738, 19720, 1330, 5851, 4548, 540, 11, 4889, 540, 198, 198, 11748, 355, 2047, 310, 395, 198, 198, 6738, 41859, 278, 13, 20274, 1330, 15237, 25714, 23004, 11, 15941, 23004, 198, 6738, ...
2.331754
211
# coding: utf-8 import logging from os import path from .models.mdsp import Mdsp from .utils.udefault import load_yaml from .dao.mongo.daomongo import DaoMongo from .dao.mongo.daogridfs import DaoGridFS class Config(object): ''' load all info from etc when starting webservice ''' @staticmethod @classm...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 18931, 198, 6738, 28686, 1330, 3108, 198, 198, 6738, 764, 27530, 13, 9132, 2777, 1330, 39762, 2777, 198, 6738, 764, 26791, 13, 463, 891, 1721, 1330, 3440, 62, 88, 43695, 198, 6738, 76...
2.06152
829
from pytheas.services import service from pytheas.viewmodels.viewmodelbase import ViewModelBase
[ 6738, 12972, 1169, 292, 13, 30416, 1330, 2139, 198, 6738, 12972, 1169, 292, 13, 1177, 27530, 13, 1177, 19849, 8692, 1330, 3582, 17633, 14881, 628 ]
3.88
25
import numpy as np import scipy.io as sio import os import matplotlib.pyplot as plt import pandas as pd from preprocessing import method_name from plot_toolbox import plot_error_rate ############################################################################### ### CLASSIFICATION EXPERIMENTS ########################...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 952, 355, 264, 952, 198, 11748, 28686, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 662, 36948, 1330, 2446,...
2.674051
948
import pprint sl = Solution() t1 = [[1,3],[2,6],[8,10],[15,18]] t1 = [Interval(*x) for x in t1] res = sl.merge(t1) pprint.pprint(res) sl = Solution() t2 = [[1,4],[4,5]] t2 = [Interval(*x) for x in t2] res = sl.merge(t2) print(res)
[ 11748, 279, 4798, 628, 198, 6649, 796, 28186, 3419, 198, 198, 83, 16, 796, 16410, 16, 11, 18, 38430, 17, 11, 21, 38430, 23, 11, 940, 38430, 1314, 11, 1507, 11907, 198, 83, 16, 796, 685, 9492, 2100, 46491, 87, 8, 329, 2124, 287, ...
1.958678
121
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Program Name: data_mining.py # Anthony Waldsmith # 8/03/16 # Python Version 3.4 # Description: Datamining CSV google stocks # Optional import for versions of python <= 2 from __future__ import print_function #name: get_data_list #param: FILE_NAME - the file's name you...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 6118, 6530, 25, 1366, 62, 45374, 13, 9078, 198, 2, 9953, 24261, 21453, 198, 2, 807, 14, 3070, 14, 1433, 198,...
3.346667
375
import os
[ 11748, 28686, 628 ]
3.666667
3
# Copyright (c) Ye Liu. All rights reserved. import torch import torch.nn as nn import nncore from ..builder import MESSAGE_PASSINGS from ..bundle import Parameter @MESSAGE_PASSINGS.register() @nncore.bind_getter('in_features', 'out_features') class GCN(nn.Module): """ Graph Convolutional Layer introduced i...
[ 2, 15069, 357, 66, 8, 11609, 18258, 13, 1439, 2489, 10395, 13, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 11748, 299, 77, 7295, 198, 6738, 11485, 38272, 1330, 337, 1546, 4090, 8264, 62, 47924, 20754,...
2.149468
1,880
import cv2 import numpy as np from numba import njit # https://automaticaddison.com/how-to-do-histogram-matching-using-opencv/ def calculate_cdf(histogram: np.ndarray) -> np.ndarray: """ This method calculates the cumulative distribution function :param array histogram: The values of the histogram :...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 997, 7012, 1330, 299, 45051, 628, 198, 2, 3740, 1378, 37800, 2860, 1653, 13, 785, 14, 4919, 12, 1462, 12, 4598, 12, 10034, 21857, 12, 15699, 278, 12, 3500, 12, 9654,...
2.985
200
import connect error_message = 'Action is not defined. Please use create, truncate, or drop.'
[ 11748, 2018, 628, 198, 18224, 62, 20500, 796, 705, 12502, 318, 407, 5447, 13, 4222, 779, 2251, 11, 40122, 378, 11, 393, 4268, 2637, 628, 628, 628, 628, 628, 628, 628 ]
3.516129
31
{ 'variables': { # may be redefined in command line on configuration stage 'BUILD_LIBRDKAFKA%': 1, }, "targets": [ { "target_name": "bindings", "sources": [ "<!@(ls -1 src/*.cc)", ], "include_dirs": [ "<!(node -e \"require('nan')\")", ], 'conditions': [ ...
[ 90, 198, 220, 705, 25641, 2977, 10354, 1391, 198, 220, 220, 220, 220, 220, 1303, 743, 307, 2266, 18156, 287, 3141, 1627, 319, 8398, 3800, 198, 220, 220, 220, 220, 220, 705, 19499, 26761, 62, 40347, 35257, 42, 8579, 25123, 4, 10354, ...
1.715248
1,633
# Sampling from a bivariate normal density via Metropolis-Hastings # %% Import packages import matplotlib.pyplot as plt import numpy as np import scipy.stats as stats import seaborn as sns import torch from torch.distributions import MultivariateNormal # from torch.distributions import Normal from torch.utils.data i...
[ 2, 3409, 11347, 422, 257, 275, 42524, 3487, 12109, 2884, 3395, 25986, 12, 39, 459, 654, 198, 198, 2, 43313, 17267, 10392, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 1174...
2.682943
1,536
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 12131, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
2.75072
694
import os import tensorflow as tf from inception_resnet_v1 import inference from triplet_loss_train import InceptionTripletLoss import numpy as np import unittest
[ 11748, 28686, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 30839, 62, 411, 3262, 62, 85, 16, 1330, 32278, 198, 6738, 15055, 83, 62, 22462, 62, 27432, 1330, 554, 4516, 14824, 37069, 43, 793, 198, 11748, 299, 32152, 355, 45941, ...
3.489362
47
#!/usr/bin/env python from setuptools import find_packages,setup version = '1.0.0' setup( name='dizicli', version=version, description='Dizi Crawler', author='Batuhan Osman Taskaya', author_email='batuhanosmantaskaya@gmail.com', url='https://github.com/btaskaya/dizicli', download_url='https...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 40406, 198, 198, 9641, 796, 705, 16, 13, 15, 13, 15, 6, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 67, 528, 291, 4528, 3256...
2.251724
290
#!/usr/bin/env python3 # The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143? if __name__ == "__main__": assert largest_prime_factor(13195) == 29 assert largest_prime_factor(600851475143) == 6857
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 383, 6994, 5087, 286, 1511, 22186, 389, 642, 11, 767, 11, 1511, 290, 2808, 13, 1867, 318, 262, 4387, 6994, 5766, 286, 262, 1271, 10053, 5332, 1415, 2425, 21139, 30, 628, ...
2.89011
91
"""isort:skip_file""" from dagster import solid @solid @solid # start_marker from dagster import AssetStore, ModeDefinition, pipeline, resource @resource @pipeline(mode_defs=[ModeDefinition(resource_defs={"asset_store": my_asset_store})]) # end_marker
[ 37811, 271, 419, 25, 48267, 62, 7753, 37811, 198, 6738, 48924, 1706, 1330, 4735, 628, 198, 31, 39390, 628, 198, 31, 39390, 628, 628, 198, 2, 923, 62, 4102, 263, 198, 6738, 48924, 1706, 1330, 31433, 22658, 11, 10363, 36621, 11, 11523, ...
2.934066
91
import unittest from bacdive.utils import check_allow if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 275, 330, 67, 425, 13, 26791, 1330, 2198, 62, 12154, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 628 ]
2.641026
39
from Dirs import * import Layers import Model from Data import * import pandas as pd import numpy as np import time Lat_Gen()
[ 6738, 360, 17062, 1330, 1635, 198, 11748, 406, 6962, 198, 11748, 9104, 198, 6738, 6060, 1330, 1635, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 198, 24220, 62, 13746, 3419, 198 ]
3.175
40
from grouper import permissions from grouper.fe.forms import PermissionRequestsForm from grouper.fe.util import GrouperHandler from grouper.models import REQUEST_STATUS_CHOICES class PermissionsRequests(GrouperHandler): """Allow a user to review a list of permission requests that they have."""
[ 6738, 1132, 525, 1330, 21627, 198, 6738, 1132, 525, 13, 5036, 13, 23914, 1330, 2448, 3411, 16844, 3558, 8479, 198, 6738, 1132, 525, 13, 5036, 13, 22602, 1330, 402, 472, 525, 25060, 198, 6738, 1132, 525, 13, 27530, 1330, 4526, 35780, 6...
3.716049
81
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2015 mjirik <mjirik@mjirik-Latitude-E6520> # # Distributed under terms of the MIT license. """ Automatic exposure compensation """ import logging logger = logging.getLogger(__name__) import argparse import numpy as np import matplotlib.py...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 69, 12685, 28, 40477, 12, 23, 198, 2, 198, 2, 15069, 10673, 1853, 285, 73, 343, 1134, 1279, 76, 7...
2.5
160
pkgname = "ninja" pkgver = "1.10.2" pkgrel = 0 hostmakedepends = ["python"] pkgdesc = "Small build system with a focus on speed" maintainer = "q66 <q66@chimera-linux.org>" license = "Apache-2.0" url = "https://ninja-build.org" sources = [f"https://github.com/ninja-build/ninja/archive/v{pkgver}.tar.gz"] sha256 = ["ce358...
[ 35339, 3672, 796, 366, 35073, 6592, 1, 198, 35339, 332, 796, 366, 16, 13, 940, 13, 17, 1, 198, 35339, 2411, 796, 657, 198, 4774, 76, 4335, 538, 2412, 796, 14631, 29412, 8973, 198, 35339, 20147, 796, 366, 18712, 1382, 1080, 351, 257,...
2.38674
181
##lots of imports. Some are unnecessary but I left a lot just to be safe... import matplotlib.pyplot as plt import matplotlib from astropy.io import fits import numpy as np import astropy.table as t import matplotlib.image as img from scipy.optimize import newton from pathlib import Path import math import matplotlib.c...
[ 2235, 75, 1747, 286, 17944, 13, 2773, 389, 13114, 475, 314, 1364, 257, 1256, 655, 284, 307, 3338, 986, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 198, 6738, 6468, 28338, 13, 952, 1330,...
1.993074
9,529
from __future__ import absolute_import import argparse import cStringIO import fnmatch import os import re import struct import textwrap from itertools import groupby from sc2reader.exceptions import FileError LITTLE_ENDIAN,BIG_ENDIAN = '<','>' class ReplayBuffer(object): """ The ReplayBuffer is a wrapper over...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 1822, 29572, 198, 11748, 269, 10100, 9399, 198, 11748, 24714, 15699, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 2878, 198, 11748, 2420, 37150, 198, 198, 6738, 340, 861,...
2.357654
4,468
import sqlite3 as sql from flask import request from flask_restful import Resource
[ 11748, 44161, 578, 18, 355, 44161, 198, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 628 ]
4.047619
21
from SimpleXMLRPCServer import SimpleXMLRPCServer from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler import xmlrpclib #instancio un objeto y conecto el servidor a donde se va a conectar servidorSuma = xmlrpclib.ServerProxy('http://localhost:9998') servidorSub = xmlrpclib.ServerProxy('http://localhost:9997') ser...
[ 6738, 17427, 55, 5805, 49, 5662, 10697, 1330, 17427, 55, 5805, 49, 5662, 10697, 198, 6738, 17427, 55, 5805, 49, 5662, 10697, 1330, 17427, 55, 5805, 49, 5662, 18453, 25060, 198, 11748, 35555, 81, 79, 565, 571, 198, 198, 2, 8625, 1192, ...
2.771014
345
# Generated by Django 3.2.8 on 2021-11-20 10:01 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 23, 319, 33448, 12, 1157, 12, 1238, 838, 25, 486, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import dict_tools import pop.hub import mock import pytest import random import string from typing import Any, Dict, List @pytest.fixture(scope="session", autouse=True) @pytest.fixture(scope="session", autouse=True) @pytest.fixture(scope="session") @pytest.mark.asyncio @pytest.fixture(scope="module") @pytest....
[ 11748, 8633, 62, 31391, 198, 11748, 1461, 13, 40140, 198, 11748, 15290, 198, 11748, 12972, 9288, 198, 11748, 4738, 198, 11748, 4731, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 2998...
2.918699
123
""" The MIT License Copyright (c) Tigran Hakobyan. http://tiggreen.me Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, mo...
[ 37811, 198, 464, 17168, 13789, 198, 198, 15269, 357, 66, 8, 14189, 2596, 24734, 672, 4121, 13, 2638, 1378, 83, 6950, 1361, 13, 1326, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, ...
3.479167
528
import torch import torch.nn as nn import torch.nn.functional as F
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 198 ]
3.285714
21
import os import sys import datetime import git from jinja2 import Template ADD_REQUIREMENTS_MACRO = """ {%- macro add_requirements(fname) -%} # Requirements populated from {{fname}} {% for requirement in read_requirements(fname) -%} RUN pip install "{{ requirement }}" {% endfor -%} {%- endmacro -%} """ if __n...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 4818, 8079, 198, 198, 11748, 17606, 198, 6738, 474, 259, 6592, 17, 1330, 37350, 628, 628, 198, 198, 29266, 62, 2200, 49128, 28957, 62, 44721, 13252, 796, 37227, 198, 90, 33963, 15021, 751, 62...
2.757576
132
import calendar print(calendar.month(2018, 8)) #This is for particular month calendar print(calendar.calendar(2020)) #This if for printing whole year calendar
[ 11748, 11845, 201, 198, 201, 198, 4798, 7, 9948, 9239, 13, 8424, 7, 7908, 11, 807, 4008, 1303, 1212, 318, 329, 1948, 1227, 11845, 201, 198, 201, 198, 4798, 7, 9948, 9239, 13, 9948, 9239, 7, 42334, 4008, 1303, 1212, 611, 329, 13570, ...
3.458333
48
"""Simulation"""
[ 37811, 8890, 1741, 37811, 198 ]
3.4
5
# https://leetcode.com/problems/all-oone-data-structure/ # # algorithms # Hard (29.33%) # Total Accepted: 17,753 # Total Submissions: 60,523 # Your AllOne object will be instantiated and called as such: # obj = AllOne() # obj.inc(key) # obj.dec(key) # param_3 = obj.getMaxKey() # param_4 = obj.getMinKey()
[ 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 439, 12, 78, 505, 12, 7890, 12, 301, 5620, 14, 198, 2, 198, 2, 16113, 198, 2, 6912, 357, 1959, 13, 2091, 4407, 198, 2, 7472, 21699, 276, 25, 220, 220, 220, 1596, 11,...
2.578512
121
""" This app creates a simple sidebar layout using inline style arguments and the dbc.Nav component. dcc.Location is used to track the current location. There are two callbacks, one uses the current location to render the appropriate page content, the other uses the current location to toggle the "active" properties o...
[ 37811, 198, 1212, 598, 8075, 257, 2829, 40217, 12461, 1262, 26098, 3918, 7159, 290, 262, 198, 9945, 66, 13, 30575, 7515, 13, 198, 198, 67, 535, 13, 14749, 318, 973, 284, 2610, 262, 1459, 4067, 13, 1318, 389, 734, 869, 10146, 11, 198...
2.472622
694
# Copyright Materialize, Inc. and contributors. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Source License, use of this software...
[ 2, 15069, 14633, 1096, 11, 3457, 13, 290, 20420, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 5765, 286, 428, 3788, 318, 21825, 416, 262, 7320, 8090, 13789, 198, 2, 3017, 287, 262, 38559, 24290, 2393, 379, 262, 6808, 286, 428, 16099, ...
2.314063
1,920
import numpy as np import cv2 from tqdm import tqdm """ Recovery Function takes a query of frames from a compressed video and returns the original frames of the video, function needs the compressed videos meta data and returns two lists, one list contains lists of rame sequences in the order of the indexes passed to t...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 37811, 198, 6690, 6560, 15553, 2753, 257, 12405, 286, 13431, 422, 257, 25388, 2008, 290, 5860, 262, 2656, 13431, 286, 2...
3.192
250
from .base import BaseTest from .fixtures import fixtures_wrapper
[ 6738, 764, 8692, 1330, 7308, 14402, 198, 6738, 764, 69, 25506, 1330, 34609, 62, 48553, 198 ]
4.125
16
from ctypes import * import math import random import os import cv2 import numpy as np import time import darknet import chcone import serial CAM_NUM = 3 DANGER = 150 a = range(-75,-26) b = range(-26,-19) c = range(-19,-13) d = range(-13,-7) e = range(-7,0) f = range(0,7) g = range(7,13) h = range(13,19) i = range(19...
[ 6738, 269, 19199, 1330, 1635, 198, 11748, 10688, 198, 11748, 4738, 198, 11748, 28686, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 3223, 3262, 198, 11748, 442, 49180, 198, 11748, 11389, 198, ...
2.225092
271
#from domains import *
[ 2, 6738, 18209, 1330, 1635 ]
4.4
5
import torch import torch.nn as nn import torch.nn.functional as func from torchsupport.modules.normalization import AdaptiveBatchNorm
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 25439, 198, 198, 6738, 28034, 11284, 13, 18170, 13, 11265, 1634, 1330, 30019, 425, 33, 963, 35393, 198 ]
3.777778
36
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Microsoft Public License. A # copy of the license can be found in the License.html file at the root of this...
[ 29113, 29113, 14468, 4242, 2, 198, 2, 198, 2, 220, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 2426, 284, 2846, 290, 3403, 286, 262, 5413, 5094, 13789, 13, 317, 220, 198, 2, 4...
3.007669
652
from acondbs.github.ops import update_org_member_lists ##__________________________________________________________________|| ##__________________________________________________________________||
[ 6738, 936, 623, 1443, 13, 12567, 13, 2840, 1330, 4296, 62, 2398, 62, 19522, 62, 20713, 198, 198, 2235, 27193, 834, 15886, 198, 198, 2235, 27193, 834, 15886, 198 ]
6.862069
29
from application import EnvironmentController from domain.model.environment import EnvironmentRepository from flask_restx import Namespace, fields, Resource from flask_restx.reqparse import RequestParser from .EnvironmentMapperImpl import EnvironmentMapperImpl from .EnvironmentDTOImpl import EnvironmentDTOImpl from i...
[ 6738, 3586, 1330, 9344, 22130, 198, 6738, 7386, 13, 19849, 13, 38986, 1330, 9344, 6207, 13264, 198, 6738, 42903, 62, 2118, 87, 1330, 28531, 10223, 11, 7032, 11, 20857, 198, 6738, 42903, 62, 2118, 87, 13, 42180, 29572, 1330, 19390, 46677...
4.11811
127
#!/usr/bin/env python # -*- coding: utf-8 -*- from communication import Result from communication import State
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 6946, 1330, 25414, 198, 6738, 6946, 1330, 1812, 198 ]
3.363636
33
"""Email.Cloud Queue Management This application allows you to manage the queue of Email.Cloud through a webapplication. Author: henk.vanachterberg@broadcom.com """ from app import create_app, db from app.models import GlobalQueue, DomainQueue from app.api import queryQueue from random import randrange app = create_...
[ 37811, 15333, 13, 18839, 4670, 518, 8549, 198, 198, 1212, 3586, 3578, 345, 284, 6687, 262, 16834, 286, 9570, 13, 18839, 832, 257, 198, 12384, 31438, 13, 198, 198, 13838, 25, 30963, 74, 13, 10438, 620, 353, 3900, 31, 36654, 785, 13, ...
3.377049
122
# Copyright (c) 2020 Graphcore Ltd. 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 l...
[ 2, 15069, 357, 66, 8, 12131, 29681, 7295, 12052, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 118...
3.459364
283
"""Setup the package.""" import os from setuptools import setup, find_packages # get the version version = None with open(os.path.join('sp_experiment', '__init__.py'), 'r') as fid: for line in (line.strip() for line in fid): if line.startswith('__version__'): version = line.split('=')[1].strip(...
[ 37811, 40786, 262, 5301, 526, 15931, 198, 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 2, 651, 262, 2196, 198, 9641, 796, 6045, 198, 4480, 1280, 7, 418, 13, 6978, 13, 22179, 10786, 2777, 62, ...
2.31162
568
import carla_utils as cu import time import numpy as np import carla if __name__ == "__main__": client, world, town_map = cu.connect_to_server('127.0.0.1', 2000, timeout=2.0, map_name='None') vehicle = cu.get_actor(world, 'vehicle.bh.crossbike', 'hero') c = CapacController(vehicle, 10) traj...
[ 11748, 1097, 5031, 62, 26791, 355, 18912, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1097, 5031, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 5456, 11, 995, 11,...
2.146018
226
# pragma pylint: disable=missing-docstring import json from shapely.geometry import Point from mobility_pipeline.lib.voronoi import load_cell
[ 2, 23864, 2611, 279, 2645, 600, 25, 15560, 28, 45688, 12, 15390, 8841, 198, 198, 11748, 33918, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 6252, 198, 6738, 15873, 62, 79, 541, 4470, 13, 8019, 13, 20867, 261, 23013, 1330, 3440, 62, 3...
3.222222
45
# -*- coding: utf-8 -*- # """*********************************************************************************************""" # FileName [ attention.py ] # Synopsis [ Sequence to sequence attention module for Tacotron ] # Author [ Ting-Wei Liu (Andi611) ] # Copyright [ Copyleft(c), Speech Lab, ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 1303, 198, 37811, 17174, 17174, 8412, 4557, 35625, 37811, 198, 2, 220, 220, 9220, 5376, 220, 220, 220, 220, 685, 3241, 13, 9078, 2361, 198, 2, 220, 220, 16065, 24608, 220, ...
3.443325
397
import cv2 import threading
[ 11748, 269, 85, 17, 198, 11748, 4704, 278, 628 ]
3.222222
9
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 4343, 3012, 3457, 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, ...
3.370021
954
filter(name__startswith='Re', age__lt=40, city__endswith='aulo')
[ 198, 24455, 7, 3672, 834, 9688, 2032, 342, 11639, 3041, 3256, 2479, 834, 2528, 28, 1821, 11, 1748, 834, 437, 2032, 342, 11639, 2518, 78, 11537, 198 ]
2.444444
27
import warnings from . import ga from .mv import Mv # galgebra 0.5.0 warnings.warn( "The `galgebra.deprecated` module is deprecated", DeprecationWarning, stacklevel=2) ################################# MV class for backward compatibility ################### class MV(Mv): """ A deprecated version of :cl...
[ 11748, 14601, 198, 198, 6738, 764, 1330, 31986, 198, 6738, 764, 76, 85, 1330, 337, 85, 198, 198, 2, 9426, 29230, 657, 13, 20, 13, 15, 198, 40539, 654, 13, 40539, 7, 198, 220, 220, 220, 366, 464, 4600, 13528, 29230, 13, 10378, 3102...
2.454628
1,102
from EPUIKit.widget.flowlayout import FlowLayout from EPUIKit.widget.label import Label from EPUIKit.widget.layout import Layout from EPUIKit.widget.quadrantslayout import QuadrantsLayout from EPUIKit.widget.widget import Widget
[ 6738, 412, 5105, 18694, 270, 13, 42655, 13, 2704, 4883, 323, 448, 1330, 27782, 32517, 198, 6738, 412, 5105, 18694, 270, 13, 42655, 13, 18242, 1330, 36052, 198, 6738, 412, 5105, 18694, 270, 13, 42655, 13, 39786, 1330, 47639, 198, 6738, ...
3.318841
69
"""Decrypt the keys of a settings JSON file.""" import argparse import os from intervention_system.deploy import settings_key_path as default_keyfile_path from intervention_system.deploy import client_config_cipher_path as default_input_path from intervention_system.deploy import client_configs_path from intervention_...
[ 37811, 10707, 6012, 262, 8251, 286, 257, 6460, 19449, 2393, 526, 15931, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 6738, 9572, 62, 10057, 13, 2934, 1420, 1330, 6460, 62, 2539, 62, 6978, 355, 4277, 62, 2539, 7753, 62, 6978, ...
2.92723
426
import argparse import json import os from snapcastr.snapcastr import Snapcastr from xdg import XDG_CONFIG_HOME CONFIG_FILE = f"{XDG_CONFIG_HOME}/snapcastr.json" HOST="0.0.0.0" PORT=5000 SC_HOST="localhost" if __name__ == "__main__": main()
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 11495, 2701, 81, 13, 45380, 2701, 81, 1330, 16026, 2701, 81, 198, 6738, 2124, 67, 70, 1330, 46537, 38, 62, 10943, 16254, 62, 39069, 198, 198, 10943, 16254, 62, 25664, ...
2.375
104
import argparse import os from Common.load_manager import SourceDataLoadManager from Common.build_manager import GraphBuilder if __name__ == '__main__': parser = argparse.ArgumentParser(description="Transform data sources into KGX files. Build neo4j graphs.") parser.add_argument('-t', '--test_mode', action='...
[ 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 6738, 8070, 13, 2220, 62, 37153, 1330, 8090, 6601, 8912, 13511, 198, 6738, 8070, 13, 11249, 62, 37153, 1330, 29681, 32875, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 103...
2.876761
284
from collections import deque q = deque() q.append(1) q.append(2) q.append(3) print(q) print(q.pop()) print(q.pop()) print(q.pop())
[ 6738, 17268, 1330, 390, 4188, 198, 198, 80, 796, 390, 4188, 3419, 198, 80, 13, 33295, 7, 16, 8, 198, 80, 13, 33295, 7, 17, 8, 198, 80, 13, 33295, 7, 18, 8, 198, 198, 4798, 7, 80, 8, 198, 198, 4798, 7, 80, 13, 12924, 28955, ...
2.177419
62
''' Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string ''. Input: ['flower', 'flow', 'flight'] Output: 'fl' Input: ['dog', 'racecar', 'car'] Output: '' Input: ['aa', 'a'] Output: 'a' =====================...
[ 7061, 6, 198, 14617, 395, 8070, 3771, 13049, 198, 198, 16594, 257, 2163, 284, 1064, 262, 14069, 2219, 21231, 4731, 12077, 281, 7177, 286, 13042, 13, 198, 1532, 612, 318, 645, 2219, 21231, 11, 1441, 281, 6565, 4731, 705, 4458, 198, 198...
3.222222
324
from distutils.core import setup, Command from distutils.command.install_data import install_data from distutils.dir_util import remove_tree from distutils import log from os import path, makedirs, walk, environ from shutil import copyfile from subprocess import call from sys import version_info if version_info[0] >=...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 11, 9455, 198, 6738, 1233, 26791, 13, 21812, 13, 17350, 62, 7890, 1330, 2721, 62, 7890, 198, 6738, 1233, 26791, 13, 15908, 62, 22602, 1330, 4781, 62, 21048, 198, 6738, 1233, 26791, 1330, 2604, ...
2.341722
755
from ..utils.preprocessing import data_preprocess from ..utils.api import api_handler from ..utils.decorators import detect_batch_decorator @detect_batch_decorator def facial_localization(image, cloud=None, batch=False, api_key=None, version=None, **kwargs): """ Given an image, returns a list of faces found w...
[ 6738, 11485, 26791, 13, 3866, 36948, 1330, 1366, 62, 3866, 14681, 198, 6738, 11485, 26791, 13, 15042, 1330, 40391, 62, 30281, 198, 6738, 11485, 26791, 13, 12501, 273, 2024, 1330, 4886, 62, 43501, 62, 12501, 273, 1352, 628, 198, 31, 1525...
2.961832
393
#!/usr/bin/env python # -*- coding: utf-8 -*- # import web import json from bson.objectid import ObjectId from config import setting import app_helper db = setting.db_web # 病种分类入口(根目录) url = ('/app2/category') GEN_SIGN = { 0 : '', 1 : '●', 2 : ' ►', 3 : '  ★', 4 : '   ◆', } # -----------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 11748, 3992, 198, 11748, 33918, 198, 6738, 275, 1559, 13, 15252, 312, 1330, 9515, 7390, 198, 6738, 4566, 1330, ...
1.856322
174
import bs4 as bs import datetime import urllib.request from django.views.generic import ListView from .models import Job from django.shortcuts import render, redirect # last = Job.objects.raw('SELECT * FROM joblist_job LIMIT 1')[0] # jobtime = last.date # print(jobtime) # time = datetime.date.today() # print(time)...
[ 11748, 275, 82, 19, 355, 275, 82, 198, 11748, 4818, 8079, 198, 11748, 2956, 297, 571, 13, 25927, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 7343, 7680, 198, 6738, 764, 27530, 1330, 15768, 198, 6738, 42625, 14208, 13, 19509, ...
3
116