content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from functools import wraps from time import time from flask import request from flask.wrappers import Response from werkzeug.datastructures import Headers from ggrc import db from ggrc import settings from ...
[ 2, 15069, 357, 34, 8, 1584, 3012, 3457, 13, 198, 2, 49962, 739, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 1279, 3826, 38559, 24290, 2393, 29, 198, 198, 6738, 1257, 310, 10141, 1330,...
3.312102
157
import unittest
[ 11748, 555, 715, 395, 628 ]
3.4
5
""" Extracting Data from XML In this assignment you will write a Python program somewhat similar to http://www.py4e.com/code3/geoxml.py. The program will prompt for a URL, read the XML data from that URL using urllib and then parse and extract the comment counts from the XML data, compute the sum of the numbers in the...
[ 37811, 198, 11627, 974, 278, 6060, 422, 23735, 198, 198, 818, 428, 16237, 345, 481, 3551, 257, 11361, 1430, 6454, 2092, 284, 198, 4023, 1378, 2503, 13, 9078, 19, 68, 13, 785, 14, 8189, 18, 14, 469, 1140, 4029, 13, 9078, 13, 383, 1...
2.872471
1,137
import random from nonebot.params import State, CommandArg, EventMessage from nonebot.typing import T_State from nonebot import on_command, on_regex, on_keyword, on_message from nonebot.adapters.onebot.v11 import Bot, MessageEvent, GROUP, MessageSegment, Event, Message, GroupMessageEvent import os import json im...
[ 11748, 4738, 201, 198, 6738, 4844, 13645, 13, 37266, 1330, 1812, 11, 9455, 28100, 11, 8558, 12837, 201, 198, 6738, 4844, 13645, 13, 774, 13886, 1330, 309, 62, 9012, 201, 198, 6738, 4844, 13645, 1330, 319, 62, 21812, 11, 319, 62, 260, ...
2.240527
607
from smt_solver.solver.solver import Solver from collections import deque, Counter
[ 6738, 895, 83, 62, 82, 14375, 13, 82, 14375, 13, 82, 14375, 1330, 4294, 332, 198, 6738, 17268, 1330, 390, 4188, 11, 15034, 628 ]
3.5
24
from pandas import DataFrame import numpy as np def _check_config(config): """ Check configuration and complete it with default_config. Parameters ---------- config: dict Some configurations or hyper-parameters of neural network. """ default_config = { "learning_rate": 0.00...
[ 6738, 19798, 292, 1330, 6060, 19778, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 4808, 9122, 62, 11250, 7, 11250, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 6822, 8398, 290, 1844, 340, 351, 4277, 62, 11250, 13, 628, ...
2.45988
835
from .LeagueEndpoint import LeagueEndpoint
[ 6738, 764, 24623, 12915, 4122, 1330, 4041, 12915, 4122, 628 ]
4.4
10
import warnings from collections import defaultdict import numpy as np import pandas as pd from .coding import strings, times, variables from .coding.variables import SerializationWarning, pop_to from .core import duck_array_ops, indexing from .core.common import contains_cftime_datetimes from .core.pycompat import d...
[ 11748, 14601, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 764, 66, 7656, 1330, 13042, 11, 1661, 11, 9633, 198, 6738, 764, 66, 7656, 13, 25641, 297...
2.497643
7,636
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None
[ 2, 30396, 329, 1702, 306, 12, 25614, 1351, 13, 198, 2, 1398, 7343, 19667, 25, 198, 2, 220, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 2124, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2100, 796, 2124,...
2.057971
69
import json import uuid from datetime import datetime from decimal import Decimal from pynamodb.attributes import ( NumberAttribute, UnicodeAttribute, UTCDateTimeAttribute, ) from pynamodb.indexes import GlobalSecondaryIndex, KeysOnlyProjection from pynamodb.models import Model from ..enums import Transac...
[ 11748, 33918, 198, 11748, 334, 27112, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 6738, 279, 4989, 375, 65, 13, 1078, 7657, 1330, 357, 198, 220, 220, 220, 7913, 33682, 11, 198, 220, 220, 220,...
3.509434
106
import logging import os from pprint import pprint import boto3 as ibm_boto3 import time from botocore.config import Config from botocore.exceptions import ClientError from tqdm import tqdm class COS(object): """Interface to BlueMix Object Storage gets params from Recipe: { "COS": { ...
[ 11748, 18931, 198, 11748, 28686, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 11748, 275, 2069, 18, 355, 220, 24283, 76, 62, 65, 2069, 18, 198, 11748, 640, 198, 6738, 10214, 420, 382, 13, 11250, 1330, 17056, 198, 6738, 10214, 420,...
2.021238
1,648
import cv2 imagem = cv2.imread("fotos/grupo.0.jpg") classificador = cv2.CascadeClassifier("recursos/haarcascade_frontalface_default.xml") imagemCinza = cv2.cvtColor(imagem, cv2.COLOR_BGR2GRAY) facesDetectadas = classificador.detectMultiScale(imagemCinza, scaleFactor=1.2, minSize=(50,50)) print(facesDetectadas) print("...
[ 11748, 269, 85, 17, 198, 198, 48466, 368, 796, 269, 85, 17, 13, 320, 961, 7203, 69, 14163, 14, 48929, 7501, 13, 15, 13, 9479, 4943, 198, 4871, 811, 7079, 796, 269, 85, 17, 13, 34, 28966, 9487, 7483, 7203, 8344, 1834, 418, 14, 30...
2.366812
229
import numpy as np import math CurrentthroughResistor()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 628, 220, 220, 220, 220, 198, 11297, 9579, 4965, 32380, 3419 ]
3.210526
19
from itertools import count import random from typing import Counter entier = int(input("Saissez un nombre")) list_gerer = une_partie(entier) print(list_gerer) liste_de_compteur = competeur_face(list_gerer) print(liste_de_compteur) liste_etats = etats_partie(liste_de_compteur) count = 1 for i in liste_etats: ...
[ 6738, 340, 861, 10141, 1330, 954, 198, 11748, 4738, 198, 6738, 19720, 1330, 15034, 628, 628, 628, 198, 298, 959, 796, 493, 7, 15414, 7203, 50, 15152, 325, 89, 555, 299, 2381, 260, 48774, 198, 4868, 62, 469, 11751, 796, 17809, 62, 39...
2.425414
181
# instruction_to_strokes_sweep.py """ Usage: PYTHONPATH=. python src/models/sweeps/instruction_to_strokes_sweep.py --groupname testsweep """ import argparse from src.models.core.experiments import run_param_sweep CMD = 'PYTHONPATH=. python src/models/instruction_to_strokes.py' NGPUS_PER_RUN = 1 GRID = { # ...
[ 2, 12064, 62, 1462, 62, 20661, 5209, 62, 46280, 538, 13, 9078, 198, 198, 37811, 198, 28350, 25, 198, 220, 220, 220, 350, 56, 4221, 1340, 34219, 28, 13, 21015, 12351, 14, 27530, 14, 46280, 25386, 14, 8625, 2762, 62, 1462, 62, 20661, ...
2.270553
669
# -*- coding: utf-8 -*- import json import requests import scrapy import time from scrapy.linkextractors import LinkExtractor from scrapy.spiders import CrawlSpider, Rule from ziroom.items import ZiroomItem, ZiroomItemLoader from ziroom.utils.common import get_md5 from scrapy.http import Request import re from urllib ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 11748, 7007, 198, 11748, 15881, 88, 198, 11748, 640, 198, 6738, 15881, 88, 13, 2815, 365, 742, 974, 669, 1330, 7502, 11627, 40450, 198, 6738, 158...
3.242718
103
#!/usr/bin/env python import csv import json statusTable = { 1: 'VALID', 0: 'UNSOLVED', } if __name__ == '__main__': to_filter = {'transport': {'seq-sat': True, 'seq-opt': False, #'seq-agl': True, 'seq-mco': True}} inpfolder = 'csv' jsonfile_prefix = 'transport-strips-' ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 198, 13376, 10962, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 352, 25, 705, 23428, 2389, 3256, 198, 220, 220, 220, 220, 220, 2...
2.117155
478
__version__ = "21.03"
[ 834, 9641, 834, 796, 366, 2481, 13, 3070, 1, 198 ]
2.2
10
from tkinter import * from playsound import playsound as play import blockioh as io dev = '' path = '' """ class alert(): def __init__(self, title, message, ecode,x,y): if ecode == '0': play('i.wav') elif ecode == '1': play('E.wav') elif ecode == '2': p...
[ 6738, 256, 74, 3849, 1330, 1635, 198, 6738, 5341, 633, 1330, 5341, 633, 355, 711, 198, 11748, 2512, 952, 71, 355, 33245, 198, 7959, 796, 10148, 198, 6978, 796, 10148, 198, 37811, 198, 4871, 7995, 33529, 198, 220, 220, 220, 825, 11593,...
2.037862
449
from utils.brick_builder import BrickBuilder
[ 6738, 3384, 4487, 13, 1671, 624, 62, 38272, 1330, 28347, 32875, 628 ]
3.833333
12
''' Units tests for the cpptraj wrappers for nasqm ''' import os import pytest import numpy as np from pynasqm.amberrestartreader import AmberRestartReader def setup_module(module): ''' Switch to test directory ''' os.chdir("tests/amberRestartReader") def teardown_module(module): ''' Return to...
[ 7061, 6, 198, 3118, 896, 5254, 329, 262, 269, 381, 9535, 73, 7917, 11799, 329, 25221, 80, 76, 198, 7061, 6, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 279, 2047, 292, 80, 76, 13, 7789,...
2.614286
140
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
from evoplotter.templates import * from evoplotter.utils import * import app.phd.cdgp.phd_processor as phd_processor import app.phd.cdgp.phd_utils as phd_utils if __name__ == "__main__": # cleanLIA() cleanSLIA()
[ 6738, 819, 20106, 313, 353, 13, 11498, 17041, 1330, 1635, 198, 6738, 819, 20106, 313, 353, 13, 26791, 1330, 1635, 198, 11748, 598, 13, 746, 67, 13, 10210, 31197, 13, 746, 67, 62, 41341, 355, 872, 67, 62, 41341, 198, 11748, 598, 13, ...
2.494505
91
# The MIT License (MIT) # # Copyright (c) 2015, Red Hat, Inc. and others # Copyright (c) 2015, Rackspace US, Inc. # # 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, includ...
[ 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 1853, 11, 2297, 10983, 11, 3457, 13, 290, 1854, 198, 2, 15069, 357, 66, 8, 1853, 11, 37927, 13200, 1294, 11, 3457, 13, 198, 2, 198, 2, 2448, 3411, 318, 29...
2.957336
961
import fx from fx import * fx.prefs.add("KMFX_Load.Paint Hard Alpha setup", True) class KMFX_hard_Alpha(Action): """creates a combo of nodes to setup a hard alpha""" addAction(KMFX_hard_Alpha())
[ 11748, 277, 87, 201, 198, 6738, 277, 87, 1330, 1635, 201, 198, 21373, 13, 3866, 9501, 13, 2860, 7203, 42, 44, 17213, 62, 8912, 13, 47, 2913, 6912, 12995, 9058, 1600, 6407, 8, 201, 198, 201, 198, 201, 198, 4871, 46646, 17213, 62, 1...
2.476744
86
#!/usr/local/autopkg/python # # 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, s...
[ 2, 48443, 14629, 14, 12001, 14, 2306, 404, 10025, 14, 29412, 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, 1...
3.318766
389
""" Builds FHIR Group resources (https://www.hl7.org/fhir/group.html) from rows of tabular data. """ import pandas as pd from kf_lib_data_ingest.common import constants from kf_lib_data_ingest.common.concept_schema import CONCEPT from kf_model_fhir.ingest_plugin.target_api_builders.kfdrc_patient import ( Patient,...
[ 37811, 198, 15580, 82, 376, 39, 4663, 4912, 4133, 357, 5450, 1378, 2503, 13, 18519, 22, 13, 2398, 14, 69, 71, 343, 14, 8094, 13, 6494, 8, 422, 15274, 198, 1659, 7400, 934, 1366, 13, 198, 37811, 198, 11748, 19798, 292, 355, 279, 67...
2.625698
179
from functools import wraps import httpx def memweb(url: str): """ Remembers input/output of a function by sending it over http to an endpoint. Important: Note that this decorator requires an extra dependeny. Ensure it is installed properly by running either; ``` python ...
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 11748, 2638, 87, 628, 198, 4299, 1066, 12384, 7, 6371, 25, 965, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 42898, 1213, 5128, 14, 22915, 286, 257, 2163, 416, 7216, 340, 625, 2...
2.626126
222
from django.test import TestCase from django.test.utils import override_settings from django.contrib.sites.models import Site from phatpages.models import PhatPage @override_settings(SITE_ID=42)
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 9288, 13, 26791, 1330, 20957, 62, 33692, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 49315, 13, 27530, 1330, 14413, 198, 198, 6738, 872, 265, 31126, 13, 27530...
3.245902
61
from __future__ import absolute_import, division, print_function from operator import getitem import numpy as np from toolz.curried import merge from .core import Array, elemwise from .. import core from ..utils import skip_doctest def wrap_elemwise(numpy_ufunc, array_wrap=False): """ Wrap up numpy function i...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 6738, 10088, 1330, 651, 9186, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 2891, 89, 13, 22019, 2228, 1330, 20121, 198, 6738, 764, 729...
2.375786
1,272
'''OpenGL extension ARB.shading_language_include This module customises the behaviour of the OpenGL.raw.GL.ARB.shading_language_include to provide a more Python-friendly API Overview (from the spec) This extension introduces a #include GLSL directive to allow reusing the same shader text in multiple sh...
[ 7061, 6, 11505, 8763, 7552, 5923, 33, 13, 1477, 4980, 62, 16129, 62, 17256, 201, 198, 201, 198, 1212, 8265, 2183, 2696, 262, 9172, 286, 262, 220, 201, 198, 11505, 8763, 13, 1831, 13, 8763, 13, 37304, 13, 1477, 4980, 62, 16129, 62, ...
3.056272
853
from imutils.face_utils import FaceAligner from PIL import Image, ImageDraw import numpy as np import imutils import dlib import cv2 import torch import torchvision.transforms as transforms import face_recognition from ..utils import downloads from ..models import submodules #with submodules.localimport('submodules/f...
[ 6738, 545, 26791, 13, 2550, 62, 26791, 1330, 15399, 2348, 570, 263, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 25302, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 545, 26791, 198, 11748, 288, 8019, 198, 11748, 269, 85, 17, 198, 11...
2.091052
637
# -*- coding: utf-8 -*- """ Created on Fri Jul 15 10:06:27 2016 @author: ALEXIS """ # %% Open an appropriate ALEXIS data file. import temp, dens and spectral data. import numpy as np import matplotlib.pyplot as plt import os os.chdir('C:/Users/ivan/OneDrive/Research/ar_OES') spect_dir = 'C:/Users/ivan/...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 19480, 5979, 1315, 838, 25, 3312, 25, 1983, 1584, 201, 198, 201, 198, 31, 9800, 25, 32318, 55, 1797, 201, 198, 37811, 201, 198, 2, ...
2.236584
2,143
from typing import List import itertools b = Solution() # print(b.totalFruit([1,2,1])) # print(b.totalFruit([0,1,2,2])) # print(b.totalFruit([1,2,3,2,2])) # print(b.totalFruit([3,3,3,1,2,1,1,2,3,3,4])) # print(b.totalFruit([0,1,6,6,4,4,6])) print(b.totalFruit([4,7,7,0,8,3,8,2,5]))
[ 6738, 19720, 1330, 7343, 198, 11748, 340, 861, 10141, 628, 198, 65, 796, 28186, 3419, 198, 2, 3601, 7, 65, 13, 23350, 37, 4872, 26933, 16, 11, 17, 11, 16, 60, 4008, 198, 2, 3601, 7, 65, 13, 23350, 37, 4872, 26933, 15, 11, 16, ...
1.791139
158
from bitmovin.resources.models import AACCodecConfiguration from ..rest_service import RestService
[ 6738, 1643, 76, 709, 259, 13, 37540, 13, 27530, 1330, 317, 26861, 375, 721, 38149, 198, 6738, 11485, 2118, 62, 15271, 1330, 8324, 16177, 628 ]
4
25
import collections import numpy as np import random import json
[ 11748, 17268, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 11748, 33918, 628 ]
4.333333
15
import requests from bs4 import BeautifulSoup import random import time random.seed(60) def get_page(url): """ Simple funtion that get the url with requests and return a bs4 object. :param (str): The string of the url :return: bs4 object """ try: req = requests.get(url) ...
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 4738, 198, 11748, 640, 198, 198, 25120, 13, 28826, 7, 1899, 8, 628, 198, 4299, 651, 62, 7700, 7, 6371, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2...
2.068685
1,354
# Generated by Django 3.1 on 2021-03-18 21:30 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 319, 33448, 12, 3070, 12, 1507, 2310, 25, 1270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.892857
28
from io import BytesIO from pathlib import Path from typing import ( Any, List, Mapping, Optional, Union, ) import numpy as np from hamcrest.core.base_matcher import BaseMatcher from hamcrest.core.string_description import StringDescription from sklearn.externals import joblib from microcosm_sagem...
[ 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 4377, 11, 198, 220, 220, 220, 7343, 11, 198, 220, 220, 220, 337, 5912, 11, 198, 220, 220, 220, 32233, 11, 198,...
3.229167
288
import os import json from pprint import pprint from agldwg_ruleset import AGLDWG_ValidRuleSet # marshalling function # add in array of results if __name__ == "__main__": # Test driver test = TestAGLDWG_Ruleset() failed = False for result in test.result: if not result.passed: ...
[ 11748, 28686, 198, 11748, 33918, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 6738, 556, 335, 86, 70, 62, 38785, 316, 1330, 317, 8763, 42955, 38, 62, 47139, 31929, 7248, 628, 220, 220, 220, 1303, 22397, 9221, 2163, 198, 220, 220, 220, ...
2.140575
313
from unittest import TestCase, main from checking.annotations import * from checking.exceptions import * from checking.classes.basic_suite import TestSuite from checking.runner import start from checking.classes.listeners.basic import Listener from tests.fixture_behaviour_test import clear def f(): """Test"...
[ 6738, 555, 715, 395, 1330, 6208, 20448, 11, 1388, 198, 198, 6738, 10627, 13, 34574, 602, 1330, 1635, 198, 6738, 10627, 13, 1069, 11755, 1330, 1635, 198, 6738, 10627, 13, 37724, 13, 35487, 62, 2385, 578, 1330, 6208, 5606, 578, 198, 673...
3.300885
113
if __name__ == '__main__': lst = list(map(float, input("Введите элементы списка: ").split())) res=0 print(lst) for i in lst: if lst.index(i) % 2 != 0: res += i print(f'1) {res:.2f}') idx=[i for i,j in enumerate(lst) if j<0] m = (sum(lst[idx[0]+1:idx[-1]])) print(f'2) {m:.2f}')
[ 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 300, 301, 796, 1351, 7, 8899, 7, 22468, 11, 5128, 7203, 140, 240, 38857, 16843, 43666, 18849, 20375, 16843, 220, 141, 235, 30143, 16843, 43108, 16843, 22177, ...
1.655556
180
#!/usr/bin/env python # Adapted from James O'Hare's excellent ffr_expandByMat.py code: # https://gist.github.com/Farfarer/c42ebd249602542a7369b4fd205f4fb5 import lx import lxu.command import lxifc import modo import traceback from debug import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 30019, 276, 422, 3700, 440, 6, 39, 533, 338, 6275, 277, 8310, 62, 11201, 392, 3886, 19044, 13, 9078, 2438, 25, 198, 2, 3740, 1378, 70, 396, 13, 12567, 13, 785, 14, 21428, ...
2.515152
99
#keyword context search and store for college news # Writes small files containing context passages for each issue in which the keyword is mentioned #import statements import re #regular expressions, checks if a string matches a regular expression import os #operating system, accesses its information import csv #prov...
[ 2, 2539, 4775, 4732, 2989, 290, 3650, 329, 4152, 1705, 198, 2, 12257, 274, 1402, 3696, 7268, 4732, 22674, 329, 1123, 2071, 287, 543, 262, 21179, 318, 4750, 198, 198, 2, 11748, 6299, 220, 198, 11748, 302, 1303, 16338, 14700, 11, 8794, ...
2.62679
1,187
import logging import sched import time from . import twt logger = logging.getLogger(__name__) followers = set()
[ 11748, 18931, 198, 11748, 6038, 198, 11748, 640, 198, 198, 6738, 764, 1330, 665, 83, 628, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 27780, 364, 796, 900, 3419, 628, 628 ]
3.076923
39
import sys import pdb # @param s, a string # @param dict, a set of string # @return a list of strings # main () if __name__ == "__main__": sys.exit(main()) # class Solution: # # # @param s, a string # # # @param dict, a set of string # # # @return a boolean # # def wordBreak(self, s, dict): # # ...
[ 11748, 25064, 198, 11748, 279, 9945, 628, 220, 220, 220, 1303, 2488, 17143, 264, 11, 257, 4731, 198, 220, 220, 220, 1303, 2488, 17143, 8633, 11, 257, 900, 286, 4731, 198, 220, 220, 220, 1303, 2488, 7783, 257, 1351, 286, 13042, 628, ...
1.928865
731
'''OpenGL extension SGIX.async_ This module customises the behaviour of the OpenGL.raw.GL.SGIX.async_ to provide a more Python-friendly API Overview (from the spec) This extension provides a framework for asynchronous OpenGL commands. It also provides commands allowing a program to wait for the completion of ...
[ 7061, 6, 11505, 8763, 7552, 26147, 10426, 13, 292, 13361, 62, 198, 198, 1212, 8265, 2183, 2696, 262, 9172, 286, 262, 220, 198, 11505, 8763, 13, 1831, 13, 8763, 13, 38475, 10426, 13, 292, 13361, 62, 284, 2148, 257, 517, 220, 198, 379...
3.949807
777
from dataclasses import dataclass import logging import urllib.parse import requests from avatar.vqa.oscar_api import OscarModel log = logging.getLogger(__name__) DIRECTION_TO_WORD = { "n": "north", "e": "east", "w": "west", "s": "south" } @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 11748, 18931, 198, 11748, 2956, 297, 571, 13, 29572, 198, 198, 11748, 7007, 198, 6738, 30919, 13, 85, 20402, 13, 418, 7718, 62, 15042, 1330, 15694, 17633, 628, 198, 6404, 796, 18931, ...
2.468468
111
import logging from importlib import import_module
[ 11748, 18931, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 628 ]
4.727273
11
from collections import OrderedDict """ LRU cache implementation As the base the ordered dict data structure is used. ordered dict is build using HashTable and LinkedList and provides Get, Set, Delete operations at O(1) Runtime complexity Complexity analysis: Runtime O(1), for both get(key) and set(key, value) operat...
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 37811, 198, 35972, 52, 12940, 7822, 198, 1722, 262, 2779, 262, 6149, 8633, 1366, 4645, 318, 973, 13, 6149, 8633, 318, 1382, 1262, 21059, 10962, 290, 7502, 276, 8053, 198, 392, 3769, 3...
3.067265
223
import logging import os from lib.error.json_validate_error import JsonValidateError from lib.json_validator import JsonValidator from lib.utils.file_manager import FileManager base_path = os.path.dirname(os.path.abspath(__file__)) source_path = os.path.join(base_path, "source") output_path = os.path.join(base_path, ...
[ 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 9195, 13, 18224, 13, 17752, 62, 12102, 378, 62, 18224, 1330, 449, 1559, 7762, 20540, 12331, 198, 6738, 9195, 13, 17752, 62, 12102, 1352, 1330, 449, 1559, 47139, 1352, 198, 6738, 9195, 13,...
2.741304
460
import unittest import common4app import common if '__main__' == __name__: unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 2219, 19, 1324, 198, 11748, 2219, 198, 198, 361, 705, 834, 12417, 834, 6, 6624, 11593, 3672, 834, 25, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 22...
2.333333
45
import os import multiprocessing as mp from models.Client import Client from models.Company import Company from models.ATM import ATM from .utils import writeBatch, log clientHeaders = ['id'] companyHeaders = ['id'] #atmHeaders = ['id', 'latitude', 'longitude']
[ 11748, 28686, 198, 11748, 18540, 305, 919, 278, 355, 29034, 198, 6738, 4981, 13, 11792, 1330, 20985, 198, 6738, 4981, 13, 39154, 1330, 5834, 198, 6738, 4981, 13, 1404, 44, 1330, 30939, 198, 6738, 764, 26791, 1330, 3551, 33, 963, 11, 2...
3.371795
78
from django.shortcuts import render from django.views.generic import TemplateView from random import randint #Some values that will be used #in views #HTML text messageInHTML = " Stay at home " break_line = " </br> " p_begin = "<p>" p_end = "</p>" #number of times phrase will appear cicle_times = 10000 compare_numb...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 198, 198, 6738, 4738, 1330, 43720, 600, 198, 198, 2, 4366, 3815, 326, 481, 307, 973, 198, 2, 259, 5009, 198, 198, 2, ...
2.873706
483
#!/usr/bin/env python from gna.expression.index import * # # 0d index # nidx = NIndex(fromlist=[]) print('Test 0d index') for i, nit in enumerate(nidx): print(' iteration', i) print(' index: ', nit.current_format() or '<empty string>') print(' full name:', nit.current_format(name='var')) pr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 308, 2616, 13, 38011, 13, 9630, 1330, 1635, 198, 198, 2, 198, 2, 657, 67, 6376, 198, 2, 198, 77, 312, 87, 796, 399, 15732, 7, 6738, 4868, 41888, 12962, 198, 198, 4798, ...
2.309297
1,678
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
3.74812
266
# -*- coding: utf-8 -*- ''' CELERY_DEFAULT_QUEUE:默认队列 BROKER_URL = 'redis://root:123456@localhost:6379/7' BROKER_URL : 代理人的网址 CELERY_RESULT_BACKEND = 'redis://root:123456@localhost:6379/8' CELERY_RESULT_BACKEND:结果存储地址 ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 198, 7061, 6, 198, 34, 3698, 19664, 62, 7206, 38865, 62, 48, 8924, 8924, 171, 120, 248, 165, 119, 246, 164, 106, 97, 165, 246, 253, 26344, 245, 220, 220, 220, ...
1.254019
622
#!/usr/bin/python # -*-coding=utf-8 -*- import json import urllib import urllib.request #import urllib2 #import http if __name__ == "__main__": # 图片的URL image_url = "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2637851855,2992656155&fm=200&gp=0.jpg" # http服务的URL url = "http...
[ 198, 2, 48443, 14629, 14, 8800, 14, 29412, 220, 198, 2, 532, 9, 12, 66, 7656, 28, 40477, 12, 23, 532, 9, 12, 220, 198, 198, 11748, 33918, 220, 198, 11748, 2956, 297, 571, 220, 198, 11748, 2956, 297, 571, 13, 25927, 198, 2, 11748...
1.899038
208
import logging from iptv_proxy.providers.coolasice.constants import CoolAsIceConstants from iptv_proxy.providers.iptv_provider.validations import ProviderValidations logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 198, 6738, 1312, 457, 85, 62, 36436, 13, 15234, 4157, 13, 24494, 292, 501, 13, 9979, 1187, 1330, 15226, 1722, 23709, 34184, 1187, 198, 6738, 1312, 457, 85, 62, 36436, 13, 15234, 4157, 13, 10257, 85, 62, 15234, 1304,...
3.169231
65
from lookup import * if __name__ == "__main__": # Setup Assets assets = Assets() assets.create_tables() # import users assets.update_users() # import jobs assets.update_jobs() assets.find_tag_match()
[ 6738, 35847, 1330, 1635, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1303, 31122, 41059, 198, 220, 220, 220, 6798, 796, 41059, 3419, 198, 220, 220, 220, 6798, 13, 17953, 62, 83, 2977, 3419, ...
2.629213
89
import argparse import cv2 import json import math import numpy as np # from pycocotools.coco import COCO # from pycocotools.cocoeval import COCOeval import torch # from datasets.coco import CocoValDataset from pose2d_models.with_mobilenet import PoseEstimationWithMobileNet from modules.keypoints import extract_keypo...
[ 11748, 1822, 29572, 198, 11748, 269, 85, 17, 198, 11748, 33918, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 2, 422, 12972, 66, 420, 313, 10141, 13, 66, 25634, 1330, 327, 4503, 46, 198, 2, 422, 12972, 66, 420, 313, 10...
3.059471
454
from libgen_api import Libgen from libgen_api.book import Book from datetime import datetime, timedelta book_cache = {} def retrive_cache_data(format: str, query: str) -> dict[int, Book]: """ Retrive the cached data for the query. """ date_now = datetime.now() # save the search results in the c...
[ 6738, 9195, 5235, 62, 15042, 1330, 7980, 5235, 198, 6738, 9195, 5235, 62, 15042, 13, 2070, 1330, 4897, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 628, 198, 2070, 62, 23870, 796, 23884, 628, 198, 4299, 1005, 11590, 62, ...
2.510417
384
from torch.nn import Module import torch.nn as nn from torchvision import models if __name__ == '__main__': pass
[ 6738, 28034, 13, 20471, 1330, 19937, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 10178, 1330, 4981, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1208 ]
3.162162
37
# This script requires the Meraki SDK, sys, copy, json import meraki import sys import copy import json # Treat your API key like a password. Store it in your environment variables as 'MERAKI_DASHBOARD_API_KEY' and let the SDK call it for you. # Or, call it manually after importing Python's os module: # API_KEY = os.g...
[ 2, 770, 4226, 4433, 262, 4638, 8182, 26144, 11, 25064, 11, 4866, 11, 33918, 198, 11748, 4017, 8182, 198, 11748, 25064, 198, 11748, 4866, 198, 11748, 33918, 198, 198, 2, 11217, 534, 7824, 1994, 588, 257, 9206, 13, 9363, 340, 287, 534, ...
3.855241
601
from pymongo import MongoClient import urllib from datetime import datetime import json import config from models import Event, EventEncoder import requests server = config.dbServer user = urllib.parse.quote_plus(config.dbUser) password = urllib.parse.quote_plus(config.dbPassword) uri = 'mongodb://{0}:{1}@{2}'.format...
[ 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 11748, 2956, 297, 571, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 33918, 198, 11748, 4566, 198, 6738, 4981, 1330, 8558, 11, 8558, 27195, 12342, 198, 11748, 7007, 628, 198, 15388, ...
1.995876
970
t = int(input()) for i in range(t): do_stuff()
[ 83, 796, 493, 7, 15414, 28955, 198, 198, 1640, 1312, 287, 2837, 7, 83, 2599, 198, 220, 220, 220, 466, 62, 41094, 3419 ]
2.217391
23
from unittest.mock import patch import tweepy from ..publishers.twitter import ( ERROR_LOG_MESSAGE_POST, TwitterPublisher, _repr_credentials, ) DUMMY_MESSAGE = 'message' DUMMY_EXCEPTION_MESSAGE = 'Oops' DUMMY_BAD_REQUEST_TEXT = 'This is bad' def test_push_to_api_wrong_credential_format(settings, cap...
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 11748, 4184, 538, 88, 198, 198, 6738, 11485, 12984, 8191, 82, 13, 6956, 1330, 357, 198, 220, 220, 220, 33854, 62, 25294, 62, 44, 1546, 4090, 8264, 62, 32782, 11, 198, 220, 22...
2.591153
746
# - Exercises2.py *- coding: utf-8 -*- """ Python has lists. The empty list is []. The following is a list of one item ["a"] and so is [3]. Here is a list with 3 items ["ball",3.14,-2]. Let's define a list, I'll call it lis and we'll do things with it to illustrate accessing items in a list. Execute the following cell ...
[ 2, 532, 1475, 2798, 2696, 17, 13, 9078, 1635, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 37906, 468, 8341, 13, 383, 6565, 1351, 318, 685, 4083, 383, 1708, 318, 257, 1351, 286, 530, 198, 9186, 14631, 64, 8973, ...
2.983278
4,844
import numpy as np x = np.arange(100).reshape(10, 10) np.save("dummy_output.npy", x)
[ 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 87, 796, 45941, 13, 283, 858, 7, 3064, 737, 3447, 1758, 7, 940, 11, 838, 8, 201, 198, 37659, 13, 21928, 7203, 67, 13513, 62, 22915, 13, 77, 9078, 1600, 2124, 8 ]
2.146341
41
#!/usr/bin/env python #encode=utf-8 #vim: tabstop=4 shiftwidth=4 softtabstop=4 #Created on 2013-8-17 #Copyright 2013 nuoqingyun xuqifeng import webob.dec import webob.exc from glance.api.glance_api import wsgi from glance import wsgi as base_wsgi from glance.utils import common
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 268, 8189, 28, 40477, 12, 23, 201, 198, 2, 31124, 25, 7400, 11338, 28, 19, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 201, 198, 201, 198, 2, 41972, 319, 2211, 12, 23...
2.396825
126
from .regularizer import * from .tdv import *
[ 198, 6738, 764, 16338, 7509, 1330, 1635, 198, 6738, 764, 8671, 85, 1330, 1635, 198 ]
3.133333
15
import sys import torch._C as _C from collections import OrderedDict import torch.sparse as sparse import torch.utils.hooks as hooks class Variable(_C._VariableBase): """Wraps a tensor and records the operations applied to it. Variable is a thin wrapper around a Tensor object, that also holds the gradien...
[ 11748, 25064, 198, 11748, 28034, 13557, 34, 355, 4808, 34, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 28034, 13, 82, 29572, 355, 29877, 198, 11748, 28034, 13, 26791, 13, 25480, 82, 355, 26569, 628, 198, 4871, 35748, 28264...
2.614347
3,039
""" 功能:52周存钱挑战 版本:V5.0 日期:2018/8/22 新增:记录每周存款数 """ import math import datetime if __name__ == '__main__': main()
[ 37811, 198, 220, 220, 220, 10263, 232, 253, 47797, 121, 171, 120, 248, 4309, 37772, 101, 27764, 246, 165, 240, 109, 162, 234, 239, 22755, 246, 198, 220, 220, 220, 13328, 231, 230, 17312, 105, 171, 120, 248, 53, 20, 13, 15, 198, 22...
1.159664
119
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-01-11 13:00 from __future__ import unicode_literals from django.db import migrations, models import django_prices.models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 20, 319, 2864, 12, 486, 12, 1157, 1511, 25, 405, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.787879
66
# Copyright 2021 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 agreed to in ...
[ 2, 220, 15069, 33448, 2297, 10983, 11, 3457, 13, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 137...
2.344467
5,449
#!/usr/bin/env python import rospy import tf import sys import numpy from nav_msgs.msg import Odometry from geometry_msgs.msg import PoseStamped, Point, Quaternion, PolygonStamped, PointStamped, Point32 from tf import transformations br = tf.TransformBroadcaster() p_map_odom1 = None q_map_odom1 = None if __name...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 686, 2777, 88, 198, 11748, 48700, 198, 11748, 25064, 198, 11748, 299, 32152, 198, 6738, 6812, 62, 907, 14542, 13, 19662, 1330, 10529, 15748, 198, 6738, 22939, 62, 907, 14542, 13, ...
2.272523
444
#!/usr/bin/python # -*- coding: UTF-8 -*- import getopt import os import sys import data import resnet if __name__ == "__main__": main(sys.argv[1:])
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 11748, 651, 8738, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 1366, 198, 11748, 581, 3262, 628, 198, 198, 361, 11593, ...
2.378788
66
word = input() # Change the next line print(word * 2)
[ 4775, 796, 5128, 3419, 198, 198, 2, 9794, 262, 1306, 1627, 198, 4798, 7, 4775, 1635, 362, 8, 198 ]
2.894737
19
# -*- coding: utf-8 -*- """Main entry point.""" __author__ = "Jose Bogarín Solano" __author_email__ = "jose@bogarin.co.cr" __contributors__ = ["Chris Lunsford <chrlunsf@cisco.com>"] __copyright__ = "Copyright (c) 2016-2018 Cisco and/or its affiliates." __license__ = "MIT" from pyramid.config import Conf...
[ 2, 220, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 13383, 5726, 966, 526, 15931, 201, 198, 201, 198, 201, 198, 834, 9800, 834, 796, 366, 23409, 21555, 283, 39588, 4294, 5733, 1, 201, 198, 834, 9800, 62...
2.477612
134
import os import re import json import hmac import discord import hashlib import aiohttp from aiohttp import web from dotenv import load_dotenv from api import TwitchAPI # from discord import Webhook, AsyncWebhookAdapter from discord.ext import commands, tasks load_dotenv() app = web.Application() routes = web.RouteTa...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 33918, 198, 11748, 289, 20285, 198, 11748, 36446, 198, 11748, 12234, 8019, 198, 11748, 257, 952, 4023, 198, 6738, 257, 952, 4023, 1330, 3992, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330...
2.928571
168
from flopy.pakbase import Package from flopy.utils import Util3d, Util2d import numpy as np import sys class Modflow88Bas(Package): """ Class to read modflow88 Basic package input. See modflow 88 documentation.... """ @staticmethod def load(f, model, ext_unit_dict=None): ...
[ 6738, 781, 11081, 13, 41091, 8692, 1330, 15717, 201, 198, 6738, 781, 11081, 13, 26791, 1330, 7273, 346, 18, 67, 11, 7273, 346, 17, 67, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 25064, 201, 198, 201, 198, 201, 198, 48...
1.735255
1,492
import cv2 import numpy as np class Trackbar: """ Attributes ---------- trackbars : object { trackbarName: [curPos, maxPos] } windowName : string name of the window Methods ------- startTrackbars Starts the HSV trackbars getTrackbarValues Updates ...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4871, 17762, 5657, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 49213, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 2610, 34046, 1058, 2134, 198, 220, 22...
2.563636
165
# services/resource/project/tests/test_config.py import os import unittest from flask import current_app from project import create_app if __name__ == '__main__': unittest.main()
[ 2, 2594, 14, 31092, 14, 16302, 14, 41989, 14, 9288, 62, 11250, 13, 9078, 628, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 198, 6738, 1628, 1330, 2251, 62, 1324, 628, 628, 198, 198,...
3
64
from typing import Optional, Tuple import matplotlib.pyplot as plt import seaborn as sns def histogram( data, column: str, figsize: Tuple[int, int] = (12, 5), title: Optional[str] = None, figure: Optional[plt.figure] = None, **kwargs, ): """ Plot a histogram of the values in the give...
[ 6738, 19720, 1330, 32233, 11, 309, 29291, 628, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 628, 198, 4299, 1554, 21857, 7, 198, 220, 220, 220, 1366, 11, 198, 220, 220, 220...
2.613105
641
#!/usr/bin/env python # -*- coding: utf-8 -*- r"""Provide the abstract task solver class from which all the other task solvers inherit from. A task solver accepts as inputs a task (or a stack of tasks) and an optimizer to use to solve the task. References: - [1] "OpenSoT: A whole-body control library for the comp...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 81, 37811, 15946, 485, 262, 12531, 4876, 1540, 332, 1398, 422, 543, 477, 262, 584, 4876, 1540, 690, 16955, 422, 13, 1...
2.552277
1,186
# Copyright 2020 The IREE Authors # # Licensed under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception """Test concat op.""" from absl import app from iree.tf.support import tf_test_utils from iree.tf.supp...
[ 2, 15069, 12131, 383, 314, 11587, 46665, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 410, 17, 13, 15, 351, 27140, 15996, 1475, 11755, 13, 198, 2, 4091, 3740, 1378, 297, 14761, 13, 2398, 14, 43, 2149, 24290, 13, 14116, 329, 5964, ...
2.959732
149
# -*- coding: utf-8 -*- """ Lucas Ou 2014 -- http://lucasou.com Setup guide: http://guide.python-distribute.org/creation.html python setup.py sdist bdist_wininst upload """ import sys import os try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 22946, 292, 42201, 1946, 1377, 2638, 1378, 75, 1229, 292, 280, 13, 785, 198, 198, 40786, 5698, 25, 2638, 1378, 41311, 13, 29412, 12, 17080, 4163, 13, 2398, ...
2.644776
335
# -*- coding: UTF-8 -*- """ anti-captcha.com service """ from .base import HTTPService from .._transport.http_transport import HTTPRequestJSON # type: ignore from .. import exceptions from .._captcha import CaptchaType from ..common import WorkerLanguage __all__ = [ 'Service', 'GetBalanceRequest', 'GetStatusRequ...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 37811, 198, 17096, 12, 27144, 11693, 13, 785, 2139, 198, 37811, 198, 198, 6738, 764, 8692, 1330, 38288, 712, 501, 198, 6738, 11485, 62, 7645, 634, 13, 4023, 62, 7645, 634, ...
2.176993
7,537
import asyncio import logging import signal import sys import asyncpg from website_monitor.config import KafkaConfig, PostgresConfig from website_monitor.database_writer import MetricsConsumer, save_metrics_to_db from website_monitor.database_writer.db import get_db_connection logging.basicConfig(stream=sys.stdout, ...
[ 11748, 30351, 952, 198, 11748, 18931, 198, 11748, 6737, 198, 11748, 25064, 198, 198, 11748, 30351, 6024, 198, 198, 6738, 3052, 62, 41143, 13, 11250, 1330, 46906, 16934, 11, 2947, 34239, 16934, 198, 6738, 3052, 62, 41143, 13, 48806, 62, ...
3.280303
132
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ 2, 15069, 1853, 3012, 3457, 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, 11846, 351, 262, 13789, ...
3.891892
259
"""Build definitions for Ruy.""" # 1. Enable -mfpu=neon unconditionally on ARM32. If it turns out that we need to support # ARM32 without NEON then we'll implement runtime detection and dispatch at that point. # 2. Explicitly pass -O3 on mobile configs where just "-c opt" means "optimize for code size". # We wou...
[ 37811, 15580, 17336, 329, 371, 4669, 526, 15931, 198, 198, 2, 352, 13, 27882, 532, 76, 69, 19944, 28, 710, 261, 31776, 8736, 319, 20359, 2624, 13, 1002, 340, 4962, 503, 326, 356, 761, 284, 1104, 198, 2, 220, 220, 220, 20359, 2624, ...
3.690583
223
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from .model_base import Model from .datatypes import StringType, IntType, FloatType, UniqueIdType from .datatypes import ForeignType, EnumType, ListType, BoolType, DatetimeType, HashType from . import binder
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 764, 19849, 62, 8692, 1330, 9104, 198, 6738, 764, 19608, 265, 9497, 1330, 10903, 6030, 11, 2558, 6030, ...
2.988372
86
""" Code is generated by ucloud-model, DO NOT EDIT IT. """ import typing from ucloud.core.client import Client from ucloud.services.uaccount.schemas import apis
[ 37811, 6127, 318, 7560, 416, 334, 17721, 12, 19849, 11, 8410, 5626, 48483, 7283, 13, 37227, 201, 198, 201, 198, 11748, 19720, 201, 198, 201, 198, 201, 198, 6738, 334, 17721, 13, 7295, 13, 16366, 1330, 20985, 201, 198, 6738, 334, 17721...
2.982759
58
# # Copyright (c) 2019, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
[ 2, 198, 2, 15069, 357, 66, 8, 13130, 11, 15127, 23929, 44680, 6234, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
2.085124
1,210
#!/usr/bin/env python import sys import numpy as np from frovedis.exrpc.server import FrovedisServer from frovedis.mllib.preprocessing import StandardScaler desc = "Test with_mean and with_std is None" # initializing the Frovedis server argvs = sys.argv argc = len(argvs) if (argc < 2): print ('Please give froved...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 8400, 1079, 271, 13, 1069, 81, 14751, 13, 15388, 1330, 9734, 1079, 271, 10697, 198, 6738, 8400, 1079, 271, 13, 76, 297...
2.504451
337
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from typing import Iterable from refinery.lib.frame import Chunk from refinery.units import Arg, Unit from refinery.lib.loader import load_pipeline class reduce(Unit): """ The reduce unit applies an arbitrary pipeline repeatedly to reduce the current ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 6738, 19720, 1330, 40806, 540, 201, 198, 6738, 44133, 13, 8019, 13, 14535, 1330, 609, 2954, 201, 198, 2...
3.060345
116
""" Author of the following code: https://github.com/falsedev """ from enum import Enum from typing import Callable, List, Optional, Type, Union from discord import ( CategoryChannel, Color, Embed, Emoji, Invite, Member, Message, PartialEmoji, Reaction, Role, TextChannel, ...
[ 37811, 198, 13838, 286, 262, 1708, 2438, 25, 198, 5450, 1378, 12567, 13, 785, 14, 69, 874, 276, 1990, 198, 37811, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 4889, 540, 11, 7343, 11, 32233, 11, 5994, 11, 4479, 198, 19...
2.590909
550
from django.contrib import admin class ArticleAdmin(admin.ModelAdmin): """Just some boilerplate code that is useful in child classes.""" readonly_fields = ('created', 'modified', 'status_changed') ordering = ['-start'] TIMESTAMP_FIELDSET = ('Timestamps', { 'description': 'When this record...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 4871, 10172, 46787, 7, 28482, 13, 17633, 46787, 2599, 198, 220, 220, 220, 37227, 5703, 617, 36741, 6816, 2438, 326, 318, 4465, 287, 1200, 6097, 526, 15931, 628, 220, 220, 220, ...
2.462738
577
# -*- coding: utf-8 -*- import tornado.web from callisto import get_logger from callisto.const import * from callisto.service.communicator import Action as CommuAction, CommunicationData as CommuData logger = get_logger(__name__) class DeviceInfoHandler(tornado.web.RequestHandler): """ Device に関する情報を返すためのサー...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33718, 13, 12384, 198, 198, 6738, 869, 396, 78, 1330, 651, 62, 6404, 1362, 198, 6738, 869, 396, 78, 13, 9979, 1330, 1635, 198, 6738, 869, 396, 78, 13, 15271, ...
2.578125
128
############################################################################### ## ## Copyright (C) 2011-2014 Tavendo GmbH ## ## 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 ## ## h...
[ 29113, 29113, 7804, 4242, 21017, 198, 2235, 198, 2235, 220, 15069, 357, 34, 8, 2813, 12, 4967, 41489, 31110, 402, 2022, 39, 198, 2235, 198, 2235, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341...
2.819918
2,199