content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from vcache_utils import VCacheStats from bfs_common import BFSParameters import sys import pandas as pd data = pd.DataFrame() for filename in sys.argv[1:]: data = data.append(BFSVCacheStats(filename).diffed_data) data.to_csv("vcache.summary.csv")
[ 6738, 410, 23870, 62, 26791, 1330, 26706, 4891, 29668, 198, 6738, 275, 9501, 62, 11321, 1330, 41646, 4303, 41158, 7307, 198, 11748, 25064, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 7890, 796, 279, 67, 13, 6601, 19778, 3419, 198, ...
2.791209
91
import json import logging import re from pathlib import Path from typing import Optional, Union import pandas as pd from . import DOCSURL, DS_URL_PREFIX, readers # configure logging logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) ch = logging.StreamHandler() ch.setLevel(logging.INFO) logger.addHa...
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 302, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 32233, 11, 4479, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 764, 1330, 37760, 50, 21886, 11, 17400, 62, 21886,...
2.246214
6,141
# This program rolls two dices and prints what you got # We set two variables (min and max) , lowest and highest number of the dice. import random min = 1 max = 6 roll_again = "yes" # We then use a while loop, so that the user can roll the dice again. while roll_again == "yes" or roll_again == "y": print "Roll...
[ 2, 770, 1430, 14088, 734, 288, 1063, 290, 20842, 644, 345, 1392, 198, 198, 2, 775, 900, 734, 9633, 357, 1084, 290, 3509, 8, 837, 9016, 290, 4511, 1271, 286, 262, 17963, 13, 220, 198, 11748, 4738, 198, 1084, 796, 352, 198, 9806, 79...
3.024845
161
#TEMA:GENERADORES ###################################################################### #Funcion que me regresa un numero determinado de numeros pares ###################################################################### ###################################################################### print("Ejemplo #1") ...
[ 2, 51, 27630, 25, 35353, 1137, 2885, 1581, 1546, 198, 198, 29113, 29113, 4242, 2235, 198, 2, 37, 19524, 295, 8358, 502, 842, 14625, 555, 997, 3529, 3416, 4533, 390, 5470, 418, 279, 3565, 198, 29113, 29113, 4242, 2235, 197, 628, 198, ...
4.351266
316
# -*- coding: utf-8 -*- """ lantz.qt.widgets ~~~~~~~~~~~~~~~~ PyQt widgets wrapped to work with lantz. :copyright: 2018 by Lantz Authors, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from . import feat, nonnumeric, numeric from .common import WidgetMixin, Childr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 300, 46269, 13, 39568, 13, 28029, 11407, 198, 220, 220, 220, 220, 27156, 628, 220, 220, 220, 9485, 48, 83, 40803, 12908, 284, 670, 351, 300,...
3.18705
139
# -*- coding: utf-8 -*- import struct import iota from iotapy.storage import converter as conv TRANSACTION_METADATA_TRITS_LENGTH = 1604 HASH_BYTES_LENGTH = 49 HASH_TRITS_LENGTH = 243
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 2878, 198, 11748, 1312, 4265, 198, 6738, 1312, 313, 12826, 13, 35350, 1330, 38394, 355, 3063, 628, 198, 5446, 15037, 44710, 62, 47123, 2885, 13563, 62, 5446, ...
2.52
75
#! /usr/bin/env python import tensorflow as tf import tensorflow.contrib.slim as slim seed = 0
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 13, 3642, 822, 13, 82, 2475, 355, 18862, 198, 198, 28826, 796, 657, 628, 628, 628, 628, 628, 628, 628, 628...
2.471698
53
from tkinter import* import website import tkinter.font as font from PIL import ImageTk,Image import os import sqlite3 import webbrowser if __name__=='__main__': main()
[ 6738, 256, 74, 3849, 1330, 9, 201, 198, 11748, 3052, 201, 198, 11748, 256, 74, 3849, 13, 10331, 355, 10369, 201, 198, 6738, 350, 4146, 1330, 7412, 51, 74, 11, 5159, 201, 198, 11748, 28686, 201, 198, 11748, 44161, 578, 18, 201, 198, ...
2.716418
67
import requests from typing import List from fastapi import FastAPI, Path from pydantic import BaseModel, HttpUrl from fastapi.middleware.cors import CORSMiddleware cors_origins = [ 'https://www.govdirectory.org', 'https://www.wikidata.org', ] user_agent_external = 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; r...
[ 11748, 7007, 198, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 3049, 15042, 1330, 12549, 17614, 11, 10644, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, 367, 29281, 28165, 198, 6738, 3049, 15042, 13, 27171, 1574, 13, 66, 669, 1330...
2.180952
1,155
from ..field import Field
[ 6738, 11485, 3245, 1330, 7663, 628 ]
4.5
6
""" This script adds a specific column to the `bug_type_entropy_projectname_old` tables. The added column contains the nesting depth (>=0) of each line. """ import os, sys, psycopg2, ntpath, traceback, subprocess from pprint import pprint #-------------------------------------------------------------------------------...
[ 37811, 198, 1212, 4226, 6673, 257, 2176, 5721, 284, 262, 4600, 25456, 62, 4906, 62, 298, 28338, 62, 16302, 3672, 62, 727, 63, 8893, 13, 383, 2087, 5721, 4909, 262, 46282, 6795, 45160, 28, 15, 8, 286, 1123, 1627, 13, 198, 37811, 198,...
3.269437
746
import matplotlib.pyplot as plt import numpy as np import cv2 import scipy.spatial from sklearn.linear_model import RANSACRegressor import os import sys import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0, parent...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 11748, 629, 541, 88, 13, 2777, 34961, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 371, 15037, 2246, 808...
2.241398
1,860
from setup import * import pygame, sys, os from pygame.locals import *
[ 6738, 9058, 1330, 1635, 198, 11748, 12972, 6057, 11, 25064, 11, 28686, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198 ]
3.227273
22
import json from investing_algorithm_framework.app.stateless.action_handlers \ .action_handler_strategy import ActionHandlerStrategy
[ 11748, 33918, 198, 6738, 14771, 62, 282, 42289, 62, 30604, 13, 1324, 13, 5219, 1203, 13, 2673, 62, 4993, 8116, 3467, 198, 220, 220, 220, 764, 2673, 62, 30281, 62, 2536, 4338, 1330, 7561, 25060, 13290, 4338, 628 ]
3.631579
38
# ---------------------------------------------------------------ALL REQUIRD FILES------------------------------------------------------------- from tkinter import * import tkinter.ttk as ttk import tkinter.messagebox as msg import tkinter.filedialog as tf from ttkthemes import ThemedStyle from PIL import Image, Image...
[ 2, 20368, 1783, 24305, 7036, 4526, 10917, 46833, 34020, 1546, 47232, 32501, 198, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 11748, 256, 74, 3849, 13, 926, 74, 355, 256, 30488, 198, 11748, 256, 74, 3849, 13, 20500, 3524, 355, 31456, 19...
2.638286
3,453
#!/usr/local/miniconda2/bin/python # _*_ coding: utf-8 _*_ """ @author: MarkLiu @time : 17-6-19 8:44 """
[ 2, 48443, 14629, 14, 12001, 14, 1084, 291, 13533, 17, 14, 8800, 14, 29412, 198, 2, 4808, 9, 62, 19617, 25, 3384, 69, 12, 23, 4808, 9, 62, 198, 198, 37811, 198, 31, 9800, 25, 2940, 43, 16115, 198, 31, 2435, 220, 1058, 1596, 12, ...
2
53
import sys #Fornece funes e variveis para manipular partes do ambiente de tempo de execuo do Python from time import sleep import pygame from settings import Settings from game_stats import GameStats from bullet import Bullet from alien import Alien def check_keydown_events(event, ai_settings, screen, stats, sb, shi...
[ 11748, 25064, 220, 1303, 1890, 710, 344, 1257, 274, 304, 1401, 425, 271, 31215, 7704, 934, 636, 274, 466, 25237, 68, 390, 28691, 390, 2452, 20895, 466, 11361, 198, 6738, 640, 1330, 3993, 198, 11748, 12972, 6057, 198, 6738, 6460, 1330, ...
2.43402
4,562
# # Copyright 2016-2017 Games Creators Club # # MIT License # from sonarsensor_service import *
[ 198, 2, 198, 2, 15069, 1584, 12, 5539, 5776, 7921, 669, 6289, 198, 2, 198, 2, 17168, 13789, 198, 2, 198, 198, 6738, 3367, 945, 22854, 62, 15271, 1330, 1635, 198 ]
3.16129
31
import numpy as np from CelestialMechanics.kepler.constants import K def mu_sun(m2_over_m1: float) -> float: """ mu = k * sqrt(1 + m2/m1) :param m2_over_m1: :type m2_over_m1: :return: mu :rtype: float """ mu = K * np.sqrt(1. + m2_over_m1) return mu * mu def mu_na(n: float, a: ...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 37231, 28452, 272, 873, 13, 365, 20053, 13, 9979, 1187, 1330, 509, 628, 198, 4299, 38779, 62, 19155, 7, 76, 17, 62, 2502, 62, 76, 16, 25, 12178, 8, 4613, 12178, 25, 198, 220, 220, 220...
2.050891
393
#!/usr/bin/python3 import hl_utils from hl_constants import * import string import re from datetime import datetime if __name__ == "__main__": print(logins(),ip(),vpn(),guthaben(),battery(),date(),sep='',end='')
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 289, 75, 62, 26791, 198, 6738, 289, 75, 62, 9979, 1187, 1330, 1635, 198, 11748, 4731, 198, 11748, 302, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628, 628, 198, 361, 11593, 3672, 8...
2.604651
86
import datetime from django.contrib import messages from django.contrib.auth import authenticate, login, logout from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from vigil_ctf_app.EmailBackEnd import EmailBackEnd #Authentication views ONLY...
[ 11748, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 8323, 5344, 11, 17594, 11, 2604, 448, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, ...
3.586957
92
import os import pickle from functools import partial from itertools import permutations, combinations import networkx as nx import numpy as np from bitstring import BitArray from collections import Counter try: from graph_measures.features_infra.feature_calculators import NodeFeatureCalculator, Featur...
[ 11748, 28686, 201, 198, 11748, 2298, 293, 201, 198, 6738, 1257, 310, 10141, 1330, 13027, 201, 198, 6738, 340, 861, 10141, 1330, 9943, 32855, 11, 17790, 201, 198, 201, 198, 11748, 3127, 87, 355, 299, 87, 201, 198, 11748, 299, 32152, 35...
2.225743
2,525
from src import XMLAnalyzerException import lxml.etree as ET from src.Structures import * from src import XMLFilter from src import XMLUtil import constants import re from src.xml_decoder import html_entitize # split at every space, except if it is inside "$param('<here>') statement # todo: move to tests file # st...
[ 6738, 12351, 1330, 23735, 37702, 9107, 16922, 198, 11748, 300, 19875, 13, 316, 631, 355, 12152, 198, 6738, 12351, 13, 44909, 942, 1330, 1635, 198, 6738, 12351, 1330, 23735, 22417, 198, 6738, 12351, 1330, 23735, 18274, 346, 198, 11748, 384...
3.558442
154
"""RF Pulse Simulation Functions. """ from sigpy import backend __all__ = ['abrm', 'abrm_nd', 'abrm_hp'] def abrm(rf, x, balanced=False): r"""1D RF pulse simulation, with simultaneous RF + gradient rotations. Args: rf (array): rf waveform input. x (array): spatial locations. bala...
[ 37811, 32754, 25062, 41798, 40480, 13, 198, 198, 37811, 198, 6738, 43237, 9078, 1330, 30203, 198, 198, 834, 439, 834, 796, 37250, 397, 26224, 3256, 705, 397, 26224, 62, 358, 3256, 705, 397, 26224, 62, 24831, 20520, 628, 198, 4299, 450, ...
1.931384
2,565
#!/usr/bin/env python # apachelint - simple tool to cleanup apache conf files # USAGE: apachelint [conffile] # -*-Python-*- import sys import re filename = sys.argv[1] indentlevel = 0 indentstep = 4 prevlineblank = False with open(filename) as f: for line in f: # strip leading & trailing space / line en...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 2471, 9636, 600, 532, 2829, 2891, 284, 27425, 2471, 4891, 1013, 3696, 198, 2, 1294, 11879, 25, 2471, 9636, 600, 685, 1102, 487, 576, 60, 198, 2, 532, 9, 12, 37906, 12, 9, ...
2.143603
383
"""Vectorized math formulae""" from numba import vectorize, int64, float64 from math import lgamma, exp, isnan, log __all__ = ["binom", "xlogy"]
[ 37811, 38469, 1143, 10688, 1296, 377, 3609, 37811, 198, 6738, 997, 7012, 1330, 15879, 1096, 11, 493, 2414, 11, 12178, 2414, 198, 6738, 10688, 1330, 300, 28483, 2611, 11, 1033, 11, 2125, 272, 11, 2604, 198, 198, 834, 439, 834, 796, 146...
2.846154
52
# @Copyright [2021] [Yash Bajaj] import fileinput as fi # This module replaces the word <|SPACE|> with a new line (code line 18) # This is a input function whatever you will write that will come in input.txt # This is a function to copy data from input.txt and paste it in copyied.txt # This function replaces <|SPACE|>...
[ 2, 2488, 15269, 685, 1238, 2481, 60, 685, 56, 1077, 347, 1228, 1228, 60, 198, 198, 11748, 2393, 15414, 355, 25912, 198, 2, 770, 8265, 24020, 262, 1573, 1279, 91, 4303, 11598, 91, 29, 351, 257, 649, 1627, 357, 8189, 1627, 1248, 8, ...
3.263514
148
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render from models import * # Create your views here.
[ 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, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 198, 6738, 4981, 1330, 1635, 198, 198, 2, 13...
3.104167
48
# -*- coding: utf-8 -*- # Date: 2020/3/17 12:16 """ an engine for deep learning task """ __author__ = 'tianyu' import abc import random import time import warnings import numpy as np import torch.backends.cudnn import torch.nn.functional as F import torch.utils.data from torch.optim.lr_scheduler import StepLR from ....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 7536, 25, 12131, 14, 18, 14, 1558, 1105, 25, 1433, 198, 198, 37811, 198, 272, 3113, 329, 2769, 4673, 4876, 198, 37811, 198, 834, 9800, 834, 796, 705, 83, 666, 247...
1.9492
4,311
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `ninjadog` package.""" # TODO: test raises ValueError when pug cli can't be found and not passed explicitly to renderer
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 51, 3558, 329, 4600, 35073, 38442, 519, 63, 5301, 526, 15931, 628, 198, 2, 16926, 46, 25, 1332, 12073, 11...
2.838235
68
from rest_framework import viewsets, permissions from rest_framework_simplejwt.authentication import JWTAuthentication from rest_framework.response import Response from rest_framework import status from core.serializers import TodoSerializer, TodoDetailSerializer from core.models import Todo
[ 6738, 1334, 62, 30604, 1330, 5009, 1039, 11, 21627, 198, 6738, 1334, 62, 30604, 62, 36439, 73, 46569, 13, 41299, 3299, 1330, 449, 54, 5603, 315, 6925, 3299, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 3060...
4.083333
72
from ._DeviceInfo import *
[ 6738, 47540, 24728, 12360, 1330, 1635, 198 ]
3.857143
7
from django.contrib.auth.forms import UserCreationForm from users.models import User, Profile from django import forms
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 11787, 12443, 341, 8479, 198, 198, 6738, 2985, 13, 27530, 1330, 11787, 11, 13118, 198, 6738, 42625, 14208, 1330, 5107, 628, 628 ]
3.727273
33
from py2neo import Graph import numpy as np import pandas as pd graph = Graph("http://192.168.50.179:7474", auth=("neo4j", "qwer")) q1 = create_entity_question() q2 = create_attribute_question() q3 = create_relation_question() df = pd.DataFrame() df['question'] = q1 + q2 + q3 df['label'] = [0] * ...
[ 6738, 12972, 17, 710, 78, 1330, 29681, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 201, 198, 34960, 796, 29681, 7203, 4023, 1378, 17477, 13, 14656, 13, 1120, 13, 21738, 25, 22, 38652, ...
2.279793
193
import cv2 from scipy.spatial import distance as dist
[ 11748, 269, 85, 17, 198, 6738, 629, 541, 88, 13, 2777, 34961, 1330, 5253, 355, 1233, 628, 198 ]
3.111111
18
import pandas as pd import os import tarfile import glob import json def unzip_rna_seq_data(file_name, desired_folder_name): ''' Downloaded RNA files are tarfiles, this unzips them''' if 'tar' in file_name: open_tar = tarfile.open(file_name) open_tar.extractall(f'{desired_folder_name}') ...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 13422, 7753, 198, 11748, 15095, 198, 11748, 33918, 628, 198, 4299, 555, 13344, 62, 81, 2616, 62, 41068, 62, 7890, 7, 7753, 62, 3672, 11, 10348, 62, 43551, 62, 3672, 2599,...
2.139233
1,695
import re from collections import OrderedDict from django.conf.urls import url as django_url, include from django.core.urlresolvers import RegexURLResolver, RegexURLPattern from django.utils.encoding import force_text import logging # Using FastUrl has a couple of caveats: # 1. FastUrl tries to keep the resolution ord...
[ 11748, 302, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 355, 42625, 14208, 62, 6371, 11, 2291, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 797, 256...
2.989293
467
import os import json import keras import numpy as np import csv from experiments import config import utils import utils_train import models import argparse def experiment(save_key, model, data_splits_file, batch_size, active_str, muxrate): """ This should be common code for all experiments """ ...
[ 11748, 28686, 198, 11748, 33918, 198, 198, 11748, 41927, 292, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 21370, 198, 198, 6738, 10256, 1330, 4566, 198, 11748, 3384, 4487, 198, 11748, 3384, 4487, 62, 27432, 198, 11748, 4981, 628,...
2.222732
871
# DEFUALT SETUP FOR NUMBERS DEFAULT_FLOAT = float # DEFAULT SETUP FOR STRINGS DEFAULT_LABEL_LENGTH = 120
[ 2, 23449, 25620, 51, 25823, 8577, 7473, 36871, 33, 4877, 198, 7206, 38865, 62, 3697, 46, 1404, 796, 12178, 198, 198, 2, 5550, 38865, 25823, 8577, 7473, 19269, 20754, 198, 7206, 38865, 62, 48780, 3698, 62, 43, 49494, 796, 7982, 198 ]
2.585366
41
from logging import exception, info from requests import post as request_post from requests.exceptions import RequestException from typing import Union from uuid import UUID from django.conf import settings from django.db.models import ( CASCADE, CharField, ForeignKey, OneToOneField, ) from web3.types ...
[ 6738, 18931, 1330, 6631, 11, 7508, 198, 6738, 7007, 1330, 1281, 355, 2581, 62, 7353, 198, 6738, 7007, 13, 1069, 11755, 1330, 19390, 16922, 198, 6738, 19720, 1330, 4479, 198, 6738, 334, 27112, 1330, 471, 27586, 198, 198, 6738, 42625, 142...
3.378788
198
if __name__ == "__main__": a = Solution() nums = [0] a.moveZeroes(nums)
[ 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 257, 796, 28186, 3419, 198, 220, 220, 220, 997, 82, 796, 685, 15, 60, 198, 220, 220, 220, 257, 13, 21084, 57, 263, 3028, 7, 77, 5700, 8 ]
1.953488
43
import argparse from reward_surfaces.agents.make_agent import make_agent import torch import json import os from glob import glob if __name__ == "__main__": main()
[ 11748, 1822, 29572, 198, 6738, 6721, 62, 11793, 32186, 13, 49638, 13, 15883, 62, 25781, 1330, 787, 62, 25781, 198, 11748, 28034, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 15095, 1330, 15095, 628, 198, 198, 361, 11593, 3672, 834, ...
3.226415
53
"""Tests on the base ladder structure.""" import pytest if __name__ == "__main__": pytest.main()
[ 37811, 51, 3558, 319, 262, 2779, 18002, 4645, 526, 15931, 198, 11748, 12972, 9288, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 12972, 9288, 13, 12417, 3419, 198 ]
2.861111
36
from django.conf.urls import url from django.urls import path from courses.views import courses_detail from courses.views.translate import get_translations urlpatterns = [ url(r'(?P<institution_id>[\w\-]+?)/(?P<course_id>[\w\-\~\$()]+?)/(?P<kis_mode>[\w\-]+?)/', courses_detail, name='courses_detail'), ...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 10902, 13, 33571, 1330, 10902, 62, 49170, 198, 6738, 10902, 13, 33571, 13, 7645, 17660, 1330, 651, 62, 7645, ...
2.635135
148
from hamcrest import assert_that, equal_to, is_ from opencypher.ast import Expression, NonEmptySequence, Order, SortItem, SortOrder
[ 6738, 8891, 66, 2118, 1330, 6818, 62, 5562, 11, 4961, 62, 1462, 11, 318, 62, 198, 198, 6738, 1280, 948, 17042, 13, 459, 1330, 41986, 11, 8504, 40613, 44015, 594, 11, 8284, 11, 33947, 7449, 11, 33947, 18743, 628 ]
3.435897
39
from Model import Critic from mindspore import Tensor from mindspore import load_param_into_net import copy C1 = Critic(state_dim=2, action_dim=1) C2 = Critic(state_dim=2, action_dim=1) # C1.load_parameter_slice(C2.parameters_dict()) # load_param_into_net(C1, C2.parameters_dict()) c1_ = C1.parameters_dict() c2_ = C2.pa...
[ 6738, 9104, 1330, 10056, 291, 198, 6738, 2000, 2777, 382, 1330, 309, 22854, 198, 6738, 2000, 2777, 382, 1330, 3440, 62, 17143, 62, 20424, 62, 3262, 198, 11748, 4866, 198, 34, 16, 796, 10056, 291, 7, 5219, 62, 27740, 28, 17, 11, 2223...
2.22
200
from .flatwrapper import FlatWrapper
[ 6738, 764, 38568, 48553, 1330, 21939, 36918, 2848, 628 ]
4.222222
9
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from cricdb_setup import Team, Player, Base, Batsman, Bowler, Fielder, PlayerStrength, PlayerWeakness, PlayerMoment, Video engine = create_engine('sqlite:///cricdb.db') # Bind the engine to the metadata of the Base class so that the #...
[ 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 201, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 201, 198, 201, 198, 6738, 1067, 291, 9945, 62, 40406, 1330, 4816, 11, 7853, 11, 7308, 11, 347, 1381, 805, 11, 9740, 1754, ...
3.219963
541
from dataclasses import dataclass, field from typing import Optional, Union from bindings.gmd.dq_evaluation_method_type_code import DqEvaluationMethodTypeCode from bindings.gmd.nil_reason_enumeration_value import NilReasonEnumerationValue __NAMESPACE__ = "http://www.isotc211.org/2005/gmd"
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 32233, 11, 4479, 198, 6738, 34111, 13, 70, 9132, 13, 49506, 62, 18206, 2288, 62, 24396, 62, 4906, 62, 8189, 1330, 360, 80, 36, 2100, 2288, 17410, 6030, ...
3.139785
93
#import time from spark.ReqBase import ReqBase
[ 2, 11748, 640, 198, 6738, 9009, 13, 3041, 80, 14881, 1330, 797, 80, 14881, 198 ]
3.133333
15
r""" This module contains several utility functions which can be used e.g. for thresholding the alpha-shearlet coefficients or for using the alpha-shearlet transform for denoising. Finally, it also contains the functions :func:`my_ravel` and :func:`my_unravel` which can be used to convert the alpha-shearlet coefficien...
[ 81, 37811, 198, 1212, 8265, 4909, 1811, 10361, 5499, 543, 460, 307, 973, 304, 13, 70, 13, 198, 1640, 11387, 278, 262, 17130, 12, 7091, 283, 1616, 44036, 393, 329, 1262, 262, 198, 26591, 12, 7091, 283, 1616, 6121, 329, 2853, 78, 1710...
2.638511
3,090
# -*- coding: utf-8 -*- # Copyright (c) 2018-2021, earthobservations developers. # Distributed under the MIT License. See LICENSE for more info. import re from datetime import datetime import pytest from tests.provider.dwd.radar import station_reference_pattern_unsorted from wetterdienst.provider.dwd.radar import Dwd...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 2864, 12, 1238, 2481, 11, 4534, 672, 3168, 602, 6505, 13, 198, 2, 4307, 6169, 739, 262, 17168, 13789, 13, 4091, 38559, 24290, 329, 517, 7508, 1...
3.011236
178
# -*- coding: utf-8 -*- import pytest import json from pathlib import Path
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 12972, 9288, 198, 11748, 33918, 198, 6738, 3108, 8019, 1330, 10644, 628, 628 ]
2.785714
28
#!/usr/bin/env python import os import sys import glob import argparse from pathlib import Path from collections import defaultdict from hashlib import sha1 import numpy as np import sacrebleu import tabulate from pysimt.metrics.simnmt import AVPScorer, AVLScorer, CWMScorer, CWXScorer """This script should be run ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 15095, 198, 11748, 1822, 29572, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 12234, 8019, 1330, 427, 64,...
2.120509
1,809
import logging from django.views.generic.base import TemplateView from django.views.generic.detail import DetailView from django.shortcuts import redirect from .controller import ( create_canvas_course, start_course_template_copy, finalize_new_canvas_course, get_canvas_course_url ) from .mixins import C...
[ 11748, 18931, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 8692, 1330, 37350, 7680, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 49170, 1330, 42585, 7680, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 198, 6738, 764,...
3.358382
173
import sys import numpy as np from .sam_utils import load_samfile, fetch_reads def _check_SE_event(gene): """Check SE event""" if (len(gene.trans) != 2 or gene.trans[0].exons.shape[0] != 3 or gene.trans[1].exons.shape[0] != 2 or np.mean(gene.trans[0].exons[[0, 2], :] == ...
[ 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 764, 37687, 62, 26791, 1330, 3440, 62, 37687, 7753, 11, 21207, 62, 40779, 198, 198, 4299, 4808, 9122, 62, 5188, 62, 15596, 7, 70, 1734, 2599, 198, 220, 220, 220, 37227, 9787...
2.16457
3,020
#==============================================================================# # Enasis Network Common Libraries # # Python Functions Time Processing # #============================================================================...
[ 2, 23926, 25609, 855, 2, 198, 2, 2039, 17765, 7311, 8070, 46267, 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, 220, 220, 220, 220, 220, 220, 220...
3.545205
365
from colorama import Fore, Back, Style, init import pyautogui import time import os os.system("mode 120, 30") Poxtrop()
[ 6738, 3124, 1689, 1330, 4558, 11, 5157, 11, 17738, 11, 2315, 201, 198, 11748, 12972, 2306, 519, 9019, 201, 198, 11748, 640, 201, 198, 11748, 28686, 201, 198, 201, 198, 418, 13, 10057, 7203, 14171, 7982, 11, 1542, 4943, 201, 198, 18833...
2.723404
47
import click from typing import Callable, List from .effect_parade import AbstractEffectParade DISPLAY_OPTIONS = [ click.option('-p', '--parade', type=click.Choice(AbstractEffectParade.get_parade_options()), help="How the effects are displayed.", default=AbstractEffectParade.get_default_option()...
[ 11748, 3904, 198, 6738, 19720, 1330, 4889, 540, 11, 7343, 198, 198, 6738, 764, 10760, 62, 1845, 671, 1330, 27741, 18610, 10044, 671, 628, 198, 26288, 31519, 62, 3185, 51, 11053, 796, 685, 198, 220, 220, 220, 3904, 13, 18076, 10786, 12...
2.646447
577
import boto3 import os import tarfile if __name__ == "__main__": s3 = boto3.client('s3', aws_access_key_id="AKIAY6UR252SQUQ3OSWZ", aws_secret_access_key="08LQj" "+ryk9SMojG18vERXKKzhNSYk5pLhAjrIAVX") output_path = "./data.tar.gz" with open(o...
[ 11748, 275, 2069, 18, 198, 11748, 28686, 198, 11748, 13422, 7753, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 264, 18, 796, 275, 2069, 18, 13, 16366, 10786, 82, 18, 3256, 3253, 82, 62, 1552...
1.912052
307
import os, sys import logging import numpy as np import pandas as pd from matplotlib import pyplot as plt from scipy.ndimage import label from .utils import watershed_tissue_sections, get_spot_adjacency_matrix # Read in a series of Loupe annotation files and return the set of all unique categories. # NOTE: "Undefine...
[ 11748, 28686, 11, 25064, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 198, 6738, 629, 541, 88, 13, 358, 9060, 1330, 6...
2.973481
905
from flask import ( Blueprint, render_template, request, session, current_app as app ) from flask_login import current_user from floa.extensions import loa from floa.models.library import Library bp = Blueprint( name='home', import_name=__name__, url_prefix="/" )
[ 6738, 42903, 1330, 357, 198, 220, 220, 220, 39932, 11, 198, 220, 220, 220, 8543, 62, 28243, 11, 198, 220, 220, 220, 2581, 11, 198, 220, 220, 220, 6246, 11, 198, 220, 220, 220, 1459, 62, 1324, 355, 598, 198, 220, 220, 220, 1267, ...
2.723214
112
import logging import orangengine from api.models import Device as DeviceModel from celery.utils.log import get_task_logger from api import debug celery_logger = get_task_logger(__name__) if debug: celery_logger.setLevel(logging.DEBUG) celery_logger.debug('Enabled Debug mode')
[ 198, 11748, 18931, 198, 11748, 393, 648, 18392, 198, 6738, 220, 40391, 13, 27530, 1330, 16232, 355, 16232, 17633, 198, 6738, 18725, 1924, 13, 26791, 13, 6404, 1330, 651, 62, 35943, 62, 6404, 1362, 198, 6738, 40391, 1330, 14257, 628, 198...
3
97
# Generated by Django 2.2.7 on 2020-12-22 16:01 import datetime from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 22, 319, 12131, 12, 1065, 12, 1828, 1467, 25, 486, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.972222
36
from stacks.decode_string import decode_string
[ 6738, 24285, 13, 12501, 1098, 62, 8841, 1330, 36899, 62, 8841, 628 ]
4
12
# import socket ip = "127.0.0.1" port = 5001 s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) s.bind((ip,port)) i=0 while True: data, addr = s.recvfrom(1024) print "Received from ",addr print "Received ",data s.close()
[ 2, 198, 11748, 17802, 198, 198, 541, 796, 366, 16799, 13, 15, 13, 15, 13, 16, 1, 198, 634, 796, 5323, 16, 198, 198, 82, 796, 17802, 13, 44971, 7, 44971, 13, 8579, 62, 1268, 2767, 11, 44971, 13, 50, 11290, 62, 35, 10761, 2390, ...
2.192661
109
import copy import logging import pathlib import torch import torch.nn as nn from yolov3.config import get_default_config from yolov3.utils.config_node import ConfigNode
[ 11748, 4866, 198, 11748, 18931, 198, 11748, 3108, 8019, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 6738, 331, 349, 709, 18, 13, 11250, 1330, 651, 62, 12286, 62, 11250, 198, 6738, 331, 349, 709, 18, ...
3.326923
52
# -*- coding: utf-8 -*- from autograd.blocks.trigo import sin, cos from autograd.variable import Variable import numpy as np import autograd as ad from autograd import config t=sub(2) t.parent()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 1960, 519, 6335, 13, 27372, 13, 2213, 14031, 1330, 7813, 11, 8615, 198, 6738, 1960, 519, 6335, 13, 45286, 1330, 35748, 198, 11748, 299, 32152, 355, 45941, 198...
2.175926
108
#!/usr/bin/python3 # using_sys.py import sys print('') for i in sys.argv: print(i) print('\n\nPython',sys.path,'\n')
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 1262, 62, 17597, 13, 9078, 198, 198, 11748, 25064, 198, 198, 4798, 7, 7061, 8, 198, 1640, 1312, 287, 25064, 13, 853, 85, 25, 198, 197, 4798, 7, 72, 8, 198, 4798, 10786, 59, 77, ...
2.125
56
import math import numbers import torch from torch import nn from torch.nn import functional as F def gaussian_filter(in_channel, out_channel, kernel_size=15, sigma=3): """ This method returns 2d gaussian filter input : in_channel : Number of input channels out_channel : Expected number of output ...
[ 11748, 10688, 198, 11748, 3146, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 198, 4299, 31986, 31562, 62, 24455, 7, 259, 62, 17620, 11, 503, 62, 17620, 11, 9720, 62, 7857...
2.502146
699
from opfu.security import Security
[ 6738, 1034, 20942, 13, 12961, 1330, 4765, 628 ]
4.5
8
# ABC103a import sys input = sys.stdin.readline sys.setrecursionlimit(10**6) a = list(map(int, input().split())) a.sort(reverse=True) print(abs(a[1]-a[0])+abs(a[1]-a[2]))
[ 2, 9738, 15197, 64, 198, 11748, 25064, 198, 15414, 796, 25064, 13, 19282, 259, 13, 961, 1370, 198, 17597, 13, 2617, 8344, 24197, 32374, 7, 940, 1174, 21, 8, 198, 198, 64, 796, 1351, 7, 8899, 7, 600, 11, 5128, 22446, 35312, 3419, 4...
2.177215
79
import os config = { #iam 'ACCOUNT_INACTIVE_DAYS': 30, #Accounts are inactive if not used for 30 days 'PASSWORD_ROTATION_DAYS': 90, #Paswords should be rotated every 90 days 'ACCESS_KEY_ROTATION_DAYS': 90 #Access Keys should be rotated every 90 days }
[ 11748, 28686, 198, 198, 11250, 796, 1391, 198, 220, 220, 220, 1303, 1789, 198, 220, 220, 220, 705, 26861, 28270, 62, 1268, 10659, 9306, 62, 26442, 50, 10354, 1542, 11, 220, 220, 220, 220, 220, 220, 1303, 30116, 82, 389, 28621, 611, ...
2.504425
113
#!/usr/bin/env python from six import BytesIO import wx import wx.richtext as rt import images #---------------------------------------------------------------------- #---------------------------------------------------------------------- #----------------------------------------------------------------------...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 2237, 1330, 2750, 4879, 9399, 198, 198, 11748, 266, 87, 198, 11748, 266, 87, 13, 7527, 5239, 355, 374, 83, 198, 11748, 4263, 198, 198, 2, 10097, 23031, 628, 198, 198, 2, ...
3.635417
192
from django.db import models from django.contrib.auth.models import User
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 628, 628, 198 ]
3.347826
23
"""Implements a HD44780 character LCD connected via NodeMCU GPIO pins.""" from machine import Pin from utime import sleep, ticks_ms from nodemcu_gpio_lcd import GpioLcd # Wiring used for this example: # # 1 - Vss (aka Ground) - Connect to one of the ground pins on you NodeMCU board. # 2 - VDD - Connect to 3V # 3 -...
[ 37811, 3546, 1154, 902, 257, 5572, 34825, 1795, 2095, 23598, 5884, 2884, 19081, 9655, 52, 50143, 20567, 526, 15931, 198, 198, 6738, 4572, 1330, 13727, 198, 6738, 3384, 524, 1330, 3993, 11, 36066, 62, 907, 198, 6738, 18666, 368, 27399, 6...
2.338139
763
import dgl import errno import numpy as np import os import random import torch from collections import defaultdict from rdkit import Chem def mkdir_p(path): """Create a folder for the given path. Parameters ---------- path: str Folder to create """ try: os.makedirs(path) ...
[ 11748, 288, 4743, 198, 11748, 11454, 3919, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 28034, 198, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 374, 67, 15813, 1330, 12870, 198, 198, 4299, 33480...
2.402969
4,581
import json import os import re import uuid from knowledge_graph_attr import KnowledgeGraph, Dijkstra total = 0.0 ignored = 0.0 if __name__ == "__main__": p = Preprocessor() path = "/Users/prasoon/Desktop/train" files = os.listdir(path) student_train_json = {'data': []} bug_train_json = {'data...
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 334, 27112, 198, 198, 6738, 3725, 62, 34960, 62, 35226, 1330, 20414, 37065, 11, 360, 45961, 12044, 198, 198, 23350, 796, 657, 13, 15, 198, 570, 1850, 796, 657, 13, 15, 628,...
1.997729
1,761
import csv import os import difflib import statistics import numpy as np import matplotlib.pyplot as plt SMALL_SIZE = 12 MEDIUM_SIZE = 14 LARGE_SIZE = 18 plt.rc('font', size=SMALL_SIZE) # controls default text sizes # plt.rc('title', titlesize=MEDIUM_SIZE) # fontsize of the axes title plt.rc('axes', lab...
[ 11748, 269, 21370, 198, 11748, 28686, 198, 11748, 814, 8019, 198, 11748, 7869, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 12310, 7036, 62, 33489, 796, 1105, 198, 3073...
1.919873
2,521
# sys.stdin.readline() import sys input = sys.stdin.readline a, b, c, d = map(int, input().split()) if a+b > c+d: ans = 'Left' elif a+b == c+d: ans = 'Balanced' else: ans = 'Right' print(ans)
[ 2, 25064, 13, 19282, 259, 13, 961, 1370, 3419, 198, 11748, 25064, 198, 15414, 796, 25064, 13, 19282, 259, 13, 961, 1370, 198, 198, 64, 11, 275, 11, 269, 11, 288, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 361, 257, 10,...
2.091837
98
#!/usr/bin/env python import copy import os.path as op NAME_FMT = "%-20s" def update_stats(filename, stat): if not op.isfile(filename): return with open(filename, 'r') as f: for line in f: l = line.rstrip() for c in FileStats.ANNOTS: if l.endswith("%s ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 4866, 198, 11748, 28686, 13, 6978, 355, 1034, 198, 198, 20608, 62, 37, 13752, 796, 366, 33963, 1238, 82, 1, 198, 198, 4299, 4296, 62, 34242, 7, 34345, 11, 1185, 2599, 198...
1.97449
784
""" by_locator : tuple --> (<selenium By object>, <selector string>) x_offset : int --> integer value of x offset in pixels y_offset : int --> integer value of y offset in pixels x_destination : int --> integer value of x location on page y_desitination : int ...
[ 37811, 198, 220, 220, 220, 416, 62, 17946, 1352, 220, 220, 220, 220, 220, 220, 220, 1058, 46545, 14610, 38155, 741, 47477, 2750, 2134, 22330, 1279, 19738, 273, 4731, 43734, 198, 220, 220, 220, 2124, 62, 28968, 220, 220, 220, 220, 220,...
3.037791
344
n = int(input()) for number in range(n): print(next(even(number))) # Don't forget to print out the first n numbers one by one here
[ 77, 796, 493, 7, 15414, 28955, 198, 220, 220, 220, 220, 198, 1640, 1271, 287, 2837, 7, 77, 2599, 198, 220, 220, 220, 3601, 7, 19545, 7, 10197, 7, 17618, 22305, 628, 628, 198, 2, 2094, 470, 6044, 284, 3601, 503, 262, 717, 299, 31...
2.88
50
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 from __future__ import unicode_literals from django.db import connections from django.utils import timezone from django.utils.functional import cached_property from cronman.config import app_settings from cronman.job import BaseCronJob from cronman.models import Cro...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 25357, 25, 13396, 25, 316, 25, 2032, 28, 19, 25, 6448, 28, 19, 25, 912, 28, 19, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, ...
3.043796
137
import re parse_re = re.compile( r'pos\=\<(?P<x>-?\d+),(?P<y>-?\d+),(?P<z>-?\d+)\>, r\=(?P<r>\d+)' ) if __name__ == '__main__': test1() test2() main()
[ 11748, 302, 198, 198, 29572, 62, 260, 796, 302, 13, 5589, 576, 7, 198, 220, 220, 220, 374, 6, 1930, 59, 28, 49778, 7, 30, 47, 27, 87, 29, 12, 30, 59, 67, 10, 828, 7, 30, 47, 27, 88, 29, 12, 30, 59, 67, 10, 828, 7, 30, ...
1.579439
107
#!/usr/bin/env python from setuptools import find_packages, setup setup( name="lib_elo_calculator", packages=find_packages(include=['lib_elo_calculator']), version='0.1.0', description='contains functions and formulas for calculating elo', author='Connor Mullett', license='MIT', setup_requires=['pytest-r...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 40406, 7, 198, 220, 1438, 2625, 8019, 62, 22126, 62, 9948, 3129, 1352, 1600, 198, 220, 10392, 28, 19796, 62, 43789, ...
2.953488
129
tot_name = os.path.join(os.path.dirname(__file__),'src/data', file_name) # open the json datafile and read it in with open(tot_name, 'r') as inputfile: doc = json.load(inputfile) # transform the data to the correct types and convert temp to celsius id_movie = int(doc['id']) movie_name = str(doc['origi...
[ 83, 313, 62, 3672, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 6, 10677, 14, 7890, 3256, 2393, 62, 3672, 8, 198, 198, 2, 1280, 262, 33918, 1366, 7753, 290, 1100, 340, 287, 198, 448...
2.40315
635
""" Code for hierarchical multi-class classifiers. Author: Thomas Mortier Date: Feb. 2021 TODO: * Add option for set-valued prediction * Feature: allow tree structures with non-unique node labels (currently, warning is thrown) """ import time import warnings import numpy as np from .utils import HLabelEncod...
[ 37811, 198, 10669, 329, 38958, 5021, 12, 4871, 1398, 13350, 13, 198, 13838, 25, 5658, 10788, 959, 198, 10430, 25, 3158, 13, 33448, 198, 198, 51, 3727, 46, 25, 220, 198, 220, 220, 220, 1635, 3060, 3038, 329, 900, 12, 39728, 17724, 19...
3.633166
199
"""Fixtures for pytest.""" import pytest from nerdchess.board import Board from nerdchess import pieces
[ 37811, 37, 25506, 329, 12972, 9288, 526, 15931, 198, 198, 11748, 12972, 9288, 198, 6738, 34712, 2395, 824, 13, 3526, 1330, 5926, 198, 6738, 34712, 2395, 824, 1330, 5207, 628, 198 ]
3.451613
31
""" if src == "auto": src = "Auto detect language" if src == "en": src = "English - English" if src == "de": src = "German - Deutsch" if src == "ar": src = "Arabic - " if src == "es": src = "Spanish - espaol, castellano" if src == "ru": src = "Russian - " if src == "pl": src =...
[ 198, 37811, 198, 220, 611, 12351, 6624, 366, 23736, 1298, 198, 220, 220, 220, 12351, 796, 366, 27722, 4886, 3303, 1, 198, 220, 611, 12351, 6624, 366, 268, 1298, 198, 220, 220, 220, 12351, 796, 366, 15823, 532, 3594, 1, 198, 220, 611...
2.242047
723
"""Decorator unctions for displaying commands.""" from functools import wraps from shutil import get_terminal_size import click def command_handler(command_title, colour='green'): """Use this decorator for surrounding the functions with banners.""" def decorator(function): """Nested decorator functio...
[ 37811, 10707, 273, 1352, 555, 2733, 329, 19407, 9729, 526, 15931, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 4423, 346, 1330, 651, 62, 23705, 282, 62, 7857, 198, 198, 11748, 3904, 628, 198, 4299, 3141, 62, 30281, 7, 21812, 6...
2.638686
274
from typing import List, Optional from pydantic import BaseModel, Field
[ 6738, 19720, 1330, 7343, 11, 32233, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 11, 7663, 628, 628, 628 ]
3.9
20
""" Test adding 4D followed by 5D image layers to the viewer Intially only 2 sliders should be present, then a third slider should be created. """ import numpy as np from skimage import data import napari with napari.gui_qt(): viewer = napari.view_image(np.random.random((2, 10, 50, 100, 100)))
[ 37811, 198, 14402, 4375, 604, 35, 3940, 416, 642, 35, 2939, 11685, 284, 262, 19091, 198, 198, 5317, 1927, 691, 362, 1017, 4157, 815, 307, 1944, 11, 788, 257, 2368, 28982, 815, 307, 198, 25598, 13, 198, 37811, 198, 198, 11748, 299, 3...
3.2
95
# A module to tests the methods of the Subsystem import unittest import os import shutil import re from copy import copy from qsome import cluster_subsystem, cluster_supersystem from pyscf import gto, lib, scf, dft, cc, mp, mcscf, tools from pyscf.cc import ccsd_t, uccsd_t import numpy as np import tempfile
[ 2, 317, 8265, 284, 5254, 262, 5050, 286, 262, 3834, 10057, 198, 198, 11748, 555, 715, 395, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 302, 198, 198, 6738, 4866, 1330, 4866, 198, 198, 6738, 10662, 11246, 1330, 13946, 62, 726...
2.916667
108
#!/usr/bin/env python import argparse import consulate options = Options() parser = argparse.ArgumentParser() parser.add_argument('-n', '--name', required=True, help='service name') parser.add_argument('-s', '--slice', help='slice name (optional)') parser.add_argument('-r', '--role', required=True, help='server role...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 44369, 198, 198, 25811, 796, 18634, 3419, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 10786, 12...
2.851541
357
from value import Account acc1 = Account(10000, 3.2) print(acc1) acc1.__balance = 100000000 print(acc1) print(acc1.getBalance()) print(acc1.getInterest()) acc1.setInterest(2.8) print(acc1)
[ 6738, 1988, 1330, 10781, 198, 198, 4134, 16, 796, 10781, 7, 49388, 11, 513, 13, 17, 8, 198, 4798, 7, 4134, 16, 8, 198, 4134, 16, 13, 834, 20427, 796, 1802, 10535, 198, 4798, 7, 4134, 16, 8, 198, 4798, 7, 4134, 16, 13, 1136, 45...
2.567568
74
# Copyright 2021 Martin Kalcok # See LICENSE file for licensing details. """Pytest fixtures for functional tests.""" # pylint: disable=W0621 import logging import tempfile from pathlib import Path import pytest from kubernetes import client, config from pytest_operator.plugin import OpsTest logger = logging.getLogg...
[ 2, 15069, 33448, 5780, 12612, 66, 482, 198, 2, 4091, 38559, 24290, 2393, 329, 15665, 3307, 13, 198, 37811, 20519, 9288, 34609, 329, 10345, 5254, 526, 15931, 198, 2, 220, 279, 2645, 600, 25, 15560, 28, 54, 3312, 2481, 198, 198, 11748, ...
3.5
96
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.contrib.auth import get_user_model from django.contrib.admin.templatetags.admin_urls import admin_urlname from django.core.mail import mail_admins from django.core.urlresolvers import reverse from django.shortcuts import redir...
[ 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, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, ...
2.631336
434
from tensorflow.python.platform import flags from tensorflow.contrib.data.python.ops import batching import tensorflow as tf import json from torch.utils.data import Dataset import pickle import os.path as osp import os import numpy as np import time from scipy.misc import imread, imresize from torchvision.datasets imp...
[ 6738, 11192, 273, 11125, 13, 29412, 13, 24254, 1330, 9701, 198, 6738, 11192, 273, 11125, 13, 3642, 822, 13, 7890, 13, 29412, 13, 2840, 1330, 15458, 278, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 33918, 198, 6738, 28034, 13,...
2.864796
784
from flask import jsonify, g, request from flask_restful import Resource from Authentication import * from Service import * def get_service(): """ Gets an instance of 'Service' from the 'g' environment. """ if not hasattr(g, 'service'): g.service = Service() return g.service def specialty_quer...
[ 6738, 42903, 1330, 33918, 1958, 11, 308, 11, 2581, 220, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 198, 198, 6738, 48191, 1330, 1635, 198, 6738, 4809, 1330, 1635, 628, 198, 4299, 651, 62, 15271, 33529, 198, 220, 220, 220, 37227, 29...
2.9375
176