content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import datetime import os import shutil import tempfile from joblib import Parallel, delayed from fastpic_upload import upload_file_to_fastpic _n_jobs_for_upload = 20 _root_folders_set = ( '/path/to/folder', ) _spoiler_for_each_file = True if __name__ == '__main__': started = datetime.datetime.now() ...
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 198, 6738, 1693, 8019, 1330, 42945, 11, 11038, 198, 6738, 3049, 16564, 62, 25850, 1330, 9516, 62, 7753, 62, 1462, 62, 7217, 16564, 628, 198, 62, ...
2.780488
164
""" Copyright (c) 2018-2022 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
[ 37811, 198, 15269, 357, 66, 8, 2864, 12, 1238, 1828, 8180, 10501, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, ...
3.940887
203
# Copyright 2013 Donald Stufft and individual contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
[ 2, 15069, 2211, 3759, 27864, 83, 290, 1981, 20420, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, ...
3.928571
168
#! /home/cha0snation/anaconda3/bin/python import random if __name__ == "__main__": words, output, word, tries, playing = setup() while playing: print("Try to guess the word:") if tries == 1: print("You have {0} try left.".format(tries)) else: print("You ha...
[ 2, 0, 1220, 11195, 14, 11693, 15, 16184, 341, 14, 272, 330, 13533, 18, 14, 8800, 14, 29412, 198, 198, 11748, 4738, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 2456, 11, 507...
1.927762
706
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on Dec 8, 2019 .. codeauthor: svitlana vakulenko <svitlana.vakulenko@gmail.com> Index docs into ES https://qbox.io/blog/building-an-elasticsearch-index-with-python ''' from settings import * import glob import re # n first characters for the doc preview L...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 41972, 319, 4280, 807, 11, 13130, 198, 492, 2438, 9800, 25, 38487, 270, 75, 2271, 410, 461, 377, ...
2.547325
486
""" A Token is a button or other object on the table that represents a position, a game state, layer state, or some other piece of info """
[ 37811, 198, 32, 29130, 318, 257, 4936, 393, 584, 2134, 319, 262, 3084, 326, 6870, 257, 2292, 11, 257, 983, 1181, 11, 7679, 1181, 11, 393, 617, 584, 3704, 286, 7508, 198, 37811, 628 ]
4.147059
34
nis=get('nis') q1="xpto1" q2=nis + "xpto2" query=query1.q2 koneksi=0 q=execute(query,koneksi)
[ 21361, 28, 1136, 10786, 21361, 11537, 198, 80, 16, 2625, 87, 457, 78, 16, 1, 198, 80, 17, 28, 21361, 1343, 366, 87, 457, 78, 17, 1, 198, 22766, 28, 22766, 16, 13, 80, 17, 198, 74, 505, 591, 72, 28, 15, 198, 80, 28, 41049, 7,...
1.727273
55
store = [2, 4, 5, 12, 43, 54, 60, 77] a = interpolation_search(store, 2) print("Index position of value 2 is ", a)
[ 628, 198, 8095, 796, 685, 17, 11, 604, 11, 642, 11, 1105, 11, 5946, 11, 7175, 11, 3126, 11, 8541, 60, 198, 64, 796, 39555, 341, 62, 12947, 7, 8095, 11, 362, 8, 198, 4798, 7203, 15732, 2292, 286, 1988, 362, 318, 33172, 257, 8, ...
2.565217
46
from django.db import models from django.db.models import Q from django.contrib.auth.models import User from django.urls import reverse
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 628, 198 ]
3.365854
41
import os import unittest from checkov.serverless.checks.function.aws.AdminPolicyDocument import check from checkov.serverless.runner import Runner from checkov.runner_filter import RunnerFilter if __name__ == '__main__': unittest.main()
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 6738, 2198, 709, 13, 15388, 1203, 13, 42116, 13, 8818, 13, 8356, 13, 46787, 36727, 24941, 1330, 2198, 198, 6738, 2198, 709, 13, 15388, 1203, 13, 16737, 1330, 21529, 198, 6738, 2198, 7...
3.402778
72
#!/usr/bin/python3 # encoding: utf-8 import os import sys import getopt import logging import shutil import psutil from modules.com_run import ComGenerator from modules.web_server import ListenServer from modules.Wlisten_server import WListenServer from modules.payload_builder_factory import PayloadBuilderFactory from...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 651, 8738, 198, 11748, 18931, 198, 11748, 4423, 346, 198, 11748, 26692, 22602, 198, 6738, 13103, 13,...
2.928983
521
import os MODELS_PATH = os.path.join(os.path.dirname(__file__), "models") YOLO_SIZE = 288 YOLO_TARGET = 9 CORRECTOR_SIZE = 50
[ 11748, 28686, 201, 198, 201, 198, 33365, 37142, 62, 34219, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 366, 27530, 4943, 201, 198, 201, 198, 56, 3535, 46, 62, 33489, 796, 35419, 201, ...
2.107692
65
# Load json bulk files into elasticsearch import json import os import time import traceback import elasticsearch from etl.common.store import list_entity_files from etl.common.utils import get_folder_path, get_file_path, create_logger, first, replace_template # Init Elasticsearch and test connection def init_es_c...
[ 2, 8778, 33918, 11963, 3696, 656, 27468, 12947, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 12854, 1891, 198, 198, 11748, 27468, 12947, 198, 198, 6738, 2123, 75, 13, 11321, 13, 8095, 1330, 1351, 62, 26858, 62, 166...
2.533071
1,527
""" This module defines the ``geoplot`` coordinate reference system classes, wrappers on ``cartopy.crs`` objects meant to be used as parameters to the ``projection`` parameter of all front-end ``geoplot`` outputs. For the list of Cartopy CRS objects this module derives from, refer to http://scitools.org.uk/cartopy/docs...
[ 37811, 198, 1212, 8265, 15738, 262, 7559, 469, 20106, 313, 15506, 20435, 4941, 1080, 6097, 11, 7917, 11799, 319, 198, 15506, 26674, 11081, 13, 66, 3808, 15506, 5563, 4001, 284, 307, 973, 355, 10007, 284, 262, 7559, 16302, 295, 15506, 11...
1.858896
978
from .default_handler import StoresHandler
[ 6738, 764, 12286, 62, 30281, 1330, 41835, 25060, 628 ]
4.888889
9
#Leia o ano de nascimento de 7 pessoas e mostre quantas ja atingiram a maioridade e quantas ainda no for c in range(1,8): p=int(input('Qual o ano de seu nascimento? ')) a=2021-p if a>= 18: print('A pessoa numero {} j maior de idade'.format(c)) else: print('A pessoa numero {} no maio...
[ 2, 3123, 544, 267, 281, 78, 390, 299, 3372, 3681, 78, 390, 767, 279, 408, 78, 292, 304, 749, 260, 5554, 292, 45091, 379, 278, 343, 321, 257, 17266, 1504, 312, 671, 304, 5554, 292, 257, 22261, 645, 628, 198, 198, 1640, 269, 287, ...
2.15
160
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Provide function to calculate SDE distance @auth: Jungang Zou @date: 2021/05/05 """
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 15946, 485, 2163, 284, 15284, 311, 7206, 5253, 198, 198, 31, 18439, 25, 27134, 648, 1168, 280, 198, 3...
2.208955
67
# -*- encoding=utf8 -*- __author__ = "pscly" from airtest.core.api import * from airtest.cli.parser import cli_setup # from douyin import * if not cli_setup(): auto_setup(__file__, logdir=True, devices=[ "android://127.0.0.1:5037/decc8da3?cap_method=MINICAP_STREAM&&ori_method=MINICAPORI&&touch_method=...
[ 2, 532, 9, 12, 21004, 28, 40477, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 366, 27566, 306, 1, 198, 198, 6738, 1633, 9288, 13, 7295, 13, 15042, 1330, 1635, 198, 6738, 1633, 9288, 13, 44506, 13, 48610, 1330, 537, 72, 62, 40406, 1...
2.971302
453
from common_fixtures import * # NOQA import websocket as ws import pytest
[ 6738, 2219, 62, 69, 25506, 1330, 1635, 220, 1303, 8005, 48, 32, 198, 11748, 2639, 5459, 355, 266, 82, 198, 11748, 12972, 9288, 628, 628, 198 ]
3.038462
26
'''ResNet using PSG in PyTorch. For Pre-activation ResNet, see 'preact_resnet.py'. Reference: [1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun Deep Residual Learning for Image Recognition. arXiv:1512.03385 ''' from numpy.lib.arraysetops import isin import torch import torch.nn as nn import torch.nn.functiona...
[ 7061, 6, 4965, 7934, 1262, 6599, 38, 287, 9485, 15884, 354, 13, 198, 198, 1890, 3771, 12, 48545, 1874, 7934, 11, 766, 705, 3866, 529, 62, 411, 3262, 13, 9078, 4458, 198, 198, 26687, 25, 198, 58, 16, 60, 509, 1385, 278, 679, 11, ...
2.235596
2,725
from pyspark.sql import Row from snorkel.labeling.lf import labeling_function from snorkel.labeling.lf.nlp_spark import spark_nlp_labeling_function from snorkel.preprocess import preprocessor from drybell_lfs import load_celebrity_knowledge_base ABSTAIN = -1 NEGATIVE = 0 POSITIVE = 1
[ 6738, 279, 893, 20928, 13, 25410, 1330, 11314, 198, 6738, 3013, 273, 7750, 13, 18242, 278, 13, 1652, 1330, 27393, 62, 8818, 198, 6738, 3013, 273, 7750, 13, 18242, 278, 13, 1652, 13, 21283, 79, 62, 2777, 668, 1330, 9009, 62, 21283, 7...
2.91
100
## # @file discrete_spectral_transform.py # @author Yibo Lin # @date Jun 2018 # import os import sys import numpy as np import torch import torch.nn.functional as F import pdb """ Discrete spectral transformation leveraging fast fourier transform engine. The math here mainly uses Prosthaphaeresis properties. The ...
[ 2235, 198, 2, 2488, 7753, 220, 220, 28810, 62, 4443, 1373, 62, 35636, 13, 9078, 198, 2, 2488, 9800, 575, 26762, 5164, 198, 2, 2488, 4475, 220, 220, 7653, 2864, 198, 2, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 299, 3215...
2.258798
6,337
import unittest, random, sys, time sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_hosts, h2o_browse as h2b, h2o_import as h2i, h2o_exec as h2e, h2o_glm import h2o_util zeroList = [ 'Result0 = 0', ] # the first column should use this exprList = [ 'Result<n> = sum(<keyX>[<col1>])', ] DO_S...
[ 11748, 555, 715, 395, 11, 4738, 11, 25064, 11, 640, 198, 17597, 13, 6978, 13, 2302, 437, 7, 17816, 2637, 4032, 492, 41707, 9078, 6, 12962, 198, 11748, 289, 17, 78, 11, 289, 17, 78, 62, 28758, 11, 289, 17, 78, 62, 4774, 82, 11, ...
2.019802
202
"""Provides all database and table structures used for the influx database. Classes: Datatype Database Table RetentionPolicy """ from __future__ import annotations from enum import Enum, unique import re import json from typing import Any, Dict, List, Set, Tuple, Union import influx.influx_queries as ...
[ 37811, 15946, 1460, 477, 6831, 290, 3084, 8573, 973, 329, 262, 25065, 6831, 13, 198, 198, 9487, 274, 25, 198, 220, 220, 220, 16092, 265, 2981, 198, 220, 220, 220, 24047, 198, 220, 220, 220, 8655, 198, 220, 220, 220, 4990, 1463, 3672...
2.409309
2,707
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2011 Dann Martens This file is part of SleekXMPP. See the file LICENSE for copying permission. """ from sleekxmpp.plugins.xep_0009.remote import Endpoint, remote, Remote, \ ANY_ALL import threading if __name__ == '__main__': main(...
[ 37811, 198, 220, 220, 220, 19498, 988, 55, 7378, 47, 25, 383, 19498, 988, 1395, 7378, 47, 10074, 198, 220, 220, 220, 15069, 357, 34, 8, 2813, 220, 360, 1236, 3981, 641, 198, 220, 220, 220, 770, 2393, 318, 636, 286, 19498, 988, 55,...
2.48855
131
import cv2 import time import socket import threading
[ 11748, 269, 85, 17, 198, 11748, 640, 198, 11748, 17802, 198, 11748, 4704, 278, 628, 628, 628, 198 ]
3.333333
18
# terrascript/resource/sematext.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:26:36 UTC) # # For imports without namespace, e.g. # # >>> import terrascript.resource.sematext # # instead of # # >>> import terrascript.resource.sematext.sematext # # This is only available for 'official' and 'partne...
[ 2, 8812, 15961, 14, 31092, 14, 325, 9830, 742, 13, 9078, 198, 2, 17406, 4142, 7560, 416, 4899, 14, 15883, 8189, 13, 9078, 357, 1731, 12, 19117, 12, 1238, 2481, 1315, 25, 2075, 25, 2623, 18119, 8, 198, 2, 198, 2, 1114, 17944, 1231,...
3.007752
129
#!/usr/bin/env python3 import tensorflow as tf physical_devices = tf.config.list_physical_devices('GPU') try: tf.config.experimental.set_memory_growth(physical_devices[0], True) except: # Invalid device or cannot modify virtual devices once initialized. pass import numpy as np import os, time, csv import ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 42854, 62, 42034, 796, 48700, 13, 11250, 13, 4868, 62, 42854, 62, 42034, 10786, 33346, 11537, 198, 28311, 25, 198, 220, 220, 220, 48...
2.789063
256
from __future__ import absolute_import, division, print_function import logging import docker import tempfile import requests from requests.exceptions import RequestException import json import pprint import time import re import os import tarfile import sys from cloudpickle import CloudPickler import pickle import num...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 11748, 18931, 198, 11748, 36253, 198, 11748, 20218, 7753, 198, 11748, 7007, 198, 6738, 7007, 13, 1069, 11755, 1330, 19390, 16922, 198, 11748, 33918, 198, ...
2.628849
617
import random import numpy import copy
[ 11748, 4738, 198, 11748, 299, 32152, 198, 11748, 4866, 628 ]
4
10
"""This module provides a console interface to convert CSV to Google Sheets.""" from csv2googlesheets.gapi_authorization import auth_with_google from csv2googlesheets.gapi_create_sheet import create_sheet from csv2googlesheets.gapi_write_to_sheet import write_to_sheet from csv2googlesheets.parse_file import build_spr...
[ 37811, 1212, 8265, 3769, 257, 8624, 7071, 284, 10385, 44189, 284, 3012, 1375, 1039, 526, 15931, 198, 198, 6738, 269, 21370, 17, 2188, 519, 829, 258, 1039, 13, 70, 15042, 62, 9800, 1634, 1330, 6284, 62, 4480, 62, 13297, 198, 6738, 269,...
2.717087
357
from netforce.model import get_model from netforce import migration from netforce import database Migration.register()
[ 6738, 2010, 3174, 13, 19849, 1330, 651, 62, 19849, 198, 6738, 2010, 3174, 1330, 13472, 198, 6738, 2010, 3174, 1330, 6831, 198, 198, 44, 4254, 13, 30238, 3419, 198 ]
4.137931
29
# -*- coding: utf-8 -*- # Copyright (c) 2011 Adi Roiban. # See LICENSE for details. """ TestCase used for Chevah project. """ from __future__ import print_function from __future__ import division from __future__ import absolute_import from six import text_type from six.moves import range import contextlib import inspec...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 2813, 1215, 72, 5564, 14278, 13, 198, 2, 4091, 38559, 24290, 329, 3307, 13, 198, 37811, 198, 14402, 20448, 973, 329, 25233, 993, 1628, 13, 198, ...
2.492008
3,128
import time
[ 11748, 640, 628 ]
4.333333
3
from metarl.tf.plotter.plotter import Plotter __all__ = ['Plotter']
[ 6738, 1138, 7063, 13, 27110, 13, 29487, 353, 13, 29487, 353, 1330, 28114, 353, 198, 198, 834, 439, 834, 796, 37250, 43328, 353, 20520, 198 ]
2.76
25
from keras import layers # Single-layer LSTM model for next-character prediction model = keras.models.Sequential() model.add(layers.LSTM(128, input_shape=(maxlen, len(chars)))) model.add(layers.Dense(len(chars), activation='softmax')) # Model compilation configuration optimizer = keras.optimizers.RMSprop(lr=0.01) mod...
[ 6738, 41927, 292, 1330, 11685, 628, 198, 2, 14206, 12, 29289, 406, 2257, 44, 2746, 329, 1306, 12, 22769, 17724, 198, 19849, 796, 41927, 292, 13, 27530, 13, 44015, 1843, 3419, 198, 19849, 13, 2860, 7, 75, 6962, 13, 43, 2257, 44, 7, ...
2.53882
644
import io import unittest import numpy as np if __name__ == '__main__': unittest.main()
[ 11748, 33245, 198, 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.526316
38
""" Example of ModECI MDF - Testing state variables """ from modeci_mdf.mdf import * import sys if __name__ == "__main__": main()
[ 37811, 198, 220, 220, 220, 17934, 286, 3401, 2943, 40, 337, 8068, 532, 23983, 1181, 9633, 198, 37811, 198, 198, 6738, 953, 721, 72, 62, 76, 7568, 13, 76, 7568, 1330, 1635, 198, 11748, 25064, 628, 198, 198, 361, 11593, 3672, 834, 662...
2.581818
55
''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
[ 7061, 6, 198, 26656, 15385, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 273, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 17080, 6169, 351, 428, 670, 329, 3224, 1321, 198, 2301, 13493, 6634, 9238, ...
3.889937
318
# Tools for cross-matching catalogs import csv import sys import os import os.path import platform import shutil import subprocess import tempfile import warnings WIN32= platform.system() == 'Windows' import numpy import astropy.coordinates as acoords from astropy.table import Table from astropy import units as u fro...
[ 2, 20003, 329, 3272, 12, 15699, 278, 18388, 82, 198, 11748, 269, 21370, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 3859, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 11748, 20218, 7753, 198, 11...
2.19506
7,813
from typing import Dict, List, Tuple import gym import ray from ray.rllib.agents.a3c.a3c_torch_policy import apply_grad_clipping from ray.rllib.agents.dqn.dqn_tf_policy import ( PRIO_WEIGHTS, Q_SCOPE, Q_TARGET_SCOPE, postprocess_nstep_and_prio) from ray.rllib.agents.dqn.dqn_torch_model import DQNTorchModel from ra...
[ 6738, 19720, 1330, 360, 713, 11, 7343, 11, 309, 29291, 198, 198, 11748, 11550, 198, 11748, 26842, 198, 6738, 26842, 13, 81, 297, 571, 13, 49638, 13, 64, 18, 66, 13, 64, 18, 66, 62, 13165, 354, 62, 30586, 1330, 4174, 62, 9744, 62, ...
2.141138
5,151
from .lit_explorer import * from .pdf_wrangling import *
[ 6738, 764, 18250, 62, 20676, 11934, 1330, 1635, 198, 6738, 764, 12315, 62, 18351, 27499, 1330, 1635, 198 ]
3.166667
18
""" funktsioonid.py Funktsioonide ja protseduuride kasutamine """ # # Protseduur # # Kutsume funktsiooni vlja minu_funktsioon() # # Funktsioon # sum = liida(3, 5) print(sum) # Nide vaikevrtuste kasutamisest # def funk(arg1 = vrtus1, arg2 = vrtus2) # pass funk() # Kutsume funktsiooni vlja ilma argumente kaasa...
[ 37811, 198, 69, 2954, 912, 952, 261, 312, 13, 9078, 198, 198, 37, 2954, 912, 952, 261, 485, 45091, 386, 912, 15532, 333, 485, 479, 292, 315, 9862, 198, 37811, 198, 198, 2, 198, 2, 1041, 912, 15532, 333, 198, 2, 198, 198, 2, 509,...
1.935977
1,765
# -*- coding: utf-8 -*- ''' Tests for the file state ''' # Import python libs from __future__ import absolute_import import errno import os import textwrap import tempfile # Import Salt Testing libs from tests.support.case import ModuleCase from tests.support.paths import TMP_STATE_TREE from tests.support.mixins impor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 51, 3558, 329, 262, 2393, 1181, 198, 7061, 6, 198, 2, 17267, 21015, 9195, 82, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 11454, 391...
3.164179
134
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2018 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 7358, 12, 7908, 41992, 4912, 31703, 12052, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 36...
3.387833
263
import torch import torch.nn as nn import torch.nn.functional as F from fastgc.model.penet import PeGradNet from fastgc.layers.linear import Linear from fastgc.activation import activation
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 3049, 36484, 13, 19849, 13, 3617, 316, 1330, 2631, 42731, 7934, 198, 6738, 3049, 36484, 13, 75, 6962, 13, 29127, 1...
3.603774
53
""" Homework 2: Higher Order Functions""" HW_SOURCE_FILE = 'hw02.py' from operator import add, mul, sub square = lambda x: x * x identity = lambda x: x triple = lambda x: 3 * x increment = lambda x: x + 1 ###################### # Required Questions # ###################### def product(n, f): """Return the pr...
[ 37811, 8074, 6433, 362, 25, 16038, 8284, 40480, 37811, 198, 198, 39, 54, 62, 47690, 62, 25664, 796, 705, 36599, 2999, 13, 9078, 6, 198, 198, 6738, 10088, 1330, 751, 11, 35971, 11, 850, 198, 198, 23415, 796, 37456, 2124, 25, 2124, 16...
2.417025
2,091
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
[ 2, 15069, 2864, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 921, 198, 2, 743, 407, 779, 428, 2393, ...
2.799903
2,064
from acceptance.harness.acceptance_test import WatchdogAcceptanceTest
[ 6738, 13427, 13, 9869, 1108, 13, 13635, 590, 62, 9288, 1330, 6305, 9703, 38855, 590, 14402, 628 ]
4.176471
17
import torch import torchtestcase from neural_spline_flows.nde.transforms import base
[ 11748, 28034, 198, 11748, 28034, 9288, 7442, 198, 198, 6738, 17019, 62, 22018, 500, 62, 44041, 13, 358, 68, 13, 7645, 23914, 1330, 2779, 628, 628 ]
3.461538
26
""" https://portswigger.net/web-security/file-path-traversal/lab-validate-file-extension-null-byte-bypass """ import sys import requests site = sys.argv[1] if 'https://' in site: site = site.rstrip('/').lstrip('https://') url = f'''https://{site}/image?filename=../../../etc/passwd%00.png''' s = requests.Session...
[ 37811, 198, 5450, 1378, 634, 2032, 15249, 13, 3262, 14, 12384, 12, 12961, 14, 7753, 12, 6978, 12, 9535, 690, 282, 14, 23912, 12, 12102, 378, 12, 7753, 12, 2302, 3004, 12, 8423, 12, 26327, 12, 1525, 6603, 198, 37811, 198, 198, 11748,...
2.539007
141
#!/usr/bin/python3.6 # -*- coding: utf-8 -*- # @Time : 2020/9/3 11:03 # @Author : Joselynzhao # @Email : zhaojing17@forxmail.com # @File : atmpro1_vsm2.py # @Software: PyCharm # @Desc : #!/usr/bin/python3.6 # -*- coding: utf-8 -*- # @Time : 2020/9/1 7:07 # @Author : Joselynzhao # @Email : zhaojing17@...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 13, 21, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 12131, 14, 24, 14, 18, 1367, 25, 3070, 198, 2, 2488, 13838, 220, 1058, 5...
2.50699
1,073
# Copyright (C) 2019 by eHealth Africa : http://www.eHealthAfrica.org # # See the NOTICE file distributed with this work for additional information # regarding copyright ownership. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with # the License. Y...
[ 2, 15069, 357, 34, 8, 13130, 416, 304, 18081, 5478, 1058, 2638, 1378, 2503, 13, 68, 18081, 17584, 30997, 13, 2398, 198, 2, 198, 2, 4091, 262, 28536, 2393, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 198, 2,...
3.749104
279
import os database_url = os.environ.get('DATABASE_URL')
[ 11748, 28686, 198, 198, 48806, 62, 6371, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 35, 1404, 6242, 11159, 62, 21886, 11537, 198 ]
2.478261
23
#!/usr/bin/env python # coding: utf-8 # In[ ]: #List and function # In[6]: # empty list my_list = [] # list of integers my_list = [1, 2, 3] # list with mixed data types my_list = [1, "Hello", 3.4] # In[7]: # nested list my_list = ["mouse", [8, 4, 6], ['a']] # In[11]: # List indexing my_list = ['p', '...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 2361, 25, 628, 198, 2, 8053, 290, 2163, 220, 628, 198, 2, 554, 58, 21, 5974, 628, 198, 2, 6565, 1351, 198, 1820, 62, 4868,...
2.381843
1,443
from datetime import date from six import BytesIO, binary_type, u from six.moves.urllib.parse import parse_qsl, urlencode from unittest2 import TestCase import mock from authorizesauce.apis.transaction import PROD_URL, TEST_URL, TransactionAPI from authorizesauce.data import Address, CreditCard from authorizesauce.e...
[ 6738, 4818, 8079, 1330, 3128, 198, 198, 6738, 2237, 1330, 2750, 4879, 9399, 11, 13934, 62, 4906, 11, 334, 198, 6738, 2237, 13, 76, 5241, 13, 333, 297, 571, 13, 29572, 1330, 21136, 62, 80, 6649, 11, 2956, 11925, 8189, 198, 198, 6738,...
2.490769
650
expected_output = { "vrf": { "VRF1": { "address_family": { "ipv6": { "instance": { "rip ripng": { "redistribute": { "static": {"route_policy": "static-to-rip"}, ...
[ 40319, 62, 22915, 796, 1391, 198, 220, 220, 220, 366, 37020, 69, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 13024, 37, 16, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 21975, 62, 17989...
1.319066
514
import csv import io import json import pandas as pd import sys from dateutil import tz from datetime import datetime, date, time, timedelta # Japan Standard Time (UTC + 09:00) JST = tz.gettz('Asia/Tokyo') JST_current_time = datetime.now(tz=JST).strftime('%Y/%m/%d %H:%M') patients_list = [] patients_summary_dic = {}...
[ 11748, 269, 21370, 198, 11748, 33245, 198, 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 25064, 198, 6738, 3128, 22602, 1330, 256, 89, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 3128, 11, 640, 11, 28805, 12514, 198, ...
2.217857
1,120
import torch from ....data.utils.boxes import centroids2corners, iou def matching_strategy(targets, dboxes, **kwargs): """ :param targets: Tensor, shape is (batch*object num(batch), 1+4+class_labels) :param dboxes: shape is (default boxes num, 4) IMPORTANT: Note that means (cx, cy, w, h) :param kw...
[ 11748, 28034, 198, 198, 6738, 19424, 7890, 13, 26791, 13, 29305, 1330, 1247, 305, 2340, 17, 20772, 364, 11, 1312, 280, 198, 198, 4299, 12336, 62, 2536, 4338, 7, 83, 853, 1039, 11, 288, 29305, 11, 12429, 46265, 22046, 2599, 198, 220, ...
2.349628
2,823
""" Flatpath, go forward forever. http://codeincomplete.com/posts/javascript-racer/ http://www.extentofthejam.com/pseudo/ http://pixel.garoux.net/screen/game_list Usage: * UP/DOWN/LEFT/RIGHT * SPACE : hide/show road map * TAB : replay this road * RETURN : go to a new road TODO: * hill road * more road sprites * soun...
[ 37811, 198, 7414, 265, 6978, 11, 467, 2651, 8097, 13, 198, 198, 4023, 1378, 8189, 259, 20751, 13, 785, 14, 24875, 14, 37495, 12, 11510, 263, 14, 198, 4023, 1378, 2503, 13, 2302, 298, 11205, 258, 39159, 13, 785, 14, 7752, 12003, 14, ...
1.809415
3,059
#!/usr/bin/env python sw1_show_cdp_neighbors = ''' SW1>show cdp neighbors Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone Device ID Local Intrfce Holdtme Capability Platform ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2032, 16, 62, 12860, 62, 10210, 79, 62, 710, 394, 32289, 796, 705, 7061, 198, 17887, 16, 29, 12860, 22927, 79, 12020, 198, 15610, 1799, 44380, 25, 371, 532, 48538, 11, 309, 532,...
2.493088
3,689
"""Routines for numerical differentiation.""" from __future__ import division import numpy as np from numpy.linalg import norm from scipy.sparse.linalg import LinearOperator from ..sparse import issparse, csc_matrix, csr_matrix, coo_matrix, find from ._group_columns import group_dense, group_sparse EPS = np.finfo(n...
[ 37811, 49, 448, 1127, 329, 29052, 32488, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 75, 1292, 70, 1330, 2593, 198, 198, 6738, 629, 541, 88, 13, 82, ...
2.43539
7,522
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ 2, 15069, 383, 9485, 15884, 354, 12469, 1074, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 1...
2.757443
3,191
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 13130, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
2.931959
485
import boto3 batch_client = boto3.client('batch')
[ 11748, 275, 2069, 18, 198, 198, 43501, 62, 16366, 796, 275, 2069, 18, 13, 16366, 10786, 43501, 11537, 198 ]
2.684211
19
from flask import Blueprint, render_template, redirect, url_for, request, flash from flask.ext.login import login_required, login_user, logout_user from werkzeug import check_password_hash, generate_password_hash from app import db, login_manager, pubnub, app, _callback from .models import User from .forms import Logi...
[ 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 18941, 11, 19016, 62, 1640, 11, 2581, 11, 7644, 198, 6738, 42903, 13, 2302, 13, 38235, 1330, 17594, 62, 35827, 11, 17594, 62, 7220, 11, 2604, 448, 62, 7220, 198, 6738, 266, 9587, 27...
3.247059
170
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-06 06:02 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 21, 319, 2177, 12, 3023, 12, 3312, 9130, 25, 2999, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
import unittest from coinplus_solo_redeem.common import wif_export_bitcoin, compute_public_key_sec256k1, address_from_publickey_ethereum
[ 11748, 555, 715, 395, 198, 6738, 10752, 9541, 62, 82, 14057, 62, 445, 13761, 13, 11321, 1330, 266, 361, 62, 39344, 62, 35395, 11, 24061, 62, 11377, 62, 2539, 62, 2363, 11645, 74, 16, 11, 2209, 62, 6738, 62, 11377, 2539, 62, 316, 1...
2.978261
46
#!usr/bin/python # -*- coding:utf8 -*- # () # 1. 1-20 # odd_list = [] # for i in range(21): # if i % 2 == 1: # odd_list.append(i) # odd_list = [i for i in range(21) if i % 2 == 1] # print(odd_list) # 2. # odd_list = [handle_item(i) for i in range(21) if i % 2 == 1] print(odd_list) # odd_gen = (i for...
[ 2, 0, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 40477, 23, 532, 9, 12, 198, 198, 2, 7499, 198, 2, 352, 13, 352, 12, 1238, 198, 2, 5629, 62, 4868, 796, 17635, 198, 2, 329, 1312, 287, 2837, 7, 2481, 2599, 198,...
2.107595
316
import ast import operator import re from collections import OrderedDict from functools import partial from ..cache import Cache from ..exceptions import PluginError, NoStreamsError from ..options import Options # FIXME: This is a crude attempt at making a bitrate's # weight end up similar to the weight of a resolut...
[ 11748, 6468, 198, 11748, 10088, 198, 11748, 302, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 6738, 11485, 23870, 1330, 34088, 198, 6738, 11485, 1069, 11755, 1330, 42636, 12331, 11...
2.235955
534
# This file is part of the Reference Data Repository (refdata). # # Copyright (C) 2021 New York University. # # refdata is free software; you can redistribute it and/or modify it under the # terms of the MIT License; see LICENSE file for more details. """Fixtures for testing the command-line interface.""" import os i...
[ 2, 770, 2393, 318, 636, 286, 262, 20984, 6060, 1432, 13264, 357, 5420, 7890, 737, 198, 2, 198, 2, 15069, 357, 34, 8, 33448, 968, 1971, 2059, 13, 198, 2, 198, 2, 1006, 7890, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 1...
3.683761
117
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import math from typing import Any, Dict import numpy as np from classy_vision.dataset.transforms import register_transform from classy_vision.dataset.transforms.classy_transform import ClassyTransform
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 1439, 6923, 33876, 198, 198, 11748, 18931, 198, 11748, 10688, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 48486, 62, ...
3.828947
76
#!/usr/bin/python3 # *************************************************************** # Copyright (c) 2022 Jittor. All Rights Reserved. # Maintainers: # Dun Liang <randonlang@gmail.com>. # # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code packag...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 41906, 8412, 46068, 8162, 198, 2, 15069, 357, 66, 8, 33160, 449, 715, 273, 13, 1439, 6923, 33876, 13, 220, 198, 2, 337, 32725, 364, 25, 220, 198, 2, 220, 220, 220, 220, 5648, 433...
2.62253
506
import argparse from helper.metaclasses_definition import Singleton
[ 198, 11748, 1822, 29572, 198, 198, 6738, 31904, 13, 4164, 330, 28958, 62, 46758, 1330, 5573, 10565, 198 ]
3.888889
18
from setuptools import setup PLUGIN_NAME = "papermill" microlib_name = f"flytekitplugins-{PLUGIN_NAME}" plugin_requires = [ "flytekit>=0.16.0b0,<1.0.0", "flytekitplugins-spark>=0.16.0b0,<1.0.0,!=0.24.0b0", "papermill>=1.2.0", "nbconvert>=6.0.7", "ipykernel>=5.0.0", ] __version__ = "0.0.0+develop...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 6489, 7340, 1268, 62, 20608, 796, 366, 20189, 17805, 1, 198, 198, 24055, 8019, 62, 3672, 796, 277, 1, 12254, 660, 15813, 37390, 12, 90, 6489, 7340, 1268, 62, 20608, 36786, 198, 198, 33803...
2.464143
502
#!/usr/bin/env python input = 368078 size = 1 s_size = size * size # squared size while (s_size < input): size += 2 s_size = size * size bottom_right = s_size bottom_left = s_size - size + 1 top_left = s_size - 2 * size + 2 top_right = s_size - 3 * size + 3 input_x = -1 input_y = -1 # bottom horizontal lin...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 15414, 796, 4570, 1795, 3695, 198, 198, 7857, 796, 352, 198, 82, 62, 7857, 796, 2546, 1635, 2546, 1303, 44345, 2546, 198, 4514, 357, 82, 62, 7857, 1279, 5128, 2599, 198, 220, 22...
2.334437
302
import copy import numpy as np from racer.utils import load_pickle from racer.methods.genetic_programming.program_tree import ProgramTree def __len__(self): return sum(len(tree) for tree in self.parameterized_trees) def set_flat_parameters(self, params): n_used = 0 for tree in self.p...
[ 11748, 4866, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 48233, 13, 26791, 1330, 3440, 62, 27729, 293, 198, 6738, 48233, 13, 24396, 82, 13, 5235, 5139, 62, 23065, 2229, 13, 23065, 62, 21048, 1330, 6118, 27660, 628, 628, 220, 220, 2...
2.321951
205
# -*- coding: utf-8 -*- """ """ import os import markdown2 from flask import (Blueprint, request, render_template, flash, g, session, redirect, url_for, abort, Markup) ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 37811, 198, 11748, 28686, 198, 11748, 1317, 2902, 17, 198, 6738, 42903, 1330, 357, 14573, 4798, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.461228
1,238
import pyttsx3 import datetime import speech_recognition as sr import wikipedia import webbrowser import os import smtplib engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') engine.setProperty('voice', voices[0].id) # To change the voice to female change 0 to 1. def take_c...
[ 11748, 12972, 83, 912, 87, 18, 201, 198, 11748, 4818, 8079, 201, 198, 11748, 4046, 62, 26243, 653, 355, 19677, 201, 198, 11748, 47145, 11151, 201, 198, 11748, 3992, 40259, 201, 198, 11748, 28686, 201, 198, 11748, 895, 83, 489, 571, 20...
2.425793
977
""" Ory Kratos API Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the admini...
[ 37811, 198, 220, 220, 220, 440, 563, 509, 10366, 418, 7824, 628, 220, 220, 220, 43925, 329, 477, 1171, 290, 11553, 440, 563, 509, 10366, 418, 23113, 13, 5094, 290, 11553, 23113, 389, 7362, 319, 1180, 14090, 13, 5094, 23113, 460, 1986,...
3.457399
223
from .grandexchange import GrandExchange, GameItemNotFound, GameItemParseError from .item import Item from .priceinfo import PriceInfo from .pricetrend import PriceTrend
[ 6738, 764, 23936, 1069, 3803, 1330, 5675, 3109, 3803, 11, 3776, 7449, 3673, 21077, 11, 3776, 7449, 10044, 325, 12331, 198, 198, 6738, 764, 9186, 1330, 9097, 198, 6738, 764, 20888, 10951, 1330, 7886, 12360, 198, 6738, 764, 1050, 291, 316...
3.717391
46
import pandas as pd import os import numpy as np import cv2 from utils import constants as const import matplotlib.pyplot as plt
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 6738, 3384, 4487, 1330, 38491, 355, 1500, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83 ]
3.282051
39
from lexer import * import sys if len(sys.argv) != 2: print("usage: main.py file") else: lex = Lexer(sys.argv[1]) with open(sys.argv[1]) as f: while True: c = f.read(1) if not c: break print(lex.scan().toString())
[ 6738, 31191, 263, 1330, 1635, 198, 11748, 25064, 198, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 14512, 362, 25, 198, 220, 220, 220, 3601, 7203, 26060, 25, 1388, 13, 9078, 2393, 4943, 198, 17772, 25, 198, 220, 220, 220, 31191, 796, ...
1.846154
156
from django.core.urlresolvers import resolve from django.urls import reverse from django.test import TestCase, RequestFactory from django.http import HttpRequest, Http404 from django.contrib.auth.models import User from unittest import skip from users.models import University, Faculty, Department, UserProfile from cms....
[ 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 10568, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 11, 19390, 22810, 198, 6738, 42625, 14208, 13, 4023, 1330, 367,...
3.712871
101
"""The present code is the Version 1.0 of the RCNN approach to perform MPS in 3D for categorical variables. It has been developed by S. Avalos and J. Ortiz in the Geometallurygical Group at Queen's University as part of a PhD program. The code is not free of bugs but running end-to-end. Any comments and further i...
[ 37811, 464, 1944, 2438, 318, 262, 10628, 352, 13, 15, 286, 262, 13987, 6144, 3164, 284, 1620, 337, 3705, 220, 201, 198, 259, 513, 35, 329, 4253, 12409, 9633, 13, 632, 468, 587, 4166, 416, 311, 13, 23587, 418, 290, 449, 13, 39039, ...
2.336988
2,098
import logging from typing import Dict from django.http import HttpRequest logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 6738, 19720, 1330, 360, 713, 198, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 18453, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 628 ]
3.25
36
from sqlalchemy.ext.declarative import declarative_base Base = declarative_base()
[ 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 198, 198, 14881, 796, 2377, 283, 876, 62, 8692, 3419 ]
3.153846
26
# -*- coding: utf-8 -*- """Collection of functions for the manipulation of time series.""" from __future__ import absolute_import, division, print_function import itertools import os import warnings import mando import numpy as np import pandas as pd from mando.rst_text_formatter import RSTHelpFormatter from tstoolb...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 36307, 286, 5499, 329, 262, 17512, 286, 640, 2168, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, ...
1.90756
7,302
from collections import OrderedDict import torch import torch.nn as nn from torch_geometric.data.batch import Batch
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 62, 469, 16996, 13, 7890, 13, 43501, 1330, 347, 963, 628 ]
3.575758
33
import math import torch import torch.nn as nn from torch.nn.modules.module import Module from GNN.GCN_layer import GraphConvolution
[ 11748, 10688, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 13, 18170, 13, 21412, 1330, 19937, 198, 6738, 402, 6144, 13, 15916, 45, 62, 29289, 220, 1330, 29681, 3103, 85, 2122 ]
3.35
40
#!/usr/bin/env python3 from __future__ import print_function import os import re import sys from datetime import datetime from math import ceil from mtools.util.input_source import InputSource from mtools.util.logevent import LogEvent states = (['PRIMARY', 'SECONDARY', 'DOWN', 'STARTUP', 'STARTUP2', ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 10688, 1330, 2906,...
1.8003
10,676
""" SVG export test """ import test import pyqtgraph as pg app = pg.mkQApp() if __name__ == '__main__': test.unittest.main()
[ 37811, 198, 50, 43490, 10784, 1332, 198, 37811, 198, 11748, 1332, 198, 11748, 12972, 80, 25297, 1470, 355, 23241, 198, 1324, 796, 23241, 13, 28015, 48, 4677, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 198, 361, 11593, 367...
2.262295
61
EVENT_SCHEDULER_STARTED = EVENT_SCHEDULER_START = 2 ** 0 EVENT_SCHEDULER_SHUTDOWN = 2 ** 1 EVENT_SCHEDULER_PAUSED = 2 ** 2 EVENT_SCHEDULER_RESUMED = 2 ** 3 EVENT_EXECUTOR_ADDED = 2 ** 4 EVENT_EXECUTOR_REMOVED = 2 ** 5 EVENT_JOBSTORE_ADDED = 2 ** 6 EVENT_JOBSTORE_REMOVED = 2 ** 7 EVENT_ALL_JOBS_REMOVED = 2 ** 8 EVENT_JO...
[ 20114, 3525, 62, 50, 3398, 1961, 6239, 1137, 62, 2257, 7227, 1961, 796, 49261, 62, 50, 3398, 1961, 6239, 1137, 62, 2257, 7227, 796, 362, 12429, 657, 198, 20114, 3525, 62, 50, 3398, 1961, 6239, 1137, 62, 9693, 3843, 41925, 796, 362, ...
1.974155
503
# Copyright (c) 2021 Project CHIP Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ 2, 15069, 357, 66, 8, 33448, 4935, 5870, 4061, 46665, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 1...
2.813761
1,090
"""This file contains functions for loading and preprocessing pianoroll data. """ import logging import numpy as np import tensorflow.compat.v1 as tf from musegan.config import SHUFFLE_BUFFER_SIZE, PREFETCH_SIZE LOGGER = logging.getLogger(__name__) # --- Data loader ----------------------------------------------------...
[ 37811, 1212, 2393, 4909, 5499, 329, 11046, 290, 662, 36948, 43923, 273, 692, 1366, 13, 198, 37811, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 13, 5589, 265, 13, 85, 16, 355, 48700, 198, 6738, ...
2.43695
1,705
print(u"Ol mundo!")
[ 4798, 7, 84, 1, 30098, 27943, 78, 2474, 8 ]
2.111111
9
from flask import Flask, app = Flask(__name__) if __name__ == "__main__": app.run(debug=True)
[ 6738, 42903, 1330, 46947, 11, 220, 201, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 220, 220, 220, 598, 13, 5143, 7, 24442, 28, 1782...
2.333333
45
from __future__ import absolute_import from __future__ import division from __future__ import print_function from compas.geometry import bounding_box from compas.geometry import bounding_box_xy __all__ = [ 'mesh_bounding_box', 'mesh_bounding_box_xy', ] def mesh_bounding_box(mesh): """Compute the (axis...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 628, 198, 6738, 552, 292, 13, 469, 15748, 1330, 5421, 278, 62, 3524, 198, 6738, 552, 292, 13...
2.532006
703
from naive import NaiveSourceSelection from star_based import StarBasedSourceSelection from utils import AskSourceSelector, HybridSourceSelector, StatSourceSelector from charset_selector import CharSet_Selector
[ 6738, 24354, 1330, 11013, 425, 7416, 4653, 1564, 198, 6738, 3491, 62, 3106, 1330, 2907, 15001, 7416, 4653, 1564, 198, 6738, 3384, 4487, 1330, 16981, 7416, 17563, 273, 11, 29481, 7416, 17563, 273, 11, 5133, 7416, 17563, 273, 198, 6738, 3...
4.117647
51
""" @Time : 201/21/19 10:47 @Author : TaylorMei @Email : mhy845879017@gmail.com @Project : iccv @File : base3_plus.py @Function: """
[ 37811, 198, 2488, 7575, 220, 220, 220, 1058, 580, 14, 2481, 14, 1129, 838, 25, 2857, 198, 2488, 13838, 220, 1058, 8121, 5308, 72, 198, 2488, 15333, 220, 220, 1058, 285, 12114, 23, 29334, 3720, 29326, 31, 14816, 13, 785, 198, 220, 19...
2.188406
69