content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from abc import ABC from pathlib import Path from typing import Any from dataclasses import dataclass from test_infra import consts from test_infra.utils.global_variables import GlobalVariables from .base_config import _BaseConfig global_variables = GlobalVariables()
[ 6738, 450, 66, 1330, 9738, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 4377, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 1332, 62, 10745, 430, 1330, 1500, 82, 198, 6738, 1332, 62, 10745, 4...
3.626667
75
# MemPool.py # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import logging from lib.serialize import uint256_to_shortstr
[ 2, 4942, 27201, 13, 9078, 198, 2, 198, 2, 4307, 6169, 739, 262, 17168, 14, 55, 1157, 3788, 5964, 11, 766, 262, 19249, 198, 2, 2393, 27975, 45761, 393, 2638, 1378, 2503, 13, 44813, 1668, 13, 2398, 14, 677, 4541, 14, 2781, 12, 43085...
3.283582
67
''' Created on Jun 13, 2019 @author: sarvi ''' from sly import Parser from .lexer import BashLexer if __name__ == '__main__': lexer = BashLexer() parser = BashParser() while True: try: text = input('Command:>') result = parser.parse(lexer.tokenize(text)) ...
[ 7061, 6, 198, 41972, 319, 7653, 1511, 11, 13130, 198, 198, 31, 9800, 25, 29008, 8903, 198, 7061, 6, 198, 198, 6738, 49822, 1330, 23042, 263, 198, 6738, 764, 2588, 263, 1330, 15743, 45117, 263, 628, 628, 628, 198, 361, 11593, 3672, 8...
2.16092
174
import datetime #avg pregnancy length is 281 days main()
[ 11748, 4818, 8079, 628, 198, 2, 615, 70, 10241, 4129, 318, 39882, 1528, 628, 198, 198, 12417, 3419 ]
3.388889
18
from django import forms from django.core.validators import MinValueValidator, MinLengthValidator
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 1855, 11395, 47139, 1352, 11, 1855, 24539, 47139, 1352, 198 ]
3.92
25
import bili_statistics from reqs.storm_raffle_handler import StormRaffleHandlerReq from tasks.utils import UtilsTask from .base_class import Forced, DontWait, Multi
[ 11748, 275, 2403, 62, 14269, 3969, 198, 6738, 43089, 82, 13, 12135, 62, 430, 487, 293, 62, 30281, 1330, 8865, 49, 30697, 25060, 3041, 80, 198, 6738, 8861, 13, 26791, 1330, 7273, 4487, 25714, 198, 6738, 764, 8692, 62, 4871, 1330, 40731...
3.387755
49
import theano import theano.tensor as T import treeano import treeano.nodes as tn fX = theano.config.floatX def GradNetOptimizerInterpolationNode(name, children, early, late, ...
[ 11748, 262, 5733, 198, 11748, 262, 5733, 13, 83, 22854, 355, 309, 198, 198, 11748, 5509, 5733, 198, 11748, 5509, 5733, 13, 77, 4147, 355, 256, 77, 198, 198, 69, 55, 796, 262, 5733, 13, 11250, 13, 22468, 55, 628, 628, 198, 4299, 17...
2.342314
631
import gzip #pragma: no cover import bz2 #pragma: no cover import lzma #pragma: no cover
[ 11748, 308, 13344, 220, 220, 1303, 1050, 363, 2611, 25, 645, 3002, 198, 11748, 275, 89, 17, 220, 220, 220, 1303, 1050, 363, 2611, 25, 645, 3002, 198, 11748, 300, 89, 2611, 220, 220, 1303, 1050, 363, 2611, 25, 645, 3002, 198 ]
2.285714
42
# -*- coding: utf-8 -*- import os CURCONF = TestConf
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 628, 628, 198, 34, 4261, 10943, 37, 796, 6208, 18546, 198 ]
2.071429
28
# -*- coding: utf-8 -*- import functools import httplib as http import markupsafe from django.core.paginator import Paginator from django.db.models import Q, QuerySet from framework.exceptions import HTTPError def get_or_http_error(Model, pk_or_query, allow_deleted=False, display_name=None): """Load an instance ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 1257, 310, 10141, 198, 11748, 1841, 489, 571, 355, 2638, 198, 198, 11748, 1317, 4739, 8635, 198, 6738, 42625, 14208, 13, 7295, 13, 79, 363, 20900, 1330, 31525, 20...
2.641908
1,279
# -*- coding: utf-8 -*- # # Copyright (c) 2016, deepsense.io # # 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 applicab...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 11, 2769, 33819, 13, 952, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, ...
3.387543
289
from adafruit_hid.keyboard import Keyboard from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS from adafruit_hid.keycode import Keycode import usb_hid import time
[ 6738, 512, 1878, 4872, 62, 49675, 13, 2539, 3526, 1330, 31973, 198, 6738, 512, 1878, 4872, 62, 49675, 13, 2539, 3526, 62, 39786, 62, 385, 1330, 31973, 32517, 2937, 198, 6738, 512, 1878, 4872, 62, 49675, 13, 2539, 8189, 1330, 7383, 818...
3.372549
51
from src.base.solution import Solution from src.tests.part2.q104_test_max_bi_tree_depth import MaxBiTreeDepthTestCases if __name__ == '__main__': sol = MaxBiTreeDepth() sol.run_tests()
[ 6738, 12351, 13, 8692, 13, 82, 2122, 1330, 28186, 198, 6738, 12351, 13, 41989, 13, 3911, 17, 13, 80, 13464, 62, 9288, 62, 9806, 62, 8482, 62, 21048, 62, 18053, 1330, 5436, 23286, 27660, 48791, 14402, 34, 1386, 628, 628, 198, 361, 11...
2.722222
72
from django.contrib import admin from . import models admin.site.register(models.Suppliers, SupplierAdmin) admin.site.register(models.InventoryUser, InventoryUserAdmin) admin.site.register(models.Product, ProductsAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 1330, 4981, 628, 198, 28482, 13, 15654, 13, 30238, 7, 27530, 13, 15979, 75, 3183, 11, 8105, 2505, 46787, 8, 198, 198, 28482, 13, 15654, 13, 30238, 7, 27530, 13, 818, 17...
3.446154
65
try: name = "" except: pass else: print na<ref>me
[ 28311, 25, 198, 220, 1438, 796, 13538, 198, 16341, 25, 198, 220, 1208, 198, 17772, 25, 198, 220, 3601, 12385, 27, 5420, 29, 1326 ]
2.291667
24
import requests
[ 198, 11748, 7007 ]
5.333333
3
# -*- coding: utf-8 -*- """ Description of example """ import pyqtgraph as pg from pyqtgraph.Qt import QtCore, QtGui, mkQApp import numpy as np app = mkQApp() # win.setWindowTitle('pyqtgraph example: ____') if __name__ == '__main__': pg.exec()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 11828, 286, 1672, 198, 37811, 198, 198, 11748, 12972, 80, 25297, 1470, 355, 23241, 198, 6738, 12972, 80, 25297, 1470, 13, 48, 83, 1330, 33734, 14055, 11, 337...
2.446602
103
''' 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 use this ...
[ 7061, 6, 198, 26656, 15385, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 273, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 17080, 6169, 351, 428, 670, 329, 3224, 1321, 198, 2301, 13493, 6634, 9238, ...
4.018957
211
# -*- encoding: utf-8 -*- import multiprocessing as mp import time from pudb.remote import set_trace def worker(worker_id): """ Simple worker process""" i = 0 while i < 10: if worker_id == 1: # debug process with id 1 set_trace(term_size=(80, 24)) time.sleep(1) # represents ...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 18540, 305, 919, 278, 355, 29034, 198, 11748, 640, 198, 6738, 279, 463, 65, 13, 47960, 1330, 900, 62, 40546, 628, 198, 4299, 8383, 7, 28816, 62, 312, 2599,...
2.260563
284
""" Test calling user defined functions using expression evaluation. This test checks that typesystem lookup works correctly for typedefs of untagged structures. Ticket: https://llvm.org/bugs/show_bug.cgi?id=26790 """ from __future__ import print_function import lldb from lldbsuite.test.decorators import * from lld...
[ 37811, 198, 14402, 4585, 2836, 5447, 5499, 1262, 5408, 12660, 13, 198, 1212, 1332, 8794, 326, 3858, 6781, 35847, 2499, 9380, 329, 25683, 891, 82, 286, 198, 2797, 14655, 8573, 13, 198, 198, 51, 9715, 25, 3740, 1378, 297, 14761, 13, 239...
3.279661
118
from PIL import Image, ImageEnhance user_account_name = "Thomas.Li26" if __name__ == "__main__": main()
[ 6738, 350, 4146, 1330, 7412, 11, 7412, 35476, 590, 201, 198, 201, 198, 7220, 62, 23317, 62, 3672, 796, 366, 22405, 13, 32304, 2075, 1, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, ...
2.416667
48
# Curbrock Summon 2 CURBROCK2 = 9400930 # MOD ID CURBROCKS_ESCAPE_ROUTE_VER2 = 600050040 # MAP ID CURBROCKS_ESCAPE_ROUTE_VER3 = 600050050 # MAP ID 2 sm.spawnMob(CURBROCK2, 190, -208, False) sm.createClock(1800) sm.addEvent(sm.invokeAfterDelay(1800000, "warp", CURBROCKS_ESCAPE_ROUTE_VER3, 0)) sm.waitForMobDeath(CURBRO...
[ 2, 4424, 7957, 694, 19515, 362, 198, 198, 34, 4261, 11473, 11290, 17, 796, 860, 7029, 45418, 1303, 19164, 4522, 198, 34, 4261, 11473, 11290, 50, 62, 1546, 33177, 36, 62, 49, 2606, 9328, 62, 5959, 17, 796, 39064, 4059, 1821, 1303, 34...
2.106145
179
""" Cancelling jobs on the University cluster forces programs to instantly quit, which sometimes crashes cluster nodes. As a remedy, this killswitch listener will stop the experiment in a nicer way to prevent this from happening. The experiment will be stopped if a file named "stop" is encountered i...
[ 37811, 198, 220, 220, 220, 43780, 2680, 3946, 319, 262, 2059, 13946, 3386, 4056, 284, 11101, 11238, 11, 198, 220, 220, 220, 220, 220, 220, 220, 543, 3360, 17616, 13946, 13760, 13, 198, 220, 220, 220, 1081, 257, 21210, 11, 428, 1494, ...
3.959677
124
from rest_framework import status from rest_framework.generics import ( RetrieveUpdateAPIView, CreateAPIView, RetrieveUpdateDestroyAPIView ) from rest_framework.permissions import AllowAny, IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView from ..authenticatio...
[ 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 8612, 873, 1330, 357, 198, 220, 220, 220, 4990, 30227, 10260, 2969, 3824, 769, 11, 13610, 2969, 3824, 769, 11, 198, 220, 220, 220, 4990, 30227, 10260, 49174, 2969, 382...
3.641975
162
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Implements a frozen dictionary-like object""" import collections import copy import common.memo as memo
[ 2, 15069, 1946, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 37811...
3.885714
70
__version__ = '5.0.2'
[ 834, 9641, 834, 796, 705, 20, 13, 15, 13, 17, 6, 198 ]
1.833333
12
from neurecon.reconstruction import reconstruct
[ 6738, 497, 495, 1102, 13, 260, 9979, 2762, 1330, 31081, 628, 198 ]
4.166667
12
# -*- coding: utf-8 -*- """Utilities common to CIFAR10 and CIFAR100 datasets. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys from six.moves import cPickle def load_batch(fpath, label_key='labels'): """Internal utility for parsing CIFAR ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 18274, 2410, 2219, 284, 327, 5064, 1503, 940, 290, 327, 5064, 1503, 3064, 40522, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 1...
2.193182
440
with open('day7/input.txt') as f: rules=dict([l.split(' contain') for l in f.read().replace(' bags', '').replace(' bag', '').replace('.', '').replace(' no other', '0 ').splitlines()]) for key in rules: rules[key]=[(d[2:].strip(), int(d[:2].strip())) for d in rules[key].split(', ')] print(getNumBags('shiny gold...
[ 198, 4480, 1280, 10786, 820, 22, 14, 15414, 13, 14116, 11537, 355, 277, 25, 198, 220, 220, 220, 3173, 28, 11600, 26933, 75, 13, 35312, 10786, 3994, 11537, 329, 300, 287, 277, 13, 961, 22446, 33491, 10786, 11668, 3256, 10148, 737, 3349...
2.647059
136
from core.advbase import * from slot.d import * if __name__ == '__main__': from core.simulate import test_with_argv test_with_argv(None, *sys.argv)
[ 6738, 4755, 13, 32225, 8692, 1330, 1635, 198, 6738, 10852, 13, 67, 1330, 1635, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 422, 4755, 13, 14323, 5039, 1330, 1332, 62, 4480, 62, 853, 85, 19...
2.557377
61
import hashlib from io import BytesIO import logging import os from typing import Any, cast, Dict, List, Optional, Sequence, Type, TYPE_CHECKING, Union from pkg_resources import parse_version import wandb from wandb import util from ._private import MEDIA_TMP from .base_types.media import BatchableMedia, Media from ....
[ 11748, 12234, 8019, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 11748, 18931, 198, 11748, 28686, 198, 6738, 19720, 1330, 4377, 11, 3350, 11, 360, 713, 11, 7343, 11, 32233, 11, 45835, 11, 5994, 11, 41876, 62, 50084, 2751, 11, 4479, ...
2.300573
1,221
import datetime # Gets time from milliseconds # Returns string formatted as HH:MM:SS:mmm, MM:SS:mmm or S:mmm, depending on the time. # Returns a string formatted as YYYY-MM-DD
[ 11748, 4818, 8079, 198, 198, 2, 29620, 640, 422, 38694, 198, 2, 16409, 4731, 39559, 355, 47138, 25, 12038, 25, 5432, 25, 27532, 11, 20806, 25, 5432, 25, 27532, 393, 311, 25, 27532, 11, 6906, 319, 262, 640, 13, 220, 198, 198, 2, 16...
3.236364
55
#!/usr/bin/env python """Pi digits example Example shows arbitrary precision using mpmath with the computation of the digits of pi. """ from mpmath import libmp, pi from mpmath import functions as mpf_funs import math from time import clock import sys def display_fraction(digits, skip=0, colwidth=10, columns=5): ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 38729, 19561, 1672, 198, 198, 16281, 2523, 14977, 15440, 1262, 285, 4426, 776, 351, 262, 198, 785, 1996, 341, 286, 262, 19561, 286, 31028, 13, 198, 37811, 198, 198, 6738, 2...
2.407965
1,130
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-03-13 00:16 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import mailauth.models import uuid
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1157, 319, 2864, 12, 3070, 12, 1485, 3571, 25, 1433, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198,...
2.965517
87
# Copyright 2013 IBM Corp. # # 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 wri...
[ 2, 15069, 2211, 19764, 11421, 13, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 1...
2.385744
954
import SimpleXMLRPCServer import sys import logging from K8055Controller import K8055Controller logging.basicConfig() controller_log = logging.getLogger("Controller") controller = Controller() server = SimpleXMLRPCServer.SimpleXMLRPCServer(("d6349.mysql.zone.ee", 7000)) server.register_instance(controller) ...
[ 11748, 17427, 55, 5805, 49, 5662, 10697, 198, 11748, 25064, 198, 198, 11748, 18931, 198, 6738, 509, 1795, 2816, 22130, 1330, 509, 1795, 2816, 22130, 198, 198, 6404, 2667, 13, 35487, 16934, 3419, 198, 198, 36500, 62, 6404, 796, 18931, 13...
3.109091
110
from .crnn import CRNN from .crnn import CRNN_Attention
[ 6738, 764, 6098, 20471, 1330, 8740, 6144, 198, 6738, 764, 6098, 20471, 1330, 8740, 6144, 62, 8086, 1463 ]
3.055556
18
import nltk import re import sys from sys import argv from nltk.sentiment.vader import SentimentIntensityAnalyzer
[ 11748, 299, 2528, 74, 198, 11748, 302, 198, 11748, 25064, 198, 6738, 25064, 1330, 1822, 85, 198, 6738, 299, 2528, 74, 13, 34086, 3681, 13, 85, 5067, 1330, 11352, 3681, 5317, 6377, 37702, 9107, 198 ]
3.257143
35
# vim: set filetype=python ts=4 sw=4 # -*- coding: utf-8 -*- """This module retrieves AWS credentials after authenticating with Okta.""" from __future__ import absolute_import, division, print_function, unicode_literals import logging from future import standard_library from tokendito import aws_helpers from tokendit...
[ 2, 43907, 25, 900, 2393, 4906, 28, 29412, 40379, 28, 19, 1509, 28, 19, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 1212, 8265, 13236, 1158, 30865, 18031, 706, 8323, 12364, 351, 6762, 8326, 526, 15931, ...
2.97996
499
from . import rest from . import helpers
[ 6738, 764, 1330, 1334, 198, 6738, 764, 220, 1330, 49385, 198 ]
3.818182
11
import io import codecs import tarfile import re import gzip import xml.etree.ElementTree as ET from fnmatch import fnmatch from pathlib import Path from typing import NamedTuple import ir_datasets from ir_datasets.indices import PickleLz4FullStore from .base import GenericDoc, GenericQuery, GenericScoredDoc, BaseDocs,...
[ 11748, 33245, 198, 11748, 40481, 82, 198, 11748, 13422, 7753, 198, 11748, 302, 198, 11748, 308, 13344, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 6738, 24714, 15699, 1330, 24714, 15699, 198, 6738, 3108, 8019, 1330...
2.822314
242
#!/usr/bin/env python # -*- coding: utf-8 -*- from .utils import download_from_yaml def download(output_dir: str, snippet_only: bool, ignore_cache: bool = False) -> None: """Downloads data files from list of URLs (default: download.yaml) into data directory (default: data/). Args: output_dir: A str...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 6738, 764, 26791, 1330, 4321, 62, 6738, 62, 88, 43695, 628, 198, 4299, 4321, 7, 22915, 62, 15908, 25, 965, 11, ...
2.364146
357
#!/usr/bin/python # (c) 2020, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' na_ontap_autosupport_invoke ''' from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 's...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 357, 66, 8, 12131, 11, 3433, 4677, 11, 3457, 198, 2, 22961, 3611, 5094, 13789, 410, 18, 13, 15, 10, 357, 3826, 27975, 45761, 393, 3740, 1378, 2503, 13, 41791, 13, 2398, 14, 677, ...
2.685254
807
from freight.api.serializer import serialize from freight.testutils import TestCase
[ 6738, 30724, 13, 15042, 13, 46911, 7509, 1330, 11389, 1096, 198, 6738, 30724, 13, 9288, 26791, 1330, 6208, 20448, 628 ]
4.25
20
import sys import numpy as np from matplotlib import pyplot as pl from rw import WriteGTiff fn = '../pozo-steep-vegetated-pcl.npy' pts = np.load(fn) x, y, z, c = pts[:, 0], pts[:, 1], pts[:, 2], pts[:, 5] ix = (0.2 * (x - x.min())).astype('int') iy = (0.2 * (y - y.min())).astype('int') shape = (100, 100) xb = np.aran...
[ 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 198, 6738, 374, 86, 1330, 19430, 19555, 733, 198, 198, 22184, 796, 705, 40720, 7501, 10872, 12, 4169, 538, 12, 303, 1136, 515,...
1.791257
915
# comtypes._meta helper module from ctypes import POINTER, c_void_p, cast import comtypes ################################################################ # metaclass for CoClass (in comtypes/__init__.py) # # The mro() of a POINTER(App) type, where class App is a subclass of CoClass: # # POINTER(App) # ...
[ 2, 401, 19199, 13557, 28961, 31904, 8265, 201, 198, 6738, 269, 19199, 1330, 19922, 41358, 11, 269, 62, 19382, 62, 79, 11, 3350, 201, 198, 11748, 401, 19199, 201, 198, 201, 198, 29113, 29113, 201, 198, 2, 1138, 330, 31172, 329, 1766, ...
2.659218
179
################################################################################ ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser General Public ## License as published by the Free Software Foundation; either ## version 2.1 of the License, or (at your op...
[ 29113, 29113, 14468, 198, 2235, 198, 2235, 770, 5888, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 198, 2235, 13096, 340, 739, 262, 2846, 286, 262, 22961, 12892, 263, 3611, 5094, 198, 2235, 13789, 355, 3199, 416, 262...
4.012255
408
#!/usr/bin/env python ############################################################################ # # Copyright (C) 2016 The Qt Company Ltd. # Contact: https://www.qt.io/licensing/ # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 29113, 29113, 7804, 4242, 198, 2, 198, 2, 15069, 357, 34, 8, 1584, 383, 33734, 5834, 12052, 13, 198, 2, 14039, 25, 3740, 1378, 2503, 13, 39568, 13, 952, 14, 677, 26426, 14, 19...
4.222581
310
#!/usr/bin/env python3 # Copyright 2004-present Facebook. All Rights Reserved. import json import os import torch model_params_subdir = "ModelParameters" optimizer_params_subdir = "OptimizerParameters" latent_codes_subdir = "LatentCodes" logs_filename = "Logs.pth" reconstructions_subdir = "Reconstructions" reconstruc...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 5472, 12, 25579, 3203, 13, 1439, 6923, 33876, 13, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 28034, 198, 198, 19849, 62, 37266, 62, 7266, 15908, 796, 366, 176...
2.889273
289
from EmoPy.src.fermodel import FERModel from EmoPy.src.directory_data_loader import DirectoryDataLoader from EmoPy.src.csv_data_loader import CSVDataLoader from EmoPy.src.data_generator import DataGenerator from EmoPy.src.neuralnets import ConvolutionalNNDropout from sklearn.model_selection import train_test_split impo...
[ 6738, 2295, 78, 20519, 13, 10677, 13, 2232, 19849, 1330, 376, 1137, 17633, 198, 6738, 2295, 78, 20519, 13, 10677, 13, 34945, 62, 7890, 62, 29356, 1330, 27387, 6601, 17401, 198, 6738, 2295, 78, 20519, 13, 10677, 13, 40664, 62, 7890, 62...
2.998092
524
from jinja2 import nodes from jinja2.ext import Extension
[ 6738, 474, 259, 6592, 17, 1330, 13760, 198, 6738, 474, 259, 6592, 17, 13, 2302, 1330, 27995, 198 ]
3.222222
18
#!/usr/bin/env python3 ################################################################################ # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"),...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 29113, 29113, 14468, 198, 2, 15069, 357, 66, 8, 12131, 11, 15127, 23929, 44680, 6234, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286,...
3.028331
2,259
# # Copyright (c) 2015-2019 Thierry Florac <tflorac AT ulthar.net> # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRAN...
[ 2, 198, 2, 15069, 357, 66, 8, 1853, 12, 23344, 536, 959, 563, 4432, 330, 1279, 83, 2704, 273, 330, 5161, 14856, 400, 283, 13, 3262, 29, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 770, 3788, 318, 2426, 284, 262, 8617, 286, ...
2.992509
267
import os import pytest import torch from hivemind import RemoteExpert from hivemind.moe.server import background_server CUSTOM_EXPERTS_PATH = os.path.join(os.path.dirname(__file__), "test_utils", "custom_networks.py")
[ 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 11748, 28034, 198, 198, 6738, 35881, 10155, 1330, 21520, 3109, 11766, 198, 6738, 35881, 10155, 13, 76, 2577, 13, 15388, 1330, 4469, 62, 15388, 198, 198, 34, 7759, 2662, 62, 6369, 18973, 4...
2.947368
76
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "Ringo" ''' () : https://www.shinnytech.com/blog/momentum-strategy/ : , / ''' from tqsdk import TqAccount, TqApi, TargetPosTask # ,NK SYMBOL = "SHFE.au1912" N = 15 api = TqApi() klines = api.get_kline_serial(SYMBOL, 60*60*24, N) quote = api.get_quote(SYM...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 220, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 366, 49, 32735, 1, 198, 198, 7061, 6, 198, 220, 7499, 198, 25, 3740, 1378, 2503, 13, 1477...
1.923715
603
# import the necessary packages import numpy as np import cv2 import imutils def color_transfer(source, target, clip=True, preserve_paper=True): """ Transfers the color distribution from the source to the target image using the mean and standard deviations of the L*a*b* color space. This implemen...
[ 2, 1330, 262, 3306, 10392, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 545, 26791, 628, 198, 4299, 3124, 62, 39437, 7, 10459, 11, 2496, 11, 10651, 28, 17821, 11, 12201, 62, 20189, 28, 17821, 2599, 198, 2...
2.534161
4,025
from Library.CreateATree import CreateATree tree = CreateATree.BinarySearchTree() nodesList = list((4, 5, 1, 3, 2)) for i in range(0, len(nodesList)): tree.insert(nodesList[i]) #tree.printInorder() tree.printPreorder() #tree.printPostorder()
[ 6738, 10074, 13, 16447, 1404, 631, 1330, 13610, 1404, 631, 198, 198, 21048, 796, 13610, 1404, 631, 13, 33, 3219, 18243, 27660, 3419, 198, 77, 4147, 8053, 796, 1351, 19510, 19, 11, 642, 11, 352, 11, 513, 11, 362, 4008, 198, 198, 1640...
2.631579
95
# # VAZ Projects # # # Author: Marcelo Tellier Sartori Vaz <marcelotsvaz@gmail.com> from django.urls import path from . import views app_name = 'siteApp' urlpatterns = [ path( '', views.Home.as_view(), name = 'home' ), path( 'about-me', views.About_me.as_view(), name = 'about_me' ), path( 'searc...
[ 2, 220, 198, 2, 13753, 57, 29898, 198, 2, 220, 198, 2, 220, 198, 2, 6434, 25, 36547, 78, 14026, 959, 311, 433, 10145, 569, 1031, 1279, 3876, 5276, 1747, 85, 1031, 31, 14816, 13, 785, 29, 628, 198, 198, 6738, 42625, 14208, 13, 63...
2.25974
231
''' @author Tom Keske @since 10.8.2019 ''' import sys from jnius import autoclass from Conf.Conf import *
[ 7061, 6, 198, 31, 9800, 4186, 40679, 365, 198, 31, 20777, 838, 13, 23, 13, 23344, 198, 7061, 6, 198, 198, 11748, 25064, 198, 6738, 474, 77, 3754, 1330, 1960, 420, 31172, 198, 6738, 7326, 13, 18546, 1330, 1635 ]
2.717949
39
# api/queue/__init__.py import os from flask import Flask from flask_bootstrap import Bootstrap # instantiate the extensions bootstrap = Bootstrap()
[ 2, 40391, 14, 36560, 14, 834, 15003, 834, 13, 9078, 628, 198, 11748, 28686, 198, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 18769, 26418, 1330, 18892, 26418, 198, 198, 2, 9113, 9386, 262, 18366, 198, 18769, 26418, 796, 18892, ...
3.5
44
import adblock import pytest SMALL_FILTER_LIST = """ ||wikipedia.org^ ||old.reddit.com^ ||lobste.rs^ """
[ 11748, 512, 9967, 198, 11748, 12972, 9288, 198, 198, 12310, 7036, 62, 46700, 5781, 62, 45849, 796, 37227, 198, 15886, 31266, 13, 2398, 61, 198, 15886, 727, 13, 10748, 13, 785, 61, 198, 15886, 75, 672, 4169, 13, 3808, 61, 198, 37811, ...
2.466667
45
from rest_framework.routers import SimpleRouter from .views.upgrade_notice import UpgradeNoticeViewSet router = SimpleRouter(trailing_slash=False) router.register('upgrade_notice', UpgradeNoticeViewSet, basename='upgrade_notice')
[ 6738, 1334, 62, 30604, 13, 472, 1010, 1330, 17427, 49, 39605, 198, 198, 6738, 764, 33571, 13, 929, 9526, 62, 42138, 1330, 24236, 26396, 7680, 7248, 198, 198, 472, 353, 796, 17427, 49, 39605, 7, 9535, 4386, 62, 6649, 1077, 28, 25101, ...
3.411765
68
''' Largest rectangle area in a histogram:: Find the largest rectangular area possible in a given histogram where the largest rectangle can be made of a number of contiguous bars. For simplicity, assume that all bars have same width and the width is 1 unit. ''' hist = [4, 7, 1, 8, 4, 9, 5] print("Maximum area is", ...
[ 7061, 6, 198, 43, 853, 395, 35991, 1989, 287, 257, 1554, 21857, 3712, 198, 16742, 262, 4387, 36954, 1989, 1744, 287, 257, 1813, 1554, 21857, 810, 262, 4387, 35991, 460, 307, 925, 286, 257, 1271, 286, 48627, 9210, 13, 220, 198, 1890, ...
3.421569
102
# -*- coding: utf-8 -*- """ pbkdf2_ctypes ~~~~~~ Fast pbkdf2. This module implements pbkdf2 for Python using crypto lib from openssl or commoncrypto. Note: This module is intended as a plugin replacement of pbkdf2.py by Armin Ronacher. Git repository: $ git clone https://github.c...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 279, 65, 74, 7568, 17, 62, 310, 9497, 198, 220, 220, 220, 220, 8728, 4907, 628, 220, 220, 220, 12549, 279, 65, 74, 7568, 17, 13, 628, 22...
1.77995
3,172
import sys import os import psycopg2 import base64 from cryptography.hazmat.primitives import serialization, hashes from cryptography.hazmat.primitives.asymmetric import padding, rsa from cryptography.hazmat.backends import default_backend import time if len(sys.argv) < 2: print("Please enter either create or rem...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 17331, 22163, 70, 17, 198, 11748, 2779, 2414, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 19795, 20288, 1330, 11389, 1634, 11, 46621, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 19795, 20288, 13,...
2.275238
1,050
# Copyright David Abrahams 2004. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt) from b2.build import type register ()
[ 2, 15069, 3271, 16660, 82, 5472, 13, 4307, 6169, 739, 262, 19835, 198, 2, 10442, 13789, 11, 10628, 352, 13, 15, 13, 357, 6214, 19249, 198, 2, 2393, 38559, 24290, 13, 14116, 393, 4866, 379, 3740, 1378, 2503, 13, 19881, 8094, 13, 5431...
3.264706
68
"""Tests for square-free decomposition algorithms and related tools. """ from sympy.polys.rings import ring from sympy.polys.domains import FF, ZZ, QQ from sympy.polys.polyclasses import DMP from sympy.polys.specialpolys import f_polys from sympy.utilities.pytest import raises f_0, f_1, f_2, f_3, f_4, f_5, f_6 = f_p...
[ 37811, 51, 3558, 329, 6616, 12, 5787, 26969, 9150, 16113, 290, 3519, 4899, 13, 37227, 198, 198, 6738, 10558, 88, 13, 35428, 82, 13, 33173, 1330, 5858, 198, 6738, 10558, 88, 13, 35428, 82, 13, 3438, 1299, 1330, 18402, 11, 1168, 57, 1...
2.653226
124
import enum from typing import Union enum_types = Union[PPT, WORD, XL]
[ 11748, 33829, 198, 6738, 19720, 1330, 4479, 628, 628, 198, 198, 44709, 62, 19199, 796, 4479, 58, 10246, 51, 11, 370, 12532, 11, 16276, 60, 198 ]
2.923077
26
# Generated by Django 4.0.1 on 2022-01-19 23:58 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 604, 13, 15, 13, 16, 319, 33160, 12, 486, 12, 1129, 2242, 25, 3365, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import panel as pn import param from awesome_panel_extensions.frameworks.fast import FastTemplate, FastTextInput WIDGETS = { "some_text": {"type": FastTextInput, "readonly": True, "sizing_mode": "fixed", "width": 400} } parameterized_app = ParameterizedApp() paremeterized_template = FastTemplate(main=[paramete...
[ 11748, 6103, 355, 279, 77, 198, 11748, 5772, 198, 198, 6738, 7427, 62, 35330, 62, 2302, 5736, 13, 19298, 19653, 13, 7217, 1330, 12549, 30800, 11, 12549, 8206, 20560, 198, 198, 54, 2389, 18851, 50, 796, 1391, 198, 220, 220, 220, 366, ...
3.040984
122
# -*- coding: utf-8 -*- import pymysql import sys, os, json, time, pymongo app_dir = os.path.abspath("../") sys.path.append(app_dir) from gjqyxyxxcxxt import settings from gjqyxyxxcxxt.database.my_redis import QueueRedis conn = None if __name__ == '__main__': main()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 279, 4948, 893, 13976, 198, 11748, 25064, 11, 28686, 11, 33918, 11, 640, 11, 279, 4948, 25162, 198, 1324, 62, 15908, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7...
2.322034
118
#main_section > lines > line > text #main_section > lines > line > sub_line > text #main_section > sub_sections #main_section > templates > type #main_section > templates > empty_values #main_section > templates > values #main_section > templates > sub_templates #main_section > title > line > text from transformers.mod...
[ 2, 12417, 62, 5458, 1875, 3951, 1875, 1627, 1875, 2420, 198, 2, 12417, 62, 5458, 1875, 3951, 1875, 1627, 1875, 850, 62, 1370, 1875, 2420, 198, 2, 12417, 62, 5458, 1875, 850, 62, 23946, 198, 2, 12417, 62, 5458, 1875, 24019, 1875, 209...
2.318668
26,435
# Importing section import json import requests import argparse import hashlib import time from http import HTTPStatus # Main if __name__ == "__main__": arg_parser = argparse.ArgumentParser() args = arg_parser.parse_args() set_cmd = 'updateSla' params = { 'idx': 'sla04', ...
[ 2, 17267, 278, 2665, 198, 11748, 33918, 198, 11748, 7007, 198, 11748, 1822, 29572, 198, 11748, 12234, 8019, 198, 11748, 640, 198, 198, 6738, 2638, 1330, 14626, 19580, 198, 198, 2, 220, 8774, 198, 361, 11593, 3672, 834, 6624, 366, 834, ...
2.326484
438
if __name__ == "__main__": arr = [-1, 2, -3, 4, 5, 6, -7, 8, 9] sort(arr) print(arr)
[ 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 5240, 796, 25915, 16, 11, 362, 11, 532, 18, 11, 604, 11, 642, 11, 718, 11, 532, 22, 11, 807, 11, 860, 60, 198, 220, 220, 220, 3297, 7, 3258...
1.767857
56
import json wiki19_anchor_sents_file = 'd:/data/res/wiki/anchor/enwiki-20190101-anchor-sents.txt' anchor_sent_texts_file = 'd:/data/res/wiki/anchor/enwiki-20190101-anchor-sents-tok-texts.txt' # __text_from_anchor_sents_file(wiki19_anchor_sents_file, anchor_sent_texts_file) part_pos_tag_files = [f'd:/data/res/wiki/...
[ 11748, 33918, 628, 628, 198, 15466, 1129, 62, 3702, 273, 62, 82, 658, 62, 7753, 796, 705, 67, 14079, 7890, 14, 411, 14, 15466, 14, 3702, 273, 14, 268, 15466, 12, 23344, 486, 486, 12, 3702, 273, 12, 82, 658, 13, 14116, 6, 198, 37...
2.215768
241
""" Test harness for smp.py """ import sys import os sys.path.append('/Users/ptendick/open-source-workspace/cannr Image/source/cannr/lib') os.environ['PATH'] = '/Library/Frameworks/Python.framework/Versions/3.7/bin:' + os.environ['PATH'] import cannr import smp # Test openProcess by opening a Flask process # Test op...
[ 37811, 198, 14402, 19356, 329, 895, 79, 13, 9078, 198, 37811, 198, 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 33295, 10786, 14, 14490, 14, 457, 437, 624, 14, 9654, 12, 10459, 12, 5225, 10223, 14, 66, 1236, 81, 7412, ...
3.024
125
import tensorflow as tf import tensorflow.contrib.slim as slim import tensorflow.contrib.slim.python.slim.nets.resnet_v1 as resnet_v1 import tensorflow.contrib.slim.python.slim.nets.inception_v1 as inception_v1 import tensorflow.contrib.slim.python.slim.nets.resnet_utils as slim_utils from tensorflow.contrib import l...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 13, 3642, 822, 13, 82, 2475, 355, 18862, 198, 11748, 11192, 273, 11125, 13, 3642, 822, 13, 82, 2475, 13, 29412, 13, 82, 2475, 13, 45938, 13, 411, 3262, 62, 85, 16,...
2.46777
1,148
""" Checkpoint Saver Track top-n training checkpoints and maintain recovery checkpoints on specified intervals. Hacked together by / Copyright 2020 Ross Wightman """ import glob import operator import os import logging import torch from .model import unwrap_model, get_state_dict _logger = logging.getLogger(__nam...
[ 37811, 6822, 4122, 311, 8770, 198, 198, 24802, 1353, 12, 77, 3047, 36628, 290, 5529, 7628, 36628, 319, 7368, 20016, 13, 198, 198, 39, 6021, 1978, 416, 1220, 15069, 12131, 9847, 370, 432, 805, 198, 37811, 198, 198, 11748, 15095, 198, 1...
3.790698
86
# AGC004a if __name__ == '__main__': main()
[ 2, 13077, 34, 22914, 64, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.083333
24
# Copyright 2012 OpenStack Foundation # 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 requ...
[ 2, 15069, 2321, 4946, 25896, 5693, 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, ...
3.466165
266
# Copyright 2016 Quora, 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 writing, so...
[ 2, 15069, 1584, 2264, 5799, 11, 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, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, ...
2.613917
4,297
""" The Galaxy web application framework """ from .framework import url_for from .framework.base import httpexceptions from .framework.decorators import ( do_not_cache, error, expose, expose_api, expose_api_anonymous, expose_api_anonymous_and_sessionless, expose_api_raw, expose_api_raw_...
[ 37811, 198, 464, 9252, 3992, 3586, 9355, 198, 37811, 198, 198, 6738, 764, 30604, 1330, 19016, 62, 1640, 198, 6738, 764, 30604, 13, 8692, 1330, 1841, 24900, 11755, 198, 6738, 764, 30604, 13, 12501, 273, 2024, 1330, 357, 198, 220, 220, ...
2.382796
465
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from abc import ABCMeta, abstractmethod from pathlib import Path from textwrap import dedent from typing import ClassVar, Iterable, List, Optional, Tuple, Type from pants.core.goals.check...
[ 2, 15069, 12131, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 1253...
2.440516
1,782
import os import random from typing import Any, Dict, List, Union import numpy as np import torch from colorama import Fore, Style from sklearn.metrics import f1_score from sklearn.metrics import precision_recall_fscore_support as score from sklearn.metrics import precision_score, recall_score def get_partial...
[ 11748, 28686, 198, 11748, 4738, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 3124, 1689, 1330, 4558, 11, 17738, 198, 6738, 1341, 35720, 13, 4164, ...
2.458188
2,296
# Copyright (C) 2018 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 or agreed to in writing, ...
[ 2, 15069, 357, 34, 8, 2864, 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, 2845, 287, 11846, 351, 262, 13789, 13, 198, ...
3.905882
425
# Copyright (c) 2010-2012 OpenStack Foundation # # 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 agree...
[ 2, 15069, 357, 66, 8, 3050, 12, 6999, 4946, 25896, 5693, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789...
2.445468
2,063
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension """ import torch.nn as n...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 198, ...
3.594118
170
# coding=utf8 ''' Created on 29 Oct 2013 @author: Nicolas Poirey ''' from Worker import Worker from Phase import Phase
[ 2, 19617, 28, 40477, 23, 198, 7061, 6, 198, 41972, 319, 2808, 2556, 2211, 198, 198, 31, 9800, 25, 29737, 7695, 557, 88, 198, 7061, 6, 198, 6738, 35412, 1330, 35412, 198, 6738, 18983, 1330, 18983, 198 ]
3.243243
37
from binascii import hexlify from functools import wraps from logging import error from os import urandom from random import randint from flask import make_response from flask import render_template from werkzeug.exceptions import BadRequest from werkzeug.exceptions import Forbidden from werkzeug.exceptions import Gon...
[ 6738, 9874, 292, 979, 72, 1330, 17910, 75, 1958, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 18931, 1330, 4049, 198, 6738, 28686, 1330, 2956, 3749, 198, 6738, 4738, 1330, 43720, 600, 198, 198, 6738, 42903, 1330, 787, 62, 26209,...
3.695652
161
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # -------------------------------------------------------------------------- from enum import IntEnum from .. import utils __all__ = ["EventTypes", "create_event"] logger = utils.ge...
[ 2, 16529, 45537, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 16529, 35937, 198, 6738, 33829, 1330, 2558, 4834, 388, 198, 198, 6738, 11485, 1330, 3384, 4487, 198, 198, 834, 439, 834, 796, 14631, 9237, 3...
2.75803
467
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'chromium_code': 1, }, 'includes': [ '../build/win_precompile.gypi', 'base.gypi', ], 'targets': [ { 'tar...
[ 2, 15069, 357, 66, 8, 2321, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 1...
1.811414
32,643
""" PROBLEM A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 99. Find the largest palindrome made from the product of two 3-digit numbers. ANSWER: 906609 Solve time ~ 0.760 seconds """ from itertools import product import unittest from...
[ 37811, 198, 4805, 9864, 2538, 44, 198, 198, 32, 6340, 521, 398, 291, 1271, 9743, 262, 976, 1111, 2842, 13, 383, 4387, 6340, 521, 5998, 925, 422, 262, 1720, 286, 734, 362, 12, 27003, 3146, 198, 271, 15897, 24, 796, 10495, 220, 7388, ...
3.077519
129
import sys import json import logging import argparse import warnings import requests from indexclient import errors # DEPRECATED 11/2019 -- interacts with old `/alias/` endpoint. # For creating aliases for indexd records, prefer using # the `add_alias` function, which interacts with the new # `/index/{GUID}/aliase...
[ 11748, 25064, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 1822, 29572, 198, 11748, 14601, 198, 198, 11748, 7007, 198, 198, 6738, 6376, 16366, 1330, 8563, 628, 198, 2, 5550, 47, 38827, 11617, 1367, 14, 23344, 1377, 44020, 351, 1468, ...
2.624765
533
import psycopg2 import redis import json from bottle import Bottle, request if __name__ == '__main__': sender = Sender() sender.run(host='0.0.0.0', port=8080, debug=True)
[ 11748, 17331, 22163, 70, 17, 198, 11748, 2266, 271, 198, 11748, 33918, 198, 6738, 9294, 1330, 33608, 11, 2581, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 29788, 796, 311, 2194, 3419, 198, 2...
2.686567
67
import click import poyo import ruamel.yaml import runez import strictyaml import yaml as pyyaml from zyaml import load_path, load_string, tokens_from_path, tokens_from_string from zyaml.marshal import decode, default_marshal, represented_scalar from . import TestSettings def ruamel_passthrough_tags(loader, tag,...
[ 11748, 3904, 198, 11748, 279, 726, 78, 198, 11748, 7422, 17983, 13, 88, 43695, 198, 11748, 1057, 8471, 198, 11748, 7646, 88, 43695, 198, 11748, 331, 43695, 355, 12972, 88, 43695, 198, 198, 6738, 1976, 88, 43695, 1330, 3440, 62, 6978, ...
2.337209
344
import pandas as pd import numpy as np import re import pickle # plotting import seaborn as sns import matplotlib.pyplot as plt # Tune learning_rate from numpy import loadtxt from xgboost import XGBClassifier from sklearn.model_selection import GridSearchCV from sklearn.model_selection import Stratifie...
[ 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 302, 201, 198, 11748, 2298, 293, 201, 198, 201, 198, 2, 29353, 201, 198, 11748, 384, 397, 1211, 355, 3013, 82, 201, 198, 11748, 260...
3.117226
2,235
############################################################################### # @todo add Pilot2-splash-app disclaimer ############################################################################### """ Get's KRAS states """ import MDAnalysis as mda from MDAnalysis.analysis import align from MDAnalysis.lib.mdamath ...
[ 29113, 29113, 7804, 4242, 21017, 198, 2, 2488, 83, 24313, 751, 21697, 17, 12, 22018, 1077, 12, 1324, 37592, 198, 29113, 29113, 7804, 4242, 21017, 198, 198, 37811, 3497, 338, 29430, 1921, 2585, 37227, 198, 198, 11748, 10670, 32750, 355, ...
2.093001
8,344
""" homeassistant.components.switch.hikvision ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support turning on/off motion detection on Hikvision cameras. Note: Currently works using default https port only. CGI API Guide: http://bit.ly/1RuyUuF Configuration: To use the Hikvision motion detection switch you will need to...
[ 37811, 198, 11195, 562, 10167, 13, 5589, 3906, 13, 31943, 13, 71, 1134, 10178, 198, 27156, 27156, 15116, 93, 198, 15514, 6225, 319, 14, 2364, 6268, 13326, 319, 39790, 10178, 9073, 13, 198, 198, 6425, 25, 16888, 2499, 1262, 4277, 3740, ...
2.808468
992
"""Define mixins to easily compose custom FilterDefinition classes."""
[ 37811, 7469, 500, 5022, 1040, 284, 3538, 36664, 2183, 25853, 36621, 6097, 526, 15931, 628, 628, 198 ]
4.411765
17
from typing import List, Optional, TYPE_CHECKING import weakref from PyQt5.QtCore import QEvent, Qt from PyQt5.QtWidgets import (QComboBox, QGridLayout, QGroupBox, QHBoxLayout, QLabel, QLineEdit, QVBoxLayout, QWidget) from electrumsv.app_state import app_state from electrumsv.bitcoin import script_template_to_str...
[ 6738, 19720, 1330, 7343, 11, 32233, 11, 41876, 62, 50084, 2751, 198, 11748, 4939, 5420, 198, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 9237, 11, 33734, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 133...
3.281588
277