content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
""" Abstract types """ from abc import ABC, abstractmethod import typing from hacenada.const import STR_DICT class SessionStorage(ABC): """ Provide access to the session's underlying storage through any mechanism """ answer: typing.Any meta: typing.Any @property def script_path(self): ...
[ 37811, 198, 23839, 3858, 198, 37811, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 11748, 19720, 198, 198, 6738, 289, 330, 268, 4763, 13, 9979, 1330, 19269, 62, 35, 18379, 628, 198, 4871, 23575, 31425, 7, 24694, 2599, 198, 22...
2.557353
680
#!/usr/bin/python # -*- coding: utf-8 -*- from django.db import models from django.contrib.auth.models import User from logging import root, basicConfig import openbabel import sys import re import tempfile import os import codecs import md5 import compounddb.sdfiterator import string import random cur_dir = os.path....
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198,...
2.182121
2,998
# Generated by Django 3.1.14 on 2021-12-13 11:06 import django.db.models.deletion from django.db import migrations, models import reservation_units.models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 1415, 319, 33448, 12, 1065, 12, 1485, 1367, 25, 3312, 198, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981,...
3.038462
52
"""xtapi""" from fastapi import ( Query, Path, Body, Cookie, Header, Form, File, UploadFile, Request, Response, status, Depends, APIRouter, HTTPException, BackgroundTasks ) from .main import MainApp from .templates import Templates __all__ = [ 'Query', ...
[ 37811, 742, 15042, 37811, 198, 6738, 3049, 15042, 1330, 357, 198, 220, 220, 220, 43301, 11, 198, 220, 220, 220, 10644, 11, 198, 220, 220, 220, 12290, 11, 198, 220, 220, 220, 39606, 11, 198, 220, 220, 220, 48900, 11, 198, 220, 220, ...
2.163498
263
from abc import ABC, ABCMeta from typing import Any from . import registry from tensortrade.core.context import TradingContext, Context from tensortrade.core.base import Identifiable class InitContextMeta(ABCMeta): """Metaclass that executes `__init__` of instance in its core. This class works with the `Tr...
[ 198, 6738, 450, 66, 1330, 9738, 11, 9738, 48526, 198, 6738, 19720, 1330, 4377, 198, 198, 6738, 764, 1330, 20478, 198, 6738, 11192, 419, 27585, 13, 7295, 13, 22866, 1330, 25469, 21947, 11, 30532, 198, 6738, 11192, 419, 27585, 13, 7295, ...
2.787599
1,516
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from math import sqrt from math import sin # 函数作为参数传入 # 使用可变参数 print(same(3, abs, sqrt, sin)) print(do_fun([1, 2, 4, 9], abs, sqrt, sin))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 10688, 1330, 19862, 17034, 198, 6738, 10688, 1330, 7813, 198, 198, 2, 10263, 229, 121, 46763, 108, 43291...
1.780952
105
from selenium import webdriver import time try: # link = "http://suninjuly.github.io/registration1.html" link = "http://suninjuly.github.io/registration2.html" browser = webdriver.Chrome() browser.get(link) # Ваш код, который заполняет обязательные поля input_first_name = browser.find_element...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 11748, 640, 198, 198, 28311, 25, 220, 198, 220, 220, 220, 1303, 2792, 796, 366, 4023, 1378, 19155, 259, 73, 2062, 13, 12567, 13, 952, 14, 2301, 33397, 16, 13, 6494, 1, 198, 220, 220, ...
1.668838
921
import numpy as np # https://gist.github.com/bwhite/3726239
[ 11748, 299, 32152, 355, 45941, 628, 198, 2, 3740, 1378, 70, 396, 13, 12567, 13, 785, 14, 65, 11186, 14, 2718, 2075, 23516, 628, 628, 198 ]
2.538462
26
from kfp.v2.dsl import ( component, Input, Output, Dataset, Artifact, HTML, ) @component( packages_to_install=[ "dask[dataframe]==2021.12.0", "gcsfs==2021.11.1"] )
[ 6738, 479, 46428, 13, 85, 17, 13, 67, 6649, 1330, 357, 198, 220, 220, 220, 7515, 11, 198, 220, 220, 220, 23412, 11, 198, 220, 220, 220, 25235, 11, 198, 220, 220, 220, 16092, 292, 316, 11, 198, 220, 220, 220, 45908, 11, 198, 220,...
1.82906
117
import logging GROUP_SEPARATOR = f"{'-' * 10}" N_TEAMS = 42 N_MEMBERS = 3 N_TEAMS_MAX = 50 N_MEMBERS_MAX = 15 BODY_TEAMS_KEY = 'teams' BODY_ERRORS_KEY = 'errors' ERROR_TAG = 'Error' ERROR_MAX_MSG = f"User input Error. Maximum {N_TEAMS_MAX} teams and {N_MEMBERS_MAX} members for team. " \ f"Values mu...
[ 11748, 18931, 628, 198, 46846, 62, 5188, 27082, 25633, 796, 277, 1, 90, 6, 19355, 1635, 838, 36786, 198, 45, 62, 9328, 40834, 796, 5433, 198, 45, 62, 44, 3620, 33, 4877, 796, 513, 198, 198, 45, 62, 9328, 40834, 62, 22921, 796, 202...
2.339806
309
import matplotlib as mpl import matplotlib.pyplot as plt import multiprocessing as multi import numpy as np import os import pandas as pd import pmagpy import pmagpy.ipmag as ipmag import pmagpy.pmag as pmag import pmagpy.pmagplotlib as pmagplotlib import re import scipy.integrate as integrate import scipy.stats as st...
[ 11748, 2603, 29487, 8019, 355, 285, 489, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 18540, 305, 919, 278, 355, 5021, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 220, 198, 11748, 19798, 292, 355,...
2.197628
4,468
import datetime from sqlalchemy import Boolean, Column, Integer, String, ForeignKey, Date from sqlalchemy.orm import relationship from app.db.base_class import Base class User(Base): """用户表""" id = Column(Integer, primary_key=True, index=True) username = Column(String(32), unique=True, index=True, nulla...
[ 11748, 4818, 8079, 198, 198, 6738, 44161, 282, 26599, 1330, 41146, 11, 29201, 11, 34142, 11, 10903, 11, 8708, 9218, 11, 7536, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2776, 198, 198, 6738, 598, 13, 9945, 13, 8692, 62, 4871, 1330, ...
2.416198
889
from .model import HighResNet3D
[ 6738, 764, 19849, 1330, 3334, 4965, 7934, 18, 35, 198 ]
3.2
10
# Copyright 2021 Hathor Labs # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
[ 2, 15069, 33448, 36556, 273, 23500, 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, 74...
3.843373
166
import sys from libya_elections.settings.base import * # noqa DEBUG = True SECRET_KEY = 'dummy secret key for testing only' INTERNAL_IPS = ('127.0.0.1', ) EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' CELERY_TASK_ALWAYS_EAGER = False INSTALLED_BACKENDS = { HTTPTESTER_BACKEND: { "E...
[ 11748, 25064, 198, 198, 6738, 9195, 3972, 62, 9509, 507, 13, 33692, 13, 8692, 1330, 1635, 220, 1303, 645, 20402, 198, 198, 30531, 796, 6407, 198, 198, 23683, 26087, 62, 20373, 796, 705, 67, 13513, 3200, 1994, 329, 4856, 691, 6, 198, ...
2.244898
882
# -*- coding: utf-8 -*- import pytest from django.core.urlresolvers import reverse from pontoon.administration.forms import ( ProjectForm, ) from pontoon.administration.views import _create_or_update_translated_resources from pontoon.base.models import ( Entity, Locale, Project, ProjectLocale, ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 198, 6738, 45443, 2049, 13, 39081, 1358, 13, 23914, 1330, 357,...
2.881255
1,179
# -*- coding: utf-8 -*- # Copyright 2018-2022 the orix developers # # This file is part of orix. # # orix is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 2864, 12, 1238, 1828, 262, 267, 8609, 6505, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 267, 8609, 13, 198, 2, 198, 2, 267, 8609, 318, 1479, 3788, 25, 345,...
3.096026
604
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628, 628, 628, 628 ]
2.888889
9
import random import matplotlib.pyplot as plt import numpy as np from prettytable import PrettyTable from auction import Auction if __name__ == '__main__': buyers = 10 strategy = [1 for n in range(buyers)] # strategy[0] = 4 auctioneer = Auctioneer(0.1, bidding_factor_str...
[ 11748, 4738, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2495, 11487, 1330, 20090, 10962, 198, 198, 6738, 14389, 1330, 36071, 628, 198, 198, 361, 11593, 3672, 834, 66...
1.86215
428
import argparse from utils.utils import * from utils.line import Line from tqdm import trange import torch import torch.optim as optim import sys import pickle if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("-g", "--graph_path", type=str) parser.add_argument("-save", "--...
[ 11748, 1822, 29572, 198, 6738, 3384, 4487, 13, 26791, 1330, 1635, 198, 6738, 3384, 4487, 13, 1370, 1330, 6910, 198, 6738, 256, 80, 36020, 1330, 491, 858, 198, 11748, 28034, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 25064, 198...
2.341902
1,167
# SDT4Parser.py # # Callback target class for the ElementTree parser to parse a SDT4 from .SDT4Classes import * # # Hanlder for each of the element types # # # Assignment of element types and (handlerFunction, (tuple of allowed parents)) # handlers = { SDT4Parser.actionTag : (hand...
[ 2, 197, 10305, 51, 19, 46677, 13, 9078, 198, 2, 198, 2, 197, 47258, 2496, 1398, 329, 262, 11703, 27660, 30751, 284, 21136, 257, 9834, 51, 19, 198, 198, 6738, 764, 10305, 51, 19, 9487, 274, 1330, 1635, 628, 628, 198, 2, 198, 2, 1...
2.408184
1,002
from data import dex import re def validate_team(team): ''' team is an array of six pokemon sets ''' if len(team) > 6: raise InValidSetError("more than 6 pokemon") pokemon_names = set() for pokemon in team: # check if the pokemon is an actual pokemon species = re.sub(r'...
[ 6738, 1366, 1330, 36017, 198, 11748, 302, 198, 198, 4299, 26571, 62, 15097, 7, 15097, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 1074, 318, 281, 7177, 286, 2237, 43962, 5621, 198, 220, 220, 220, 705, 7061, 198, 220, 22...
2.361891
677
from collections import namedtuple as Struct from sklearn.model_selection import GroupShuffleSplit, ShuffleSplit DataSplitConfig = Struct('DataSplitConfig', ['validation_size', 'test_size', 'random_seed']) DEFAULT_SPLIT_CONFIG = DataSplitConfig(0.2, 0.2, 1337)
[ 6738, 17268, 1330, 3706, 83, 29291, 355, 32112, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4912, 2484, 18137, 41205, 11, 911, 18137, 41205, 198, 198, 6601, 41205, 16934, 796, 32112, 10786, 6601, 41205, 16934, 3256, 37250, 12102, ...
3.207317
82
import csv file = open("sex-ratio.csv") csvreader = csv.reader(file) header = next(csvreader) mapped = {} for row in csvreader: if(row[0] not in mapped): mapped[row[0]]={} mapped[row[0]][row[2]] = row[3] # f = open("converted.csv",'w') rows=[] for c in mapped: row = [c] for y in mapped[c]:...
[ 11748, 269, 21370, 198, 198, 7753, 220, 796, 1280, 7203, 8044, 12, 10366, 952, 13, 40664, 4943, 198, 198, 40664, 46862, 796, 269, 21370, 13, 46862, 7, 7753, 8, 198, 198, 25677, 796, 1306, 7, 40664, 46862, 8, 198, 198, 76, 6320, 796,...
2.254296
291
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import # Markdown is optional try: import markdown def apply_markdown(text): """ Simple wrapper around :func:`markdown.markdown` to set the base level of '#' style headers to <h2>. """ extensions...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 11, 4112, 62, 11748, 198, 198, 2, 2940, 2902, 318, 11902, 198, 28311, 25, 198, 220, 220, 220, 1330, 1317, 2...
2.44186
215
"""Finite Difference Methods """ import numpy as np def FDMWeights(M, x0, alpha): """Calculate the weights in finite difference formulas for any order of derivative and to any order of accuracy on onedimensional grids with arbitrary spacing. Args: M (int): Order of derivative x0 (flo...
[ 37811, 37, 9504, 43795, 25458, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 376, 23127, 1135, 2337, 7, 44, 11, 2124, 15, 11, 17130, 2599, 198, 220, 220, 220, 37227, 9771, 3129, 378, 262, 19590, 287, 27454, 3580...
2.21195
1,590
#!/usr/bin/env python3 import os import time import datetime from bluepy import btle from bluepy.btle import Scanner, DefaultDelegate, Peripheral, Characteristic, ScanEntry, Service, UUID import curses import curses.textpad from carcontrol import CarControl # Scan timeout in seconds SCAN_TIMEOUT = 10 ## screen part...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 198, 6738, 4171, 9078, 1330, 275, 7100, 198, 6738, 4171, 9078, 13, 65, 7100, 1330, 20937, 1008, 11, 15161, 5005, 34...
2.373171
410
import math import torch import torch.nn as nn
[ 11748, 10688, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 628, 628 ]
3.1875
16
import json from app.models import BaseModel
[ 11748, 33918, 198, 198, 6738, 598, 13, 27530, 1330, 7308, 17633, 628 ]
3.916667
12
""" This module contains all the functions from the ``operator`` module (bar some functions that dind't feel like they belonged here) transformed into a spice so it can be used more confortable. :Example: Consider adding ``2`` to a list of numbers:: map(add(2), [1,2,3,4,5]) """ import operator from spycy impor...
[ 37811, 198, 1212, 8265, 4909, 477, 262, 5499, 422, 262, 7559, 46616, 15506, 8265, 357, 5657, 617, 198, 12543, 2733, 326, 288, 521, 470, 1254, 588, 484, 19611, 994, 8, 14434, 656, 257, 198, 2777, 501, 523, 340, 460, 307, 973, 517, 10...
2.504488
2,228
# Copyright 2021 curoky(cccuroky@gmail.com). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
[ 2, 15069, 33448, 269, 1434, 2584, 7, 535, 66, 1434, 2584, 31, 14816, 13, 785, 737, 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, ...
2.681582
961
# -*- coding: utf-8 -*- from django.contrib.contenttypes.models import ContentType from rest_framework import serializers from vvphotos.models import Album
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 410, 85, 24729, 13, 27...
3.333333
48
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from p...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 14432, 84, 11712, 30617, 7824, 628, 220, 220, 220, 383, 14432, 84, 11712, 30617, 7824, 3769, 345, 351, 257, 3665, 11, 11282, 11, 290, 2829, 5313, 2594, 7824, 329, ...
2.327616
2,857
from flask.helpers import url_for from pyTrendsExtensions import GetTrendingOverTime from flask import Flask, redirect # from flask_restful import Api, Resource, reqparse, abort, fields, marshal_with # from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) # api = Api(app) @app.route("/") @app.route("/<keywor...
[ 6738, 42903, 13, 16794, 364, 1330, 19016, 62, 1640, 198, 6738, 12972, 45461, 82, 11627, 5736, 1330, 3497, 45461, 278, 5886, 7575, 198, 6738, 42903, 1330, 46947, 11, 18941, 198, 2, 422, 42903, 62, 2118, 913, 1330, 5949, 72, 11, 20857, ...
3.056604
106
''' TCP server interface for console. The TCP server will be automatically built. - @interface: The function for user interface, and keep the server running. ''' from . import logger from .defines import TCPServer server = TCPServer() server.start()
[ 7061, 6, 201, 198, 4825, 47, 4382, 7071, 329, 8624, 13, 201, 198, 464, 23633, 4382, 481, 307, 6338, 3170, 13, 201, 198, 201, 198, 12, 2488, 39994, 25, 383, 2163, 329, 2836, 7071, 11, 290, 1394, 262, 4382, 2491, 13, 201, 198, 7061,...
3.216867
83
from django.shortcuts import render from django.views.generic import ListView from .models import Video,Audio,Image,Note
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 7343, 7680, 198, 6738, 764, 27530, 1330, 7623, 11, 21206, 11, 5159, 11, 6425, 198 ]
3.78125
32
from worldtools import * from enum import Enum from math import sin, cos, pi from random import uniform class Animal: """Class representing Animal in the world""" def __init__(self, world, pos: (float, float), speed: float): """ Initializes the Animal Args: world (World): The world pos ( (float, float)...
[ 6738, 995, 31391, 1330, 1635, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 10688, 1330, 7813, 11, 8615, 11, 31028, 198, 6738, 4738, 1330, 8187, 198, 198, 4871, 13792, 25, 198, 197, 37811, 9487, 10200, 13792, 287, 262, 995, 37811, 628, ...
2.709148
1,279
import graphgallery.nn.models.dgl as models from graphgallery.data.sequence import FullBatchSequence from graphgallery import functional as gf from graphgallery.gallery.nodeclas import NodeClasTrainer from graphgallery.gallery.nodeclas import DGL @DGL.register() class APPNP(NodeClasTrainer): """Impleme...
[ 11748, 4823, 24460, 13, 20471, 13, 27530, 13, 67, 4743, 355, 4981, 201, 198, 6738, 4823, 24460, 13, 7890, 13, 43167, 1330, 6462, 33, 963, 44015, 594, 201, 198, 6738, 4823, 24460, 1330, 10345, 355, 308, 69, 201, 198, 6738, 4823, 24460,...
2.817814
247
#!/usr/bin/env python3 """ This module contains all class to manage variable choice Heuristic """ class VariableChoiceHeuristic: """ Super class to handle variable choice heuristic """ def __init__(self, vars): """ Args: vars (set): variables used in all clauses. """ ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 770, 8265, 4909, 477, 1398, 284, 6687, 7885, 3572, 679, 27915, 37227, 198, 198, 4871, 35748, 46770, 1544, 27915, 25, 198, 220, 220, 220, 37227, 3115, 1398, 284, 5412, 7885, ...
2.35006
837
from mayan.apps.views.forms import FileDisplayForm
[ 6738, 743, 272, 13, 18211, 13, 33571, 13, 23914, 1330, 9220, 23114, 8479, 201, 198, 201, 198 ]
3.176471
17
from matplotlib import pyplot as plt import math, sigfig, warnings # module "sigfig" requires "pip install sigfig" at command line import numpy as np # TRUSS INNER CLASSES END HERE # MAIN FUNCTIONS END HERE build_truss(815, True)
[ 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 11748, 10688, 11, 43237, 5647, 11, 14601, 1303, 8265, 366, 82, 328, 5647, 1, 4433, 366, 79, 541, 2721, 43237, 5647, 1, 379, 3141, 1627, 198, 11748, 299, 32152, 355, 45941...
2.962963
81
import rospy import numpy as np from std_msgs.msg import Float64 from gazebo_msgs.srv import * from geometry_msgs.msg import * import sys, select, os import roslib if os.name == 'nt': import msvcrt else: import tty, termios roslib.load_manifest('dual_gazebo') if __name__ == '__main__': try: ro...
[ 11748, 686, 2777, 88, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 14367, 62, 907, 14542, 13, 19662, 1330, 48436, 2414, 198, 6738, 308, 1031, 1765, 78, 62, 907, 14542, 13, 27891, 85, 1330, 1635, 198, 6738, 22939, 62, 907, 14542, 13,...
1.738555
983
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
[ 2, 795, 16436, 25, 532, 9, 12, 4235, 25, 21015, 26, 12972, 12, 521, 298, 12, 28968, 25, 604, 26, 7400, 12, 10394, 25, 604, 26, 33793, 12, 8658, 82, 12, 14171, 25, 18038, 532, 9, 12, 198, 2, 409, 25, 900, 39747, 28, 19, 40379, ...
2.978365
416
# Water Jug problem print("Solution for Water Jug problem!") x = int(input("Enter the capacity of jug1 : ")) y = int(input("Entert the capacity of jug2 : ")) target = int(input("Enter the target volume : ")) start = [0, 0] if target % gcd(x,y) == 0: print(bfs(start, target, x, y)) else: print("No so...
[ 2, 5638, 449, 1018, 1917, 201, 198, 201, 198, 4798, 7203, 46344, 329, 5638, 449, 1018, 1917, 2474, 8, 201, 198, 87, 796, 493, 7, 15414, 7203, 17469, 262, 5339, 286, 45808, 16, 1058, 366, 4008, 201, 198, 88, 796, 493, 7, 15414, 720...
2.315789
152
''' author: cxn version: 0.1.0 read camera calibration from mat ''' import numpy as np import cv2 from scipy.io import loadmat import matplotlib.pyplot as plt #双目相机参数 # 畸变校正和立体校正 def rectifyImage(image1, image2, map1x, map1y, map2x, map2y): """ cv2.remap重映射,就是把一幅图像中某位置的像素放置到另一个图片指定位置的过程 """ ...
[ 7061, 6, 198, 9800, 25, 43213, 77, 198, 9641, 25, 657, 13, 16, 13, 15, 198, 961, 4676, 36537, 422, 2603, 198, 7061, 6, 628, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 6738, 629, 541, 88, 13, 952, 1330, 344...
1.538567
726
#! /usr/bin/env python # -*- coding: utf-8 -*- # Put your models here from sqlalchemy import Column, BigInteger, Integer, String, SmallInteger, Float, Boolean, DECIMAL, Text, DateTime, Date, \ Index, UniqueConstraint from sqlalchemy.dialects.mysql import MEDIUMTEXT, LONGTEXT, BIGINT, INTEGER, SMALLINT, TINYINT, T...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5930, 534, 4981, 994, 198, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 4403, 46541, 11, 34142, 11, 10903...
1.95723
491
# -*- coding: utf-8 -*- """ Author: Zhao Xinlu School: BUPT Date: 2018-01-15 Function: Some different searching algorithms and its performance """ def Simple_search(lists, key): ''' Simple_search: 数据不排序的线性查找,遍历数据元素; 性能: 时间复杂度:O(n) :param lists: search list :param key: the value of key :...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 13838, 25, 29436, 25426, 2290, 198, 26130, 25, 347, 8577, 51, 198, 10430, 25, 2864, 12, 486, 12, 1314, 198, 22203, 25, 2773, 1180, 10342, 16113, 290, 663, ...
1.626442
2,428
""" resources.oauth_ropc ~~~~~~~~~~~~~~~~~~~~ OAuth2 Resource Owner Password Credentials Grant resource object with responders. This resource should be used to accept access_token requests according to RFC 6749 section 4.3: tools.ietf.org/html/rfc6749#section-4.3 The resource req...
[ 37811, 198, 220, 220, 220, 4133, 13, 12162, 1071, 62, 1773, 66, 198, 220, 220, 220, 220, 27156, 8728, 628, 220, 220, 220, 440, 30515, 17, 20857, 23853, 30275, 327, 445, 14817, 12181, 8271, 198, 220, 220, 220, 2134, 351, 33339, 13, 6...
2.254176
1,377
import os from flask import Flask, request from fbmessenger import BaseMessenger from fbmessenger import quick_replies from fbmessenger.elements import Text from fbmessenger.thread_settings import GreetingText, GetStartedButton, MessengerProfile from fbmessenger import elements from fbmessenger import templates ACCESS...
[ 11748, 28686, 198, 6738, 42903, 1330, 46947, 11, 2581, 198, 6738, 277, 20475, 408, 6540, 1330, 7308, 36479, 6540, 198, 6738, 277, 20475, 408, 6540, 1330, 2068, 62, 35666, 444, 198, 6738, 277, 20475, 408, 6540, 13, 68, 3639, 1330, 8255, ...
2.952128
188
# -*- coding: utf-8 -*- from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from model.contact import ContactBaseData import re
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 13, 17077, 1330, 5313, 32103, 21321, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 1330, 2938, 62, 17561, ...
3.35
60
# ################################################################################################ # ------------------------------------------------------------------------------------------------ # File: text_recognition_tesseract_engine.py # Author: Luis Monteiro # # Created on nov 17, 2019, 22:00 PM # -----------...
[ 2, 1303, 29113, 29113, 14468, 7804, 4242, 21017, 198, 2, 16529, 3880, 198, 2, 9220, 25, 220, 220, 2420, 62, 26243, 653, 62, 83, 408, 263, 529, 62, 18392, 13, 9078, 198, 2, 6434, 25, 20894, 22489, 7058, 198, 2, 198, 2, 15622, 319, ...
8.147465
217
import OSC, time #import rtmidi_python as rtmidi #midi_out = rtmidi.MidiOut() #midi_out.open_port(0) if __name__ == "__main__": s = OSC.OSCServer(('10.100.7.151', 57120)) # listen on localhost, port 57120 s.addMsgHandler('/startup', handler) # call handler() for OSC messages received with the /startup a...
[ 11748, 440, 6173, 11, 640, 198, 2, 11748, 374, 83, 13602, 72, 62, 29412, 355, 374, 83, 13602, 72, 198, 2, 13602, 72, 62, 448, 796, 374, 83, 13602, 72, 13, 44, 19830, 7975, 3419, 198, 2, 13602, 72, 62, 448, 13, 9654, 62, 634, 7...
2.423611
144
# -*- coding: utf-8 -*- # @Author: Manuel Rodriguez <valle> # @Date: 28-Aug-2017 # @Email: valle.mrv@gmail.com # @Filename: views.py # @Last modified by: valle # @Last modified time: 02-Mar-2018 # @License: Apache license vesion 2.0 from django.forms.models import model_to_dict from django.db.models import Q fro...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2488, 13838, 25, 25995, 19391, 1279, 2100, 293, 29, 198, 2, 2488, 10430, 25, 220, 220, 2579, 12, 12512, 12, 5539, 198, 2, 2488, 15333, 25, 220, 1188, 293, 13...
2.751765
850
from __future__ import ( absolute_import, unicode_literals, ) import unittest from pysoa.common.errors import Error from pysoa.test.plan.grammar import assertions from pysoa.test.plan.grammar.data_types import AnyValue # noinspection PyTypeChecker
[ 6738, 11593, 37443, 834, 1330, 357, 198, 220, 220, 220, 4112, 62, 11748, 11, 198, 220, 220, 220, 28000, 1098, 62, 17201, 874, 11, 198, 8, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 12972, 568, 64, 13, 11321, 13, 48277, 1330, ...
2.954545
88
import asyncio import socket import time import logging from unittest.mock import Mock from torba.testcase import IntegrationTestCase, Conductor import lbry.wallet from lbry.schema.claim import Claim from lbry.wallet.transaction import Transaction, Output from lbry.wallet.dewies import dewies_to_lbc as d2l, lbc_to_dewi...
[ 11748, 30351, 952, 198, 11748, 17802, 198, 11748, 640, 198, 11748, 18931, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 6738, 7332, 7012, 13, 9288, 7442, 1330, 38410, 14402, 20448, 11, 9724, 33029, 198, 11748, 18360, 563, 13,...
2.76506
332
import sqlite3 conn = sqlite3.connect('northwind_small.sqlite3') curs = conn.cursor() query = '''SELECT ProductName FROM Product ORDER BY UnitPrice DESC LIMIT 10''' curs.execute(query) results = curs.fetchall() print('Ten most expensive items (per unit price):') for result in results: print(result[0]) query = '''S...
[ 11748, 44161, 578, 18, 198, 37043, 796, 44161, 578, 18, 13, 8443, 10786, 43588, 7972, 62, 17470, 13, 25410, 578, 18, 11537, 198, 66, 1834, 796, 48260, 13, 66, 21471, 3419, 198, 22766, 796, 705, 7061, 46506, 8721, 5376, 16034, 8721, 19...
2.95092
652
"""Module for functional data manipulation in a basis system. Defines functional data object in a basis function system representation and the corresponding basis classes. """ import copy import warnings from abc import ABC, abstractmethod from typing import Tuple import numpy as np from ..._utils import _domain_ra...
[ 37811, 26796, 329, 10345, 1366, 17512, 287, 257, 4308, 1080, 13, 198, 198, 7469, 1127, 10345, 1366, 2134, 287, 257, 4308, 2163, 1080, 10552, 290, 198, 1169, 11188, 4308, 6097, 13, 198, 198, 37811, 198, 11748, 4866, 198, 11748, 14601, 19...
2.346202
3,963
from collections import defaultdict import math import time import random import tensorflow as tf import numpy as np # The length of the n-gram N = 2 # Functions to read in the corpus # NOTE: We are using data from the Penn Treebank, which is already converted # into an easy-to-use format with "<unk>" symbols. ...
[ 6738, 17268, 1330, 4277, 11600, 198, 11748, 10688, 198, 11748, 640, 198, 11748, 4738, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 383, 4129, 286, 262, 299, 12, 4546, 198, 45, 796, 362, 1...
2.345317
1,057
# Generated by Django 2.2.12 on 2020-08-02 14:03 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1065, 319, 12131, 12, 2919, 12, 2999, 1478, 25, 3070, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.8
30
t.left(90) t.color("green") t.speed(1) tree(90)
[ 198, 83, 13, 9464, 7, 3829, 8, 198, 198, 83, 13, 8043, 7203, 14809, 4943, 198, 83, 13, 12287, 7, 16, 8, 198, 21048, 7, 3829, 8, 628 ]
1.821429
28
# genetic algorithm search of the one max optimization problem from numpy.random import randint from numpy.random import rand import numpy as np import json # objective function # tournament selection # crossover two parents to create two children # mutation operator # genetic algorithm if False: # define t...
[ 2, 8513, 11862, 2989, 286, 262, 530, 3509, 23989, 1917, 198, 6738, 299, 32152, 13, 25120, 1330, 43720, 600, 198, 6738, 299, 32152, 13, 25120, 1330, 43720, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33918, 198, 198, 2, 9432, 2163, ...
2.869565
253
from django import forms from joblistings.models import Job from accounts.models import Employer from ace.constants import CATEGORY_CHOICES, MAX_LENGTH_TITLE, MAX_LENGTH_DESCRIPTION, MAX_LENGTH_RESPONSABILITIES, MAX_LENGTH_REQUIREMENTS, MAX_LENGTH_STANDARDFIELDS, LOCATION_CHOICES from tinymce.widgets import TinyMCE fro...
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 1693, 4868, 654, 13, 27530, 1330, 15768, 198, 6738, 5504, 13, 27530, 1330, 12645, 263, 198, 6738, 31506, 13, 9979, 1187, 1330, 327, 6158, 38, 15513, 62, 44899, 34444, 11, 25882, 62, 43, 49494, ...
3.346939
147
from .cluster_dw import ClusterWrapper from .graphsage_dw import GraphSAGEDataWrapper from .m3s_dw import M3SDataWrapper from .network_embedding_dw import NetworkEmbeddingDataWrapper from .node_classification_dw import FullBatchNodeClfDataWrapper from .pprgo_dw import PPRGoDataWrapper from .sagn_dw import SAGNDataWrapp...
[ 6738, 764, 565, 5819, 62, 67, 86, 1330, 38279, 36918, 2848, 198, 6738, 764, 34960, 82, 496, 62, 67, 86, 1330, 29681, 4090, 38, 1961, 1045, 36918, 2848, 198, 6738, 764, 76, 18, 82, 62, 67, 86, 1330, 337, 18, 50, 6601, 36918, 2848, ...
2.833333
114
#!/usr/bin/env python3 import io import sys import generator from generator.cmdline import * if __name__ == '__main__': if len(sys.argv) == 1: run_cli() else: cmds = [] line_buf = [] for arg in sys.argv[1:]: if arg == '--': cmds.append(' '.join(line...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 33245, 198, 11748, 25064, 198, 198, 11748, 17301, 198, 6738, 17301, 13, 28758, 1370, 1330, 1635, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, ...
1.865672
268
import os import pathlib import click import parse from fishtools.config import Config @click.command() @click.argument('config_fpath') if __name__ == "__main__": main()
[ 11748, 28686, 198, 11748, 3108, 8019, 198, 198, 11748, 3904, 198, 11748, 21136, 198, 198, 6738, 5916, 31391, 13, 11250, 1330, 17056, 628, 198, 198, 31, 12976, 13, 21812, 3419, 198, 31, 12976, 13, 49140, 10786, 11250, 62, 69, 6978, 11537...
3
61
#!/usr/bin/env python # # Copyright 2015 Martin Cochran # # 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 la...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 1853, 5780, 33005, 2596, 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, 239...
2.278214
2,038
from owslib.wms import WebMapService import pyproj from PIL import Image from typing import Tuple, List, Dict, Any import os.path from pathlib import Path FORMAT_ENDINGS = {"image/jpeg": "jpg"}
[ 6738, 12334, 6649, 571, 13, 86, 907, 1330, 5313, 13912, 16177, 198, 11748, 12972, 1676, 73, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 19720, 1330, 309, 29291, 11, 7343, 11, 360, 713, 11, 4377, 198, 11748, 28686, 13, 6978, 198, 6738...
3.078125
64
from __future__ import print_function import os.path from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request from google.oauth2.credentials import Credentials import time from email.mime.text import MIMEText from .models imp...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 13, 6978, 198, 6738, 23645, 499, 291, 75, 1153, 13, 67, 40821, 1330, 1382, 198, 6738, 23645, 62, 18439, 62, 12162, 1071, 8019, 13, 11125, 1330, 2262, 4262, 4677, 37535, ...
2.953229
449
# This module is automatically generated by autogen.sh. DO NOT EDIT. from . import _IBM # Aliases
[ 2, 770, 8265, 318, 6338, 7560, 416, 1960, 6644, 13, 1477, 13, 8410, 5626, 48483, 13, 198, 198, 6738, 764, 1330, 4808, 9865, 44, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 198, 198, 2, 12104, 1386, 198 ]
2.97561
41
_base_='../swin/mask_rcnn_swin-t-p4-w7_fpn_1x_coco.py' dataset_type='CocoDataset' prefix='../coco-annotator/datasets/test/' classes=('plasticbottle','alu can','box') # classes=('',) model = dict( roi_head=dict( bbox_head=dict(num_classes=3), mask_head=dict(num_classes=3))) # train_pipeline = [ # ...
[ 62, 8692, 62, 11639, 40720, 2032, 259, 14, 27932, 62, 6015, 20471, 62, 2032, 259, 12, 83, 12, 79, 19, 12, 86, 22, 62, 69, 21999, 62, 16, 87, 62, 66, 25634, 13, 9078, 6, 198, 19608, 292, 316, 62, 4906, 11639, 34, 25634, 27354, ...
1.97343
828
""" Handle MySQL I/O via sqlalchemy engine and ORM """ from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from flickipedia.config import schema from flickipedia.config import log, settings class DataIOMySQL(object): """ Class implementing data IO for MySQL. Utilizes sqlalchemy [1]. ...
[ 37811, 198, 37508, 33476, 314, 14, 46, 2884, 44161, 282, 26599, 3113, 290, 6375, 44, 198, 37811, 198, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 6738, 26810, 11151...
2.028834
2,393
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-21 23:08 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 20, 319, 2177, 12, 940, 12, 2481, 2242, 25, 2919, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.678571
56
"""Tests for the Patient model."""
[ 37811, 51, 3558, 329, 262, 35550, 2746, 526, 15931, 628 ]
3.6
10
# Python 3.7.9 # pip install clipboard # pip install pywin32 # pip install pyautogui # pip install pynput # Google chrome Keyboard Shortcuts for Google Translate https://chrome.google.com/webstore/detail/keyboard-shortcuts-for-go/akjhnbnjanndggbcegmdggfjjclohjpo # alt+j listen google translate # Google chrome Dark Re...
[ 2, 11361, 513, 13, 22, 13, 24, 198, 198, 2, 7347, 2721, 47999, 198, 2, 7347, 2721, 12972, 5404, 2624, 198, 2, 7347, 2721, 12972, 2306, 519, 9019, 198, 2, 7347, 2721, 279, 2047, 1996, 198, 198, 2, 3012, 32030, 31973, 10073, 23779, ...
2.851936
439
# -*- coding: UTF-8 -*- # # Given a linked list, swap every two adjacent nodes and return its head. # # For example, # Given 1->2->3->4, you should return the list as 2->1->4->3. # # Your algorithm should use only constant space. You may not modify the values in the list, only nodes itself can be changed. # # Python, P...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 2, 198, 2, 11259, 257, 6692, 1351, 11, 16075, 790, 734, 15909, 13760, 290, 1441, 663, 1182, 13, 198, 2, 198, 2, 1114, 1672, 11, 198, 2, 11259, 352, 3784, 17, 3784, 18, ...
3.266667
105
from unittest.case import TestCase from probability.discrete import Discrete, Conditional
[ 6738, 555, 715, 395, 13, 7442, 1330, 6208, 20448, 198, 198, 6738, 12867, 13, 15410, 8374, 1330, 8444, 8374, 11, 9724, 1859, 628 ]
4
23
"""Adversarial Variational Bayes (AVB). Adversarial Variational Bayes: Unifying Variational Autoencoders and Generative Adversarial Networks http://arxiv.org/abs/1701.04722 Ref) https://github.com/gdikov/adversarial-variational-bayes http://seiya-kumada.blogspot.com/2018/07/adversarial-variational-bayes.html https://...
[ 37811, 2782, 690, 36098, 15965, 864, 4696, 274, 357, 10116, 33, 737, 198, 198, 2782, 690, 36098, 15965, 864, 4696, 274, 25, 791, 4035, 15965, 864, 5231, 6571, 19815, 364, 290, 2980, 876, 198, 2782, 690, 36098, 27862, 198, 4023, 1378, ...
2.088857
1,373
from pytest_httpx import HTTPXMock import httpx_auth from tests.auth_helper import get_header
[ 6738, 12972, 9288, 62, 4023, 87, 1330, 14626, 37643, 735, 198, 198, 11748, 2638, 87, 62, 18439, 198, 6738, 5254, 13, 18439, 62, 2978, 525, 1330, 651, 62, 25677, 628 ]
3.2
30
#!/usr/bin/env python3 import argparse import sys import os # This key table has to match the one in bootloader keyTbl = [0xDEADBEEF, 0xAAAAAAAA, 0x11111111, 0x00000000, 0xFFFFFFFF, 0x55555555, 0xA5A5A5A5, 0x66666666] #****************************************************************************** # # Main function #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 2, 770, 1994, 3084, 468, 284, 2872, 262, 530, 287, 6297, 29356, 198, 2539, 51, 2436, 796, 685, 15, 87, 72...
4.005769
520
from django.views.generic import TemplateView from django.views.decorators.cache import never_cache from django.db.models import Count, Sum from django.db.models.functions import Coalesce from backend.api.models import Profile, ProfileDisplayFields, PostAggregateFields from django.http import JsonResponse from django.h...
[ 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 198, 6738, 42625, 14208, 13, 33571, 13, 12501, 273, 2024, 13, 23870, 1330, 1239, 62, 23870, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 2764, 11, 5060, 198, 6738, 4262...
2.477186
526
# # Created on Wed Nov 18 2020 # # Copyright (c) 2020 - Simon Prast # import os import uuid from django.conf import settings from django.db import models from user.models import User
[ 2, 198, 2, 15622, 319, 3300, 5267, 1248, 12131, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 532, 11288, 1736, 459, 198, 2, 628, 198, 11748, 28686, 198, 11748, 334, 27112, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738,...
3.183333
60
p1 = People("Maria", 1999) print(p1.name) print(p1.birthYear) print(p1.age) p1.pillar = "Architecture and Sustainable Design (ASD)" print(f"{p1.name} is {p1.age} years old, and she is majored in {p1.pillar}")
[ 198, 198, 79, 16, 796, 4380, 7203, 46827, 1600, 7358, 8, 198, 4798, 7, 79, 16, 13, 3672, 8, 198, 4798, 7, 79, 16, 13, 24280, 17688, 8, 198, 4798, 7, 79, 16, 13, 496, 8, 198, 198, 79, 16, 13, 41643, 796, 366, 19895, 5712, 495...
2.366667
90
#!/usr/bin/env python # -*- coding: utf-8 -*- """Perform a functional test of the list command.""" import os import orion.core.cli def test_no_exp(monkeypatch, clean_db, capsys): """Test that nothing is printed when there are no experiments.""" monkeypatch.chdir(os.path.dirname(os.path.abspath(__file__))) ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 5990, 687, 257, 10345, 1332, 286, 262, 1351, 3141, 526, 15931, 198, 11748, 28686, 198, 198, 11748, 393, 295, 13,...
2.559429
1,893
from rest_framework import serializers from .models import Teacher,Timetable,Klass,Pupil,Cabinet,Subject, Grade class TeacherSerializer(serializers.ModelSerializer): """Список учителей""" class TeacherAddSerializer(serializers.ModelSerializer): """Добавление учителя""" class PupilSerializer(se...
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 201, 198, 6738, 764, 27530, 1330, 32019, 11, 14967, 316, 540, 11, 42, 31172, 11, 47, 929, 346, 11, 34, 6014, 316, 11, 19776, 11, 22653, 201, 198, 201, 198, 201, 198, 4871, 32019, 32634, 750...
2.307763
1,082
import argparse import os import numpy as np from tqdm import tqdm from mypath import Path from dataloaders import make_data_loader from modeling.sync_batchnorm.replicate import patch_replication_callback from modeling.erfnet_road import * from utils.loss import SegmentationLosses from utils.calculate_weights import c...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 616, 6978, 1330, 10644, 198, 6738, 4818, 282, 1170, 364, 1330, 787, 62, 7890, 62, 29356, 198, ...
3.205
200
name0_1_0_0_0_3_0 = None name0_1_0_0_0_3_1 = None name0_1_0_0_0_3_2 = None name0_1_0_0_0_3_3 = None name0_1_0_0_0_3_4 = None
[ 3672, 15, 62, 16, 62, 15, 62, 15, 62, 15, 62, 18, 62, 15, 796, 6045, 198, 198, 3672, 15, 62, 16, 62, 15, 62, 15, 62, 15, 62, 18, 62, 16, 796, 6045, 198, 198, 3672, 15, 62, 16, 62, 15, 62, 15, 62, 15, 62, 18, 62, 17, ...
1.454545
88
import csv import config as C import pandas as pd from sklearn import preprocessing import numpy as np if __name__ == '__main__': df = pd.read_csv('./JsonToCSV/data0126.csv') ecgList = [] recordLen = 10000 for i in range(len(df.ECG)): ecgList.append(changeToList(df.ECG[i].split(" "))) fo...
[ 11748, 269, 21370, 198, 11748, 4566, 355, 327, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 1330, 662, 36948, 198, 11748, 299, 32152, 355, 45941, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, ...
1.911184
608
import sys import piLock.configuration as conf import classErrorLog as errorLog
[ 11748, 25064, 198, 11748, 31028, 25392, 13, 11250, 3924, 355, 1013, 198, 11748, 1398, 12331, 11187, 355, 4049, 11187, 198 ]
4
20
# Github : https://github.com/adarsh2104 # HR-Profile: https://www.hackerrank.com/adarsh_2104 # Challenge : https://www.hackerrank.com/challenges/s10-quartiles # Max Score : 30 n = input() input_array = sorted([int(x) for x in input().split()]) print(find_median(input_array[:len(input_array)//2])) print(fin...
[ 198, 2, 220, 38994, 220, 220, 220, 1058, 3740, 1378, 12567, 13, 785, 14, 324, 5406, 17, 13464, 198, 2, 220, 15172, 12, 37046, 25, 3740, 1378, 2503, 13, 31153, 8056, 962, 13, 785, 14, 324, 5406, 62, 17, 13464, 198, 2, 220, 13879, ...
2.588957
163
import attr from couchexport.export import export_raw from couchexport.models import Format TITLE_ROW = [ 'Source Field', 'Field', 'Map Via', 'Data Source', 'Filter Name', 'Filter Value', 'Table Name', 'Format Via', ] @attr.s @attr.s @attr.s
[ 11748, 708, 81, 198, 198, 6738, 2284, 2395, 87, 634, 13, 39344, 1330, 10784, 62, 1831, 198, 6738, 2284, 2395, 87, 634, 13, 27530, 1330, 18980, 198, 198, 49560, 2538, 62, 49, 3913, 796, 685, 198, 220, 220, 220, 705, 7416, 7663, 3256,...
2.369748
119
""" Handles visit long trends (scaling factors) applied to the observation. The classic cases are the `hook' and long term ramp """ import abc import numpy as np class BaseVisitTrend(object): """ Visit trends take input the visit planner output and generate a scaling factor that will be multiplied per expos...
[ 37811, 7157, 829, 3187, 890, 11257, 357, 1416, 4272, 5087, 8, 5625, 284, 262, 13432, 13, 383, 198, 49421, 2663, 389, 262, 4600, 25480, 6, 290, 890, 3381, 10454, 198, 37811, 198, 198, 11748, 450, 66, 198, 198, 11748, 299, 32152, 355, ...
2.873171
410
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628, 198 ]
2.9
40
# # Author    : Manuel Bernal Llinares # Project   : trackhub-creator # Timestamp : 07-09-2017 11:24 # --- # © 2017 Manuel Bernal Llinares <mbdebian@gmail.com> # All rights reserved. # """ This pipeline creates a trackhub for a PRIDE project, based on the information provided via a JSON formatted file, as it can be ...
[ 2, 220, 198, 2, 6434, 33477, 1849, 25, 25995, 6206, 282, 18315, 1437, 411, 198, 2, 4935, 4603, 1849, 25, 2610, 40140, 12, 45382, 198, 2, 5045, 27823, 1058, 8753, 12, 2931, 12, 5539, 1367, 25, 1731, 198, 2, 11420, 198, 2, 10673, 21...
2.497216
3,592
import pytest from pytest_mock import mocker import pandas as pd from kipoiseq.transforms.functional import translate, rc_dna from kipoiseq.dataclasses import Interval, Variant from kipoiseq.extractors.protein import cut_transcript_seq, gtf_row2interval, \ CDSFetcher, TranscriptSeqExtractor, ProteinSeqExtractor, \ ...
[ 11748, 12972, 9288, 198, 6738, 12972, 9288, 62, 76, 735, 1330, 285, 12721, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 479, 541, 25678, 80, 13, 7645, 23914, 13, 45124, 1330, 15772, 11, 48321, 62, 67, 2616, 198, 6738, 479, 541, ...
2.4225
400
from PIL import Image import numpy as np # Works when launched from terminal # noinspection PyUnresolvedReferences from k_means import k_means input_image_file = 'lena.jpg' output_image_prefix = 'out_lena' n_clusters = [2, 3, 5] max_iterations = 100 launch_count = 3 main()
[ 6738, 350, 4146, 1330, 7412, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 10933, 618, 5611, 422, 12094, 198, 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 6738, 479, 62, 1326, 504, 1330, 479, 62, 1326, 504, 198, 198, 1...
2.818182
99
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # 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, 19617, 28, 40477, 12, 23, 198, 2, 15069, 12131, 383, 3012, 4992, 46665, 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, ...
2.817932
4,361
from .pytransform import pyarmor_runtime pyarmor_runtime() __pyarmor__(__name__, __file__, b'\x50\x59\x41\x52\x4d\x4f\x52\x00\x00\x03\x09\x00\x61\x0d\x0d\x0a\x08\x2d\xa0\x01\x00\x00\x00\x00\x01\x00\x00\x00\x40\x00\x00\x00\xed\x00\x00\x00\x00\x00\x00\x18\x3d\x71\xc5\x03\x9e\x68\x9a\xa0\x37\x72\x21\xef\xad\x8a\xf4\x10\x0...
[ 6738, 764, 9078, 35636, 1330, 12972, 40456, 62, 43282, 198, 9078, 40456, 62, 43282, 3419, 198, 834, 9078, 40456, 834, 7, 834, 3672, 834, 11, 11593, 7753, 834, 11, 275, 6, 59, 87, 1120, 59, 87, 3270, 59, 87, 3901, 59, 87, 4309, 59,...
1.285291
1,013
# -*- coding: utf-8 -*- ''' :codeauthor: Rupesh Tare <rupesht@saltstack.com> ''' # Import Python Libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase, skipIf from tests.support.mock import ( patch,...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 220, 220, 220, 1058, 8189, 9800, 25, 371, 929, 5069, 309, 533, 1279, 622, 12272, 4352, 31, 82, 2501, 25558, 13, 785, 29, 198, 7061, 6, 198, 198, 2, 1...
1.489651
3,672
import torch from torch import nn import torch.nn.functional as F from metrics.ssim import ssim from metrics.tv_loss import TVLoss #import models.networks as networks from metrics.my_ssim import ssim_loss # class CSSIM(nn.Module): # Complementary SSIM # def __init__(self, default_range=1, filter_size=11, k1=0.01...
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 20731, 13, 824, 320, 1330, 264, 14323, 198, 6738, 20731, 13, 14981, 62, 22462, 1330, 3195, 43, 793, 198, 2, 11748, 4981, 13, ...
2.207637
838
""" Test the Google Cloud Storage Client and associated helper functions """ # Python stl imports import os import unittest # Project imports from gcloud.gcs import StorageClient # Third-party imports
[ 37811, 198, 14402, 262, 3012, 10130, 20514, 20985, 290, 3917, 31904, 5499, 198, 37811, 198, 2, 11361, 336, 75, 17944, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 2, 4935, 17944, 198, 6738, 308, 17721, 13, 70, 6359, 1330, 2...
4
51