content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
""" This module implements a Behler-Parinello Neural network that is compatible with Scikit learn and can therefore be used with Osprey hyperparameter optimisation. This code was written following closely the code written by Zachary Ulissi (Department of Chemical Engineering, Stanford University) in the tflow.py modul...
[ 37811, 198, 1212, 8265, 23986, 257, 10407, 1754, 12, 10044, 500, 18798, 47986, 3127, 326, 318, 11670, 351, 10286, 15813, 2193, 290, 460, 4361, 307, 198, 1484, 351, 440, 2777, 4364, 8718, 17143, 2357, 6436, 5612, 13, 198, 198, 1212, 2438...
2.314871
8,251
import torch import torch.nn as nn from transformers import AutoModel import torch.nn.functional as F
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 6121, 364, 1330, 11160, 17633, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628 ]
3.814815
27
import pytest import os from stackmanager.config import Config from stackmanager.exceptions import ValidationError from stackmanager.loader import load_config
[ 11748, 12972, 9288, 201, 198, 11748, 28686, 201, 198, 6738, 8931, 37153, 13, 11250, 1330, 17056, 201, 198, 6738, 8931, 37153, 13, 1069, 11755, 1330, 3254, 24765, 12331, 201, 198, 6738, 8931, 37153, 13, 29356, 1330, 3440, 62, 11250, 201, ...
3.320755
53
# -*- coding: utf-8 -*- """ chat_view.py - presenter for the chat""" __author__ = "topseli" __license__ = "0BSD" import os import sys from PyQt5 import QtWidgets, uic from PyQt5.QtCore import pyqtSignal, pyqtSlot if __name__ == '__main__': run()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 8537, 62, 1177, 13, 9078, 532, 39597, 329, 262, 8537, 37811, 198, 834, 9800, 834, 796, 366, 4852, 741, 72, 1, 198, 834, 43085, 834, 796, 366, 15, 21800, 1, 19...
2.415094
106
# -*- coding: utf-8 -*- """ FELPY __author__ = "Trey Guest" __credits__ = ["Trey Guest"] __license__ = "EuXFEL" __version__ = "0.2.1" __maintainer__ = "Trey Guest" __email__ = "trey.guest@xfel.eu" __status__ = "Developement" """ from wpg.srw import srwlpy from wpg.wavefront import Wavefront as WPG_Wavefront from ma...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 37, 3698, 47, 56, 198, 198, 834, 9800, 834, 796, 366, 51, 4364, 22358, 1, 198, 834, 66, 20696, 834, 796, 14631, 51, 4364, 22358, 8973, 198, 834, 43085, 8...
2.39697
990
# Copyright (C) 2008 Valmantas Paliksa <walmis at balticum-tv dot lt> # Copyright (C) 2008 Tadas Dailyda <tadas at dailyda dot com> # # Licensed under the GNU General Public License Version 3 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
[ 2, 15069, 357, 34, 8, 3648, 3254, 76, 415, 292, 3175, 72, 591, 64, 1279, 16783, 25413, 379, 275, 2501, 39901, 12, 14981, 16605, 300, 83, 29, 198, 2, 15069, 357, 34, 8, 3648, 309, 38768, 6714, 6814, 1279, 83, 38768, 379, 4445, 6814...
3.658009
231
from dataclasses import (dataclass, field) from pyro.TimeElapsed import TimeElapsed @dataclass
[ 6738, 4818, 330, 28958, 1330, 357, 19608, 330, 31172, 11, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2214, 8, 201, 198, 201, 198, 6738, 12972, ...
2
65
#Script generated by SupremolecularAnalyser import sys sys.path.insert(0, "/net/archive/groups/plggkatksdh/pyplotTest") import matplotlib.pyplot as plt from simpleFilters import * import pandas as pd import numpy as np import matplotlib as mpl import matplotlib.colors as mcolors from os.path import isdir, ...
[ 2, 7391, 7560, 416, 5200, 2787, 2305, 10440, 2025, 26266, 263, 201, 198, 11748, 25064, 201, 198, 201, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 12813, 3262, 14, 17474, 14, 24432, 14, 489, 1130, 41826, 591, 34985, 14, 9078, 29487, ...
2.412902
27,050
#!/usr/bin/env python import os, sys, datetime, operator numArgs = len(sys.argv) if numArgs == 1: rootDir = "/var/www/html/apps/opensha" elif numArgs == 2: rootDir = sys.argv[1] else: print "USAGE: " + sys.argv[0] + " [dir]" sys.exit(2) if not os.path.isdir(rootDir): print rootDir + " is not a directory!" ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 11, 25064, 11, 4818, 8079, 11, 10088, 198, 198, 22510, 42035, 796, 18896, 7, 17597, 13, 853, 85, 8, 198, 198, 361, 997, 42035, 6624, 352, 25, 198, 197, 15763, 3527...
2.275641
156
from .rambank import RAMBank import logging from enum import Enum logging.basicConfig(level=logging.DEBUG) log = logging.getLogger(name='mbc1') class MBC1: """ Memory Bank Controller 1 Memory from 0x0-0x7fff is both read from and writen to for control of MBC Registers ... Attributes ------...
[ 6738, 764, 859, 17796, 1330, 13931, 28650, 198, 11748, 18931, 198, 6738, 33829, 1330, 2039, 388, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 30531, 8, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 3672, 11639, 2...
1.881701
1,623
import socket import sys import time PORT = 0 buffer = 1024 server = ("127.0.0.1", 12345) clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) try: clientsocket.bind((socket.gethostbyname(""), PORT)) print(socket.gethostbyname("")) except: print("[Binding Error] : Exiting...") sys.exit(1) while ...
[ 11748, 17802, 198, 11748, 25064, 198, 11748, 640, 198, 198, 15490, 796, 657, 198, 22252, 796, 28119, 198, 15388, 796, 5855, 16799, 13, 15, 13, 15, 13, 16, 1600, 17031, 2231, 8, 628, 198, 565, 2334, 5459, 796, 17802, 13, 44971, 7, 44...
2.555556
495
import argparse import editdistance from num2words import num2words from dataset import * from engine import * if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--engine_type', type=str, required=True) args = parser.parse_args() print('Engine type is %s' % str(args....
[ 11748, 1822, 29572, 198, 198, 11748, 4370, 30246, 198, 6738, 997, 17, 10879, 1330, 997, 17, 10879, 198, 198, 6738, 27039, 1330, 1635, 198, 6738, 3113, 1330, 1635, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, ...
2.253205
1,248
import codecs import os import re def read(*parts): """ Build an absolute path from *parts* and and return the contents of the resulting file. Assume UTF-8 encoding. """ here = os.path.abspath(os.path.dirname(__file__)) with codecs.open(os.path.join(here, *parts), "rb", "utf-8") as f: ...
[ 11748, 40481, 82, 198, 11748, 28686, 198, 11748, 302, 628, 198, 4299, 1100, 46491, 42632, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 10934, 281, 4112, 3108, 422, 1635, 42632, 9, 290, 290, 1441, 262, 10154, 286, 262, 198, 220...
3.119589
1,848
import lasagne
[ 11748, 39990, 21080, 628 ]
4
4
import warnings import pytest
[ 11748, 14601, 198, 198, 11748, 12972, 9288, 628, 628 ]
3.777778
9
#!/usr/bin/env python import argparse import os import sys import subprocess import github3 PROJECT_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..') BUILD_DIR = os.path.join(PROJECT_DIR, './build') GITHUB_API_TOKEN = os.environ.get('HOMEBREW_GITHUB_API_TOKEN') if GITHUB_API_TOKEN: gh = githu...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 850, 14681, 198, 11748, 33084, 18, 198, 198, 31190, 23680, 62, 34720, 796, 28686, 13, 6978, 13, 22179, 7, 418, ...
2.539642
391
# -*- coding: utf-8 -*- from django.db import models from django.utils.functional import empty from .utils.lazymodel import model_cache_key, OBJECT_DOES_NOT_EXIST, get_model_cache from .utils.modelutils import ( lookup_cache_key, model_cache_deleted_cache_key, model_row_cache_enabled, save_lookup_cache...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 13, 45124, 1330, 6565, 198, 198, 6738, 764, 26791, 13, 75, 12582, 19849, 1330, 2746, 62, 23...
3.05036
417
# -*- coding: utf-8 -*- """ Created on Sat Dec 01 21:52:18 2018 @author: LCL """ from __future__ import division # for / and // #from collections import Counter # for merge dict import sys # for exit() import os # for file path global CodeUpperPath CodeUpperPath = os.path.abspath('..') ''' https://blog.csdn.net/...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 7031, 4280, 5534, 2310, 25, 4309, 25, 1507, 2864, 198, 198, 31, 9800, 25, 406, 5097, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, ...
1.99711
346
# -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2018 all rights reserved # # support import pyre # declaration class Status(pyre.tracker): """ A helper that watches over a component's traits and records value changes """ # public data raw = True # meta-methods ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 285, 40302, 257, 13, 70, 13, 257, 26884, 85, 6557, 89, 271, 198, 2, 29617, 39795, 198, 2, 357, 66, 8, 7795, 12, 7908, 477, 2489, 10395, 198, 2, 628, 1...
2.452
250
from lxml import etree
[ 6738, 300, 19875, 1330, 2123, 631 ]
3.666667
6
import tensorflow as tf from basic.model import Model from my.tensorflow import average_gradients from my.tensorflow.general import zerout_gradients_for_zero_weights
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 4096, 13, 19849, 1330, 9104, 198, 6738, 616, 13, 83, 22854, 11125, 1330, 2811, 62, 9744, 2334, 198, 6738, 616, 13, 83, 22854, 11125, 13, 24622, 1330, 1976, 263, 448, 62, 9744, 2334...
3.428571
49
''' Functionality to get ticker names and data ''' import os import random import pandas as pd import yfinance as yf def get_random_tickers(n: int) -> list: ''' From the available ticker data, randomly select n tickers. ''' return random.sample(get_all_ticker_names(), n) def get_tickers_exc_sample(n: ...
[ 7061, 6, 198, 22203, 1483, 284, 651, 4378, 263, 3891, 290, 1366, 198, 7061, 6, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 331, 69, 14149, 355, 331, 69, 198, 198, 4299, 651, 62, 25120, 62, ...
2.350888
1,690
# conding=utf-8 from .CCPRestSDK import REST # 说明:主账号,登陆云通讯网站后,可在"控制台-应用"中看到开发者主账号ACCOUNT SID _accountSid = '8a216da86812593601682c07861e1cad' # 说明:主账号Token,登陆云通讯网站后,可在控制台-应用中看到开发者主账号AU...
[ 2, 1779, 278, 28, 40477, 12, 23, 198, 198, 6738, 764, 4093, 4805, 395, 10305, 42, 1330, 30617, 628, 198, 2, 5525, 107, 112, 23626, 236, 171, 120, 248, 10310, 119, 164, 112, 99, 20998, 115, 171, 120, 234, 163, 247, 119, 165, 247, ...
1.048645
1,624
from .settings_base import * DEBUG = False REST_FRAMEWORK['DEFAULT_RENDERER_CLASSES'] = ( 'rest_framework.renderers.JSONRenderer', 'utils.api.BrowsableAPIRendererWithoutForms', )
[ 6738, 764, 33692, 62, 8692, 1330, 1635, 628, 198, 30531, 796, 10352, 198, 198, 49, 6465, 62, 10913, 2390, 6217, 14670, 17816, 7206, 38865, 62, 49, 10619, 1137, 1137, 62, 31631, 1546, 20520, 796, 357, 198, 220, 220, 220, 705, 2118, 62,...
2.533333
75
from pyvista import examples dataset = examples.download_rectilinear_grid() # doctest:+SKIP
[ 6738, 12972, 85, 12523, 1330, 6096, 198, 19608, 292, 316, 796, 6096, 13, 15002, 62, 2554, 346, 259, 451, 62, 25928, 3419, 220, 1303, 10412, 395, 25, 10, 18831, 4061, 198 ]
3
31
from django.contrib import admin from reversion.admin import VersionAdmin from . import models admin.site.register(models.ToDoList, ToDoListAdmin) admin.site.register(models.ToDoItem, ToDoItemAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 302, 9641, 13, 28482, 1330, 10628, 46787, 198, 198, 6738, 764, 1330, 4981, 628, 628, 198, 198, 28482, 13, 15654, 13, 30238, 7, 27530, 13, 2514, 5211, 8053, 11, 1675, 5211, 805...
3.253968
63
import numpy as np def OrdenDeConvergencia(xNmenos2, xNmenos1, xN, xNmas1): """ Calcula el orden de convergencia para determinado punto aplicando la division que se realiza en la definicion. Si algun denominador resultase nulo, no se devolvera una constante, se devuelve None. """ a = xNmas...
[ 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 201, 198, 4299, 1471, 6559, 5005, 3103, 332, 5235, 33743, 7, 87, 45, 3653, 418, 17, 11, 2124, 45, 3653, 418, 16, 11, 2124, 45, 11, 2124, 45, 5356, 16, 2599, 201, 198, 220, 220, ...
2.162909
1,774
import random print(play())
[ 11748, 4738, 628, 628, 198, 4798, 7, 1759, 28955, 198 ]
3.2
10
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33160, 383, 3012, 4992, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, ...
3.206704
716
import pytest from pathlib import Path from eddington import FitData from mock import Mock import numpy as np from pytest_cases import fixture_plus from eddington_matplotlib import plot_all from tests.plot import dummy_func should_print_results = True should_plot_fitting = True should_plot_residuals = True should_p...
[ 11748, 12972, 9288, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 1225, 67, 9557, 1330, 25048, 6601, 198, 6738, 15290, 1330, 44123, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 9288, 62, 33964, 1330, 29220, 62, 9541, 198, ...
2.913793
174
import socket import threading PORT = 9090 HOST = socket.gethostbyname(socket.gethostname()) #local host server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind((HOST, PORT)) clients = [] def start(): """ Thread to accept clients :return: None """ server.listen()...
[ 11748, 17802, 201, 198, 11748, 4704, 278, 201, 198, 201, 198, 15490, 796, 860, 42534, 201, 198, 39, 10892, 796, 17802, 13, 1136, 4774, 1525, 3672, 7, 44971, 13, 1136, 4774, 3672, 28955, 1303, 12001, 2583, 201, 198, 201, 198, 15388, 79...
2.066049
863
import numpy as np import sys from scipy.special import erfcinv as erfcinv from calc_sigmas import calc_sigmas
[ 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 198, 6738, 629, 541, 88, 13, 20887, 1330, 1931, 16072, 16340, 355, 1931, 16072, 16340, 198, 6738, 42302, 62, 82, 328, 5356, 1330, 42302, 62, 82, 328, 5356, 220, 198, 220, 220, 220, 198...
2.761905
42
import numpy as np import matplotlib.pyplot as plt from math import sqrt, floor, ceil from scipy.interpolate import RegularGridInterpolator from scipy.ndimage import label import random import warnings import sys import os import csv import cv2 from sklearn.cluster import KMeans from PIL import Image from ...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 6738, 10688, 1330, 19862, 17034, 11, 4314, 11, 2906, 346, 201, 198, 6738, 629, 541, 88, 13, 3849, 16104, 378, 1330, 23603, 413...
2.852564
156
# -*- coding: utf-8 -*- import numpy as np import numpy.linalg as la import scipy as sp # ================ ARRAY ================ # ================ STATS ================ msqrt = lambda M : [np.matmul(u,np.diag(np.sqrt(s))) for u,s,vh in [la.svd(M)]][0] matern = lambda r,r0,nu : 2**(1-nu)/sp.special.gamma(nu)...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 75, 1292, 70, 355, 8591, 198, 11748, 629, 541, 88, 355, 599, 198, 198, 2, 796, 25609, 18604, 5923, 30631, 79...
2.13253
249
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from pycassa import ConnectionPool, ColumnFamily from urllib import unquote_plus from contrail_api_cli.command import Command, Option from contrail_api_cli.resource import Resource, Collection from contrail_api_cli.exceptions import Resour...
[ 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, 11748, 18931, 198, 198, 6738, 12972, 66, 562, 64, 1330, 26923, 27201, 11, 29201, 24094, 198, 6738, 2956, ...
2.4375
608
from datamart.utilities.utils import Utils from pandas import DataFrame from datamart.es_managers.json_query_manager import JSONQueryManager import typing class Dataset: """ Represents a retrieved dataset from datamart, in a search query. Contains the meta info and the way to materialize the dataset. ...
[ 6738, 4818, 321, 433, 13, 315, 2410, 13, 26791, 1330, 7273, 4487, 198, 6738, 19798, 292, 1330, 6060, 19778, 198, 6738, 4818, 321, 433, 13, 274, 62, 805, 10321, 13, 17752, 62, 22766, 62, 37153, 1330, 19449, 20746, 13511, 198, 11748, 19...
2.448637
954
# This file holds metadata about the project. It should import only from standard library modules # (this includes not importing other modules in the package) so that it can be loaded # by setup.py before dependencies are installed. source = "https://github.com/neilpquinn/wmfdata" version = "0.1.0"
[ 2, 770, 2393, 6622, 20150, 546, 262, 1628, 13, 632, 815, 1330, 691, 422, 3210, 5888, 13103, 198, 2, 357, 5661, 3407, 407, 33332, 584, 13103, 287, 262, 5301, 8, 220, 523, 326, 340, 460, 307, 9639, 198, 2, 416, 9058, 13, 9078, 878, ...
3.810127
79
from collections import defaultdict import os # A disjoint exonic bin. This class holds disjoint exonic bin data prepared # in the preprocessing step ####################### ####################### # Transcript class
[ 6738, 17268, 1330, 4277, 11600, 198, 11748, 28686, 198, 198, 2, 317, 595, 73, 1563, 409, 9229, 9874, 13, 770, 1398, 6622, 595, 73, 1563, 409, 9229, 9874, 1366, 5597, 198, 2, 287, 262, 662, 36948, 2239, 198, 198, 14468, 4242, 21017, ...
4.25
52
import configparser import hashlib import logging import os import sys import requests MOJANG_MANIFEST_URL = 'https://launchermeta.mojang.com/mc/game/version_manifest.json' DOWNLOADS_VERSIONS_FILENAME = 'servers-infos.txt' class IntegrityCheckError(Exception): """Throwed if the file signature doesn't match wit...
[ 11748, 4566, 48610, 198, 11748, 12234, 8019, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 7007, 628, 198, 11770, 41, 15567, 62, 10725, 5064, 6465, 62, 21886, 796, 705, 5450, 1378, 38722, 2044, 28961, 13, 5908,...
2.341119
1,841
class News_Sources: """ clas to define the objects in the News_Sources class """ class News_Article: """ class to define the objects in the News_Article class """
[ 4871, 3000, 62, 21188, 25, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 537, 292, 284, 8160, 262, 5563, 287, 262, 3000, 62, 21188, 1398, 198, 220, 220, 220, 37227, 628, 198, 4871, 3000, 62, 14906, 25, 628, 220, 220, 220, 37227, ...
3.015873
63
""" UDP client in python. """ import logging import socket import threading from py_client.players import Player logging.basicConfig(level=logging.DEBUG) class UdpClient: """UDP client for playing Connect-N""" # SETTING UP # LISTENING # RECEIVING # SENDING
[ 37811, 36428, 5456, 287, 21015, 13, 37227, 198, 198, 11748, 18931, 198, 11748, 17802, 198, 11748, 4704, 278, 198, 198, 6738, 12972, 62, 16366, 13, 32399, 1330, 7853, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, ...
2.918367
98
## Copyright 2020 UT-Battelle, LLC. See LICENSE.txt for more information. ### # @author Narasinga Rao Miniskar, Frank Liu, Dwaipayan Chakraborty, Jeffrey Vetter # miniskarnr@ornl.gov # # Modification: # Baseline code # Date: Apr, 2020 # ******************************************************...
[ 2235, 15069, 12131, 19255, 12, 33, 1078, 13485, 11, 11419, 13, 220, 4091, 38559, 24290, 13, 14116, 329, 517, 1321, 13, 198, 21017, 198, 2, 2488, 9800, 13596, 2313, 64, 48395, 1855, 1984, 283, 11, 5278, 18258, 11, 360, 10247, 541, 2293...
3.432432
259
# -*- coding: utf-8 -*- # TODO: remove this from flask.ext.cache import Cache from settings import CACHE_CONFIG cache = Cache()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16926, 46, 25, 4781, 428, 198, 198, 6738, 42903, 13, 2302, 13, 23870, 1330, 34088, 198, 198, 6738, 6460, 1330, 327, 2246, 13909, 62, 10943, 16254, 628, 198, 23870, ...
2.734694
49
""" Unit tests for specific models @author: Mathieu Doucet / UTK """ from __future__ import print_function import unittest, math, time # Disable "missing docstring" complaint # pylint: disable-msg=C0111 # Disable "too many methods" complaint # pylint: disable-msg=R0904 # Disable "could be a function" compla...
[ 37811, 198, 220, 220, 220, 11801, 5254, 329, 2176, 4981, 198, 220, 220, 220, 2488, 9800, 25, 16320, 22304, 5728, 66, 316, 1220, 19255, 42, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 555, 715, 395,...
2.077944
2,938
import asyncio from right import Right
[ 11748, 30351, 952, 198, 6738, 826, 1330, 6498, 198 ]
4.333333
9
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 12131, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843,...
2.594127
1,328
import os, sys sys.path.insert(0, os.path.abspath('..')) from WeekX.LinkedList import LinkedList from WeekX.Stack import Stack if __name__ == '__main__': graph = Graph(13) graph.addEdge(0,1) graph.addEdge(0,5) graph.addEdge(0,2) graph.addEdge(0,6) graph.addEdge(3,4) graph.addEdge(5,3) graph.addEdge(5,4) gra...
[ 11748, 28686, 11, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 397, 2777, 776, 10786, 492, 6, 4008, 198, 6738, 6119, 55, 13, 11280, 276, 8053, 1330, 7502, 276, 8053, 198, 6738, 6119, 55, 13, 25896, 1330, ...
2.327296
773
# -*- coding: utf-8 -*- ############################################## # Export CloudWatch metric data to csv file # Configuration file ############################################## METRICS = { 'CPUUtilization': ['AWS/EC2', 'AWS/RDS'], 'CPUCreditUsage': ['AWS/EC2', 'AWS/RDS'], 'CPUCreditBalance': ['AWS/EC2', 'AWS/...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 7804, 4242, 2235, 198, 2, 36472, 10130, 10723, 18663, 1366, 284, 269, 21370, 2393, 198, 2, 28373, 2393, 198, 29113, 7804, 4242, 2235, 198, 198, 47123, 49, 19505, ...
2.311041
1,585
# coding: utf-8 from __future__ import unicode_literals import os import shutil import subprocess from .ffmpeg import FFmpegPostProcessor from ..utils import ( check_executable, encodeArgument, encodeFilename, PostProcessingError, prepend_extension, replace_extension, shell_quote, ba...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 628, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 198, 6738, 764, 487, 43913, 1330, 18402, 43913, 6307, 18709, ...
2.764706
119
import tensorflow as tf import RecordLoader as rloader import numpy as np import time MAX_EPOCH = 1 REPEAT = 1 BATCH_SIZE = 200 TEST_TFRECORD = '' MODEL_GRAPH = '' MODEL_PATH = '' with tf.Session() as sess: saver = tf.train.import_meta_graph(MODEL_GRAPH) saver.restore(sess, tf.train.latest_check...
[ 11748, 11192, 273, 11125, 355, 48700, 201, 198, 11748, 13266, 17401, 355, 374, 29356, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 640, 201, 198, 201, 198, 22921, 62, 8905, 46, 3398, 796, 352, 201, 198, 2200, 11401, 1404, ...
2.250377
663
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() setup( name="py_outrider", version="0.1.0", author="Stefan Loipfinger, Ines Scheller", author_email="scheller@in.tum.de", description="Python backend package for OUTRIDER2 R package", ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 40406, ...
1.967742
589
import sys from os import environ from unittest.mock import patch from pynamodb.exceptions import DoesNotExist from pytest import mark, raises from pytest_subtests import SubTests from geostore.api_keys import MESSAGE_KEY from geostore.check_files_checksums.task import main from geostore.check_files_checksums.utils i...
[ 11748, 25064, 198, 6738, 28686, 1330, 551, 2268, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 279, 4989, 375, 65, 13, 1069, 11755, 1330, 8314, 3673, 3109, 396, 198, 6738, 12972, 9288, 1330, 1317, 11, 12073, 198, ...
3.096667
300
# start_repo_marker_0 import os from dagster import IOManager, graph, io_manager, op, repository from pyspark.sql import DataFrame, Row, SparkSession from pyspark.sql.types import IntegerType, StringType, StructField, StructType @io_manager @op @op @graph make_and_filter_data_job = make_and_filter_data.to_j...
[ 2, 923, 62, 260, 7501, 62, 4102, 263, 62, 15, 198, 11748, 28686, 198, 198, 6738, 48924, 1706, 1330, 314, 2662, 272, 3536, 11, 4823, 11, 33245, 62, 37153, 11, 1034, 11, 16099, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 6060, 19778,...
2.701299
154
import numpy as np # from cobra.flux_analysis import flux_variability_analysis from pytfa.analysis.variability import variability_analysis
[ 11748, 299, 32152, 355, 45941, 198, 2, 422, 22843, 430, 13, 69, 22564, 62, 20930, 1330, 28462, 62, 25641, 1799, 62, 20930, 198, 6738, 12972, 83, 13331, 13, 20930, 13, 25641, 1799, 1330, 25364, 62, 20930, 198 ]
3.756757
37
# Copyright (c) 2008,2015,2016,2017,2018,2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Contains a collection of basic calculations. These include: * wind components * heat index * windchill """ import contextlib from itertools import produ...
[ 2, 15069, 357, 66, 8, 3648, 11, 4626, 11, 5304, 11, 5539, 11, 7908, 11, 23344, 3395, 20519, 34152, 13, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 347, 10305, 513, 12, 2601, 682, 13789, 13, 198, 2, 30628, 55, 12, 34156, 12, 33...
2.792985
15,081
""" 问题描述:给定彼此独立的两棵树头结点分别为t1和t2,判断t1树是否包含t2树全部的拓扑结构。 """ from binarytree.toolcls import Node if __name__ == '__main__': t1 = Node(1) t1.left = Node(2) t1.right = Node(3) t1.left.left = Node(4) t1.left.right = Node(5) t1.right.left = Node(6) t1.right.right = Node(7) t1.left.left.left =...
[ 37811, 198, 29785, 106, 165, 95, 246, 162, 237, 237, 32573, 108, 171, 120, 248, 163, 119, 247, 22522, 248, 37605, 120, 29826, 97, 45379, 105, 44165, 233, 21410, 10310, 97, 162, 96, 113, 43718, 239, 13783, 112, 163, 119, 241, 163, 22...
1.515942
345
import pymongo config = { # "mongo" : "mongodb://usuario:pass@localhost/admin" # "mongo" : "mongodb://usuario:pass@localhost:27100/admin" "mongo" : "mongodb://localhost:27100/admin" } myclient = pymongo.MongoClient(config['mongo']) print('bases de datos',myclient.list_database_names()) db = myclient["tes...
[ 11748, 279, 4948, 25162, 198, 198, 11250, 796, 1391, 198, 220, 220, 220, 1303, 366, 76, 25162, 1, 1058, 366, 31059, 375, 65, 1378, 385, 84, 4982, 25, 6603, 31, 36750, 14, 28482, 1, 198, 220, 220, 220, 1303, 366, 76, 25162, 1, 1058...
2.280453
353
# coding:utf-8 # Produced by Andysin Zhang # 06_Aug_2019 # Inspired By Google, Appreciate for the wonderful work # # Copyright 2019 TCL Inc. All Rights Reserverd. # 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 ...
[ 2, 19617, 25, 40477, 12, 23, 198, 2, 21522, 771, 416, 843, 893, 259, 19439, 198, 2, 9130, 62, 12512, 62, 23344, 198, 2, 45827, 2750, 3012, 11, 2034, 29102, 378, 329, 262, 7932, 670, 198, 2, 198, 2, 15069, 13130, 309, 5097, 3457, ...
2.372003
7,008
# from .. import ( # PathManager, # Path_, # ) from .base import ( BaseFormat, BaseFormats, ) from .df import ( DFFormat, DFFormats, ) from .audio import ( AudioFormat, AudioFormats, ) from .video import ( VideoFormat, VideoFormats, FourCC, ) from .img import ( ImgFormat, ImgFormats, )
[ 2, 422, 11485, 1330, 357, 198, 2, 220, 220, 10644, 13511, 11, 198, 2, 220, 220, 10644, 62, 11, 198, 2, 1267, 198, 198, 6738, 764, 8692, 1330, 357, 198, 220, 7308, 26227, 11, 198, 220, 7308, 8479, 1381, 11, 198, 8, 198, 198, 6738...
2.401515
132
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628 ]
3.333333
6
from nltk import sent_tokenize import pandas as pd import numpy as np import joblib def createData(abstract): """ This function extracts the text from all the sentences and extracts the positional information of the sentences in an unstructract. Args: abstract - raw text of unstructured abst...
[ 6738, 299, 2528, 74, 1330, 1908, 62, 30001, 1096, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1693, 8019, 198, 198, 4299, 2251, 6601, 7, 397, 8709, 2599, 628, 220, 220, 220, 37227, 198, 220, ...
2.517134
642
# -*- coding: utf-8 -*- """ Created on Sun Apr 22 16:58:07 2018 @author: Madhur Kashyap 2016EEZ8350 """ import math import logging import numpy as np import pandas as pd from Utils import gen_bidi_map, is_array_or_list, is_dataframe from AudioUtils import read_sph, extract_features from TrainUtils import...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 3825, 2758, 2534, 1467, 25, 3365, 25, 2998, 2864, 201, 198, 201, 198, 31, 9800, 25, 4627, 48349, 20578, 88, 499, 1584, 6500, 57, 5999...
2.591241
137
from .env import NEnv from datetime import datetime MODEL_NEGOTIATION = [ "DQN", "PPO1", "PPO2", "GAIL", "A2C", "ACER", "DDPG", ]
[ 6738, 764, 24330, 1330, 399, 4834, 85, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 33365, 3698, 62, 45, 7156, 2394, 40, 6234, 796, 685, 198, 220, 220, 220, 366, 35, 48, 45, 1600, 198, 220, 220, 220, 366, 10246, 46, 16, 1600...
1.775281
89
from bs4 import BeautifulSoup import requests from google.cloud import firestore from google.cloud import secretmanager if __name__ == "__main__": hello_pubsub(event="", context="")
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 198, 6738, 23645, 13, 17721, 1330, 2046, 8095, 198, 6738, 23645, 13, 17721, 1330, 3200, 37153, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 2...
3.462963
54
import os os.environ["SYNCGIT_REPOS_DIR_NAME"] = os.path.join("tests", "fixtures")
[ 11748, 28686, 198, 198, 418, 13, 268, 2268, 14692, 23060, 7792, 38, 2043, 62, 35316, 2640, 62, 34720, 62, 20608, 8973, 796, 28686, 13, 6978, 13, 22179, 7203, 41989, 1600, 366, 69, 25506, 4943, 198 ]
2.4
35
import os import numpy as np import re if __name__ == '__main__': # path = '~/.dnn/datasets/hcp/processing_odf/HCP_1200_tensor' # process_all_odf_tensors(path) path = '~/.dnn/datasets/hcp/processing/HCP_1200_tensor' process_all_dti_tensors(path)
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 302, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 1303, 3108, 796, 705, 93, 11757, 67, 20471, 14, 19608, 292, 1039, 14,...
2.195122
123
""" Tools for ploting individual traces * :py:class:`TraceDB`: Store a map between individual traces and image stacks """ # Imports import pathlib from typing import Dict, Optional, Tuple, List # 3rd party imports import numpy as np import matplotlib.pyplot as plt from skimage.feature import peak_local_max # Our...
[ 37811, 20003, 329, 7110, 278, 1981, 20675, 198, 198, 9, 1058, 9078, 25, 4871, 25, 63, 2898, 558, 11012, 63, 25, 9363, 257, 3975, 1022, 1981, 20675, 290, 2939, 24285, 198, 198, 37811, 198, 198, 2, 1846, 3742, 198, 11748, 3108, 8019, ...
1.872631
14,509
#/bin/envs python3 #-*- encoding: utf-8 -*- # if(re.findall(r"^>[a-zA-Z0-9]{6}$",line)): try: import numpy as np except ImportError: raise ImportError("pip3 install numpy") try: import pandas as pd except ImportError: raise ImportError("pip3 install pandas") import os, argparse, math , re from decimal import ...
[ 2, 14, 8800, 14, 268, 14259, 21015, 18, 198, 2, 12, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 197, 361, 7, 260, 13, 19796, 439, 7, 81, 1, 61, 36937, 64, 12, 89, 32, 12, 57, 15, 12, 24, 60, 90, 21, 92...
2.305556
252
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. # coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. #...
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 201, 198, 2, 49962, 739, 262, 17168, 5964, 13, 201, 198, 201, 198, 2, 19617, 28, 40477, 12, 23, 201, 198, 2, 16529, 35937, 201, 198, 2, 6127, 7560, 416, 5413, 357, 49, 8, 11160, 19452, 6127...
3.431438
299
from typing import Dict from typing import List import pytest import pytorch_lightning as pl import torch from torch import nn import torch.nn.functional as F import optuna from optuna.integration import PyTorchLightningPruningCallback from optuna.testing.integration import create_running_trial from optuna.testing.in...
[ 6738, 19720, 1330, 360, 713, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 12972, 9288, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124...
3.71134
97
top_card = None player_hand = None eventID = None drawn_cards = None playerTurn = None winner = None chosenColour = None playable_cards = None currentChoice = None okPrompt = None colourChange = None
[ 4852, 62, 9517, 796, 6045, 198, 7829, 62, 4993, 220, 796, 6045, 198, 15596, 2389, 796, 6045, 198, 41549, 62, 27761, 796, 6045, 198, 7829, 17278, 796, 6045, 198, 39791, 796, 6045, 198, 354, 5233, 5216, 454, 796, 6045, 198, 1759, 540, ...
3.225806
62
# ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ # Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. # =============================================================...
[ 2, 796, 2559, 18604, 43, 2149, 24290, 62, 2257, 7227, 10052, 4770, 1421, 18604, 198, 2, 8745, 13, 261, 499, 13, 17896, 3609, 198, 2, 38093, 25609, 18604, 198, 2, 15069, 357, 66, 8, 2177, 12, 7908, 5161, 5, 51, 42443, 14161, 13, 14...
2.513584
4,233
from toee import * import char_class_utils ################################################### classEnum = stat_level_horizon_walker ################################################### class_feats = { } class_skills = (skill_balance, skill_climb, skill_diplomacy, skill_handle_animal, skill_hide, skill_knowledge...
[ 6738, 284, 1453, 1330, 1635, 198, 11748, 1149, 62, 4871, 62, 26791, 198, 198, 29113, 14468, 21017, 198, 198, 4871, 4834, 388, 796, 1185, 62, 5715, 62, 17899, 8637, 62, 20783, 198, 198, 29113, 14468, 21017, 628, 198, 4871, 62, 5036, 13...
3.605042
119
#!/usr/bin/env python # -*- coding: utf-8 -*- """Unit tests for txt_utils.py. """ from pyhandy import remove_multiple_newlines_in_txt, trim_spaces_and_tabs_from_lines_in_txt
[ 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, 26453, 5254, 329, 256, 742, 62, 26791, 13, 9078, 13, 198, 37811, 198, 198, 6738, 12972, 4993, 88, 1330, 4...
2.405405
74
import argparse import sys import os import importlib from parser import parser parser.parse(sys.argv[1], sys.argv[2])
[ 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 1330, 8019, 198, 198, 6738, 30751, 1330, 30751, 198, 198, 48610, 13, 29572, 7, 17597, 13, 853, 85, 58, 16, 4357, 25064, 13, 853, 85, 58, 17, 12962, 628 ]
3.05
40
""" Copyright [2019-2020] EMBL-European Bioinformatics Institute 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 ...
[ 37811, 198, 15269, 685, 23344, 12, 42334, 60, 17228, 9148, 12, 22030, 16024, 259, 18982, 873, 5136, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2...
3.898601
286
pi = 3.14159 r = int(input()) volume = (4/3) * pi * r ** 3 print("VOLUME = %.3f" % volume)
[ 14415, 796, 513, 13, 1415, 19707, 198, 198, 81, 796, 493, 7, 15414, 28955, 198, 198, 29048, 796, 357, 19, 14, 18, 8, 1635, 31028, 1635, 374, 12429, 513, 198, 198, 4798, 7203, 44558, 38340, 796, 4064, 13, 18, 69, 1, 4064, 6115, 8 ]
2.113636
44
"""Change RelativeModifier.value to a Numeric/Decimal Revision ID: 5795c29b2c7a Revises: 19506187e7aa Create Date: 2014-07-23 14:43:45.748696 """ # revision identifiers, used by Alembic. revision = '5795c29b2c7a' down_revision = '19506187e7aa' from alembic import op import sqlalchemy as sa from sqlalchemy.sql impor...
[ 37811, 19400, 45344, 5841, 7483, 13, 8367, 284, 257, 399, 39223, 14, 10707, 4402, 198, 198, 18009, 1166, 4522, 25, 642, 41544, 66, 1959, 65, 17, 66, 22, 64, 198, 18009, 2696, 25, 11445, 21, 23451, 68, 22, 7252, 198, 16447, 7536, 25,...
2.768116
138
""" #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Copyright (C) 2018 Fernando Serena. #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the ...
[ 37811, 198, 2, 12, 46402, 46402, 46402, 46402, 27584, 46249, 198, 220, 15069, 357, 34, 8, 2864, 31063, 30175, 2616, 13, 198, 2, 12, 46402, 46402, 46402, 46402, 27584, 46249, 198, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, ...
4.020134
298
from PySide2.QtWidgets import QDialog, QFileDialog from .settings_dialog_ui import Ui_SettingsDialogUi
[ 6738, 9485, 24819, 17, 13, 48, 83, 54, 312, 11407, 1330, 1195, 44204, 11, 1195, 8979, 44204, 198, 6738, 764, 33692, 62, 38969, 519, 62, 9019, 1330, 471, 72, 62, 26232, 44204, 52, 72 ]
3
34
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: Yijia Zheng # @email : yj.zheng@siat.ac.cn # @Time : 2020/04/11 17:40:28 import logging import numpy as np
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 2488, 13838, 25, 575, 2926, 544, 44583, 201, 198, 2, 2488, 12888, 1058, 331, 73, 13, 89, 31753, 31, 82...
2.070588
85
"""/web/app/syzygy/wishlist/__init__.py Author: Adam Green (adam.green1@maine.edu) [Description] Classes: [ClassesList] Functions: [FunctionsList] """ import logging from .model import Wishlist from .schema import WishlistSchema BASE_ROUTE = "wishlist" log = logging.getLogger(__name__)
[ 37811, 14, 12384, 14, 1324, 14, 1837, 7357, 1360, 14, 86, 680, 4868, 14, 834, 15003, 834, 13, 9078, 198, 198, 13838, 25, 7244, 3469, 357, 324, 321, 13, 14809, 16, 31, 76, 5718, 13, 15532, 8, 198, 198, 58, 11828, 60, 198, 198, 94...
2.475806
124
def _nr(): """Get the current INPUT_LINE_NUMBER""" global INPUT_LINE_NUMBER try: return fileinput.lineno() except RuntimeError: return INPUT_LINE_NUMBER
[ 201, 198, 4299, 4808, 48624, 33529, 201, 198, 220, 220, 220, 37227, 3855, 262, 1459, 3268, 30076, 62, 24027, 62, 41359, 13246, 37811, 201, 198, 220, 220, 220, 3298, 3268, 30076, 62, 24027, 62, 41359, 13246, 201, 198, 220, 220, 220, 19...
2.229885
87
import tensorflow as tf __all__ = ["auxillary_loss"] def auxillary_loss(disc_target, disc_preds, cont_trg, cont_pred): r""" Args: disc_target (tensor): a tensor representing the discriminator target ouput disc_preds (tensor): a tensor representing the prediction of discriminator con...
[ 11748, 11192, 273, 11125, 355, 48700, 628, 198, 834, 439, 834, 796, 14631, 14644, 15856, 62, 22462, 8973, 628, 198, 4299, 27506, 15856, 62, 22462, 7, 15410, 62, 16793, 11, 1221, 62, 28764, 82, 11, 542, 62, 2213, 70, 11, 542, 62, 287...
2.604575
306
import dataclasses import uuid @dataclasses.dataclass
[ 11748, 4818, 330, 28958, 198, 11748, 334, 27112, 628, 198, 31, 19608, 330, 28958, 13, 19608, 330, 31172, 198 ]
2.947368
19
# -*- coding: utf-8 -*- from django.conf.urls import include, url from django.contrib.auth import views as auth_views from django.contrib.auth.decorators import login_required from rest_framework import routers from . import views from . import api router = routers.DefaultRouter() router.register(r'pages', api.PageVi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 5009, 355, 6284, 62, 33571, 198, 6738, 42625...
2.143083
1,265
import math big = 600851475143 for i in range (3, 150000000000): factor = big/i if (math.floor(factor) * i == big and math.ceil(factor) * i == big): for j in range (3, i+1): factor2 = i/j if (math.floor(factor2) *j == i and math.ceil(factor2) * j == i): print("Not...
[ 11748, 10688, 198, 14261, 796, 10053, 5332, 1415, 2425, 21139, 198, 1640, 1312, 287, 2837, 357, 18, 11, 1315, 8269, 405, 2599, 198, 220, 220, 220, 5766, 796, 1263, 14, 72, 198, 220, 220, 220, 611, 357, 11018, 13, 28300, 7, 31412, 8,...
2.145455
220
#初始化login.py文件 #第一次修改
[ 2, 26344, 251, 34650, 233, 44293, 244, 38235, 13, 9078, 23877, 229, 20015, 114, 198, 198, 2, 163, 105, 105, 31660, 162, 105, 94, 46479, 106, 162, 242, 117 ]
0.758621
29
# # Dimensional and dimensionless parameter values, and scales # import pybamm import pandas as pd import os import numbers import numpy as np from pprint import pformat class ParameterValues: """ The parameter values for a simulation. Note that this class does not inherit directly from the python dictio...
[ 2, 198, 2, 360, 16198, 290, 15793, 1203, 11507, 3815, 11, 290, 16252, 198, 2, 198, 11748, 12972, 65, 6475, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 3146, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 279, ...
2.186244
9,305
from sklearn.model_selection import train_test_split import numpy as np import os from keras.preprocessing.image import load_img from keras.preprocessing.image import img_to_array from keras.applications.mobilenet_v2 import preprocess_input # 이미지 원본 경로 SOURCE_PATH = "../../image/" # 이미지 타입 CLASSES = ["mask", "no_mask"...
[ 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 41927, 292, 13, 3866, 36948, 13, 9060, 1330, 3440, 62, 9600, 198, 6738, 41927, 292, 13, 3866, ...
1.508716
631
import io import os import zipfile import numpy as np from PIL import Image from chainer.dataset import download from chainer.dataset import DatasetMixin
[ 11748, 33245, 198, 11748, 28686, 198, 11748, 19974, 7753, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 6333, 263, 13, 19608, 292, 316, 1330, 4321, 198, 198, 6738, 6333, 263, 13, 19608, 292, 316, ...
3.297872
47
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import cog.models.dbutils
[ 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, 9945, 1330, 4981, 11, 15720, 602, 198, 11748, 43072, 13, 27530, 13, 67, 436...
2.891304
46
"""Functions .. autosummary:: :toctree: identity const match """ from haskpy.types.function import function @function def identity(x): """a -> a""" return x @function def const(x, y): """a -> b -> a""" return x # # Pattern matching related functions # # NOTE: Currying doesn't work ...
[ 37811, 24629, 2733, 198, 198, 492, 44619, 388, 6874, 3712, 198, 220, 220, 1058, 1462, 310, 631, 25, 628, 220, 220, 5369, 198, 220, 220, 1500, 198, 220, 220, 2872, 198, 198, 37811, 198, 198, 6738, 468, 74, 9078, 13, 19199, 13, 8818, ...
3.534247
219
import asyncio import aiohttp import discord from redbot.core import commands, Config, checks import discord.errors from redbot.core.bot import Red from typing import * import logging import datetime import re from redbot.core.utils.chat_formatting import pagify, box, quote import markdownify log = logging.getLogger("...
[ 11748, 30351, 952, 198, 11748, 257, 952, 4023, 198, 11748, 36446, 198, 6738, 2266, 13645, 13, 7295, 1330, 9729, 11, 17056, 11, 8794, 198, 11748, 36446, 13, 48277, 198, 6738, 2266, 13645, 13, 7295, 13, 13645, 1330, 2297, 198, 6738, 19720...
3.454545
99
import copy import numpy as np import torch import torch.nn as nn import torch.nn.functional as F # Implementation of Soft Actor-Critic (SAC) # Paper: https://arxiv.org/abs/1801.01290 # Soft Actor-Critic Algorithms and Applications # https://arxiv.org/abs/1812.05905 # Implemetation of Attentive Update of Multi-Critic ...
[ 11748, 4866, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 2, 46333, 286, 8297, 27274, 12, 18559, 291, 357, 50, 2246, 8,...
2.488
500
####################################### # Project: IO_Vehicle_Detection Project # Authors: Mateusz Smendowski, Piotr Sladowski, Adam Twardosz # Copyright (C) Mateusz Smendowski, Piotr Sladowski, Adam Twardosz 2020 ####################################### import sys import os import platform import time from PySide2 im...
[ 29113, 4242, 21017, 198, 2, 4935, 25, 24418, 62, 37870, 1548, 62, 11242, 3213, 4935, 198, 2, 46665, 25, 24787, 385, 89, 2439, 437, 12079, 11, 350, 5151, 81, 3454, 9797, 4106, 11, 7244, 309, 904, 418, 89, 198, 2, 15069, 357, 34, 8,...
2.72103
466
# coding: utf-8 # # Mapping of production and consumption mixes in Europe and their effect on carbon footprint of electric vehicles # This code plots the following: # - CF of production vs consumption mixes of each country with visual indication of relative contribution to total European electricity production] ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1303, 337, 5912, 286, 3227, 290, 7327, 33237, 287, 2031, 290, 511, 1245, 319, 6588, 24713, 286, 5186, 5672, 198, 198, 2, 770, 2438, 21528, 262, 1708, 25, 198, 2, 220, 220, 220, 220, 5...
2.258441
11,995
# Adapted from: https://stackoverflow.com/questions/37935920/quantile-normalization-on-pandas-dataframe # Citing: https://en.wikipedia.org/wiki/Quantile_normalization
[ 2, 30019, 276, 422, 25, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 29088, 30743, 1238, 14, 40972, 576, 12, 11265, 1634, 12, 261, 12, 79, 392, 292, 12, 7890, 14535, 198, 2, 327, 1780, 25, 3740, 1378, 268, 13, 31266...
3.054545
55
""" The board definition should define the following variables: PART (str): The part name of the FPGA according to the tool """ PART = "xcku115-flva1517-2-e"
[ 37811, 198, 464, 3096, 6770, 815, 8160, 262, 1708, 9633, 25, 198, 220, 220, 220, 16652, 357, 2536, 2599, 383, 636, 1438, 286, 262, 376, 6968, 32, 1864, 284, 262, 2891, 198, 37811, 198, 198, 30709, 796, 366, 87, 694, 84, 15363, 12, ...
3.075472
53
import argparse # to pass the argument import cv2 # to import the openCV library # fetching the arguments and save in dictionary ap = argparse.ArgumentParser() ap.add_argument("-i", "--image", required = True, help = "Enter path to the image") args = vars(ap.parse_args()) # loading and converting the image into n...
[ 11748, 1822, 29572, 220, 220, 1303, 284, 1208, 262, 4578, 198, 11748, 269, 85, 17, 220, 220, 1303, 284, 1330, 262, 1280, 33538, 5888, 198, 198, 2, 21207, 278, 262, 7159, 290, 3613, 287, 22155, 198, 499, 796, 1822, 29572, 13, 28100, ...
2.75
424