content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import math import os from copy import deepcopy from ast import literal_eval import pandas as pd from math import factorial import random from collections import Counter, defaultdict import sys from nltk import word_tokenize from tqdm import tqdm, trange import argparse import numpy as np import re import csv from skle...
[ 11748, 10688, 198, 11748, 28686, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 6468, 1330, 18875, 62, 18206, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 10688, 1330, 1109, 5132, 198, 11748, 4738, 198, 6738, 17268, 1330, 15034, 11, ...
1.885669
3,140
import typing import pytest from src import selections
[ 11748, 19720, 198, 198, 11748, 12972, 9288, 198, 6738, 12351, 1330, 28224, 628 ]
4.384615
13
import pytest from janitor.utils import _clean_accounting_column
[ 11748, 12972, 9288, 198, 198, 6738, 42897, 2072, 13, 26791, 1330, 4808, 27773, 62, 23317, 278, 62, 28665, 628, 198 ]
3.4
20
# coding=utf-8 import sys, getopt import urllib import requests import requests_cache import re import time from bs4 import BeautifulSoup from requests import Session sys.path.append("/home/taejoon1kim/BERT/my_bert") from utils.cacheUtils import cacheExist, writeCache, readCache, getDownloadCachePath from utils.path...
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 11748, 25064, 11, 651, 8738, 198, 11748, 2956, 297, 571, 198, 11748, 7007, 198, 11748, 7007, 62, 23870, 198, 11748, 302, 198, 11748, 640, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 67...
2.208651
393
from xml.dom.minidom import Document, parse ''' course_list = [] course_list.append(Course('Advance Math')) course_list.append(Course('Linear Algebra')) course_list.append(Course('Procedure Oriented Programming')) course_list.append(Course('Object Oriented Programming')) course_list[-1].add_pre_course(course_list,...
[ 6738, 35555, 13, 3438, 13, 1084, 312, 296, 1330, 16854, 11, 21136, 628, 628, 198, 198, 7061, 6, 198, 17319, 62, 4868, 796, 17635, 198, 17319, 62, 4868, 13, 33295, 7, 49046, 10786, 2782, 19259, 16320, 6, 4008, 198, 17319, 62, 4868, 1...
2.976945
347
import pytest from theheck.rules.git_rm_local_modifications import match, get_new_command from theheck.types import Command
[ 11748, 12972, 9288, 198, 6738, 262, 258, 694, 13, 38785, 13, 18300, 62, 26224, 62, 12001, 62, 4666, 6637, 1330, 2872, 11, 651, 62, 3605, 62, 21812, 198, 6738, 262, 258, 694, 13, 19199, 1330, 9455, 628, 628, 198 ]
3.282051
39
import logging import json_logging import tomlkit import uvicorn from fastapi import FastAPI, status from fastapi.encoders import jsonable_encoder from fastapi.openapi.docs import ( get_redoc_html, get_swagger_ui_html, get_swagger_ui_oauth2_redirect_html, ) from fastapi.responses import JSONResponse from f...
[ 11748, 18931, 198, 198, 11748, 33918, 62, 6404, 2667, 198, 11748, 284, 4029, 15813, 198, 11748, 334, 25531, 1211, 198, 6738, 3049, 15042, 1330, 12549, 17614, 11, 3722, 198, 6738, 3049, 15042, 13, 12685, 375, 364, 1330, 33918, 540, 62, 1...
2.939076
476
# Copyright (c) Microsoft Corporation and contributors. # Licensed under the MIT License. import logging import math import time from typing import Any, List, Optional, Tuple, Union import networkx as nx import numpy as np from ..utils import remap_node_ids def node2vec_embed( graph: Union[nx.Graph, nx.DiGraph...
[ 2, 15069, 357, 66, 8, 5413, 10501, 290, 20420, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 198, 11748, 18931, 198, 11748, 10688, 198, 11748, 640, 198, 6738, 19720, 1330, 4377, 11, 7343, 11, 32233, 11, 309, 29291, 11, 4479, 1...
2.710347
2,793
# bot.py # TODO: # organize imports # organize from websocket import create_connection from threading import Thread from battle import Battle import commands import traceback import requests import inspect import json from fractions import Fraction import random import time import sys import re imp...
[ 2, 10214, 13, 9078, 201, 198, 201, 198, 2, 16926, 46, 25, 201, 198, 2, 16481, 17944, 201, 198, 2, 16481, 201, 198, 201, 198, 6738, 2639, 5459, 1330, 2251, 62, 38659, 201, 198, 6738, 4704, 278, 1330, 14122, 201, 198, 6738, 3344, 13...
3.49505
101
from typing import Optional, Tuple, Union import numpy as np import pandas as pd import pyvista as pv from pyvista import DataSet, MultiBlock, PolyData, UnstructuredGrid try: from typing import Literal except ImportError: from typing_extensions import Literal from .ddrtree import DDRTree, cal_ncenter from .s...
[ 6738, 19720, 1330, 32233, 11, 309, 29291, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 85, 12523, 355, 279, 85, 198, 6738, 12972, 85, 12523, 1330, 6060, 7248, 11, 15237, 1...
2.534545
3,025
# -*- coding: utf-8 -*- from model.group import Group import pytest import allure_pytest
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 2746, 13, 8094, 1330, 4912, 198, 11748, 12972, 9288, 198, 11748, 477, 495, 62, 9078, 9288, 628, 198 ]
2.757576
33
from __future__ import annotations from .frame import Frame from .generated.communication_pb2 import CursorPosition
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 764, 14535, 1330, 25184, 198, 6738, 764, 27568, 13, 32560, 62, 40842, 17, 1330, 327, 21471, 26545, 628 ]
4.37037
27
from __future__ import absolute_import, division, print_function, unicode_literals from base64 import b64decode from binascii import hexlify, unhexlify from struct import pack import six from django.db import models from django.utils.encoding import force_text from django_otp.models import Device from django_otp.ut...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 2779, 2414, 1330, 275, 2414, 12501, 1098, 198, 6738, 9874, 292, 979, 72, 1330, 17910, 75, 1958, 11, 555, ...
3.144654
159
import typing # custom data structure to hold the state of an HSV filter # Putting this here out of the way as it's a chonk # For a given item string case it will return the optimal filter and the correct position to look def grab_object_preset(object_name=None, **kwargs) -> typing.Tuple[HsvFilter, list]: if obj...
[ 11748, 19720, 198, 2, 2183, 1366, 4645, 284, 1745, 262, 1181, 286, 281, 18070, 53, 8106, 628, 198, 198, 2, 39956, 428, 994, 503, 286, 262, 835, 355, 340, 338, 257, 442, 261, 74, 198, 2, 1114, 257, 1813, 2378, 4731, 1339, 340, 481,...
2.2228
2,500
import numpy as np from numpy.testing import assert_allclose from echo import CallbackProperty, ListCallbackProperty from glue.core import Data, DataCollection from .test_state import clone from ..state_objects import (State, StateAttributeLimitsHelper, StateAttributeSingleValueHelper, ...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 439, 19836, 198, 198, 6738, 9809, 1330, 4889, 1891, 21746, 11, 7343, 47258, 21746, 198, 6738, 22749, 13, 7295, 1330, 6060, 11, 6060, 36307, 198, 198, ...
2.209743
1,478
from typing import Iterable, Optional
[ 6738, 19720, 1330, 40806, 540, 11, 32233, 628 ]
4.875
8
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright (c) 2002-2018 "Neo Technology," # Network Engine for Objects in Lund AB [http://neotechnology.com] # # This file is part of Neo4j. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Li...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 6244, 12, 7908, 366, 8199, 78, 8987, 553, 198, 2, 7311, 7117, 329, 35832, 287, 33609, 95...
3.478261
230
import dash from catboost import CatBoostClassifier, CatBoostRegressor from xgboost import XGBClassifier, XGBRegressor from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor from explainerdashboard.explainers import ClassifierExplainer, RegressionExplainer from explainerdashboard.datasets import...
[ 198, 198, 11748, 14470, 198, 198, 6738, 3797, 39521, 1330, 5181, 45686, 9487, 7483, 11, 5181, 45686, 8081, 44292, 198, 6738, 2124, 70, 39521, 1330, 1395, 4579, 9487, 7483, 11, 1395, 4579, 8081, 44292, 198, 6738, 1341, 35720, 13, 1072, 1...
3.650794
126
import tensorflow as tf import sys import os from glob import glob import png sys.path.append(os.path.join(__file__,'..','..')) from tfDataIngest import tfDataSetParquet as tfDsParquet inputDataDir = sys.argv[1] outputDir = sys.argv[2] # test app if __name__ == "__main__": files = glob(os.path.join(inputDataDir...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 15095, 1330, 15095, 198, 11748, 279, 782, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 834, 7753, 834, 4032, 492, 41707, 4...
2.315451
466
"""\ Code generator functions for wxDatePickerCtrl objects @copyright: 2002-2007 Alberto Griggio @copyright: 2014-2016 Carsten Grohmann @copyright: 2016-2021 Dietmar Schwertberger @license: MIT (see LICENSE.txt) - THIS PROGRAM COMES WITH NO WARRANTY """ import common, compat import wcodegen def xrc_code_generat...
[ 37811, 59, 198, 10669, 17301, 5499, 329, 266, 87, 10430, 47, 15799, 40069, 5563, 198, 198, 31, 22163, 4766, 25, 6244, 12, 12726, 40649, 1902, 6950, 952, 198, 31, 22163, 4766, 25, 1946, 12, 5304, 1879, 26400, 10299, 71, 9038, 198, 31, ...
2.849206
252
import pprint import mxnet as mx from mxnet import gluon from mxnet import init from lib.core.get_optimizer import * from lib.core.metric import MPJPEMetric from lib.core.loss import MeanSquareLoss from lib.core.loader import JointsDataIter from lib.network import get_net from lib.net_module import * from lib.utils i...
[ 11748, 279, 4798, 198, 198, 11748, 285, 87, 3262, 355, 285, 87, 198, 6738, 285, 87, 3262, 1330, 1278, 84, 261, 198, 6738, 285, 87, 3262, 1330, 2315, 198, 198, 6738, 9195, 13, 7295, 13, 1136, 62, 40085, 7509, 1330, 1635, 198, 6738, ...
2.994253
174
import os from tqdm import tqdm import torch.backends.cudnn as cudnn import torch from datasets import ImageNetInstance, ImageNetInstanceLMDB from torchvision import transforms import argparse from BaseTaskModel.task_network import get_moco_network, get_swav_network, get_selfboost_network, get_minmaxent_network, get_si...
[ 11748, 28686, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 28034, 13, 1891, 2412, 13, 66, 463, 20471, 355, 269, 463, 20471, 198, 11748, 28034, 198, 6738, 40522, 1330, 7412, 7934, 33384, 11, 7412, 7934, 33384, 31288, 1101...
2.918539
356
import pytest from rudra.utils.mercator import SimpleMercator
[ 11748, 12972, 9288, 198, 198, 6738, 28906, 430, 13, 26791, 13, 647, 66, 1352, 1330, 17427, 42981, 1352, 628 ]
3.368421
19
import os import sys import unittest from tests.tests_bin_class.test_performance import * if __name__ == "__main__": unittest.main()
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 198, 6738, 5254, 13, 41989, 62, 8800, 62, 4871, 13, 9288, 62, 26585, 1330, 1635, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, ...
2.836735
49
#!/usr/bin/env python from vc3master.task import VC3Task
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 628, 628, 198, 6738, 410, 66, 18, 9866, 13, 35943, 1330, 26706, 18, 25714 ]
2.727273
22
import sys import traceback from django.conf import settings from django.urls import resolve from lxml import etree from six.moves.urllib.request import urlopen, Request
[ 11748, 25064, 198, 11748, 12854, 1891, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 10568, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 6738, 2237, 13, 76, 5241, 13, 333, 297, 571, ...
3.489796
49
import logging from spaceone.inventory.libs.connector import AzureConnector from spaceone.inventory.error import * from spaceone.inventory.error.custom import * __all__ = ['SnapshotConnector'] _LOGGER = logging.getLogger(__name__)
[ 11748, 18931, 198, 198, 6738, 2272, 505, 13, 24807, 13, 8019, 82, 13, 8443, 273, 1330, 22134, 34525, 198, 6738, 2272, 505, 13, 24807, 13, 18224, 1330, 1635, 198, 6738, 2272, 505, 13, 24807, 13, 18224, 13, 23144, 1330, 1635, 198, 834, ...
3.530303
66
""" A customer walks into a store. Do the steps to interact with them: - Get *a* (not *the*) greeter - Interact with them Simple wired application: - Settings that say what punctuation to use - Registry - Two factories that says hello, one for the FrenchCustomer context - A default Customer and FrenchCustomer ...
[ 37811, 198, 198, 32, 6491, 11114, 656, 257, 3650, 13, 2141, 262, 4831, 284, 9427, 351, 606, 25, 198, 198, 12, 3497, 1635, 64, 9, 357, 1662, 1635, 1169, 28104, 10536, 2357, 198, 198, 12, 4225, 529, 351, 606, 198, 198, 26437, 28217, ...
3.3104
625
""" This module defines the LDARProgram class. """ import numpy as np import copy from .repair import Repair from ..EmissionSimModules.result_classes import ResultDiscrete, ResultContinuous
[ 37811, 198, 1212, 8265, 15738, 262, 27178, 1503, 15167, 1398, 13, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4866, 198, 6738, 764, 49932, 1330, 28912, 198, 6738, 11485, 36, 3411, 8890, 5841, 5028, 13, 20274, 62, 37...
3.84
50
#Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. #This program is free software; you can redistribute it and/or modify it under the terms of the BSD 0-Clause License. #This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ...
[ 2, 15269, 357, 34, 8, 12131, 13, 43208, 21852, 1766, 1539, 12052, 13, 1439, 2489, 10395, 13, 201, 198, 2, 1212, 1430, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 340, 739, 262, 2846, 286, 262, 347, 10305, ...
3.497326
187
import uvicorn from fastapi import FastAPI from fastapi.staticfiles import StaticFiles from routes import doc, api from fastapi.templating import Jinja2Templates from starlette.requests import Request # configure static and templates file on jinja 2 app = FastAPI( title=f"Technical Case", description=f"endpoi...
[ 11748, 334, 25531, 1211, 198, 6738, 3049, 15042, 1330, 12549, 17614, 198, 6738, 3049, 15042, 13, 12708, 16624, 1330, 36125, 25876, 198, 6738, 11926, 1330, 2205, 11, 40391, 198, 6738, 3049, 15042, 13, 11498, 489, 803, 1330, 17297, 6592, 17...
2.995935
246
import json import concurrent.futures import csv from os import path import io import logging import os import shutil from tempfile import TemporaryDirectory import warnings import zlib import gzip import zipfile from civis import APIClient from civis._utils import maybe_get_random_name from civis.base import EmptyRe...
[ 11748, 33918, 198, 11748, 24580, 13, 69, 315, 942, 198, 11748, 269, 21370, 198, 6738, 28686, 1330, 3108, 198, 11748, 33245, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 6738, 20218, 7753, 1330, 46042, 43055, 198, 1174...
2.195839
5,479
import unittest import pytest from small_text.integrations.pytorch.exceptions import PytorchNotFoundError try: from small_text.integrations.pytorch.query_strategies import ( BADGE, ExpectedGradientLength, ExpectedGradientLengthMaxWord) except PytorchNotFoundError: pass
[ 11748, 555, 715, 395, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 1402, 62, 5239, 13, 18908, 9143, 13, 9078, 13165, 354, 13, 1069, 11755, 1330, 9485, 13165, 354, 3673, 21077, 12331, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 1402...
2.646552
116
TANGO_PALLETE = [ '2e2e34343636', 'cccc00000000', '4e4e9a9a0606', 'c4c4a0a00000', '34346565a4a4', '757550507b7b', '060698989a9a', 'd3d3d7d7cfcf', '555557575353', 'efef29292929', '8a8ae2e23434', 'fcfce9e94f4f', '72729f9fcfcf', 'adad7f7fa8a8', '34...
[ 51, 1565, 11230, 62, 47, 1847, 2538, 9328, 796, 685, 201, 198, 220, 220, 220, 705, 17, 68, 17, 68, 2682, 2682, 2623, 2623, 3256, 201, 198, 220, 220, 220, 705, 535, 535, 8269, 3256, 201, 198, 220, 220, 220, 705, 19, 68, 19, 68, ...
1.451613
248
from datetime import datetime, timedelta from enum import Enum from typing import List, Optional, Tuple, Dict, Any, Union import time from authlib.common.security import generate_token from authlib.consts import default_json_headers from authlib.oauth2 import ( OAuth2Request, AuthorizationServer as _Authorizat...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 309, 29291, 11, 360, 713, 11, 4377, 11, 4479, 198, 198, 11748, 640, 198, 6738, 6284, 8019, 13, 11321...
2.892545
1,489
import asyncio import datetime import logging import socket from . import protocol from typing import Tuple from asyncio import AbstractEventLoop logger = logging.getLogger(__name__) def deregister_protocol(self, peer: Tuple[str, int]) -> None: """ De-register a protocol instance from the server. ...
[ 198, 11748, 30351, 952, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 17802, 198, 198, 6738, 764, 1330, 8435, 198, 198, 6738, 19720, 1330, 309, 29291, 198, 6738, 30351, 952, 1330, 27741, 9237, 39516, 628, 198, 6404, 1362, 796, ...
2.246677
677
import logging import uuid from enum import Enum from typing import List, Optional, Dict, Any from dataclasses import dataclass, field from pydantic import BaseModel from ...integrations.scheduled.playbook_scheduler import PlaybooksScheduler from ..reporting.base import Finding, BaseBlock # Right now: # 1. this i...
[ 11748, 18931, 198, 11748, 334, 27112, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 360, 713, 11, 4377, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 198, 6738, 279, 5173, 5109, ...
3.535885
209
from mongoengine import Document from mongoengine.fields import ( FloatField, StringField, ListField, URLField, ObjectIdField, )
[ 6738, 285, 25162, 18392, 1330, 16854, 198, 6738, 285, 25162, 18392, 13, 25747, 1330, 357, 198, 220, 220, 220, 48436, 15878, 11, 198, 220, 220, 220, 10903, 15878, 11, 198, 220, 220, 220, 7343, 15878, 11, 198, 220, 220, 220, 10289, 1587...
2.745455
55
from ._movement import Movement from .path import MovementPath from .paths import MovementPaths
[ 6738, 47540, 21084, 434, 1330, 15477, 198, 198, 6738, 764, 6978, 1330, 15477, 15235, 198, 6738, 764, 6978, 82, 1330, 15477, 15235, 82, 198 ]
4.041667
24
#!/usr/bin/python import os import sys from om_shared import * if __name__ == '__main__': if len(sys.argv) ==1: print "no arguments given" sys.exit(1) args = parse_args(sys.argv[1:]) main(args) """ # $ cd D:\Plextor\data\Acquisitie\BioNanoGenomics\MyLycopersicumWorks...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 39030, 62, 28710, 1330, 1635, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 611, 18896, 7,...
1.791404
1,745
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify,...
[ 2, 17168, 38559, 24290, 198, 2, 198, 2, 15069, 8309, 532, 12131, 416, 22631, 3539, 26363, 432, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3...
3.78882
322
# sacher_epos.py, python wrapper for sacher epos motor # David Christle <christle@uchicago.edu>, August 2014 # """ Possbily Maxon EPOS now """ """ This is the actual version that works But only in the lab32 virtual environment """ # from instrument import Instrument # import qt import ctypes import ctypes.wintypes i...
[ 2, 264, 3493, 62, 538, 418, 13, 9078, 11, 21015, 29908, 329, 264, 3493, 304, 1930, 5584, 198, 2, 3271, 1951, 293, 1279, 43533, 293, 31, 794, 4549, 13, 15532, 22330, 2932, 1946, 198, 2, 198, 37811, 198, 47, 793, 65, 813, 5436, 261,...
2.704783
1,338
import argparse import os image_dir = 'image' label_dir = 'label' splits = ['train', 'val', 'test'] image_dirs = [ 'image/{}', 'image/{}_crop' ] label_dirs = [ 'label/{}/annotations', 'label/{}/annotations_crop', ] if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argu...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 9060, 62, 15908, 796, 705, 9060, 6, 198, 18242, 62, 15908, 796, 705, 18242, 6, 198, 22018, 896, 796, 37250, 27432, 3256, 705, 2100, 3256, 705, 9288, 20520, 198, 9060, 62, 15908, 82, 796...
2.431818
176
"""How to use ``unfoldNd``. A comparison with ``torch.nn.Unfold``.""" # imports, make this example deterministic import torch import unfoldNd torch.manual_seed(0) # random batched RGB 32x32 image-shaped input tensor of batch size 64 inputs = torch.randn((64, 3, 32, 32)) # module hyperparameters kernel_size = 3 dil...
[ 37811, 2437, 284, 779, 7559, 403, 11379, 45, 67, 15506, 13, 317, 7208, 351, 7559, 13165, 354, 13, 20471, 13, 3118, 11379, 15506, 526, 15931, 198, 198, 2, 17944, 11, 787, 428, 1672, 2206, 49228, 198, 11748, 28034, 198, 198, 11748, 1663...
2.89644
309
from django.utils.encoding import force_str from django.utils.functional import keep_lazy from django.utils.safestring import SafeText, mark_safe _json_escapes = { ord('>'): '\\u003E', ord('<'): '\\u003C', ord('&'): '\\u0026', } _json_escapes_attr = { ord('>'): '\\u003E', ord('<'): '\\u003C', ...
[ 6738, 42625, 14208, 13, 26791, 13, 12685, 7656, 1330, 2700, 62, 2536, 198, 6738, 42625, 14208, 13, 26791, 13, 45124, 1330, 1394, 62, 75, 12582, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 19978, 8206, 11, 1317, 62, ...
2.07
200
from ..charts import Chart from flask import jsonify, request _BASE_CONFIG = { "showLink": False, "displaylogo": False, "modeBarButtonsToRemove": ["sendDataToCloud"] }
[ 198, 6738, 11485, 354, 5889, 1330, 22086, 198, 6738, 42903, 1330, 33918, 1958, 11, 2581, 198, 198, 62, 33, 11159, 62, 10943, 16254, 796, 1391, 198, 220, 220, 220, 366, 12860, 11280, 1298, 10352, 11, 198, 220, 220, 220, 366, 13812, 640...
2.716418
67
#!/usr/bin/python import sys from PyQt4 import QtGui from PyQt4 import QtCore if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 25064, 198, 6738, 9485, 48, 83, 19, 1330, 33734, 8205, 72, 198, 6738, 9485, 48, 83, 19, 1330, 33734, 14055, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 19...
2.510638
47
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import torch import unittest from gpytorch.means import ZeroMean
[ 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.724138
58
import jsonpickle import random import string from model.contact import Contact import os.path import getopt import sys try: opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number of contacts", "file"]) except getopt.GetoptError as err: getopt.usage() sys.exit(2) n = 5 f = "data/contacts.json" for o,...
[ 11748, 33918, 27729, 293, 198, 11748, 4738, 198, 11748, 4731, 198, 6738, 2746, 13, 32057, 1330, 14039, 198, 11748, 28686, 13, 6978, 198, 11748, 651, 8738, 198, 11748, 25064, 628, 198, 28311, 25, 198, 220, 220, 220, 2172, 82, 11, 26498, ...
2.591445
678
# Test the runpy module import unittest import os import os.path import sys import tempfile from test.test_support import verbose, run_unittest, forget from runpy import _run_code, _run_module_code, run_module # Note: This module can't safely test _run_module_as_main as it # runs its tests in the current process, whic...
[ 2, 6208, 262, 1057, 9078, 8265, 198, 11748, 555, 715, 395, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 25064, 198, 11748, 20218, 7753, 198, 6738, 1332, 13, 9288, 62, 11284, 1330, 15942, 577, 11, 1057, 62, 403, 715, 395...
3.133663
202
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: imagedata.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf i...
[ 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, 545, 1886, 1045, 13, 1676, 1462, 198, 198, 11748, 25064, 198, 62, 65, 28...
2.460236
1,949
from sqlalchemy import func from flask_rest_jsonapi import ResourceList from marshmallow_jsonapi import fields from marshmallow_jsonapi.flask import Schema from app.api.helpers.utilities import dasherize from app.api.bootstrap import api from app.models import db from app.models.discount_code import DiscountCode from ...
[ 6738, 44161, 282, 26599, 1330, 25439, 198, 6738, 42903, 62, 2118, 62, 17752, 15042, 1330, 20857, 8053, 198, 6738, 22397, 42725, 62, 17752, 15042, 1330, 7032, 198, 6738, 22397, 42725, 62, 17752, 15042, 13, 2704, 2093, 1330, 10011, 2611, 19...
3.677966
118
from .stop_words import STOP_WORDS from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS from .lex_attrs import LEX_ATTRS from ...language import Language __all__ = ["Serbian"]
[ 6738, 764, 11338, 62, 10879, 1330, 44934, 62, 45359, 5258, 198, 6738, 764, 30001, 7509, 62, 1069, 11755, 1330, 5390, 43959, 14887, 1137, 62, 6369, 42006, 11053, 198, 6738, 764, 2588, 62, 1078, 3808, 1330, 406, 6369, 62, 1404, 5446, 50, ...
3.084746
59
from .functions.deform_conv import deform_conv, modulated_deform_conv from .functions.deform_pool import deform_roi_pooling from .modules.deform_conv import (DeformConv, ModulatedDeformConv, DeformConvPack, ModulatedDeformConvPack) from .modules.deform_pool import (DeformRoIPooling, De...
[ 6738, 764, 12543, 2733, 13, 2934, 687, 62, 42946, 1330, 47577, 62, 42946, 11, 953, 4817, 62, 2934, 687, 62, 42946, 198, 6738, 764, 12543, 2733, 13, 2934, 687, 62, 7742, 1330, 47577, 62, 305, 72, 62, 7742, 278, 198, 6738, 764, 18170,...
2.269896
289
# coding: utf-8 from rest_framework import serializers from data.models import Skill, SkillValue
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 1366, 13, 27530, 1330, 16023, 11, 16023, 11395, 628, 628 ]
3.703704
27
# File: Converting_RGB_to_GreyScale.py # Description: Opening RGB image as array, converting to GreyScale and saving result into new file # Environment: PyCharm and Anaconda environment # # MIT License # Copyright (c) 2018 Valentyn N Sichkar # github.com/sichkar-valentyn # # Reference to: # Valentyn N Sichkar. Image pr...
[ 2, 9220, 25, 35602, 889, 62, 36982, 62, 1462, 62, 49141, 29990, 13, 9078, 198, 2, 12489, 25, 25522, 25228, 2939, 355, 7177, 11, 23202, 284, 13980, 29990, 290, 8914, 1255, 656, 649, 2393, 198, 2, 9344, 25, 9485, 1925, 1670, 290, 1052...
2.903614
1,743
import colorsys import json from jinja2 import Environment, PackageLoader import graph
[ 11748, 7577, 893, 198, 11748, 33918, 198, 198, 6738, 474, 259, 6592, 17, 1330, 9344, 11, 15717, 17401, 198, 11748, 4823, 628, 628, 628, 628, 198 ]
3.692308
26
# Copyright (c) 2018, INRIA # Copyright (c) 2018, University of Lille # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, t...
[ 2, 15069, 357, 66, 8, 2864, 11, 3268, 49, 3539, 198, 2, 15069, 357, 66, 8, 2864, 11, 2059, 286, 406, 8270, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 12...
3.687086
604
# coding=UTF-8 # ex:ts=4:sw=4:et=on # # Copyright (c) 2013, Mathijs Dumon # All rights reserved. # Complete license can be found in the LICENSE file. from mvc.models.properties import StringProperty from pyxrd.generic.io.custom_io import storables, Storable from pyxrd.generic.models.base import DataModel from pyxrd....
[ 2, 19617, 28, 48504, 12, 23, 198, 2, 409, 25, 912, 28, 19, 25, 2032, 28, 19, 25, 316, 28, 261, 198, 2, 198, 2, 15069, 357, 66, 8, 2211, 11, 16320, 2926, 82, 30933, 261, 198, 2, 1439, 2489, 10395, 13, 198, 2, 13248, 5964, 460...
3.040984
122
# start 1 plainProgrammingBug.py import random # returns -1, 0, 1 with equal probability SimpleBug() """ you can eliminate the randomMove() function substituting xPos += randomMove() yPos += randomMove() with xPos += random.randint(-1, 1) yPos += random.randint(-1,...
[ 2, 923, 352, 8631, 15167, 2229, 25624, 13, 9078, 201, 198, 11748, 4738, 201, 198, 201, 198, 201, 198, 2, 5860, 532, 16, 11, 657, 11, 352, 220, 351, 4961, 12867, 201, 198, 201, 198, 201, 198, 201, 198, 26437, 25624, 3419, 201, 198,...
2.503067
163
money = 8074 #money = 18705 #coin_list = [24,23,21,5,3,1] coin_list = [24,13,12,7,5,3,1] #coin_list = map(int, open('dataset_71_8.txt').read().split(',')) d = {0:0} for m in range(1,money+1): min_coin = 1000000 for coin in coin_list: if m >= coin: if d[m-coin]+1 < min_coin:...
[ 201, 198, 26316, 796, 807, 2998, 19, 201, 198, 2, 26316, 796, 1248, 34801, 201, 198, 2, 3630, 62, 4868, 796, 685, 1731, 11, 1954, 11, 2481, 11, 20, 11, 18, 11, 16, 60, 201, 198, 3630, 62, 4868, 796, 685, 1731, 11, 1485, 11, 10...
1.733607
244
""" Remove comments from bib file. """ from textx import metamodel_for_language from txbibtex import bibentry_str BIB_FILE = 'references.bib' bibfile = metamodel_for_language('bibtex').model_from_file(BIB_FILE) # Drop line comments. print('\n'.join([bibentry_str(e) for e in bibfile.entries if e.__cla...
[ 37811, 198, 27914, 3651, 422, 275, 571, 2393, 13, 198, 37811, 198, 6738, 2420, 87, 1330, 1138, 321, 375, 417, 62, 1640, 62, 16129, 198, 6738, 27765, 65, 571, 16886, 1330, 275, 571, 13000, 62, 2536, 198, 198, 3483, 33, 62, 25664, 796...
2.428571
147
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC. 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 requir...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 1303, 198, 2, 15069, 13130, 3012, 11419, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198...
3.4319
558
import json from .papers import Papers from .researchers import Researchers def ResearchersFile(filename): """Parse a file containing researchers.""" try: with open(filename, "r") as file: data = json.load(file) except FileNotFoundError: data = {} return Researchers(data, ...
[ 11748, 33918, 198, 198, 6738, 764, 40491, 1330, 27420, 198, 6738, 764, 260, 325, 283, 3533, 1330, 26685, 628, 198, 4299, 26685, 8979, 7, 34345, 2599, 198, 220, 220, 220, 37227, 10044, 325, 257, 2393, 7268, 4837, 526, 15931, 198, 220, ...
2.734783
230
############################################################################# # Copyright (c) 2017 SiteWare Corp. All right reserved ############################################################################# import logging import pytest from . import addresses
[ 29113, 29113, 7804, 4242, 2, 198, 2, 15069, 357, 66, 8, 2177, 14413, 38824, 11421, 13, 1439, 826, 10395, 198, 29113, 29113, 7804, 4242, 2, 198, 198, 11748, 18931, 198, 198, 11748, 12972, 9288, 198, 6738, 764, 1330, 9405, 198 ]
6.65
40
import texar.tf as tx beam_width = 5 hidden_dim = 768 bert = { 'pretrained_model_name': 'bert-base-uncased' } # See https://texar.readthedocs.io/en/latest/code/modules.html#texar.tf.modules.BERTEncoder.default_hparams bert_encoder = {} # From https://github.com/asyml/texar/blob/413e07f859acbbee979f274b52942edd5...
[ 11748, 48659, 283, 13, 27110, 355, 27765, 198, 198, 40045, 62, 10394, 796, 642, 198, 30342, 62, 27740, 796, 46720, 198, 198, 4835, 796, 1391, 198, 220, 220, 220, 705, 5310, 13363, 62, 19849, 62, 3672, 10354, 705, 4835, 12, 8692, 12, ...
2.294964
834
# Generated by Django 3.1.2 on 2020-10-29 09:04 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 940, 12, 1959, 7769, 25, 3023, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#------------------------------------------------------------------------------- # Name: Landsat Digital Numbers to Radiance/Reflectance # Purpose: To convert landsat 4,5, or 7 pixel values from digital numbers # to Radiance, Reflectance, or Temperature # Author: Quinten Geddes Quinte...
[ 2, 10097, 24305, 198, 2, 6530, 25, 220, 220, 220, 220, 220, 220, 220, 24182, 265, 10231, 27797, 284, 5325, 3610, 14, 8134, 801, 590, 198, 2, 32039, 25, 220, 220, 220, 220, 220, 1675, 10385, 8604, 265, 604, 11, 20, 11, 393, 767, ...
2.301844
3,091
import string import requests import sys import myparser import re
[ 11748, 4731, 198, 11748, 7007, 198, 11748, 25064, 198, 11748, 616, 48610, 198, 11748, 302, 628 ]
4.25
16
import urllib.request import json access_token = "265791501.a4af066.f45a9f44719a4b2cb2d137118524e32b" api_url = "https://api.instagram.com/v1" nn_lat = 56.296504 nn_lng = 43.936059 locations = request("/locations/search", "lat=" + str(nn_lat) + "&lng=" + str(nn_lng))["data"] print(locations) for location in locatio...
[ 11748, 2956, 297, 571, 13, 25927, 198, 11748, 33918, 198, 198, 15526, 62, 30001, 796, 366, 2075, 3553, 40248, 486, 13, 64, 19, 1878, 15, 2791, 13, 69, 2231, 64, 24, 69, 34825, 1129, 64, 19, 65, 17, 21101, 17, 67, 19708, 1157, 5332...
2.421875
192
"""Unit tests for app.validators. """ from wtforms import ValidationError import flask from pytest import raises from app.utils.validators import password_rules, image_file, allowed_file def _run_validator_check(subtests, validator, valid, invalid): """Runs tests again validator with valid and invalid inputs. ...
[ 37811, 26453, 5254, 329, 598, 13, 12102, 2024, 13, 37227, 198, 6738, 266, 83, 23914, 1330, 3254, 24765, 12331, 198, 11748, 42903, 198, 6738, 12972, 9288, 1330, 12073, 198, 6738, 598, 13, 26791, 13, 12102, 2024, 1330, 9206, 62, 38785, 11...
2.653251
323
import warnings import numpy as np def nans_in_same_positions(*arrays): """ Compares all provided arrays to see if they have NaNs in the same positions. """ if len(arrays) == 0: return True for arr in arrays[1:]: if not (np.isnan(arrays[0]) == np.isnan(arr)).all(): ret...
[ 11748, 14601, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 299, 504, 62, 259, 62, 31642, 62, 1930, 1756, 46491, 3258, 592, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3082, 3565, 477, 2810, 26515, 284, 766, 611, ...
2.584034
238
"""Unit tests of authorization searches.""" import pytest from ..utilities.general import is_never_authz, is_no_authz, uses_cataloging, uses_filesystem_only from dlkit.abstract_osid.osid import errors from dlkit.primordium.id.primitives import Id from dlkit.primordium.type.primitives import Type from dlkit.runtime ...
[ 37811, 26453, 5254, 286, 19601, 15455, 526, 15931, 628, 198, 11748, 12972, 9288, 628, 198, 6738, 11485, 315, 2410, 13, 24622, 1330, 318, 62, 12081, 62, 18439, 89, 11, 318, 62, 3919, 62, 18439, 89, 11, 3544, 62, 9246, 11794, 278, 11, ...
2.969163
227
""" NEW: Handle flux files """ import autofile def read_flux(ts_save_path, vrc_locs=(0,)): """ Read the geometry from the filesys """ vrc_fs = autofile.fs.vrctst(ts_save_path) if vrc_fs[-1].file.flux.exists(vrc_locs): flux_str = vrc_fs[-1].file.flux.read(vrc_locs) else: flux_st...
[ 37811, 198, 220, 12682, 25, 33141, 28462, 3696, 198, 37811, 198, 198, 11748, 1960, 1659, 576, 628, 198, 4299, 1100, 62, 69, 22564, 7, 912, 62, 21928, 62, 6978, 11, 410, 6015, 62, 17946, 82, 16193, 15, 35751, 2599, 198, 220, 220, 220...
2.071006
169
import math import numpy as np import pandas as pd from sklearn.base import BaseEstimator import sys import os sys.path.append(os.path.abspath('../DecisionTree')) from DecisionTree import DecisionTree
[ 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 8692, 1330, 7308, 22362, 320, 1352, 198, 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, ...
3.295082
61
g = gen() try: g.pend_throw except AttributeError: print("SKIP") raise SystemExit print(next(g)) print(next(g)) g.pend_throw(ValueError()) v = None try: v = next(g) except Exception as e: print("raised", repr(e)) print("ret was:", v) # It's legal to pend exception in a just-started generator,...
[ 198, 70, 796, 2429, 3419, 198, 198, 28311, 25, 198, 220, 220, 220, 308, 13, 37038, 62, 16939, 198, 16341, 3460, 4163, 12331, 25, 198, 220, 220, 220, 3601, 7203, 18831, 4061, 4943, 198, 220, 220, 220, 5298, 4482, 30337, 628, 198, 479...
2.597884
189
# -*- coding: utf-8 -*- """ Created on Tue Dec 15 09:49:47 2020 @author: james.z.hare """ from src.UnitModule import UnitClass, advance from copy import deepcopy import math # Will be used as the projectile for the missile launcher unit
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 4280, 1315, 7769, 25, 2920, 25, 2857, 12131, 198, 198, 31, 9800, 25, 474, 1047, 13, 89, 13, 43466, 198, 37811, 198, 198, 6738, 12351, 13...
3.186667
75
from car import * car1 = Car("Nissan","Tiida",450000) car2 = Car("Toyota","Vios",400000) car3 = Car("BMW","X3",3400000) compare(car3,car1) compare(car1,car2)
[ 6738, 1097, 1330, 1635, 198, 198, 7718, 16, 796, 1879, 7203, 45, 24112, 2430, 40533, 3755, 1600, 2231, 2388, 8, 198, 7718, 17, 796, 1879, 7203, 48236, 4265, 2430, 53, 4267, 1600, 7029, 830, 8, 198, 7718, 18, 796, 1879, 7203, 12261, ...
2.239437
71
from abc import ABCMeta, abstractmethod from prelude.typeclasses import Monad from prelude.decorators import monad_eq, singleton
[ 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 6738, 662, 38792, 13, 4906, 37724, 1330, 2892, 324, 198, 6738, 662, 38792, 13, 12501, 273, 2024, 1330, 937, 324, 62, 27363, 11, 2060, 1122, 198 ]
3.583333
36
#!/usr/bin/env python from __future__ import print_function import roslib roslib.load_manifest('msgs_to_cv2') import sys import rospy import cv2 from std_msgs.msg import String from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError if __name__ == '__main__': main(sys.argv)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 686, 6649, 571, 198, 4951, 8019, 13, 2220, 62, 805, 8409, 10786, 907, 14542, 62, 1462, 62, 33967, 17, 11537, 198, 11748,...
2.723214
112
# Copyright (c) 2021 Food-X Technologies # # This file is part of foodx_devops_tools. # # You should have received a copy of the MIT License along with # foodx_devops_tools. If not, see <https://opensource.org/licenses/MIT>. """Azure related utilities."""
[ 2, 220, 15069, 357, 66, 8, 33448, 7318, 12, 55, 21852, 198, 2, 198, 2, 220, 770, 2393, 318, 636, 286, 2057, 87, 62, 7959, 2840, 62, 31391, 13, 198, 2, 198, 2, 220, 921, 815, 423, 2722, 257, 4866, 286, 262, 17168, 13789, 1863, ...
3.107143
84
#!/usr/bin/env python3 # --------------------( LICENSE )-------------------- # Copyright (c) 2014-2021 Beartype authors. # See "LICENSE" for further details. ''' **Beartype validators.** This submodule publishes a PEP-compliant hierarchy of subscriptable (indexable) classes enabling callers ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 41436, 7, 38559, 24290, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 19351, 198, ...
3.281768
1,810
import unittest from mock import Mock import base64 from cellardoor import errors from cellardoor.authentication import * from cellardoor.authentication.basic import BasicAuthIdentifier
[ 11748, 555, 715, 395, 198, 6738, 15290, 1330, 44123, 198, 11748, 2779, 2414, 198, 6738, 2685, 446, 2675, 1330, 8563, 198, 6738, 2685, 446, 2675, 13, 41299, 3299, 1330, 1635, 198, 6738, 2685, 446, 2675, 13, 41299, 3299, 13, 35487, 1330, ...
3.679245
53
from .styleAugmentor import StyleAugmentor
[ 6738, 764, 7635, 12512, 434, 273, 1330, 17738, 12512, 434, 273 ]
3.818182
11
_base_ = [ '../../../_base_/datasets/imagenet/swin_sz224_4xbs256.py', '../../../_base_/default_runtime.py', ] # model settings model = dict( type='MixUpClassification', pretrained=None, alpha=0.2, mix_mode="cutmix", mix_args=dict( attentivemix=dict(grid_size=32, top_k=None, beta=8),...
[ 62, 8692, 62, 796, 685, 198, 220, 220, 220, 705, 40720, 40720, 40720, 62, 8692, 62, 14, 19608, 292, 1039, 14, 320, 11286, 316, 14, 2032, 259, 62, 82, 89, 24137, 62, 19, 87, 1443, 11645, 13, 9078, 3256, 198, 220, 220, 220, 705, 4...
2.109461
1,279
import os from mcstasscript.instr_reader.control import InstrumentReader from mcstasscript.interface.instr import McStas_instr
[ 11748, 28686, 198, 6738, 36650, 301, 562, 6519, 13, 259, 2536, 62, 46862, 13, 13716, 1330, 42410, 33634, 198, 6738, 36650, 301, 562, 6519, 13, 39994, 13, 259, 2536, 1330, 1982, 1273, 292, 62, 259, 2536, 628 ]
3.459459
37
#!/usr/bin/python # Copyright (c) 2009 The Regents of the University of California. All rights reserved. # # Permission is hereby granted, without written agreement and without # license or royalty fees, to use, copy, modify, and distribute this # software and its documentation for any purpose, provided that the # abov...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 15069, 357, 66, 8, 3717, 383, 3310, 658, 286, 262, 2059, 286, 3442, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1231, 3194, 4381, 290, 1231, 198, 2, ...
3.139535
688
#! /usr/bin/env python3 ####################### """#################### Index: 1. Imports and Readme 2. Functions 3. Main 4. Testing ####################""" ####################### ################################################################### # 1. IMPORTS AND README #############################...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 14468, 4242, 21017, 198, 37811, 14468, 4242, 198, 15732, 25, 198, 220, 220, 220, 352, 13, 1846, 3742, 290, 4149, 1326, 198, 220, 220, 220, 362, 13, 40480, 198, 220, 220, ...
4.723577
246
# Need this to import from parent directory when running outside pycharm import os import sys sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)) from ac_utils.general import save_to_json, load_from_json import click import xml.etree.ElementTree from urllib import unquote if __name...
[ 2, 10664, 428, 284, 1330, 422, 2560, 8619, 618, 2491, 2354, 12972, 354, 1670, 198, 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, ...
2.96063
127
# -*- coding: utf-8 -*- import logging import re import inventree.base import inventree.stock import inventree.company import inventree.build logger = logging.getLogger('inventree')
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 18931, 198, 11748, 302, 198, 198, 11748, 8067, 631, 13, 8692, 198, 11748, 8067, 631, 13, 13578, 198, 11748, 8067, 631, 13, 39722, 198, 11748, 8067, 631, 13, ...
2.743243
74
import functools import os import shutil import tempfile from unittest import mock from unittest.mock import MagicMock import pytest from aiohttp import abc, web from aiohttp.web_urldispatcher import SystemRoute async def test_follow_symlink(tmp_dir_path, aiohttp_client): """ Tests the access to a symlink...
[ 11748, 1257, 310, 10141, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 6738, 555, 715, 395, 1330, 15290, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 198, 198, 11748, 12972, 9288, 198, 198, 673...
2.614515
1,061
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Authors : Nairouz Mrabah (mrabah.nairouz@courrier.uqam.ca) & Mohamed Fawzi Touati (touati.mohamed_fawzi@courrier.uqam.ca) # @Paper : Rethinking Graph Autoencoder Models for Attributed Graph Clustering # @License : MIT License import torch import numpy as np import tor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 30515, 669, 1058, 399, 958, 280, 89, 1770, 397, 993, 357, 76, 25619, 993, 13, 77, 958, 280, 89, 31, 43220,...
2.926087
230
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, _ import logging _logger = logging.getLogger(__name__)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2142, 286, 10529, 2238, 13, 4091, 38559, 24290, 2393, 329, 1336, 6634, 290, 15665, 3307, 13, 198, 198, 6738, 16298, 2238, 1330, 40391, 11, 4981, 11, 4808, 198, 198, ...
3.016129
62
import math import numpy as np import numpy.random as npr import torch import torch.utils.data as data import torch.utils.data.sampler as torch_sampler from torch.utils.data.dataloader import default_collate from torch._six import int_classes as _int_classes from core.config import cfg from roi_data.minibatch import ...
[ 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 25120, 355, 299, 1050, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 198, 11748, 28034, 13, 26791, 13, 7890, 13, 37687, 20053, 35...
2.376799
1,112
import warnings from distutils.version import LooseVersion import numpy as np import pytest from scipy import linalg from sklearn.model_selection import train_test_split from sklearn.utils.testing import assert_allclose from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import ass...
[ 11748, 14601, 198, 198, 6738, 1233, 26791, 13, 9641, 1330, 6706, 577, 14815, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 6738, 629, 541, 88, 1330, 300, 1292, 70, 198, 198, 6738, 1341, 35720, 13, 19849, 62, 4...
2.297259
2,116
#coding: utf8 import copy import re from blocks import Block, EmptyBlock, KeyValueOption, Comment, Location qwe = EmptyBlock() parse("""#{ asd #qweqeqwe{} servername qweqweqweqweqwe; # comment {lalalal} #1 server { listen 8080 tls; root /data/up1; location / { l200; } lo...
[ 2, 66, 7656, 25, 3384, 69, 23, 198, 11748, 4866, 198, 11748, 302, 198, 198, 6738, 7021, 1330, 9726, 11, 33523, 12235, 11, 7383, 11395, 19722, 11, 18957, 11, 13397, 628, 628, 198, 80, 732, 796, 33523, 12235, 3419, 198, 198, 29572, 72...
2.144958
476
import os import subprocess import sys print 'Build Config:' print ' Host:win7 x86' print ' Branch:develop' print ' Target:win32' print ' "%VS110COMNTOOLS%..\IDE\devenv.com" "build\cocos2d-win32.vc2012.sln" /Build "Debug|Win32"' if(os.path.exists('build/cocos2d-win32.vc2012.sln') == False): node_...
[ 11748, 28686, 201, 198, 11748, 850, 14681, 201, 198, 11748, 25064, 201, 198, 4798, 705, 15580, 17056, 32105, 201, 198, 4798, 705, 220, 220, 220, 14504, 25, 5404, 22, 2124, 4521, 6, 201, 198, 4798, 705, 220, 220, 220, 20551, 25, 16244,...
2.283784
370
#!/usr/bin/env python from iris_sdk.models.base_resource import BaseData from iris_sdk.models.maps.ord.rate_center_search_order import \ RateCenterSearchOrderMap
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 4173, 271, 62, 21282, 74, 13, 27530, 13, 8692, 62, 31092, 1330, 7308, 6601, 198, 6738, 4173, 271, 62, 21282, 74, 13, 27530, 13, 31803, 13, 585, 13, 4873, 62, 16159, 62, ...
2.912281
57
from pathlib import Path import optimizers.PSO as pso import optimizers.MVO as mvo import optimizers.GWO as gwo import optimizers.MFO as mfo import optimizers.CS as cs import optimizers.BAT as bat import optimizers.WOA as woa import optimizers.FFA as ffa import optimizers.SSA as ssa import optimizers.GA as ga import o...
[ 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 6436, 11341, 13, 3705, 46, 355, 279, 568, 198, 11748, 6436, 11341, 13, 44, 29516, 355, 285, 13038, 198, 11748, 6436, 11341, 13, 33191, 46, 355, 308, 21638, 198, 11748, 6436, 11341, 13, 4...
2.151786
2,464
import dataclasses import pytest from dataclasses_avroschema import fields from . import consts
[ 11748, 4818, 330, 28958, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 4818, 330, 28958, 62, 615, 305, 15952, 2611, 1330, 7032, 198, 198, 6738, 764, 1330, 1500, 82, 628, 628, 198 ]
3.21875
32