content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
""" Tests for typhon.retrieval.qrnn module. Tests the QRNN implementation for all available backends. """ from typhon.retrieval.qrnn import QRNN, set_backend, get_backend import numpy as np import os import importlib import pytest import tempfile # # Import available backends. # backends = [] try: import typhon....
[ 37811, 198, 51, 3558, 329, 37428, 261, 13, 1186, 380, 18206, 13, 80, 81, 20471, 8265, 13, 198, 198, 51, 3558, 262, 42137, 6144, 7822, 329, 477, 1695, 736, 2412, 13, 198, 37811, 198, 6738, 37428, 261, 13, 1186, 380, 18206, 13, 80, ...
2.664865
185
import pdb import signal import numpy as np import inversion import client import modelBranch from matplotlib import pyplot as plt # setup debug interrupt signal.signal(signal.SIGINT, debug_signal_handler) # Constants ITER = 500 numClasses = 10 numFeatures = 784 numParams = numClasses * numFeatures epsilon = 5 batch...
[ 11748, 279, 9945, 198, 11748, 6737, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 287, 9641, 198, 11748, 5456, 198, 11748, 2746, 33, 25642, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 198, 2, 9058, 14257, 1131...
2.838384
693
''' Manage Azure Billing. ''' from .. pyaz_utils import _call_az from . import account, agreement, balance, customer, enrollment_account, instruction, invoice, period, permission, policy, product, profile, property, role_assignment, role_definition, subscription, transaction
[ 7061, 6, 198, 5124, 496, 22134, 3941, 278, 13, 198, 7061, 6, 198, 6738, 11485, 12972, 1031, 62, 26791, 1330, 4808, 13345, 62, 1031, 198, 6738, 764, 1330, 1848, 11, 4381, 11, 5236, 11, 6491, 11, 20753, 62, 23317, 11, 12064, 11, 45458...
4.014493
69
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import torch import torch.nn as nn from torch.nn.functional import softmax import numpy as np import matplotlib.pyplot as plt
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 28034, 198, ...
3.68
75
from flask_bootstrap import Bootstrap from flask_sqlalchemy import SQLAlchemy from flask_mail import Mail from flask_ckeditor import CKEditor from flask_moment import Moment from flask_login import LoginManager from flask_wtf.csrf import CSRFProtect bootstrap = Bootstrap() db = SQLAlchemy() moment = Moment() ckeditor...
[ 6738, 42903, 62, 18769, 26418, 1330, 18892, 26418, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 42903, 62, 4529, 1330, 11099, 198, 6738, 42903, 62, 694, 35352, 1330, 327, 7336, 67, 2072, 198, 6738, 42903, ...
3.074286
175
__author__ = 'ishan' from gi.repository import Gtk, GtkSource, Gio, GLib from . import footer, terminal from .file import FileChooser from core.compile import Compile import core import os class Tabs(footer.Footer, Gtk.Grid, core.Language): """ handles the addition and deletion of tabs in the notebook ...
[ 834, 9800, 834, 796, 705, 680, 272, 6, 198, 198, 6738, 308, 72, 13, 260, 1930, 37765, 1330, 402, 30488, 11, 402, 30488, 7416, 11, 402, 952, 11, 10188, 571, 198, 6738, 764, 1330, 2366, 263, 11, 12094, 198, 6738, 764, 7753, 1330, 92...
2.255034
1,937
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() db_config = { 'SQLALCHEMY_DATABASE_URI': 'sqlite:///todoapp.sqlite3', 'SQLALCHEMY_TRACK_MODIFICATIONS': False }
[ 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 198, 9945, 796, 16363, 2348, 26599, 3419, 198, 198, 9945, 62, 11250, 796, 1391, 198, 220, 220, 220, 705, 17861, 1847, 3398, 3620, 56, 62, 35, 1404, 6242, 11159, 62, 47...
2.307692
78
from abc import ABC, abstractmethod from flappening.entities import Bird
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 198, 6738, 781, 1324, 3101, 13, 298, 871, 1330, 14506, 628 ]
3.75
20
import string from nltk.corpus import stopwords as sw from nltk.corpus import wordnet as wn from nltk import wordpunct_tokenize from nltk import WordNetLemmatizer from nltk import sent_tokenize from nltk import pos_tag from sklearn.base import BaseEstimator, TransformerMixin class NLTKPreprocessor(BaseEstimator, Tra...
[ 11748, 4731, 198, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879, 355, 1509, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 1573, 3262, 355, 266, 77, 198, 6738, 299, 2528, 74, 1330, 1573, 79, 16260, 62, 30001, ...
2.347695
1,323
# Copyright Peznauts <kevin@cloudnull.com>. 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, 220, 220, 15069, 2631, 47347, 17712, 1279, 365, 7114, 31, 17721, 8423, 13, 785, 28401, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743...
3.55122
205
import numpy as np import numpy.random import matplotlib matplotlib.use('Agg') from matplotlib import pyplot as plt import sklearn.datasets def generate_circle(num_samples=100, noise=0.1): """ Generates the x, y coordinates of noisy points scattered around a circle Args: num_samples (int, optiona...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 25120, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 11748, 1341, 3572...
2.133147
1,074
from interpolators import * from geodesicspace import * from metric import * from sets import * from ..klampt import vectorops import random def sample_hypersphere(d,c,r): """Samples a d-dimensional sphere uniformly, centered at c and with radius r""" assert(d == len(c)) d = [random.gauss(0,1) f...
[ 6738, 39555, 2024, 1330, 1635, 198, 6738, 4903, 4147, 873, 10223, 1330, 1635, 198, 6738, 18663, 1330, 1635, 198, 6738, 5621, 1330, 1635, 198, 6738, 11485, 74, 2543, 457, 1330, 15879, 2840, 198, 11748, 4738, 220, 220, 220, 220, 220, 220,...
2.727201
1,272
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: kikimr/public/api/protos/ydb_rate_limiter.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 479, 1134, 320, 81, 14, 11377, 14, 15042, 14, 11235, 418, 14, 5173, 65, ...
2.533457
16,185
from flask import Blueprint, Response, render_template from .calendar import get_calendar views = Blueprint("views", __name__, url_prefix="/") @views.route('/') @views.route('/calendar.ics') @views.route('/in_game_content.ics') @views.route('/games_with_prime.ics')
[ 6738, 42903, 1330, 39932, 11, 18261, 11, 8543, 62, 28243, 198, 6738, 764, 9948, 9239, 1330, 651, 62, 9948, 9239, 198, 198, 33571, 796, 39932, 7203, 33571, 1600, 11593, 3672, 834, 11, 19016, 62, 40290, 35922, 4943, 198, 198, 31, 33571, ...
2.945652
92
"""Functions to interactively cut the data into buckets and plot the results""" __version__ = '0.1.0' # Ensure this is kept in-sync with VERSION in the SETUP.PY ############ # Contents # ############ # - Setup # - Assign buckets # - Group and aggregate # - Set coordinates # - Pipeline functions # - Plotting # - Run...
[ 37811, 24629, 2733, 284, 9427, 2280, 2005, 262, 1366, 656, 38674, 290, 7110, 262, 2482, 37811, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 16, 13, 15, 6, 220, 220, 1303, 48987, 428, 318, 4030, 287, 12, 27261, 351, 44156, 2849, 287, ...
2.327007
8,272
import tensorflow as tf import numpy as np import claude.claudeflow.helper as cfh import claude.utils as cu import claude.tx as tx c = 299792458
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 26435, 2507, 13, 565, 3885, 891, 9319, 13, 2978, 525, 355, 30218, 71, 198, 11748, 26435, 2507, 13, 26791, 355, 18912, 198, 11748, 26435, 2507, 13...
2.807692
52
import os from collections import OrderedDict from pypospack.pyposmat.engines import PyposmatEngine testing_set = OrderedDict() testing_set['base_directory'] = 'rank_test' testing_set['config_fn'] = os.path.join('data','pyposmat.config.in') testing_set['parameters'] = OrderedDict([ ('SiSiSi_epsilon', 2.4123264333...
[ 11748, 28686, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 6738, 12972, 1930, 8002, 13, 9078, 1930, 6759, 13, 1516, 1127, 1330, 9485, 1930, 6759, 13798, 198, 198, 33407, 62, 2617, 796, 14230, 1068, 35, 713, 3419, 198, 33407, ...
2.215078
451
# coding:utf-8 import os from setuptools import setup, find_packages setup( name="format_converter", version="0.0.1", author="ruifengyun", author_email="rfyiamcool@163.com", description="format converter", license="MIT", keywords=["converter", "fengyun"], url="https://github.com/rfyia...
[ 2, 19617, 25, 40477, 12, 23, 198, 11748, 28686, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 18982, 62, 1102, 332, 353, 1600, 198, 220, 220, 220, 2196, 2625,...
2.617747
293
import re import shutil import sys import subprocess from pathlib import Path from typing import Optional from loguru import logger from pydantic import BaseModel, BaseSettings, DirectoryPath from fastapi import FastAPI class Command(BaseModel): """Accepts an arbitrary command string which is passed to gphoto2....
[ 11748, 302, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 11748, 850, 14681, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 32233, 198, 6738, 2604, 14717, 1330, 49706, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, ...
2.876404
623
#amara.lib __all__ = ['IriError', 'inputsource'] from amara import Error class IriError(Error): """ Exception related to URI/IRI processing """ RESOURCE_ERROR = 1 INVALID_BASE_URI = 100 #RELATIVE_DOCUMENT_URI = 110 RELATIVE_BASE_URI = 111 OPAQUE_BASE_URI = 112 NON_FILE_URI = 12...
[ 2, 47848, 13, 8019, 198, 198, 834, 439, 834, 796, 37250, 40, 380, 12331, 3256, 705, 15414, 10459, 20520, 198, 198, 6738, 716, 3301, 1330, 13047, 198, 198, 4871, 314, 380, 12331, 7, 12331, 2599, 198, 220, 220, 220, 37227, 198, 220, 2...
2.507246
345
from django.urls import path from django.contrib import admin from django.urls import re_path from rest_framework_swagger.views import get_swagger_view from ws.views import ValueList, ValueDetail schema_view = get_swagger_view(title='VALUE ARRAY WEB API') urlpatterns = [ path('front/betsy/irish/embargo/admin/',...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 302, 62, 6978, 198, 6738, 1334, 62, 30604, 62, 2032, 7928, 13, 33571, 1330, 651, 62, 2032,...
2.189542
306
import matplotlib.pyplot as plt content = "" with open("out.dat") as f: content = f.readlines() content = [x.strip().split(' ') for x in content] ins = [] outs = [] for l in content: t = l[0] r = l[1:] if t == '+': ins.append(r) else: outs.append(r) start = int(ins[0][3]) c...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11299, 796, 13538, 198, 4480, 1280, 7203, 448, 13, 19608, 4943, 355, 277, 25, 198, 220, 220, 220, 2695, 796, 277, 13, 961, 6615, 3419, 198, 198, 11299, 796, 685, 87,...
2.072414
290
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v5/proto/resources/campaign.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.pro...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 23645, 14, 5643, 14, 13297, 5643, 62, 85, 20, 14, 1676, 1462, 14, 37540,...
2.463587
40,178
#!/usr/bin/python3 import conftest import unittest suite = unittest.TestSuite() suite.addTest(unittest.TestLoader().discover('.')) runner = unittest.TextTestRunner() result = runner.run(suite) exit(0 if result.wasSuccessful() else 1)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 369, 701, 395, 198, 11748, 555, 715, 395, 198, 2385, 578, 796, 555, 715, 395, 13, 14402, 5606, 578, 3419, 198, 2385, 578, 13, 2860, 14402, 7, 403, 715, 395, 13, 14402, 174...
2.732558
86
# from earth engine - need API import ee import datetime ee.Authenticate() ee.Initialize() # test that things work # Print the elevation of Mount Everest. dem = ee.Image('USGS/SRTMGL1_003') xy = ee.Geometry.Point([86.9250, 27.9881]) elev = dem.sample(xy, 30).first().get('elevation').getInfo() print('Mount Everest el...
[ 2, 422, 4534, 3113, 532, 761, 7824, 198, 198, 11748, 304, 68, 198, 11748, 4818, 8079, 198, 198, 1453, 13, 47649, 5344, 3419, 198, 1453, 13, 24243, 1096, 3419, 198, 198, 2, 1332, 326, 1243, 670, 198, 2, 12578, 262, 22910, 286, 5628, ...
2.713626
433
""" Copyright 2020 - Present Okta, 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, softwa...
[ 37811, 198, 15269, 12131, 532, 21662, 6762, 8326, 11, 3457, 13, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 137...
2.092289
3,229
"""Module used to scan the market in search of good deals.""" from datetime import datetime from ratelimit import limits, sleep_and_retry import utils @sleep_and_retry @limits(calls=3, period=1.5) def deal_finder(): """Method used to scan the market in search of good prices. The conditions used ar...
[ 37811, 26796, 973, 284, 9367, 262, 1910, 287, 2989, 286, 922, 7529, 526, 15931, 201, 198, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 201, 198, 6738, 2494, 32374, 1330, 7095, 11, 3993, 62, 392, 62, 1186, 563, 201, 198, 11748, 3384, ...
1.782681
3,626
import re from . import regex import sys DAYS = ["MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"] NUM = "0123456789"
[ 11748, 302, 198, 6738, 764, 1330, 40364, 198, 11748, 25064, 628, 198, 26442, 50, 796, 14631, 27857, 1600, 366, 51, 8924, 1600, 366, 54, 1961, 1600, 366, 4221, 52, 1600, 366, 37, 7112, 1600, 366, 50, 1404, 1600, 366, 50, 4944, 8973, ...
2.118644
59
import pytest from django.test import Client from django.urls import reverse from http import HTTPStatus from dependency_resolving.dependencies_cache import DependenciesCache @pytest.fixture # In a more complex flow I'd add mocking to the logger so it'd be easier to track the flow # TODO: This can be split t...
[ 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 9288, 1330, 20985, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 2638, 1330, 14626, 19580, 198, 198, 6738, 20203, 62, 411, 10890, 13, 45841, 3976, 62, 23870, 1330, 37947, ...
3.765957
141
# stdlib import functools from typing import Any as TypeAny from typing import List as TypeList from typing import Tuple as TypeTuple # syft relative from . import session # noqa: 401 from . import share # noqa: 401 from ...ast import add_classes from ...ast import add_methods from ...ast import add_modules from ......
[ 2, 14367, 8019, 198, 11748, 1257, 310, 10141, 198, 6738, 19720, 1330, 4377, 355, 5994, 7149, 198, 6738, 19720, 1330, 7343, 355, 5994, 8053, 198, 6738, 19720, 1330, 309, 29291, 355, 5994, 51, 29291, 198, 198, 2, 827, 701, 3585, 198, 67...
2.82684
231
import json, settings, webbrowser, urllib3, requests, time from time import sleep from selenium.webdriver.remote import webelement from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from urllib import parse from selenium.webdriver.support.ui import WebDriverWait...
[ 11748, 33918, 11, 6460, 11, 3992, 40259, 11, 2956, 297, 571, 18, 11, 7007, 11, 640, 198, 6738, 640, 1330, 3993, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 47960, 1330, 356, 1350, 1732, 198, 6738, 384, 11925, 1505, 13, 12384, ...
2.976658
814
#! /usr/bin/env python3.6 import argparse import torch import os import numpy as np from multi_agent_sac.algorithm import MASAC from multi_agent_sac.misc import from_unit_actions from multi_agent_sac.env_wrapper import ParallelEnv from rospkg import RosPack import json if __name__ == '__main__': parser = argpar...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 21, 198, 198, 11748, 1822, 29572, 198, 11748, 28034, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 5021, 62, 25781, 62, 30584, 13, 282, 42289, 1330, 32337, 224...
2.588028
284
import discord from discord.ext import commands from datetime import datetime import random import aiohttp import json base_color=0x3498db su_color=0x2ecc71 err_color=0xe74c3c null_color=discord.Color.from_rgb(47,49,56)
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 4738, 198, 11748, 257, 952, 4023, 198, 11748, 33918, 198, 198, 8692, 62, 8043, 28, 15, 87, 2682, 4089, 9945, 198, 2385, 62, 804...
2.716049
81
import pygame import sys import var import font import title clock = pygame.time.Clock() main()
[ 11748, 12972, 6057, 198, 11748, 25064, 198, 198, 11748, 1401, 198, 11748, 10369, 198, 198, 11748, 3670, 198, 198, 15750, 796, 12972, 6057, 13, 2435, 13, 44758, 3419, 198, 198, 12417, 3419 ]
3.09375
32
import cv2 import numpy as np def copy_orange(img): """A Function to Copy/extract Oranges only to a new img""" result = np.zeros(img.shape, np.uint8) hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) # v = np.array([]) for i in range(result.shape[0]): for j in range(result.shape[1]): ...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 4866, 62, 43745, 7, 9600, 2599, 198, 220, 220, 220, 37227, 32, 15553, 284, 17393, 14, 2302, 974, 1471, 6231, 691, 284, 257, 649, 33705, 37811, 198, 220, 220, 22...
2.071661
307
import asyncio from itertools import chain from urllib.parse import urlparse from notetool.tool.log import log from .dht.bencode import bdecode from .dht.torrent import Magnet, Torrent from .peer import fetch_from_peer from .peer_tracker import retrieve_peers_http_tracker from .peer_tracker import retrieve_peers_udp_t...
[ 11748, 30351, 952, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 198, 6738, 407, 316, 970, 13, 25981, 13, 6404, 1330, 2604, 198, 6738, 764, 67, 4352, 13, 11722, 8189, 1330, 275,...
3.153226
124
import numpy as np import cv2 from ..__init__ import __rootdir__ from . import config, detector from .log import logger, save_screenshot from .scene import Scene, SceneComment from .image import bytes2img, loadimg, threshole from .matcher import Matcher
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 198, 6738, 11485, 834, 15003, 834, 1330, 11593, 15763, 15908, 834, 198, 6738, 764, 1330, 4566, 11, 31029, 198, 6738, 764, 6404, 1330, 49706, 11, 3613, 62, 1416, 26892, 198, ...
3.472973
74
### # albinolobster@ubuntu:~$ python3 mt_www_version.py # crc: 1660362373 # size: 43765 # version: 6.0 # # albinolobster@ubuntu:~$ python3 mt_www_version.py # crc: 2855787042 # size: 66364 # version: 6.45.3 ### import re import csv import sys import argparse from urllib.request import Request, urlopen from urllib.er...
[ 21017, 198, 2, 435, 8800, 349, 672, 1706, 31, 32230, 25, 93, 3, 21015, 18, 45079, 62, 2503, 62, 9641, 13, 9078, 220, 198, 2, 1067, 66, 25, 1467, 1899, 2623, 1954, 4790, 198, 2, 2546, 25, 604, 2718, 2996, 198, 2, 2196, 25, 718, ...
2.366071
672
QUERIES = dict( mni2native={ "main_key": "subject_specific", "sub_key": "mni_to_native_transform", }, native2mni={ "main_key": "subject_specific", "sub_key": "native_to_mni_transform", }, anat_reference={ "main_key": "subject_specific", "sub_key": "nat...
[ 10917, 1137, 11015, 796, 8633, 7, 198, 220, 220, 220, 285, 8461, 17, 30191, 34758, 198, 220, 220, 220, 220, 220, 220, 220, 366, 12417, 62, 2539, 1298, 366, 32796, 62, 11423, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 7266, ...
2.227778
360
#this file is created for the signals, for each new user creat a new Profile from django.db.models.signals import post_save from django.contrib.auth.models import User from django.dispatch import receiver from .models import Profile #when a user is saved then send this signal which be revieved by this #receiver, th...
[ 2, 5661, 2393, 318, 2727, 329, 262, 10425, 11, 329, 1123, 649, 2836, 1827, 257, 649, 13118, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 1281, 62, 21928, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, ...
3.520325
123
# Copyright (C) 2014 Midokura SARL # 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...
[ 2, 15069, 357, 34, 8, 1946, 7215, 482, 5330, 47341, 43, 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, 22...
2.172992
2,266
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from setuptools import setup projects = [p.rstrip("\n") for p in open("hydra-configs-projects.txt", "r").readlines()] project_uris = [ f"{project} @ git+https://github.com/pytorch/hydra-torch/#subdirectory={project}" for project in projects...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 42068, 796, 685, 79, 13, 81, 36311, 7203, 59, 77, 4943, 329, 279, 287, 1280, 7203, 15511, 430, 1...
2.573913
230
# BS.Player v2.51 # SEH Overwrite Vulnerability # http://www.mertsarica.com junk = "[Options]\nSkin=" vulnerability = junk + "\x41"*496 + "\x42"*4 + "\x43"*4 try: vulnerable = open("vulnerable.bsi",'w') vulnerable.write(vulnerability) vulnerable.close() print "Vulnerable file created!\n" ...
[ 2, 24218, 13, 14140, 410, 17, 13, 4349, 201, 198, 2, 7946, 39, 3827, 13564, 569, 40920, 201, 198, 2, 2638, 1378, 2503, 13, 647, 912, 283, 3970, 13, 785, 201, 198, 201, 198, 73, 2954, 796, 12878, 29046, 60, 59, 77, 42455, 2625, 2...
2.386667
150
from my_package import A1 from my_package import A2 print(A2)
[ 6738, 616, 62, 26495, 1330, 317, 16, 198, 6738, 616, 62, 26495, 1330, 317, 17, 198, 198, 4798, 7, 32, 17, 8, 198 ]
2.73913
23
from toolz import curry import numpy as np import pandas as pd from nfldata.common import process_time_col from nfldata.lookup import score_before_time offense_team_stat_columns = [ 'rushing_att', 'rushing_yds', 'rushing_tds', 'rushing_twoptm', 'fumbles_lost', 'passing_att', 'passing_cmp',...
[ 6738, 2891, 89, 1330, 34611, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 299, 69, 335, 1045, 13, 11321, 1330, 1429, 62, 2435, 62, 4033, 198, 6738, 299, 69, 335, 1045, 13, 5460, 929, 1330...
2.057971
414
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2021 Oleksandr Moskalenko <om@rc.ufl.edu> # # Distributed under terms of the MIT license. """ Main module for the TranD package. Define a CLI and drive execution of all analyses. """ import argparse import logging import re import os imp...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 69, 12685, 28, 40477, 12, 23, 198, 2, 198, 2, 15069, 10673, 33448, 30093, 591, 46273, 5826, 74,...
2.258743
4,947
# -*- coding: utf-8 -*- """ zang.connectors.base_connector ~~~~~~~~~~~~~~~~~~~ This module contains base connector class used for all forms of communication with the Avaya CPaaS REST API. """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 89, 648, 13, 8443, 669, 13, 8692, 62, 8443, 273, 198, 27156, 4907, 93, 198, 1212, 8265, 4909, 2779, 21716, 1398, 973, 329, 477, 5107, 286, 6946, 198, ...
3.344828
58
import sys import argparse from pylibftdi import Driver # from ftd2xx import ftd2xx as ftd # from ftd2xx import * from eculib import KlineAdapter if __name__ == '__main__': Main()
[ 11748, 25064, 198, 11748, 1822, 29572, 198, 6738, 279, 2645, 571, 701, 10989, 1330, 12434, 198, 2, 422, 277, 8671, 17, 5324, 1330, 277, 8671, 17, 5324, 355, 277, 8671, 198, 2, 422, 277, 8671, 17, 5324, 1330, 1635, 198, 6738, 304, 31...
2.8
65
from unittest import TestCase from pypattyrn.structural.flyweight import FlyweightMeta class FlyweightMetaTestCase(TestCase): """ Unit testing class for the FlyweightMeta class. """ def setUp(self): """ Initialize testing data. """ self.card_class = Card def test_...
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 279, 4464, 265, 774, 35906, 13, 7249, 1523, 13, 12254, 6551, 1330, 13575, 6551, 48526, 628, 198, 4871, 13575, 6551, 48526, 14402, 20448, 7, 14402, 20448, 2599, 198, 220, 220, 220, 37227...
2.362275
334
import os # Searching for YAML files in the given path
[ 11748, 28686, 628, 198, 198, 2, 11140, 278, 329, 575, 2390, 43, 3696, 287, 262, 1813, 3108, 198 ]
3.222222
18
# coding=utf-8 from random import randint from MT19937 import MT19937 from time import time from Crypto.Util import number import os pre = os.urandom(randint(5,10)) mess = pre+'A'*14 mx = 1<<16 key = randint(0,mx) # 用于加密的密钥生成(不安全) # 用于 生成token 不安全 checkToken(getToken())
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 4738, 1330, 43720, 600, 198, 6738, 19308, 19104, 2718, 1330, 19308, 19104, 2718, 198, 6738, 640, 1330, 220, 640, 198, 6738, 36579, 13, 18274, 346, 1330, 1271, 198, 11748, 28686, 198, 3866, 796, ...
1.971429
140
"""Make models.py a module containing one file per model as it was getting too long.""" # flake8: noqa # pylint: disable=wildcard-import from .course import * from .organization import * from .subject import *
[ 37811, 12050, 4981, 13, 9078, 257, 8265, 7268, 530, 2393, 583, 2746, 355, 340, 373, 1972, 1165, 890, 526, 15931, 198, 2, 781, 539, 23, 25, 645, 20402, 198, 2, 279, 2645, 600, 25, 15560, 28, 21992, 9517, 12, 11748, 198, 6738, 764, ...
3.5
60
import ast import urllib import os import logging import boto3 from botocore.exceptions import ClientError
[ 11748, 6468, 198, 11748, 2956, 297, 571, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 275, 2069, 18, 198, 6738, 10214, 420, 382, 13, 1069, 11755, 1330, 20985, 12331, 628, 198 ]
3.516129
31
"""Classes containing the exceptions for reporting errors. (C) Copyright 2013-2020 NuoDB, Inc. All Rights Reserved. This software is licensed under a BSD 3-Clause License. See the LICENSE file provided with this software. """ __version__ = '2.5.2' from .connection import * from .datatype import * from .exception i...
[ 37811, 9487, 274, 7268, 262, 13269, 329, 6447, 8563, 13, 198, 198, 7, 34, 8, 15069, 2211, 12, 42334, 399, 20895, 11012, 11, 3457, 13, 220, 1439, 6923, 33876, 13, 198, 198, 1212, 3788, 318, 11971, 739, 257, 347, 10305, 513, 12, 2601,...
3.452632
95
import os LOCAL_DIR = None SCRIPTS_DIR = None SPECS_DIR = None BP_DIR = None LOCAL_DIR_KEY = ".local" SCRIPTS_DIR_KEY = "scripts" SPECS_DIR_KEY = "specs"
[ 11748, 28686, 198, 198, 29701, 1847, 62, 34720, 796, 6045, 198, 6173, 32618, 4694, 62, 34720, 796, 6045, 198, 48451, 50, 62, 34720, 796, 6045, 198, 20866, 62, 34720, 796, 6045, 198, 198, 29701, 1847, 62, 34720, 62, 20373, 796, 27071, ...
2.291667
72
from benchbuild.project import Project from benchbuild.environments import container from benchbuild.source import Git from benchbuild.utils.cmd import make class Lammps(Project): """ LAMMPS benchmark """ NAME: str = 'lammps' DOMAIN: str = 'scientific' GROUP: str = 'benchbuild' SOURCE = [ ...
[ 6738, 7624, 11249, 13, 16302, 1330, 4935, 198, 6738, 7624, 11249, 13, 268, 12103, 1330, 9290, 198, 6738, 7624, 11249, 13, 10459, 1330, 15151, 198, 6738, 7624, 11249, 13, 26791, 13, 28758, 1330, 787, 628, 198, 4871, 406, 6475, 862, 7, ...
2.55665
203
# -*- coding: utf-8 -*- """ Base class template for time series classifier scitype. class name: BaseClassifier Scitype defining methods: fitting - fit(self, X, y) predicting - predict(self, X) State: fitted model/strategy - by convention, any attributes ending in "_" fitted state f...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 14881, 1398, 11055, 329, 640, 2168, 1398, 7483, 629, 414, 431, 13, 628, 220, 220, 220, 1398, 1438, 25, 7308, 9487, 7483, 198, 198, 3351, 414, 431, 16215, 5...
2.36412
3,010
from typing import List, Any import re import sys keylist = '' synt = [',','.','(',')','[',']','{','}',':',';'] keys = [] iden = [] mOp = [] lOp = [] numV = [] others = [] if __name__ == "__main__": main()
[ 6738, 19720, 1330, 7343, 11, 4377, 198, 11748, 302, 198, 11748, 25064, 198, 2539, 4868, 796, 10148, 198, 1837, 429, 796, 685, 3256, 41707, 2637, 4032, 7, 3256, 11537, 41707, 58, 3256, 20520, 41707, 90, 41707, 92, 3256, 10354, 3256, 1702...
2.366667
90
# Copyright 2019 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ 2, 15069, 13130, 383, 21239, 80, 34152, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921...
2.759756
820
import nltk import os import string from sklearn.feature_extraction.text import TfidfVectorizer from nltk.stem.porter import PorterStemmer translator = str.maketrans('', '', string.punctuation) path = './reuters/training/' token_dict = {} if __name__ == '__main__': main()
[ 11748, 299, 2528, 74, 198, 11748, 28686, 198, 11748, 4731, 198, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 309, 69, 312, 69, 38469, 7509, 198, 6738, 299, 2528, 74, 13, 927, 13, 26634, 1330, 20890, 1273, 368, ...
2.8
100
from .mutation import * from .decorators import * from .mixins import *
[ 6738, 764, 76, 7094, 1330, 1635, 198, 6738, 764, 12501, 273, 2024, 1330, 1635, 198, 6738, 764, 19816, 1040, 1330, 1635, 198 ]
3.272727
22
from setuptools import setup setup( name='smartblinds_client', version='0.6', description='Unofficial client for the MySmartBlinds Smart Bridge', long_description=readme(), url='http://github.com/ianlevesque/smartblinds-client', author='Ian Levesque', author_email='ian@ianlevesque.org', ...
[ 6738, 900, 37623, 10141, 1330, 9058, 628, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 27004, 27461, 82, 62, 16366, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 21, 3256, 198, 220, 220, 220, 6764, 11639, 3118, 16841, 5456, ...
2.698885
269
""" Export TorchScript python inference_torchscript.py \ --variant dpt_hybrid \ --precision float16 \ --output """ import argparse import glob import os import cv2 import torch from torchvision.transforms import Compose import util.io from dpt.transforms import NormalizeImage, PrepareForNet, Resize if...
[ 37811, 198, 43834, 34868, 7391, 198, 29412, 32278, 62, 13165, 354, 12048, 13, 9078, 3467, 198, 220, 220, 220, 1377, 25641, 415, 288, 457, 62, 12114, 10236, 3467, 198, 220, 220, 220, 1377, 3866, 16005, 12178, 1433, 3467, 198, 220, 220, ...
2.921739
230
import psycopg2 from datetime import datetime import sys
[ 198, 11748, 17331, 22163, 70, 17, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 25064, 198 ]
3.411765
17
prot_seq = input('Protein sequence: ').upper() prot_deg = {'A':4, 'C':2, 'D':2, 'E':2, 'F':2, 'G':4, 'H':2, 'I':3, 'K':2, 'L':6, 'M':1, 'N':2, 'P':4, 'Q':2, 'R':6, 'S':6, 'T':4, 'V':4, 'W':1, 'Y':2} segs_values = [] for aa in range(len(prot_seq)): segment = prot_seq[aa:aa + 15] ...
[ 11235, 62, 41068, 796, 5128, 10786, 47, 35574, 8379, 25, 705, 737, 45828, 3419, 198, 11235, 62, 13500, 796, 1391, 6, 32, 10354, 19, 11, 705, 34, 10354, 17, 11, 705, 35, 10354, 17, 11, 705, 36, 10354, 17, 11, 705, 37, 10354, 17, ...
1.790476
315
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 通用数据处理代码 """ # 输入以换行符分隔的列表文本,返回python简单列表对象 # 输入以换行符分隔的列表文本,指定每个列表项的键名称,返回python字典列表对象
[ 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, 37811, 198, 34460, 248, 18796, 101, 46763, 108, 162, 235, 106, 13783, 226, 49426, 228, 47987, 163, 254, 223, ...
0.790055
181
#demonstrating the if statement name = 'Bob' if name == 'Alice': print('Hi Alice') print('Done')
[ 2, 26567, 2536, 803, 262, 611, 2643, 198, 3672, 796, 705, 18861, 6, 198, 361, 1438, 6624, 705, 44484, 10354, 198, 220, 220, 220, 3601, 10786, 17250, 14862, 11537, 198, 4798, 10786, 45677, 11537, 198 ]
2.885714
35
"""Define tests for the System object.""" # pylint: disable=protected-access from datetime import datetime, timedelta import aiohttp from aresponses import ResponsesMockServer import pytest from simplipy import API from simplipy.errors import ( InvalidCredentialsError, PendingAuthorizationError, RequestEr...
[ 37811, 7469, 500, 5254, 329, 262, 4482, 2134, 526, 15931, 198, 2, 279, 2645, 600, 25, 15560, 28, 24326, 12, 15526, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 11748, 257, 952, 4023, 198, 6738, 389, 20587, 274,...
1.987023
4,007
from lipyc.panels.Panel import Panel from lipyc.panels.RightPanel import InfoPanel #from lipyc.scheduler import scheduler
[ 6738, 10645, 88, 66, 13, 6839, 1424, 13, 26639, 1330, 18810, 198, 6738, 10645, 88, 66, 13, 6839, 1424, 13, 11028, 26639, 1330, 14151, 26639, 198, 2, 6738, 10645, 88, 66, 13, 1416, 704, 18173, 1330, 6038, 18173, 628 ]
3.153846
39
from __future__ import print_function from bs4 import BeautifulSoup, NavigableString import sys, codecs, re overrides = { "statement-separator": "statement-terminator", "blocks": "block-delimiters", "modifiable-variable": "local-variable", "write-once-variable": "constant", "arithmetic-operators-addition-subtract...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 11, 13244, 328, 540, 10100, 198, 11748, 25064, 11, 40481, 82, 11, 302, 198, 198, 2502, 81, 1460, 796, 1391, 198, 197, 1, 26090, 12, 25512...
2.549036
2,386
import FWCore.ParameterSet.Config as cms from ..modules.hltPrePhoton100EBTightIDTightIsoOpenUnseeded_cfi import * from ..sequences.HLTBeginSequence_cfi import * from ..sequences.HLTEndSequence_cfi import * from ..sequences.HLTPhoton100EBTightIDTightIsoOpenUnseededSequence_cfi import * MC_Photon100EB_TightID_TightIso_...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 6738, 11485, 18170, 13, 71, 2528, 6719, 2725, 18970, 3064, 36, 19313, 432, 2389, 51, 432, 40, 568, 11505, 3118, 325, 15395, 62, 66, 12463, 1330, 1635, 198, 6738...
2.460396
202
import numpy as np radii = [] for i in range(0,10): corners = np.loadtxt('./openDR_object_kps/'+str(i+1)+'/corners.txt') x_dis = corners[:,0].max() - corners[:,0].min() y_dis = corners[:,1].max() - corners[:,1].min() z_dis = corners[:,2].max() - corners[:,2].min() diag = np.sqrt(x_dis**2 + y_dis**2 + z_dis**2)...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6335, 4178, 796, 17635, 198, 1640, 1312, 287, 2837, 7, 15, 11, 940, 2599, 628, 197, 20772, 364, 796, 45941, 13, 2220, 14116, 7, 4458, 14, 9654, 7707, 62, 15252, 62, 74, 862, 14, 6, 10, 2536...
2.19337
181
# coding: utf-8 """ ESP Documentation The Evident Security Platform API (version 2.0) is designed to allow users granular control over their Amazon Web Service security experience by allowing them to review alerts, monitor signatures, and create custom signatures. OpenAPI spec version: v2_sdk Ge...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 9428, 43925, 628, 220, 220, 220, 383, 4319, 738, 4765, 19193, 7824, 357, 9641, 362, 13, 15, 8, 318, 3562, 284, 1249, 2985, 19468, 934, 1630, 625, 511, 6186, 5313...
2.258948
7,627
import json import requests from requests import RequestException from logger import Logger
[ 11748, 33918, 198, 11748, 7007, 198, 6738, 7007, 1330, 19390, 16922, 198, 6738, 49706, 1330, 5972, 1362, 628, 628, 198 ]
4.8
20
import numpy as np from nose.tools import assert_true from sklearn.ensemble import RandomForestClassifier from splearn.ensemble import SparkRandomForestClassifier from splearn.utils.testing import SplearnTestCase from splearn.utils.validation import check_rdd_dtype
[ 11748, 299, 32152, 355, 45941, 198, 6738, 9686, 13, 31391, 1330, 6818, 62, 7942, 198, 6738, 1341, 35720, 13, 1072, 11306, 1330, 14534, 34605, 9487, 7483, 198, 6738, 599, 35720, 13, 1072, 11306, 1330, 17732, 29531, 34605, 9487, 7483, 198, ...
3.760563
71
import random Prueba = Player() print(Prueba.tryShot(5)) print(Prueba.isAlive()) print(Prueba.numbers)
[ 11748, 4738, 198, 198, 6836, 518, 7012, 796, 7853, 3419, 198, 4798, 7, 6836, 518, 7012, 13, 28311, 28512, 7, 20, 4008, 198, 4798, 7, 6836, 518, 7012, 13, 271, 2348, 425, 28955, 198, 4798, 7, 6836, 518, 7012, 13, 77, 17024, 8, 198 ...
2.363636
44
""" The module with CLI code that handles the `hopla api` group command. """ import logging import click import requests from hopla.hoplalib.requests_helper import get_data_or_exit from hopla.hoplalib.http import UrlBuilder from hopla.hoplalib.common import GlobalConstants from hopla.hoplalib.outputformatter import J...
[ 37811, 198, 464, 8265, 351, 43749, 2438, 326, 17105, 262, 4600, 8548, 5031, 40391, 63, 1448, 3141, 13, 198, 37811, 198, 11748, 18931, 198, 198, 11748, 3904, 198, 11748, 7007, 198, 198, 6738, 1725, 5031, 13, 8548, 75, 282, 571, 13, 889...
2.747671
1,288
import keyword key = "elif" s="vinit" if keyword.iskeyword(key): print(key," is keyword") else: print(key," is not keyword") if keyword.iskeyword(s): print(s," is keyword") else: print(s," is not keyword") #This method is use to print the set of keywords present in python print(keyword.kwlist)
[ 11748, 21179, 198, 198, 2539, 796, 366, 417, 361, 1, 198, 82, 2625, 7114, 270, 1, 198, 361, 21179, 13, 271, 2539, 4775, 7, 2539, 2599, 198, 197, 4798, 7, 2539, 553, 318, 21179, 4943, 198, 17772, 25, 198, 197, 4798, 7, 2539, 553, ...
2.839623
106
import logging import pickle import uuid import os import importlib import yaml from abc import ABCMeta, abstractmethod from typing import Any, Optional, Union, List, Dict, Text from os import mkdir from copy import deepcopy import posixpath import shutil import cloudpickle import numpy as np import pandas import mlfl...
[ 11748, 18931, 198, 11748, 2298, 293, 198, 11748, 334, 27112, 198, 11748, 28686, 198, 11748, 1330, 8019, 198, 11748, 331, 43695, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 6738, 19720, 1330, 4377, 11, 32233, 11, 4479, ...
2.309593
7,933
from json import loads from requests import post ## https://api.ecoledirecte.com/v3/eleves/483/notes.awp?verbe=get& #token = "something" #token = input("Enter your token >> ") #request = post("https://api.ecoledirecte.com/v3/eleves/483/notes.awp?verbe=get&", {"token": token}, headers={"Content-Type": "application/x-ww...
[ 6738, 33918, 1330, 15989, 198, 6738, 7007, 1330, 1281, 198, 198, 2235, 3740, 1378, 15042, 13, 721, 45342, 1060, 68, 13, 785, 14, 85, 18, 14, 11129, 1158, 14, 38783, 14, 17815, 13, 707, 79, 30, 332, 1350, 28, 1136, 5, 198, 2, 30001...
2.384442
887
import pytest from utils.data_source_utils import ( prep_file_source, simple_bq_source_using_query_arg, simple_bq_source_using_table_ref_arg, ) from feast import Entity, ValueType from feast.feature_view import FeatureView from feast.inference import infer_entity_value_type_from_feature_views @pytest.mar...
[ 11748, 12972, 9288, 198, 6738, 3384, 4487, 13, 7890, 62, 10459, 62, 26791, 1330, 357, 198, 220, 220, 220, 3143, 62, 7753, 62, 10459, 11, 198, 220, 220, 220, 2829, 62, 65, 80, 62, 10459, 62, 3500, 62, 22766, 62, 853, 11, 198, 220, ...
2.964602
113
from cv2 import connectedComponents import pandas as pd import numpy as np
[ 6738, 269, 85, 17, 1330, 5884, 7293, 3906, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 628 ]
3.454545
22
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 33448, 43208, 21852, 1766, 1539, 12052, 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.805714
525
from deep_lyric_visualizer.generator.generation_environment import (GenerationEnvironment, WikipediaBigGANGenerationEnviornment) from deep_lyric_visualizer.generator.generatorio import PickleGeneratorIO, YAMLGeneratorIO from deep_lyric_visualizer.helpe...
[ 6738, 2769, 62, 306, 1173, 62, 41464, 7509, 13, 8612, 1352, 13, 20158, 62, 38986, 1330, 357, 8645, 341, 31441, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.423529
170
# tts_utils.py ## ⊕ [langdetect · PyPI](https://pypi.org/project/langdetect/) # from langdetect import detect ## ⊕ [polyglot · PyPI](https://pypi.org/project/polyglot/) """ preqs: pip install pyobjc pip install pyttsx3 """ def say_lang(sentence, lang, verbose=True): """ import sagas.nlu.tts_utils as tts t...
[ 2, 256, 912, 62, 26791, 13, 9078, 198, 2235, 2343, 232, 243, 685, 17204, 15255, 478, 14128, 9485, 11901, 16151, 5450, 1378, 79, 4464, 72, 13, 2398, 14, 16302, 14, 17204, 15255, 478, 34729, 198, 2, 422, 42392, 15255, 478, 1330, 4886, ...
2.088369
1,754
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.15.2) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x00\xac\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x32\x...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 20857, 2134, 2438, 198, 2, 198, 2, 15622, 416, 25, 383, 20857, 3082, 5329, 329, 9485, 48, 83, 20, 357, 48, 83, 410, 20, 13, 1314, 13, 17, 8, 198, 2, 198,...
1.263858
11,419
import typing import os.path from itertools import groupby from collections import namedtuple import click from django.utils import timezone from django.db import connection import rssant_common.django_setup # noqa:F401 from rssant_common.helper import to_timezone_cst from rssant.email_template import EmailTemplate f...
[ 11748, 19720, 198, 11748, 28686, 13, 6978, 198, 6738, 340, 861, 10141, 1330, 1448, 1525, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 11748, 3904, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, ...
2.861111
360
""" Description: This kata is from check py.checkio.org You are given an array with positive numbers and a number N. You should find the N-th power of the element in the array with the index N. If N is outside of the array, then return -1. Don't forget that the first element has the index 0. Let's look at a few exampl...
[ 37811, 198, 11828, 25, 198, 1212, 479, 1045, 318, 422, 2198, 12972, 13, 9122, 952, 13, 2398, 198, 1639, 389, 1813, 281, 7177, 351, 3967, 3146, 290, 257, 1271, 399, 13, 921, 815, 1064, 262, 399, 12, 400, 1176, 286, 262, 5002, 198, ...
2.962567
187
### # Copyright (c) 2016 Nishant Das Patnaik. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
[ 198, 21017, 198, 1303, 15069, 357, 66, 8, 1584, 48438, 415, 29533, 3208, 2616, 1134, 13, 198, 1303, 198, 1303, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 1303, 345, 743, 407, 779, 428, ...
3.769663
178
from unittest.mock import Mock import pytest from common.exceptions import LogicError from plenum.common.constants import DOMAIN_LEDGER_ID from plenum.common.messages.internal_messages import CheckpointStabilized, NeedBackupCatchup, NeedMasterCatchup from plenum.common.messages.node_messages import Checkpoint, Ordere...
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 2219, 13, 1069, 11755, 1330, 30146, 12331, 198, 6738, 458, 44709, 13, 11321, 13, 9979, 1187, 1330, 24121, 29833, 62, 30465, 30373, 62, 2389, ...
2.917085
398
#!/usr/bin/env python3 """ Clustering Module """ import numpy as np def kmeans(X, k, iterations=1000): """ Performs K-means on a dataset: X is a numpy.ndarray of shape (n, d) containing the dataset n is the number of data points d is the number of dimensions for each data point k is a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 2601, 436, 1586, 19937, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 479, 1326, 504, 7, 55, 11, 479, 11, 34820, 28, 12825, 2599, 198, 220, 220, 220...
2.395006
881
#! /usr/bin/env python import matplotlib.pyplot as pl import numpy as np x = np.arange(-8 * np.pi, 8 * np.pi, 0.01) y = np.sin(x) pl.plot(x, y, "b-") pl.show()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 198, 11748, 299, 32152, 355, 45941, 198, 198, 87, 796, 45941, 13, 283, 858, 32590, 23, 1635, 45941, 13, 14415, 11, 807, 16...
2.0375
80
import logging import random import numpy as np import os import torch from unittest import TestCase from generative_playground.models.decoder.decoder import get_decoder from generative_playground.models.decoder.graph_decoder import GraphEncoder from generative_playground.codec.codec import get_codec from generative_pl...
[ 11748, 18931, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 28034, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 1152, 876, 62, 1759, 2833, 13, 27530, 13, 12501, 12342, 13, 12501, 12342, ...
3.103896
308
import time adder_dict([1,2,3,4,5]*100,5) adder_logic([1,2,3,4,5]*100,5)
[ 11748, 640, 201, 198, 201, 198, 26676, 62, 11600, 26933, 16, 11, 17, 11, 18, 11, 19, 11, 20, 60, 9, 3064, 11, 20, 8, 201, 198, 201, 198, 201, 198, 26676, 62, 6404, 291, 26933, 16, 11, 17, 11, 18, 11, 19, 11, 20, 60, 9, 306...
1.568627
51
import logging from scipy.misc import imresize from skimage.transform import resize from IAlgorithm import IAlgorithm import numpy as np __author__ = 'simon'
[ 11748, 18931, 198, 6738, 629, 541, 88, 13, 44374, 1330, 545, 411, 1096, 198, 6738, 1341, 9060, 13, 35636, 1330, 47558, 198, 6738, 314, 2348, 42289, 1330, 314, 2348, 42289, 198, 11748, 299, 32152, 355, 45941, 198, 198, 834, 9800, 834, ...
3.404255
47
# OSL Lexer import os, sys import ply.lex as lex reserved = ( 'AND', 'BREAK', 'CLOSURE', 'COLOR', 'CONTINUE', 'DO', 'ELSE', 'EMIT', 'FLOAT', 'FOR', 'IF', 'ILLUMINANCE', 'ILLUMINATE', 'INT', 'MATRIX', 'NORMAL', 'NOT', 'OR', 'OUTPUT', 'POINT', 'PUBLIC', 'RETURN', 'STRING', 'STRUCT', 'VECTOR', 'VOID', 'WHIL...
[ 2, 7294, 43, 17210, 263, 198, 198, 11748, 28686, 11, 25064, 198, 198, 11748, 35960, 13, 2588, 355, 31191, 198, 198, 411, 8520, 796, 357, 198, 220, 220, 220, 705, 6981, 3256, 705, 40438, 10206, 3256, 705, 5097, 2640, 11335, 3256, 705, ...
1.917391
1,840
import json from google.api_core import retry from google.cloud.bigquery.reservation_v1 import ReservationServiceClient """ { "commit_id":"projects/{}/locations/US/capacityCommitments/7161799642806938531" } """
[ 11748, 33918, 198, 6738, 23645, 13, 15042, 62, 7295, 1330, 1005, 563, 198, 6738, 23645, 13, 17721, 13, 14261, 22766, 13, 411, 13208, 62, 85, 16, 1330, 1874, 13208, 16177, 11792, 198, 198, 37811, 198, 90, 198, 366, 41509, 62, 312, 2404...
2.972222
72
import os import configparser import copy import logging from log import get_logger from ui_channel.alerts import Alerts from ui_channel.camera import Camera desi_spectro_redux = os.environ.get('DESI_SPECTRO_REDUX') qlf_root = os.getenv('QLF_ROOT') logger = get_logger( "qlf.camera_status", os.path.join(qlf_ro...
[ 11748, 28686, 198, 11748, 4566, 48610, 198, 11748, 4866, 198, 11748, 18931, 198, 6738, 2604, 1330, 651, 62, 6404, 1362, 198, 6738, 334, 72, 62, 17620, 13, 44598, 82, 1330, 23276, 82, 198, 6738, 334, 72, 62, 17620, 13, 25695, 1330, 204...
2.57971
138
import re from django import template from django.utils.html import escape from django.utils.safestring import mark_safe from rest_framework.templatetags.rest_framework import urlize_quoted_links register = template.Library() @register.filter() def urlize_url_fields_only(text): """ Split text into quot...
[ 11748, 302, 198, 198, 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 26791, 13, 6494, 1330, 6654, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 198, 198, 6738, 1334, 62, 30604, 13, 11498...
3.037736
212
""" Copyright (c) 2021 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
[ 37811, 198, 15069, 357, 66, 8, 33448, 8180, 10501, 198, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 921, 743, 7...
3.439344
305