content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# tensorflow mnist beginner tutorial # https://www.tensorflow.org/versions/r0.10/tutorials/mnist/beginners/index.html import tensorflow as tf # Download the input data. This will give three data sets: # mnist.train, mnist.test and mnist.validation from tensorflow.examples.tutorials.mnist import input_data mnist = inp...
[ 2, 11192, 273, 11125, 285, 77, 396, 31516, 11808, 198, 2, 3740, 1378, 2503, 13, 83, 22854, 11125, 13, 2398, 14, 47178, 14, 81, 15, 13, 940, 14, 83, 44917, 82, 14, 10295, 396, 14, 27471, 2741, 14, 9630, 13, 6494, 198, 198, 11748, ...
2.910891
606
""" Go Dep Workflow """ import logging from warnings import warn from aws_lambda_builders.actions import CopySourceAction from aws_lambda_builders.workflow import BaseWorkflow, Capability from .actions import DepEnsureAction, GoBuildAction from .utils import OSUtils from .subproc_exec import SubprocessExec LOG = log...
[ 37811, 198, 5247, 2129, 5521, 11125, 198, 37811, 198, 198, 11748, 18931, 198, 6738, 14601, 1330, 9828, 198, 198, 6738, 3253, 82, 62, 50033, 62, 50034, 13, 4658, 1330, 17393, 7416, 12502, 198, 6738, 3253, 82, 62, 50033, 62, 50034, 13, ...
3.223881
201
#!/usr/bin/env python # Specter MultiWallet Implementation # Nick Frichette 12/10/2017 """The purpose of the multiwallet is to provide an interface for users to interact with their Specter wallets. This application will show all the wallets thy currently possess, as well as allow users to create more.""" ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 13058, 263, 15237, 47152, 46333, 198, 2, 8047, 376, 1173, 3202, 660, 1105, 14, 940, 14, 5539, 198, 198, 37811, 464, 4007, 286, 262, 5021, 44623, 318, 284, 2148, 281, 7071, 329, 29...
3.1375
160
from output.models.nist_data.atomic.g_year_month.schema_instance.nistschema_sv_iv_atomic_g_year_month_min_exclusive_5_xsd.nistschema_sv_iv_atomic_g_year_month_min_exclusive_5 import NistschemaSvIvAtomicGYearMonthMinExclusive5 __all__ = [ "NistschemaSvIvAtomicGYearMonthMinExclusive5", ]
[ 6738, 5072, 13, 27530, 13, 77, 396, 62, 7890, 13, 47116, 13, 70, 62, 1941, 62, 8424, 13, 15952, 2611, 62, 39098, 13, 77, 1023, 2395, 2611, 62, 21370, 62, 452, 62, 47116, 62, 70, 62, 1941, 62, 8424, 62, 1084, 62, 41195, 62, 20, ...
2.433333
120
import threading import sublime main_thread = threading.current_thread()
[ 198, 11748, 4704, 278, 220, 198, 11748, 41674, 198, 198, 12417, 62, 16663, 796, 4704, 278, 13, 14421, 62, 16663, 3419, 198 ]
3.454545
22
from __future__ import annotations import asyncio import typing import discord from discord.ext import commands from .errors import InvokedMetaCommand class SettingsMenuOption(object): """ An option that can be chosen for a settings menu's selectable item, eg an option that refers to a sub-menu, or ...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 30351, 952, 198, 11748, 19720, 198, 198, 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 6738, 764, 48277, 1330, 10001, 6545, 48526, 21575, 628, 628, 198, 198, 4871, ...
2.333698
14,618
# # Copyright 2021 XEBIALABS # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, subli...
[ 2, 198, 2, 15069, 33448, 1395, 36, 3483, 1847, 32, 4462, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, 25423, 12340, ...
4.067308
312
# -*- coding: utf-8 -*- from ._metric_learning import metric_learning from ._metric_learning_minibatch import metric_learning_minibatch from ._reference_centers import reference_centers from ._spatial_reconstruction import spatial_reconstruction __version__ = '0.1.0'
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 47540, 4164, 1173, 62, 40684, 1330, 18663, 62, 40684, 198, 6738, 47540, 4164, 1173, 62, 40684, 62, 1084, 571, 963, 1330, 18663, 62, 40684, 62, 1084, 571, 963,...
3.074468
94
#간단한 인사말
[ 2, 166, 108, 226, 46695, 101, 47991, 250, 23821, 251, 116, 168, 8955, 167, 100, 238, 628 ]
0.588235
17
""" Define some functions used in concrete domain. """ import torch from torch import Tensor from torch.nn import functional as F from diffabs.abs import MetaFunc from diffabs.utils import reduce_dim_dists class ConcDist(MetaFunc): """ Similar to AbsEle in abs.py, it needs the distance for concrete data points ...
[ 37811, 2896, 500, 617, 5499, 973, 287, 10017, 7386, 13, 37227, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 309, 22854, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 198, 198, 6738, 814, 8937, 13, 8937, 1330, 30277, 37, 19524, ...
3.258216
213
from django.conf.urls import url from .views import serve_all urlpatterns = ( url(r'^.*$', serve_all, name="localsrv:serve_all"), )
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 764, 33571, 1330, 4691, 62, 439, 198, 198, 6371, 33279, 82, 796, 357, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 15885, 3, 3256, 4691, 62, 439, 11, 1438, 2625, 179...
2.472727
55
import unittest from collections import namedtuple, defaultdict import numpy as np import torch from ptan.experience import ExperienceSourceFirstLast from tqdm import tqdm from irelease.data import GeneratorData from irelease.env import MoleculeEnv from irelease.model import Encoder, PositionalEncoding, Stack...
[ 11748, 555, 715, 395, 201, 198, 6738, 17268, 1330, 3706, 83, 29291, 11, 4277, 11600, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 28034, 201, 198, 6738, 279, 38006, 13, 23100, 1240, 1330, 16386, 7416, 5962, 5956, 201, 198, ...
2.70936
406
import torch from torch.utils.data import Dataset import json import numpy as np import os from PIL import Image from torchvision import transforms as T try: from .ray_utils import * except : from ray_utils import * import glob import cv2 if __name__ == '__main__': import matplotlib.pyplot as plt fr...
[ 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 28034, 10178, 1330, 31408, 355, 309, 198, ...
2.06305
682
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 201, 198, 201, 198 ]
2.777778
9
'''Example of class decorator to make sure some attributes are always Decimal''' from decimal import Decimal from operator import attrgetter def decimals(cls): '''A class decorator that ensures all attributes specifiec in the class __decimals__ will be Decimal. Make sure your class is a new style class (...
[ 7061, 6, 16281, 286, 1398, 11705, 1352, 284, 787, 1654, 617, 12608, 389, 1464, 4280, 4402, 7061, 6, 198, 198, 6738, 32465, 1330, 4280, 4402, 198, 6738, 10088, 1330, 708, 81, 1136, 353, 198, 198, 4299, 875, 320, 874, 7, 565, 82, 2599...
2.407745
439
import os from numpy import * from matplotlib.pyplot import * from netCDF4 import Dataset from pylab import * from mpl_util import LevelColormap import pyroms import pyroms_toolbox from mpl_toolkits.basemap import Basemap, shiftgrid import mpl_toolkits.basemap as mp from bathy_smoother import * import mpl_util import l...
[ 11748, 28686, 198, 6738, 299, 32152, 1330, 1635, 198, 6738, 2603, 29487, 8019, 13, 9078, 29487, 1330, 1635, 198, 6738, 2010, 34, 8068, 19, 1330, 16092, 292, 316, 198, 6738, 279, 2645, 397, 1330, 1635, 198, 6738, 285, 489, 62, 22602, 1...
2.639769
347
# Copyright (C) 2013-present The DataCentric 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 o...
[ 2, 15069, 357, 34, 8, 2211, 12, 25579, 383, 6060, 19085, 1173, 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, 11846...
3.530466
279
import core from dominate.tags import * class Header(): ''' Header for pages with NavBar. ''' @staticmethod # pylama:ignore=W0401
[ 11748, 4755, 198, 6738, 17863, 13, 31499, 1330, 1635, 628, 198, 4871, 48900, 33529, 198, 220, 220, 220, 705, 7061, 48900, 329, 5468, 351, 13244, 10374, 13, 198, 220, 220, 220, 705, 7061, 628, 220, 220, 220, 2488, 12708, 24396, 198, 19...
2.754717
53
# GENERATED BY KOMAND SDK - DO NOT EDIT import insightconnect_plugin_runtime import json
[ 2, 24700, 1137, 11617, 11050, 509, 2662, 6981, 26144, 532, 8410, 5626, 48483, 198, 11748, 11281, 8443, 62, 33803, 62, 43282, 198, 11748, 33918, 628, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 628 ]
2.833333
36
from .base import Term from .constant import Constant from .image import Image from .network import Network from .parameter import Parameter from .symbol import Symbol __all__ = ["Constant", "Image", "Network", "Parameter", "Symbol", "Term"]
[ 6738, 764, 8692, 1330, 35118, 198, 6738, 764, 9979, 415, 1330, 20217, 198, 6738, 764, 9060, 1330, 7412, 198, 6738, 764, 27349, 1330, 7311, 198, 6738, 764, 17143, 2357, 1330, 25139, 2357, 198, 6738, 764, 1837, 23650, 1330, 38357, 198, 19...
3.681818
66
""" Created on Fri Jul 23 18:02:49 2021 @author: Nelson Mosquera (Monotera) """ # Problema 1 import math import numpy as np print("Raiz cuadrarda de 7 con una tolerancia de 10^-8 ", sqrt(7, 10**-124, 1)) print("Raiz cuadrarda de 7 con una tolerancia de 10^-16 ", sqrt(7, 10**-16, 1)) print("Raiz cuadrarda de 7 util...
[ 37811, 198, 41972, 319, 19480, 5979, 2242, 1248, 25, 2999, 25, 2920, 33448, 198, 198, 31, 9800, 25, 12996, 5826, 421, 8607, 357, 9069, 313, 8607, 8, 198, 37811, 198, 198, 2, 1041, 903, 2611, 352, 198, 11748, 10688, 198, 11748, 299, ...
2.503401
147
# -*- coding: utf-8 -*- """ /dms/redirect/views_show.py .. zeigt den Inhalt einer Weiterleitung an Django content Management System Hans Rauch hans.rauch@gmx.net Die Programme des dms-Systems koennen frei genutzt und den spezifischen Beduerfnissen entsprechend angepasst werden. 0.01 23.01.2007 Beginn der...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 14, 67, 907, 14, 445, 1060, 14, 33571, 62, 12860, 13, 9078, 198, 198, 492, 41271, 328, 83, 2853, 554, 71, 2501, 304, 7274, 775, 2676, 293, 270, 2150, 281...
2.693095
391
# # This file is part of pyasn1-alt-modules software. # # Created by Russ Housley with assistance from asn1ate v.0.6.0. # Modified by Russ Housley to include the opentypemap manager. # # Copyright (c) 2019-2022, Vigil Security, LLC # License: http://vigilsec.com/pyasn1-alt-modules-license.txt # # RPKI Route Origin Auth...
[ 2, 198, 2, 770, 2393, 318, 636, 286, 12972, 292, 77, 16, 12, 2501, 12, 18170, 3788, 13, 198, 2, 198, 2, 15622, 416, 1887, 367, 516, 1636, 351, 6829, 422, 355, 77, 16, 378, 410, 13, 15, 13, 21, 13, 15, 13, 198, 2, 40499, 416,...
2.713514
370
"""Support for building extensions using mypyc with distutils or setuptools The main entry points are mypycify, which produces a list of extension modules to be passed to setup, and MypycifyBuildExt, which must be registered as a BuildExt command. A trivial setup.py for a mypyc built project, then, looks like: fr...
[ 37811, 15514, 329, 2615, 18366, 1262, 616, 9078, 66, 351, 1233, 26791, 393, 900, 37623, 10141, 198, 198, 464, 1388, 5726, 2173, 389, 616, 9078, 66, 1958, 11, 543, 11073, 257, 1351, 286, 7552, 198, 18170, 284, 307, 3804, 284, 9058, 11,...
2.572948
6,018
from Middleware import * if __name__ == '__main__': fecth_ark_data()
[ 6738, 6046, 1574, 1330, 1635, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 277, 478, 71, 62, 668, 62, 7890, 3419 ]
2.517241
29
import os import pymongo import json import random import hashlib import time from flask import jsonify from hashlib import sha256 import redis def dummy(request): """Responds to any HTTP request. Args: request (flask.Request): HTTP request object. Returns: The response text or...
[ 11748, 28686, 198, 11748, 279, 4948, 25162, 198, 11748, 33918, 198, 11748, 4738, 198, 198, 11748, 12234, 8019, 198, 11748, 640, 198, 6738, 42903, 1330, 33918, 1958, 198, 198, 6738, 12234, 8019, 1330, 427, 64, 11645, 198, 11748, 2266, 271,...
2.223052
937
import sys from PyQt5.QtGui import QImage from PyQt5.QtWidgets import QLabel from commonwidgets import *
[ 11748, 25064, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 1195, 5159, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 33986, 198, 198, 6738, 2219, 28029, 11407, 1330, 1635, 628, 198 ]
2.634146
41
# -*- coding: utf-8 -*- """ Copyright ©2017. The Regents of the University of California (Regents). All Rights Reserved. Permission to use, copy, modify, and distribute this software and its documentation for educational, research, and not-for-profit purposes, without fee and without a signed licensing agreement, is he...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 15269, 10673, 5539, 13, 383, 3310, 658, 286, 262, 2059, 286, 3442, 357, 8081, 658, 737, 198, 3237, 6923, 33876, 13, 2448, 3411, 284, 779, 11, 4866, 11, 130...
2.488308
2,181
import torch.utils.data as data from PIL import Image import os # refer to https://github.com/pytorch/vision/blob/master/torchvision/datasets/folder.py IMG_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.ppm', '.bmp', '.pgm', '.tif'] def has_file_allowed_extension(filename, extensions): """Checks if a file is an allowe...
[ 11748, 28034, 13, 26791, 13, 7890, 355, 1366, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 28686, 198, 198, 2, 3522, 284, 3740, 1378, 12567, 13, 785, 14, 9078, 13165, 354, 14, 10178, 14, 2436, 672, 14, 9866, 14, 13165, 354, 10178, ...
2.898678
227
import re from tools.general import load_input rules, messages = parse_input_data(load_input("day19.txt")) pattern = re.compile("^" + resolve_rule(rules, 0) + "$") print(f"Part 1 => {sum(1 for msg in messages if pattern.match(msg))}") special_cases = { 8 : resolve_rule(rules, 42) + '+', 11 : '(' + '|'.join(...
[ 11748, 302, 198, 6738, 4899, 13, 24622, 1330, 3440, 62, 15414, 198, 198, 38785, 11, 6218, 796, 21136, 62, 15414, 62, 7890, 7, 2220, 62, 15414, 7203, 820, 1129, 13, 14116, 48774, 198, 198, 33279, 796, 302, 13, 5589, 576, 7203, 61, 1,...
2.19398
299
from glouton.modules.telemetryModuleBase import TelemetryModuleBase from glouton.shared.logger import logger import json import os
[ 198, 6738, 1278, 448, 261, 13, 18170, 13, 46813, 41935, 26796, 14881, 1330, 14318, 41935, 26796, 14881, 198, 6738, 1278, 448, 261, 13, 28710, 13, 6404, 1362, 1330, 49706, 198, 11748, 33918, 198, 11748, 28686, 628 ]
3.694444
36
# однострочный комментарий ''' первая строка вторая строка ''' # Ввод / вывод информации print('Hello!') # более сложный выыод print('Hello!', 'student!') # вывод с разделитетем - sep print('Hello!', 'student!', 123, sep='xxx') # бывает важно что бы конец строки был другим символом - and print('Hello!', 'student!', 123...
[ 2, 12466, 122, 43666, 22177, 15166, 21727, 20375, 21169, 15166, 141, 229, 22177, 45035, 140, 117, 12466, 118, 25443, 120, 43108, 16843, 22177, 20375, 16142, 21169, 18849, 140, 117, 198, 7061, 6, 198, 140, 123, 16843, 21169, 38857, 16142, ...
1.226328
433
# -*- coding: utf-8 -*- from abc import ABCMeta, abstractmethod from collections import namedtuple from datetime import datetime from typing import Any, Dict, Iterable, List, Optional, Text from bs4 import BeautifulSoup from yyutil.cache import DummyCache from yyutil.time import astimezone from yyutil.url import UrlF...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 4377, 11, 3...
3.297521
121
import numpy as np import matplotlib.pyplot as plt from hs_digitizer import * import glob import scipy.signal as ss from scipy.optimize import curve_fit import re, sys plt.rcParams.update({'font.size': 14}) paths = ['/daq2/20190618/pramp_tests/outgassing', \ #'/daq2/20190624/pramp/outgassing_test1', \ '/daq2/2...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 289, 82, 62, 12894, 3029, 263, 1330, 1635, 198, 11748, 15095, 198, 11748, 629, 541, 88, 13, 12683, 282, 355, 37786, 198, 6738, 629...
2.399628
538
""" W2UI Layout Widget Implementation """ from .raw_w2ui_layout import Layout as w2ui_raw_layout class Layout: """W2UI Layout class""" @property @property def init_widget(self): """Initialize the layout to be displayed""" if not self._has_panel: self.content_top = { ...
[ 37811, 198, 54, 17, 10080, 47639, 370, 17484, 46333, 198, 37811, 198, 198, 6738, 764, 1831, 62, 86, 17, 9019, 62, 39786, 1330, 47639, 355, 266, 17, 9019, 62, 1831, 62, 39786, 628, 198, 198, 4871, 47639, 25, 198, 220, 220, 220, 37227...
2.348441
2,052
# This problem was recently asked by Twitter: # Given a string with the initial condition of dominoes, where: # . represents that the domino is standing still # L represents that the domino is falling to the left side # R represents that the domino is falling to the right side # Figure out the final position of the ...
[ 2, 770, 1917, 373, 2904, 1965, 416, 3009, 25, 198, 198, 2, 11259, 257, 4731, 351, 262, 4238, 4006, 286, 2401, 2879, 274, 11, 810, 25, 198, 198, 2, 764, 6870, 326, 262, 2401, 2879, 318, 5055, 991, 198, 2, 406, 6870, 326, 262, 240...
3.75188
133
base_id = 0 base_gms = 23580 base_state_transfer = 28366 base_sst = 37683 base_rdmc = 31675 base_external = 32645 num_senders = 8 num_clients = 2 for i in range(num_senders + num_clients): print('\n\nfor id {}:\n'.format(i)) print('# my local id - each node should have a different id') print('local_id = ...
[ 8692, 62, 312, 796, 657, 198, 8692, 62, 70, 907, 796, 28878, 1795, 198, 8692, 62, 5219, 62, 39437, 796, 2579, 32459, 198, 8692, 62, 82, 301, 796, 5214, 47521, 198, 8692, 62, 4372, 23209, 796, 34131, 2425, 198, 8692, 62, 22615, 796, ...
2.48368
337
# -*- coding: utf-8 -*-
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628 ]
1.785714
14
# Make sure to edit this configuration file with your database connection details # and Alpha Vantage API key DB_USER = 'user' DB_PASS = 'passwd' DB_HOST = 'host' DB_PORT = '000' DB_NAME = 'db' APIKEY = 'alpha_vantage_apikey'
[ 2, 6889, 1654, 284, 4370, 428, 8398, 2393, 351, 534, 6831, 4637, 3307, 198, 2, 290, 12995, 569, 36403, 7824, 1994, 198, 11012, 62, 29904, 796, 705, 7220, 6, 198, 11012, 62, 47924, 796, 705, 6603, 16993, 6, 198, 11012, 62, 39, 10892,...
2.960526
76
import sys from collections import namedtuple from pathlib import Path from dl_plus import ytdl from dl_plus.config import get_config_home from dl_plus.exceptions import DLPlusException from dl_plus.pypi import load_metadata backends_dir = get_config_home() / 'backends' BackendInfo = namedtuple( 'BackendInfo',...
[ 11748, 25064, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 288, 75, 62, 9541, 1330, 331, 8671, 75, 198, 6738, 288, 75, 62, 9541, 13, 11250, 1330, 651, 62, 11250, 62, 11195, 198, 6738, ...
3.04878
123
import numpy as np import matplotlib.pyplot as plt import math from numpy import random omega = np.array([-1/2, 1/2]) beta = 1/4 sigma = 1 N = 16 ND = 30 dt = 0.01 T_list = np.linspace(0, ND, num=int(ND/dt)) (res, phase) = solve_diffeqs(N, sigma, beta, omega, ND, dt) plt.figure(figsize=(10, 7), dpi=100) plt.grid(c...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 10688, 198, 6738, 299, 32152, 1330, 4738, 628, 628, 198, 462, 4908, 796, 45941, 13, 18747, 26933, 12, 16, 14, 17, 11, 352, 14, ...
2.019376
929
""" Deep Deterministic Policy Gradient (DDPG) ----------------------------------------- An algorithm concurrently learns a Q-function and a policy. It uses off-policy data and the Bellman equation to learn the Q-function, and uses the Q-function to learn the policy. Reference --------- Deterministic Policy Gr...
[ 37811, 201, 198, 29744, 45559, 49228, 7820, 17701, 1153, 357, 35, 6322, 38, 8, 201, 198, 3880, 45537, 201, 198, 2025, 11862, 47480, 22974, 257, 1195, 12, 8818, 290, 257, 2450, 13, 201, 198, 1026, 3544, 572, 12, 30586, 1366, 290, 262, ...
1.935242
4,262
from __future__ import unicode_literals from django.core.exceptions import ObjectDoesNotExist from django.forms.models import ModelForm, model_to_dict from .constants import (MODERATION_STATUS_PENDING, MODERATION_STATUS_REJECTED) from .utils import django_17
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396, 198, 6738, 42625, 14208, 13, 23914, 13, 27530, 1330, 9104, 8479, 11, 2746, 62, 1462...
3.156627
83
import csv import platform from time import time from statistics import mean from collections import deque from datetime import datetime import psutil import log from cpu import Cpu from __init__ import __version__ from process import ProcessReader class History(deque): ''' A double ended queue with methods ...
[ 11748, 269, 21370, 198, 11748, 3859, 198, 6738, 640, 1330, 640, 198, 6738, 7869, 1330, 1612, 198, 6738, 17268, 1330, 390, 4188, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 26692, 22602, 198, 198, 11748, 2604, 198, 6738, 42804, ...
2.490385
416
from __future__ import absolute_import as _abs from ._ffi.node import NodeBase, NodeGeneric, register_node from ._ffi.runtime_ctypes import TVMType, TypeCode from . import make as _make from . import generic as _generic from . import _api_internal class Expr(ExprOp, NodeBase): """Base class of all tvm Expressions...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 355, 4808, 8937, 198, 6738, 47540, 487, 72, 13, 17440, 1330, 19081, 14881, 11, 19081, 46189, 11, 7881, 62, 17440, 198, 6738, 47540, 487, 72, 13, 43282, 62, 310, 9497, 1330, 3195, 44, 603...
2.878543
247
from abc import ABC from typing import Dict, Any from allenact.utils.viz_utils import VizSuite, AgentViewViz from projects.gym_baselines.experiments.gym_base import GymBaseConfig
[ 6738, 450, 66, 1330, 9738, 198, 6738, 19720, 1330, 360, 713, 11, 4377, 198, 198, 6738, 477, 268, 529, 13, 26791, 13, 85, 528, 62, 26791, 1330, 36339, 5606, 578, 11, 15906, 7680, 53, 528, 198, 198, 6738, 4493, 13, 1360, 76, 62, 120...
3.137931
58
import pandas as pd from sklearn.tree import DecisionTreeClassifier # Import Decision Tree Classifier from sklearn.model_selection import train_test_split # Import train_test_split function from sklearn import metrics #Import scikit-learn metrics module for accuracy calculation from fastapi import FastAPI import uvicor...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 21048, 1330, 26423, 27660, 9487, 7483, 1303, 17267, 26423, 12200, 5016, 7483, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 1303, 17267, 4512, ...
3.167364
239
# Generated by Django 3.2 on 2021-06-11 18:47 from django.db import migrations, models import wagtail.core.fields
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 319, 33448, 12, 3312, 12, 1157, 1248, 25, 2857, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 266, 363, 13199, 13, 7295, 13, 25747, 628 ]
2.974359
39
... txt = ['[', ']'] * N ... random.shuffle( txt ) ... return ''.join(txt) ... ... braced = 0 ... for ch in txt: ... if ch == '[': braced += 1 ... if ch == ']': ... braced -= 1 ... if braced < 0: return False ... return braced == 0 ... >>> for txt in (gen(...
[ 986, 220, 220, 220, 220, 256, 742, 796, 37250, 58, 3256, 705, 60, 20520, 1635, 399, 198, 986, 220, 220, 220, 220, 4738, 13, 1477, 18137, 7, 256, 742, 1267, 198, 986, 220, 220, 220, 220, 1441, 705, 4458, 22179, 7, 14116, 8, 198, ...
1.902613
421
#!/usr/bin/env python # encoding: utf-8 ''' Created on Mar 12, 2017 @author: Yusuke Kawatsu ''' import numpy as np import matplotlib.pyplot as plt if __name__ == '__main__': plot()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 7061, 6, 198, 41972, 319, 1526, 1105, 11, 2177, 198, 198, 31, 9800, 25, 41749, 4649, 23043, 19231, 198, 7061, 6, 198, 198, 11748, 299, 321...
2.480519
77
# -*-coding: utf-8 -*- """ @Project: tools @File : debug.py @Author : panjq @E-mail : pan_jinquan@163.com @Date : 2019-05-10 16:24:49 """ import datetime import logging import sys import time ''' url:https://cuiqingcai.com/6080.html level级别:debug、info、warning、error以及critical ''' # loggi...
[ 2, 532, 9, 12, 66, 7656, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 2488, 16775, 25, 4899, 198, 220, 220, 220, 2488, 8979, 220, 220, 1058, 14257, 13, 9078, 198, 220, 220, 220, 2488, 13838, 1058, 3425, 73, ...
1.979751
642
""" Copyright (C) 2010 CNRS Author: Florent Lamiraux, Nicolas Mansard """ from __future__ import print_function import types from enum import Enum from . import signal_base, wrap from .attrpath import setattrpath if 'display' not in globals().keys(): # --- FACTORY ---------------------------------------------...
[ 37811, 198, 220, 15069, 357, 34, 8, 3050, 31171, 6998, 628, 220, 6434, 25, 23347, 429, 10923, 343, 14644, 11, 29737, 18580, 446, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 3858, 198, 6738, 33829, ...
2.539216
3,468
from typing import List from reinvent_models.link_invent.model_vocabulary.vocabulary import Vocabulary, SMILESTokenizer, create_vocabulary
[ 6738, 19720, 1330, 7343, 201, 198, 201, 198, 6738, 36608, 62, 27530, 13, 8726, 62, 259, 1151, 13, 19849, 62, 18893, 22528, 13, 18893, 22528, 1330, 47208, 22528, 11, 9447, 4146, 6465, 4233, 7509, 11, 2251, 62, 18893, 22528, 201, 198, 2...
3.372093
43
from logging import getLogger from pathlib import Path from sanic import Blueprint, HTTPResponse, Request from sanic.response import file from .reload import setup_livereload logger = getLogger("booktracker") bp = Blueprint("Frontend") setup_livereload(bp) @bp.get("/<path:path>")
[ 6738, 18931, 1330, 651, 11187, 1362, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 5336, 291, 1330, 39932, 11, 7154, 51, 4805, 9774, 2591, 11, 19390, 198, 6738, 5336, 291, 13, 26209, 1330, 2393, 198, 198, 6738, 764, 260, 2220, 1...
3.108696
92
from setuptools import setup, find_packages from Cython.Build import cythonize import numpy setup( name='hdestimator', version='0.9', install_requires=[ 'h5py', 'pyyaml', 'numpy', 'scipy', 'mpmath', 'matplotlib', 'cython', ], packages=find_pac...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 327, 7535, 13, 15580, 1330, 3075, 400, 261, 1096, 198, 11748, 299, 32152, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 71, 16520, 320, 1352, 3256, 198, 220, ...
2.034384
349
import cv2 import numpy as np class roi: """docstring for roi."""
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4871, 686, 72, 25, 198, 220, 220, 220, 37227, 15390, 8841, 329, 686, 72, 526, 15931, 198 ]
2.482759
29
""" Common functions for creating enrich2 datasets (for GB1 and Bgl3) """ from os.path import join from subprocess import call import pandas as pd import utils def create_e2_config_file(inp_fn, sel_fn, e2_output_dir, config_file_save_dir): """ create a config file specifying parameters for enrich2 """ text ...
[ 37811, 8070, 5499, 329, 4441, 22465, 17, 40522, 357, 1640, 13124, 16, 290, 347, 4743, 18, 8, 37227, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 6738, 850, 14681, 1330, 869, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, ...
2.107252
1,641
# Generated by Django 3.1.4 on 2020-12-30 02:30 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 19, 319, 12131, 12, 1065, 12, 1270, 7816, 25, 1270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
'''Main tests in API''' import unittest import pandas as pd from model.charts.base import BaseChart class BaseChartGetFillColorTest(): # class BaseChartGetFillColorTest(unittest.TestCase): ''' Test behaviours linked to getting the fill color from a color array ''' def test_get_fill_color(self): ''' Tes...
[ 7061, 6, 13383, 5254, 287, 7824, 7061, 6, 198, 11748, 555, 715, 395, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 2746, 13, 354, 5889, 13, 8692, 1330, 7308, 45488, 198, 198, 4871, 7308, 45488, 3855, 33762, 10258, 14402, 33529, 198...
2.14299
2,154
from django.conf.urls import include, url from django.contrib import admin import django if django.VERSION >= (1, 8): urlpatterns = [ url(r'^', include('blog.urls', namespace="blog")), url(r'^admin/', include(admin.site.urls)), url(r'^ckeditor/', include('libs.ckeditor_uploader.urls')), ...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 11748, 42625, 14208, 198, 198, 361, 42625, 14208, 13, 43717, 18189, 357, 16, 11, 807, 2599, 198, 220, 220, 2...
2.295203
271
import chatexchange import live_testing if live_testing.enabled:
[ 11748, 442, 378, 87, 3803, 198, 198, 11748, 2107, 62, 33407, 628, 198, 361, 2107, 62, 33407, 13, 25616, 25, 198 ]
3.238095
21
''' for i in all_title: individual_title = i.text print(individual_title) x +=1 sheet1.write(x+1,1,individual_title) wb.save('냉장고2.xls') ''' ''' for j in all_price: individual_price = re.sub("[^0-9]", "", j.text) print(individual_price) x +=1 sheet1.write(x+1,2,individual_title) ...
[ 198, 7061, 6, 198, 1640, 1312, 287, 477, 62, 7839, 25, 198, 220, 220, 220, 1981, 62, 7839, 796, 1312, 13, 5239, 198, 220, 220, 220, 3601, 7, 43129, 62, 7839, 8, 198, 220, 220, 220, 2124, 15853, 16, 198, 220, 220, 220, 9629, 16, ...
1.979424
243
sth = 0 # BUG: solve me
[ 48476, 796, 657, 198, 198, 2, 347, 7340, 25, 8494, 502, 198 ]
2.083333
12
from importlib import import_module from .Connector import Connector # formatters for making life easier, don't you want it that way? fmt_params = '{}&api_action={}&api_output={}&{}'.format fmt_noparams = '{}&api_action={}&api_output={}'.format
[ 6738, 1330, 8019, 1330, 1330, 62, 21412, 198, 6738, 764, 34525, 1330, 8113, 273, 198, 198, 2, 5794, 1010, 329, 1642, 1204, 4577, 11, 836, 470, 345, 765, 340, 326, 835, 30, 198, 69, 16762, 62, 37266, 796, 705, 90, 92, 5, 15042, 62,...
2.883721
86
# 读入数据 from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn import preprocessing import numpy as np import matplotlib.pyplot as plt diabetes = datasets.load_diabetes() X = diabetes.data y = diabetes.target # 划分数据集 X_train, X_test, y_train, y_test = train_test_split(X, y, tes...
[ 198, 2, 5525, 107, 119, 17739, 98, 46763, 108, 162, 235, 106, 198, 6738, 1341, 35720, 1330, 40522, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 1341, 35720, 1330, 662, 36948, 198, 11748, 29...
2.022505
1,022
from __future__ import absolute_import from __future__ import division from __future__ import print_function import types import cv2 import pandas as pd import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from models import get_model from losses import get_loss from transforms impor...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 3858, 198, 198, 11748, 269, 85, 17, 198, 11748, 19798, 292, 355, 279, 67, 1...
3.433628
113
## @ingroup Attributes-Propellants #Jet A # # Created: Unk 2013, SUAVE TEAM # Modified: Feb 2016, M. Vegh # ---------------------------------------------------------------------- # Imports # ---------------------------------------------------------------------- from .Propellant import Propellant from SUAVE.Core imp...
[ 2235, 2488, 278, 3233, 49213, 12, 2964, 23506, 1187, 198, 2, 42273, 317, 198, 2, 198, 2, 15622, 25, 220, 791, 74, 2211, 11, 13558, 32, 6089, 33536, 198, 2, 40499, 25, 3158, 1584, 11, 337, 13, 8016, 456, 198, 198, 2, 16529, 23031, ...
2.116915
804
""" done """ import numpy as np from ..misc_functions import random_data from ..stability_selection import ( stability, biggest_indexes, selected_param, build_submatrix, build_subset, )
[ 37811, 198, 28060, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 11485, 44374, 62, 12543, 2733, 1330, 4738, 62, 7890, 198, 198, 6738, 11485, 301, 1799, 62, 49283, 1330, 357, 198, 220, 220, 220, 10159, 11, 198, 2...
2.619048
84
from typing import Union from plantuml2freemind.custom_types import ChildNode, RootNode AnyNode = Union[RootNode, ChildNode] def convert_tree_into_puml(root: RootNode) -> str: """Generate PlantUML mindmap from tree.""" puml = generate_puml_node(root, 1) if root.right: puml = concat_pumls(p...
[ 6738, 19720, 1330, 4479, 198, 198, 6738, 4618, 388, 75, 17, 19503, 368, 521, 13, 23144, 62, 19199, 1330, 5932, 19667, 11, 20410, 19667, 198, 198, 7149, 19667, 796, 4479, 58, 30016, 19667, 11, 5932, 19667, 60, 628, 628, 628, 198, 198, ...
2.342105
228
# # Copyright 2020- IBM Inc. All rights reserved # SPDX-License-Identifier: Apache2.0 # from typing import Optional, Callable import numpy as np from abc import ABC, abstractmethod
[ 2, 198, 2, 15069, 12131, 12, 19764, 3457, 13, 1439, 2489, 10395, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 17, 13, 15, 198, 2, 198, 6738, 19720, 1330, 32233, 11, 4889, 540, 198, 11748, 299, 32152, 355, 45941, 198, ...
3.425926
54
## Created the 05/03/19 ## By Data Templar ## ## The purpose of this script is to remove all space in all files ## and folders' name. So we can share the "server url" directly try: from tqdm import tqdm tqdmimport = True except ImportError as e: tqdmimport = False print("enable to import the progr...
[ 2235, 15622, 262, 8870, 14, 3070, 14, 1129, 198, 2235, 2750, 6060, 41741, 198, 2235, 198, 2235, 383, 4007, 286, 428, 4226, 318, 284, 4781, 477, 2272, 287, 477, 3696, 198, 2235, 290, 24512, 6, 1438, 13, 1406, 356, 460, 2648, 262, 366...
3.05
260
import abc import tensorflow as tf from tensor_annotations import tensorflow as ttf from tensor_annotations import axes from src.channelcoding.dataclasses import FixedPermuteInterleaverSettings, RandomPermuteInterleaverSettings from .codes import Code from .types import Batch, Time, Channels
[ 11748, 450, 66, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 62, 34574, 602, 1330, 11192, 273, 11125, 355, 256, 27110, 198, 6738, 11192, 273, 62, 34574, 602, 1330, 34197, 198, 198, 6738, 12351, 13, 17620, 66, ...
3.183673
98
# 顺序查找 # 二分查找 # 二分查找 递归 前提是已排序的
[ 2, 16268, 94, 118, 41753, 237, 162, 253, 98, 33699, 122, 628, 198, 2, 220, 12859, 234, 26344, 228, 162, 253, 98, 33699, 122, 628, 198, 2, 220, 12859, 234, 26344, 228, 162, 253, 98, 33699, 122, 16268, 222, 240, 37605, 240, 10263, 2...
0.62069
58
import asyncio import pytest import aetcd import aetcd.exceptions import aetcd.watcher @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio
[ 11748, 30351, 952, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 257, 316, 10210, 198, 11748, 257, 316, 10210, 13, 1069, 11755, 198, 11748, 257, 316, 10210, 13, 86, 34734, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628,...
2.46875
64
from itertools import groupby from datetime import date, timedelta from operator import itemgetter from sqlalchemy import func from .utm_db import session_utm from .models import PaymentTransaction, BalanceHistory, User from .helpers import get_timestamp_from_date def fetch_pays_from_utm(date_begin, date_end): ...
[ 6738, 340, 861, 10141, 1330, 1448, 1525, 198, 6738, 4818, 8079, 1330, 3128, 11, 28805, 12514, 198, 6738, 10088, 1330, 2378, 1136, 353, 198, 198, 6738, 44161, 282, 26599, 1330, 25439, 198, 198, 6738, 764, 26841, 62, 9945, 1330, 6246, 62,...
1.782311
3,652
""" Block Permutations ============================= The permutations of :class:`hyppo.independence.Dcorr` can be restricted to appropriately match known dependencies of samples under the null distribution (i.e. multilevel and longitudinal data). Without such modifications, calculated pvalues are invalid as the defaul...
[ 37811, 198, 12235, 2448, 21973, 602, 198, 4770, 25609, 28, 198, 198, 464, 9943, 32855, 286, 1058, 4871, 25, 63, 12114, 16634, 13, 39894, 13, 35, 10215, 81, 63, 460, 307, 10770, 284, 20431, 2872, 1900, 198, 45841, 3976, 286, 8405, 739,...
2.550672
2,753
""" Module description: """ __version__ = '0.1' __author__ = 'Felice Antonio Merra, Vito Walter Anelli, Claudio Pomo' __email__ = 'felice.merra@poliba.it, vitowalter.anelli@poliba.it, claudio.pomo@poliba.it' import os import numpy as np import tensorflow as tf from tensorflow import keras os.environ['TF_CPP_MIN_LOG...
[ 37811, 198, 26796, 6764, 25, 198, 198, 37811, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 16, 6, 198, 834, 9800, 834, 796, 705, 42493, 501, 11366, 4638, 430, 11, 569, 10094, 15819, 1052, 23225, 11, 1012, 24051, 350, 17902, 6, 198, ...
2.493056
144
# Copyright 2022 MosaicML Composer authors # SPDX-License-Identifier: Apache-2.0 """The state of the trainer.""" from __future__ import annotations import collections.abc import logging import warnings from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, Optional, Sequence, Union, cast import torch impor...
[ 2, 15069, 33160, 5826, 18452, 5805, 29936, 263, 7035, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 37811, 464, 1181, 286, 262, 21997, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, ...
2.503197
7,977
# -------------- # import the libraries import numpy as np import pandas as pd import seaborn as sns from sklearn.model_selection import train_test_split import warnings warnings.filterwarnings('ignore') # Code starts here df = pd.read_csv(path) df.head() X = df.iloc[:,: -1] y = df.iloc[:,-1] X_train, X_test , y_train...
[ 2, 220, 26171, 198, 2, 1330, 262, 12782, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35...
2.559645
788
from .local_settings import *
[ 6738, 764, 12001, 62, 33692, 1330, 1635, 198 ]
3.75
8
from KratosMultiphysics import Parameters import ethier_benchmark_analysis BaseAnalysis = ethier_benchmark_analysis.EthierBenchmarkAnalysis
[ 6738, 509, 10366, 418, 15205, 13323, 23154, 1330, 40117, 198, 11748, 4555, 959, 62, 26968, 4102, 62, 20930, 198, 14881, 32750, 796, 4555, 959, 62, 26968, 4102, 62, 20930, 13, 40226, 959, 44199, 4102, 32750, 198 ]
3.888889
36
from pydantic.dataclasses import dataclass from ..vae import VAEConfig @dataclass class BetaVAEConfig(VAEConfig): r""" :math:`\beta`-VAE model config config class Parameters: input_dim (tuple): The input_data dimension. latent_dim (int): The latent space dimension. Default: None. ...
[ 6738, 279, 5173, 5109, 13, 19608, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 11485, 33353, 1330, 13753, 2943, 261, 5647, 628, 198, 31, 19608, 330, 31172, 198, 4871, 17993, 11731, 2943, 261, 5647, 7, 11731, 2943, 261, 5647, 2599...
2.681081
185
import queue if __name__ == '__main__': main()
[ 11748, 16834, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.454545
22
"""This program is to fetch the words from an url online. Example: $python words.py "http://sixty-north.com/c/t.txt" """ import sys from urllib.request import urlopen # Do Something nice: if __name__ == "__main__": print_items(fetch_words(sys.argv[1]))
[ 37811, 1212, 1430, 318, 284, 21207, 262, 2456, 422, 281, 19016, 2691, 13, 198, 198, 16281, 25, 198, 3, 29412, 2456, 13, 9078, 366, 4023, 1378, 82, 19404, 12, 43588, 13, 785, 14, 66, 14, 83, 13, 14116, 1, 198, 37811, 198, 11748, 25...
2.721649
97
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.20.7 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six fr...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 12554, 527, 3262, 274, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 4946, 15042, 35986, 3740, 1378, 12567, 13, 785, 14, 9654, 499, 270, 10141, 14, 9654, ...
2.564794
3,596
# Copyright (c) 2018 Dow Jones & Company, Inc. # # 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...
[ 2, 220, 15069, 357, 66, 8, 2864, 21842, 5437, 1222, 5834, 11, 3457, 13, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, 2845, ...
2.445335
1,372
from django.conf.urls import url from . import views app_name= "app" urlpatterns = [ # ex : /book/ url(r'^$', views.Index, name="Index"), url(r'^test$', views.test, name="test"), # ex : /book/list url(r'^list/$', views.Book_list, name="book-list"), # ex : /book/1/ url(r'^(?P<pk>[0-9]+)/$',...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 28, 366, 1324, 1, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 1303, 409, 1058, 1220, 2070, 14, 198, 220, ...
2.219008
242
from django.shortcuts import render from rest_framework import status from rest_framework import generics from rest_framework import viewsets from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.views import APIView from rest_framework.permissions import (IsAut...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 1330, 1152, 873, 198, 6738, 1334, 62, 30604, 1330, 5009, 1039, 198, 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330,...
2.621926
976
import logging from abc import ABC, abstractmethod from oshino.util import current_ts, timer
[ 11748, 18931, 198, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 198, 6738, 267, 1477, 2879, 13, 22602, 1330, 1459, 62, 912, 11, 19781, 628 ]
3.555556
27
"""Functions for building tensorflow graph """ # MIT License # # Copyright (c) 2018 Debayan Deb # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limi...
[ 37811, 24629, 2733, 329, 2615, 11192, 273, 11125, 4823, 198, 37811, 198, 2, 17168, 13789, 198, 2, 220, 198, 2, 15069, 357, 66, 8, 2864, 8965, 22931, 8965, 198, 2, 220, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, ...
2.479095
2,033
"""Corma, one time report to rule them all!""" import argparse # corma report test-dev -t 7h -d 2020-10-12 # corma report vacation # corma submit bombardier -t 2020-09 if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("register") parser.parse_args()
[ 37811, 34, 579, 64, 11, 530, 640, 989, 284, 3896, 606, 477, 2474, 15931, 628, 198, 11748, 1822, 29572, 198, 198, 2, 269, 579, 64, 989, 1332, 12, 7959, 532, 83, 767, 71, 532, 67, 12131, 12, 940, 12, 1065, 198, 2, 269, 579, 64, ...
2.768519
108
#!/usr/bin/env python import argparse import numpy as np import pandas as pd import logging main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 18931, 628, 198, 12417, 3419 ]
3.060606
33
# Copyright (c) 2017 Hitachi, 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.0 # # Unless required by applicable law or ...
[ 2, 15069, 357, 66, 8, 2177, 7286, 14299, 11, 12052, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 28...
2.307394
5,667
import requests from bs4 import BeautifulSoup SEARCH_URL = "https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=" CVE_URL = "https://cve.mitre.org/cgi-bin/cvename.cgi?name="
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 5188, 31315, 62, 21886, 796, 366, 5450, 1378, 66, 303, 13, 2781, 260, 13, 2398, 14, 37157, 12, 8800, 14, 66, 303, 2539, 13, 37157, 30, 2539, 4775, 2625, 198, 31436, ...
2.463768
69
#!/usr/bin/python # Classification (U) """Program: run_program.py Description: Unit testing of run_program in mongo_perf.py. Usage: test/unit/mongo_perf/run_program.py Arguments: """ # Libraries and Global Variables # Standard import sys import os if sys.version_info < (2, 7): import u...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 40984, 357, 52, 8, 198, 198, 37811, 15167, 25, 220, 1057, 62, 23065, 13, 9078, 628, 220, 220, 220, 12489, 25, 220, 11801, 4856, 286, 1057, 62, 23065, 287, 285, 25162, 62, 525, 69, 13, ...
2.122211
5,155
""" CBAM-ResNet for ImageNet-1K, implemented in Chainer. Original paper: 'CBAM: Convolutional Block Attention Module,' https://arxiv.org/abs/1807.06521. """ __all__ = ['CbamResNet', 'cbam_resnet18', 'cbam_resnet34', 'cbam_resnet50', 'cbam_resnet101', 'cbam_resnet152'] import os import chainer.functions as F i...
[ 37811, 198, 220, 220, 220, 10078, 2390, 12, 4965, 7934, 329, 7412, 7934, 12, 16, 42, 11, 9177, 287, 609, 10613, 13, 198, 220, 220, 220, 13745, 3348, 25, 705, 23199, 2390, 25, 34872, 2122, 282, 9726, 47406, 19937, 4032, 3740, 1378, 2...
2.562713
2,639
from . import cpu from . import gpu
[ 6738, 764, 1330, 42804, 198, 6738, 764, 1330, 308, 19944 ]
3.5
10
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import httpretty import json import uuid from collections import Mapping from faker import Faker from tests.test_api.utils import TestBaseApi from polyaxon_client.api.base import BaseApiHandler from polyaxon_client.api.bookmark...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 2638, 16100, 198, 11748, 33918, 198, 11748, 334, 27112, 198, 198, 6738, 17...
3.096774
155
import tensorflow as tf import os os.environ['CUDA_DEVICE_ORDER'] = 'PCI_BUS_ID' os.environ['CUDA_VISIBLE_DEVICES'] = '0' print('physical devices:', str(tf.config.experimental.list_physical_devices()))
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 28686, 198, 198, 418, 13, 268, 2268, 17816, 43633, 5631, 62, 7206, 27389, 62, 12532, 1137, 20520, 796, 705, 5662, 40, 62, 45346, 62, 2389, 6, 198, 418, 13, 268, 2268, 17816, 43633, 563...
2.636364
77
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2021, Cisco Systems # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r""" --- module: trigger_image_activation short_description: Manage TriggerImageActivation objects of SoftwareImageManagementSwim ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 25, 357, 66, 8, 33448, 11, 28289, 11998, 198, 2, 22961, 3611, 5094, 13789, 410, 18, 13, 15, 10, 357, 3826, ...
2.96516
1,062