content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from flask import Blueprint, request as flask_request, jsonify from cartmigration.libs.utils import * route_path = Blueprint('route_path', __name__) @route_path.route("/action/<string:method>", methods = ['post'])
[ 6738, 42903, 1330, 39932, 11, 2581, 355, 42903, 62, 25927, 11, 33918, 1958, 198, 198, 6738, 6383, 76, 4254, 13, 8019, 82, 13, 26791, 1330, 1635, 198, 198, 38629, 62, 6978, 796, 39932, 10786, 38629, 62, 6978, 3256, 11593, 3672, 834, 8,...
3.253731
67
# Copyright 2021, The TensorFlow Federated 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, 33448, 11, 383, 309, 22854, 37535, 35089, 515, 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, 351, ...
3.664336
286
from datetime import datetime from typing import Any, Optional import aioredis from .store import RateLimiterStoreABC class RedisStore(RateLimiterStoreABC): """An redis backed store of rate limits. Arguments: address: The address of the redis instance. kwargs: Any keyword arguments to pass ...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 4377, 11, 32233, 198, 198, 11748, 257, 72, 1850, 271, 198, 198, 6738, 764, 8095, 1330, 14806, 19352, 2676, 22658, 24694, 628, 198, 4871, 2297, 271, 22658, 7, 32184, 19352, 2676...
3.022388
134
"""keyrings.envvars tests."""
[ 37811, 365, 2417, 654, 13, 24330, 85, 945, 5254, 526, 15931, 198 ]
2.5
12
from time import time
[ 6738, 640, 1330, 640, 198 ]
4.4
5
from __future__ import absolute_import, unicode_literals from qproject.celery import app as celery_app __all__ = ['celery_app']
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 10662, 16302, 13, 7015, 88, 1330, 598, 355, 18725, 1924, 62, 1324, 198, 198, 834, 439, 834, 796, 37250, 7015, 88, 62, 1324, 20520, 198 ]
3.095238
42
from numpy.testing import assert_allclose import pytest from ..bbox import AnchorPoint, FrozenError, BBox
[ 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 439, 19836, 198, 11748, 12972, 9288, 198, 198, 6738, 11485, 65, 3524, 1330, 29253, 273, 12727, 11, 23673, 12331, 11, 12597, 1140, 628, 220, 220, 220, 220, 198, 220, 220, 220, 220, 628, 220,...
2.418182
55
"""Example program to demonstrate how to send markers into LSL.""" import random import time from pylsl import StreamInfo, StreamOutlet info = StreamInfo(name='markers', type='Markers', channel_count=1, channel_format='int32', source_id='markers_test1234') # next make an outlet outlet =...
[ 37811, 16281, 1430, 284, 10176, 703, 284, 3758, 19736, 656, 406, 8634, 526, 15931, 201, 198, 201, 198, 11748, 4738, 201, 198, 11748, 640, 201, 198, 201, 198, 6738, 279, 2645, 6649, 1330, 13860, 12360, 11, 13860, 7975, 1616, 201, 198, ...
2.691542
201
import json import numpy as np import pickle from sklearn.linear_model import Ridge from azureml.core.model import Model from inference_schema.schema_decorators import input_schema, output_schema from inference_schema.parameter_types.numpy_parameter_type import NumpyParameterType from utils import mylib input_sample...
[ 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 20614, 198, 6738, 35560, 495, 4029, 13, 7295, 13, 19849, 1330, 9104, 198, 6738, 32278, 62, 15952, 2611, 13, 159...
3.017964
167
""" 11292 : 키 큰 사람 URL : https://www.acmicpc.net/problem/11292 Input : 3 John 1.75 Mary 1.64 Sam 1.81 2 Jose 1.62 Miguel 1.58 5 John 1.75 Mary 1.75 Sam 1.74 Jose 1.75 Miguel 1.75 0 Output : ...
[ 37811, 198, 220, 220, 220, 13539, 5892, 1058, 220, 169, 224, 97, 220, 169, 223, 108, 23821, 8955, 167, 252, 234, 198, 220, 220, 220, 10289, 1058, 3740, 1378, 2503, 13, 330, 9383, 14751, 13, 3262, 14, 45573, 14, 14686, 5892, 198, 220...
1.80137
438
#AUTOGENERATED! DO NOT EDIT! File to edit: dev/90_notebook_core.ipynb (unless otherwise specified). __all__ = ['in_ipython', 'IN_IPYTHON', 'in_colab', 'IN_COLAB', 'in_notebook', 'IN_NOTEBOOK'] from ..imports import * def in_ipython(): "Check if the code is running in the ipython environment (jupyter including)" ...
[ 2, 39371, 7730, 1677, 1137, 11617, 0, 8410, 5626, 48483, 0, 9220, 284, 4370, 25, 1614, 14, 3829, 62, 11295, 2070, 62, 7295, 13, 541, 2047, 65, 357, 25252, 4306, 7368, 737, 198, 198, 834, 439, 834, 796, 37250, 259, 62, 541, 7535, 3...
2.407591
606
import requests import random from hackvt2016.app import create_app from hackvt2016.resource.models import Resource from hackvt2016.category.models import Category def load_seeds(): """ max longitudes and latitudes: Coordinates [5:55] lat: 42.777 - 44.953 long: (-72.632) - (-73.132) lat: 44.452 - 4...
[ 11748, 7007, 198, 11748, 4738, 198, 6738, 8156, 36540, 5304, 13, 1324, 1330, 2251, 62, 1324, 198, 6738, 8156, 36540, 5304, 13, 31092, 13, 27530, 1330, 20857, 198, 6738, 8156, 36540, 5304, 13, 22872, 13, 27530, 1330, 21743, 628, 198, 198...
2.494032
1,927
import subprocess from typing import List, Tuple import vapoursynth as vs from lvsfunc.misc import source from lvsfunc.types import Range from vardautomation import (FSRCNNX_56_16_4_1, JAPANESE, AudioCutter, AudioStream, BasicTool, FileInfo, FlacEncoder, Mux, Pre...
[ 11748, 850, 14681, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 198, 198, 11748, 38187, 454, 28869, 400, 355, 3691, 198, 6738, 300, 14259, 20786, 13, 44374, 1330, 2723, 198, 6738, 300, 14259, 20786, 13, 19199, 1330, 13667, 198, 6738, 4...
2.212121
1,089
from kallikrein import Expectation from kallikrein.matchers.comparison import eq from ribosome.test.klk.expectation import await_k_with from ribosome.nvim.io.compute import NvimIO from ribosome.nvim.api.ui import current_cursor __all__ = ('current_cursor_is',)
[ 6738, 479, 439, 1134, 260, 259, 1330, 23600, 341, 198, 6738, 479, 439, 1134, 260, 259, 13, 6759, 3533, 13, 785, 1845, 1653, 1330, 37430, 198, 198, 6738, 12183, 418, 462, 13, 9288, 13, 41582, 74, 13, 1069, 806, 341, 1330, 25507, 62, ...
2.731959
97
# Your NumMatrix object will be instantiated and called as such: # obj = NumMatrix(matrix) # param_1 = obj.sumRegion(row1,col1,row2,col2)
[ 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628, 198, 2, 3406, 31835, 46912, 2134, 481, 307, 9113, 12931, 290, 1444, 355, 884, 25, 198, 2, 26181, 796, 31835, 46912, 7, 6759, 8609, 8, 198, ...
2.358209
67
import os import numpy as np import pandas as pd from lingam.varma_lingam import VARMALiNGAM def randnetbalanced(dims, samples, indegree, parminmax, errminmax): """ この関数は以前頂いたmatlabのスクリプトを移植したものですのでご確認不要です。 create a more balanced random network Parameter --------- dims : int number o...
[ 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 18459, 321, 13, 85, 10961, 62, 1359, 321, 1330, 569, 33456, 1847, 72, 10503, 2390, 198, 198, 4299, 43720, 3262, 27753, 7, 67,...
2.110856
1,308
from ctypes import * import unittest import comtypes.test comtypes.test.requires("devel") from comtypes import BSTR, IUnknown, GUID, COMMETHOD, HRESULT malloc = POINTER(IMalloc)() oledll.ole32.CoGetMalloc(1, byref(malloc)) assert bool(malloc) c_wchar_p.__ctypes_from_outparam__ = from_outparm ## print comstri...
[ 6738, 269, 19199, 1330, 1635, 198, 11748, 555, 715, 395, 198, 198, 11748, 401, 19199, 13, 9288, 198, 785, 19199, 13, 9288, 13, 47911, 7203, 2934, 626, 4943, 198, 198, 6738, 401, 19199, 1330, 347, 18601, 11, 314, 20035, 11, 19348, 2389...
2.453875
271
# Fit logistic regression models to 3 classs 2d data. import superimport import matplotlib.pyplot as plt import numpy as np from sklearn.preprocessing import PolynomialFeatures from scipy.stats import multivariate_normal as mvn from sklearn.linear_model import LogisticRegression import matplotlib.colors as mcol impo...
[ 198, 2, 25048, 2604, 2569, 20683, 4981, 284, 513, 1398, 82, 362, 67, 1366, 13, 198, 198, 11748, 2208, 11748, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720...
2.366423
685
from rolepermissions.roles import AbstractUserRole
[ 6738, 2597, 525, 8481, 13, 305, 829, 1330, 27741, 12982, 47445, 628, 628, 628, 628, 198 ]
3.6875
16
#!/usr/bin/env python """Pre-schedule DDF sequences """ # pylint: disable=no-member # imports import sys import logging from argparse import ArgumentParser import yaml import numpy as np import pandas as pd import astropy.coordinates import astropy.units as u import lsst.sims.utils # constants # exception classes ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 6719, 12, 15952, 5950, 360, 8068, 16311, 198, 37811, 198, 2, 279, 2645, 600, 25, 15560, 28, 3919, 12, 19522, 198, 198, 2, 17944, 198, 11748, 25064, 198, 11748, 18931, 198, 6738,...
2.358224
4,098
# -*- coding: utf-8 -*- from numpy import * from mab.binningtools import bingrid, binrange import mab.gd.logging as logging logger = logging.getLogger("gd.nbody.gadget")
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 299, 32152, 1330, 1635, 198, 6738, 285, 397, 13, 8800, 768, 31391, 1330, 275, 278, 6058, 11, 9874, 9521, 198, 11748, 285, 397, 13, 21287, 13, 6404, 2667, 355, 18...
2.452055
73
# ------------------------------------------------------------------------------ # CodeHawk Binary Analyzer # Author: Henny Sipma # ------------------------------------------------------------------------------ # The MIT License (MIT) # # Copyright (c) 2021 Aarno Labs LLC # # Permission is hereby granted, free of charg...
[ 2, 16529, 26171, 198, 2, 6127, 39, 19301, 45755, 16213, 9107, 198, 2, 6434, 25, 367, 11870, 311, 541, 2611, 198, 2, 16529, 26171, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 33448, 317, 1501, 78, ...
3.875439
570
#!/usr/bin/env python # coding: utf-8 # In[1]: import pandas as pd import statsmodels.api as sm import numpy as np import matplotlib.pyplot as plt from sklearn.decomposition import PCA from mpl_toolkits.mplot3d import Axes3D import seaborn as sns import os import sys import scipy.stats from scipy.stats.mstats import...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 16, 5974, 628, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 9756, 27530, 13, 15042, 355, 895, 198, 11748, 299, 32152, 355...
1.997583
1,241
import redlab as rl print("-------einzelneWerte-------------------------") print("16BitValue:" + str(rl.cbAIn(0, 0, 1))) print("VoltageValue:" + str(rl.cbVIn(0, 0, 1))) print("-------Messreihe-------------------------") print("Messreihe:" + str(rl.cbAInScan(0, 0, 0, 300, 8000, 1))) print("Messreihe:" + str(rl.cbVInSca...
[ 11748, 2266, 23912, 355, 374, 75, 198, 198, 4798, 7203, 26866, 68, 259, 17396, 710, 54, 263, 660, 22369, 12, 4943, 198, 4798, 7203, 1433, 13128, 11395, 11097, 1343, 965, 7, 45895, 13, 21101, 32, 818, 7, 15, 11, 657, 11, 352, 22305, ...
2.549505
202
import os
[ 11748, 28686, 628 ]
3.666667
3
# -*- coding: utf-8 -*- """DGCCA.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/15L_7jxf0KH81UjAO6waIbQso1nqML0kD # Deep Generalized Cannonical Correlation Analysis Implementaion for 3 views cca-zoo package is used for the implemntaion of gcca ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 35, 38, 4093, 32, 13, 541, 2047, 65, 198, 198, 38062, 4142, 7560, 416, 1623, 4820, 2870, 13, 198, 198, 20556, 2393, 318, 5140, 379, 198, 220, 220, 220, 3740, ...
2.898958
960
import FWCore.ParameterSet.Config as cms #IsolatedPixelTrackCandidateProducer default configuration isolPixelTrackProd = cms.EDProducer("IsolatedPixelTrackCandidateL1TProducer", L1eTauJetsSource = cms.InputTag( 'hltGtStage2Digis','Tau' ), tauAssociationCone = cms.double( 0.0 ), tauUnbi...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 2, 3792, 50027, 40809, 24802, 41572, 20540, 11547, 2189, 4277, 8398, 198, 30152, 40809, 24802, 2964, 67, 220, 220, 220, 796, 269, 907, 13, 1961, 11547, 2189, 7203...
2
508
#!/usr/bin/env python3 #################################################################################################### # # Project: Embedded Learning Library (ELL) # File: procmon.py # Authors: Lisa Ong # # Requires: Python 3.4+, psutil (pip install psutil) # #############################################...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 29113, 29113, 29113, 4242, 198, 2, 198, 2, 220, 4935, 25, 220, 13302, 47238, 18252, 10074, 357, 23304, 8, 198, 2, 220, 9220, 25, 220, 220, 220, 220, 13834, 2144, 13, 9078, 198, ...
3.633205
259
''' Source codes for Python Machine Learning By Example 3rd Edition (Packt Publishing) Chapter 5 Predicting Online Ads Click-through with Logistic Regression Author: Yuxi (Hayden) Liu (yuxi.liu.ece@gmail.com) ''' import tensorflow as tf import pandas as pd n_rows = 300000 df = pd.read_csv("train", nrows=n_rows) X = ...
[ 7061, 6, 198, 7416, 12416, 329, 11361, 10850, 18252, 2750, 17934, 513, 4372, 5061, 357, 11869, 83, 23499, 8, 198, 14126, 642, 49461, 278, 7467, 47442, 6914, 12, 9579, 351, 5972, 2569, 3310, 2234, 198, 13838, 25, 575, 2821, 72, 357, 31...
2.432357
717
""" 辅助函数 """ from cswd.common.utils import ensure_list from .core import symbols, to_tdates def select_output_by(output, start=None, end=None, assets=None): """ 按时间及代码选择`pipeline`输出数据框 专用于研究环境下的run_pipeline输出结果分析 参数 ---- output : MultiIndex DataFrame pipeline输出结果 start : str...
[ 37811, 198, 164, 122, 227, 27950, 102, 49035, 121, 46763, 108, 198, 37811, 198, 6738, 269, 2032, 67, 13, 11321, 13, 26791, 1330, 4155, 62, 4868, 198, 198, 6738, 764, 7295, 1330, 14354, 11, 284, 62, 8671, 689, 628, 198, 4299, 2922, 6...
1.510328
823
from typing import Callable, Dict, Any import numpy as np from . import _abstract from ...ops.reshape import aligned_with
[ 6738, 19720, 1330, 4889, 540, 11, 360, 713, 11, 4377, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 764, 1330, 4808, 397, 8709, 198, 198, 6738, 2644, 2840, 13, 3447, 1758, 1330, 19874, 62, 4480, 628, 628 ]
3.282051
39
#!/usr/bin/python from Qt import QtCore, QtWidgets from .stylesheet import STYLE_QMENU # disable for issue #142 # def hideEvent(self, event): # super(BaseMenu, self).hideEvent(event) # for a in self.actions(): # if hasattr(a, 'node_id'): # a.node_id = None
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 6738, 33734, 1330, 33734, 14055, 11, 33734, 54, 312, 11407, 198, 6738, 764, 47720, 25473, 1330, 3563, 56, 2538, 62, 48, 49275, 52, 628, 198, 220, 220, 220, 1303, 15560, 329, 2071, 1303, 23726...
2.188811
143
''' Created on Aug 29 2015 @author: kevin.chien@94301.ca ''' # server info status code OK = FlamesStatus(0, 'common.ok', 'OK.') # server error status code UNEXPECTED_EXCEPTION = FlamesStatus(1000001, 'common.unexpected_exception', 'Unknown Error.') UNKNOWN_RESOURCE = FlamesStatus(1000002, 'common.unknown_res...
[ 7061, 6, 198, 41972, 319, 2447, 2808, 1853, 198, 198, 31, 9800, 25, 885, 7114, 13, 354, 2013, 31, 24, 3559, 486, 13, 6888, 198, 7061, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 2, 4382, 7508, 3722, 2438, 198, 11380, 79...
2.631579
342
import pytest import torch import tempfile import shutil import os from tests.material import utils import padl from padl import transform, identity, batch from padl_ext.pytorch_lightning.prepare import LightningModule try: import pytorch_lightning as pl from pytorch_lightning.callbacks import ModelCheckpoin...
[ 11748, 12972, 9288, 198, 11748, 28034, 198, 11748, 20218, 7753, 198, 11748, 4423, 346, 198, 11748, 28686, 198, 198, 6738, 5254, 13, 33665, 1330, 3384, 4487, 198, 198, 11748, 14841, 75, 198, 6738, 14841, 75, 1330, 6121, 11, 5369, 11, 154...
3.010471
191
# coding: utf-8 from __future__ import print_function import sys import os import datetime import pprint try: from pyAnaf.api import Anaf except: sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from pyAnaf.api import Anaf if __name__ == '__main__': main()
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 4818, 8079, 198, 11748, 279, 4798, 628, 198, 28311, 25, 198, 220, 220, 220, 422, 12972, 2025, ...
2.516129
124
import pandas as pd df = pd.read_csv('/Users/student/Dropbox/PhD/2019 Summer/Dissertation_v7/Colombia/Stations_Selected_Colombia_RT.csv') IDs = df['Codigo'].tolist() COMIDs = df['COMID'].tolist() Names = df['Nombre'].tolist() Rivers = df['Corriente'].tolist() '''Get Historical Observed Water Levels''' observed_wl_d...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, 10786, 14, 14490, 14, 50139, 14, 26932, 3524, 14, 2725, 35, 14, 23344, 10216, 14, 35, 747, 42245, 62, 85, 22, 14, 5216, 2381, 544, 14, 1273, 602, ...
2.580363
1,487
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None
[ 2, 30396, 329, 257, 13934, 5509, 10139, 13, 198, 2, 1398, 12200, 19667, 25, 198, 2, 220, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 2124, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2100, 796, 2124, 1...
2.175676
74
import random import time import numpy as np import os import difflib import torch from utils.structure import Example, Batch, Patch, lists2tensor, Token, BIO from utils.tokenizer import Tokenizer from typing import List, Union from tqdm import tqdm from collections import Counter import Levenshtein import math import ...
[ 11748, 4738, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 814, 8019, 198, 11748, 28034, 198, 6738, 3384, 4487, 13, 301, 5620, 1330, 17934, 11, 347, 963, 11, 17106, 11, 8341, 17, 83, 22854, 11, 29...
3.651685
89
from main_dir.drawing.background_loads import BackgroundLoads """getting the screen and setting background """ class BackGround: """taking the image""" view_background = BackgroundLoads().load_and_move() def redraw_game_window(self, screen): """setting background in the screen at position x y""...
[ 6738, 1388, 62, 15908, 13, 19334, 278, 13, 25249, 62, 46030, 1330, 25353, 8912, 82, 198, 198, 37811, 37210, 262, 3159, 290, 4634, 4469, 220, 37227, 628, 198, 4871, 5157, 35539, 25, 198, 220, 220, 220, 37227, 26103, 262, 2939, 37811, 1...
3.12605
119
# yellowbrick.utils.decorators # Decorators and descriptors for annotating yellowbrick library functions. # # Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> # Created: Thu May 18 15:13:33 2017 -0400 # # Copyright (C) 2017 District Data Labs # For license information, see LICENSE.txt # # ID: decorators.py...
[ 2, 7872, 1671, 624, 13, 26791, 13, 12501, 273, 2024, 198, 2, 4280, 273, 2024, 290, 12145, 669, 329, 24708, 803, 7872, 1671, 624, 5888, 5499, 13, 198, 2, 198, 2, 6434, 25, 220, 220, 14533, 14964, 3319, 1279, 11848, 1516, 3319, 31, ...
3.229898
883
import argparse from werkzeug.security import generate_password_hash import secrets import string from modules.Auth.auth import auth from modules.Auth.user_db import UserDatabase from app import app main()
[ 11748, 1822, 29572, 198, 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 7716, 62, 28712, 62, 17831, 198, 11748, 13141, 198, 11748, 4731, 198, 198, 6738, 13103, 13, 30515, 13, 18439, 1330, 6284, 198, 6738, 13103, 13, 30515, 13, 7220, 62, ...
3.781818
55
# """ # This file is part of Happypanda. # Happypanda is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # any later version. # Happypanda is distributed in the hope that it wi...
[ 2, 37227, 198, 2, 770, 2393, 318, 636, 286, 18321, 4464, 5282, 13, 198, 2, 18321, 4464, 5282, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 2, 340, 739, 262, 2846, 286, 262, 22961, 3611, 5094, 13789, 3...
2.322592
2,855
#coding:utf-8 portList=(8888,8889)#本服务器监听端口 import tornado.ioloop import tornado.web import numpy as np from time import sleep #import shutil #import os from random import random from io import BytesIO from PIL import Image from base64 import b64decode import utils model = utils.loadmodel('Model.json', ...
[ 171, 119, 123, 2, 66, 7656, 25, 40477, 12, 23, 201, 198, 634, 8053, 16193, 3459, 3459, 11, 3459, 4531, 8, 2, 17312, 105, 17312, 235, 27950, 94, 161, 247, 101, 33566, 239, 28938, 105, 44165, 107, 20998, 96, 201, 198, 201, 198, 1174...
2
498
# -*- coding: utf-8 -*- # @Time : 2020/11/21 上午11:27 # @Author : 司云中 # @File : base_api.py # @Software: Pycharm """ 通用API共享函数 """ from rest_framework import status from rest_framework.response import Response from rest_framework.generics import GenericAPIView from Emall.exceptions import SqlServerError from Emall.re...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 1058, 12131, 14, 1157, 14, 2481, 220, 41468, 39355, 230, 1157, 25, 1983, 198, 2, 2488, 13838, 1058, 10263, 237, 116, 12859, 239, 40792, 198, 2, 248...
2.132984
955
""" MIT License Copyright (c) 2020 GamingGeek 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, dis...
[ 37811, 198, 36393, 13789, 198, 15269, 357, 66, 8, 12131, 14426, 10082, 988, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 286, 428, 3788, 198, 392, 3917, 10314, 3696, 357, 1169, 366...
4.074324
296
# -*- coding: utf-8 -*- # Copyright (C) 2012 Anaconda, Inc # SPDX-License-Identifier: BSD-3-Clause from __future__ import absolute_import, division, print_function, unicode_literals import bz2 import sys, os from collections import defaultdict from contextlib import closing from errno import EACCES, ENODEV, EPERM from...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 34, 8, 2321, 1052, 330, 13533, 11, 3457, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 18, 12, 2601, 682, 198, 6738, 11593, 37443...
2.844327
758
from lxml import etree import logging import random import os import shutil import types, cgi from pylons import config from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from webenmr.model import Projects, Calculations, Jobs, CalculationTipology, U...
[ 6738, 300, 19875, 1330, 2123, 631, 198, 11748, 18931, 198, 11748, 4738, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 3858, 11, 269, 12397, 198, 6738, 279, 2645, 684, 1330, 4566, 198, 6738, 279, 2645, 684, 1330, 2581, 11, 2882, ...
3.219895
191
""" This migration script adds support for storing tags in the context of a dataset in a library """ import logging from sqlalchemy import ( Column, ForeignKey, Integer, MetaData, Table, ) # Need our custom types, but don't import anything else from model from galaxy.model.custom_types import Tri...
[ 37811, 198, 1212, 13472, 4226, 6673, 1104, 329, 23069, 15940, 287, 262, 4732, 286, 257, 27039, 287, 257, 5888, 198, 37811, 198, 198, 11748, 18931, 198, 198, 6738, 44161, 282, 26599, 1330, 357, 198, 220, 220, 220, 29201, 11, 198, 220, ...
2.770449
379
import os from unittest import mock from heliumcli import utils, settings from heliumcli.main import main from tests.helpers.commonhelper import given_config_exists from .helpers import testcase, commonhelper __author__ = "Alex Laird" __copyright__ = "Copyright 2018, Helium Edu" __version__ = "1.6.0"
[ 11748, 28686, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 6738, 43142, 44506, 1330, 3384, 4487, 11, 6460, 198, 6738, 43142, 44506, 13, 12417, 1330, 1388, 198, 6738, 5254, 13, 16794, 364, 13, 11321, 2978, 525, 1330, 1813, 62, 11250,...
3.244681
94
from loguru import logger logger.enable("snapflow") if __name__ == "__main__": test()
[ 6738, 2604, 14717, 1330, 49706, 198, 198, 6404, 1362, 13, 21633, 7203, 45380, 11125, 4943, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1332, 3419, 198 ]
2.685714
35
# Copyright [2018-2020] Peter Krenesky # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
[ 2, 15069, 685, 7908, 12, 42334, 60, 5613, 509, 918, 274, 2584, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262,...
3.583333
264
from rest_framework.routers import DefaultRouter, DynamicRoute, Route class CustomBulkDeleteRouter(DefaultRouter): """ A custom URL router for the Product API that correctly routes DELETE requests with multiple query parameters. """ routes = [ Route( url=r"^{prefix}$", ...
[ 6738, 1334, 62, 30604, 13, 472, 1010, 1330, 15161, 49, 39605, 11, 26977, 43401, 11, 18956, 628, 198, 4871, 8562, 33, 12171, 38727, 49, 39605, 7, 19463, 49, 39605, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 317, 2183, 10289, ...
1.925714
525
#landing page inputs taken as a form input. from django import forms from . import models
[ 2, 1044, 278, 2443, 17311, 2077, 355, 257, 1296, 5128, 13, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 764, 1330, 4981, 628, 197 ]
3.833333
24
from .upgrade_manifest import set_config
[ 6738, 764, 929, 9526, 62, 805, 8409, 1330, 900, 62, 11250, 198 ]
3.416667
12
from django.db import transaction from rest_framework.exceptions import NotFound, PermissionDenied from rest_framework.generics import get_object_or_404 from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.serializers import ModelSerializer from rest_fr...
[ 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 6738, 1334, 62, 30604, 13, 1069, 11755, 1330, 1892, 21077, 11, 2448, 3411, 21306, 798, 198, 6738, 1334, 62, 30604, 13, 8612, 873, 1330, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 1334...
4.091667
120
l = int(input()) operacao = input() matriz = [] soma = 0.0 for x in range(0, 12): linha = [] for y in range(0, 12): linha.append(float(input())) matriz.append(linha) for x in range(0, 12): soma += matriz[x][l] if operacao == 'S': print('{:.1f}'.format(soma)) else: print('{:.1f}'.format(s...
[ 75, 796, 493, 7, 15414, 28955, 198, 3575, 330, 5488, 796, 5128, 3419, 198, 6759, 47847, 796, 17635, 198, 82, 6086, 796, 657, 13, 15, 198, 1640, 2124, 287, 2837, 7, 15, 11, 1105, 2599, 198, 220, 220, 220, 9493, 3099, 796, 17635, 19...
2.05
160
# open Himawari-8 standard format # output data dictionary ready to put in frp_pixel.py # the struction of the dictionary should be like this # ['ir39', 'ir12', 'saa', 'ir11', 'cloudfree', 'lat', # 'ir11rad', 'diff', 'sun_glint', 'ACQTIME', 'vza', # 'vaa', 'lon', 'cmask', 'CMa_TEST', 'pixsize', 'szen', # 'tirradratio',...
[ 2, 1280, 10978, 707, 2743, 12, 23, 3210, 5794, 198, 2, 5072, 1366, 22155, 3492, 284, 1234, 287, 1216, 79, 62, 32515, 13, 9078, 198, 2, 262, 336, 2762, 286, 262, 22155, 815, 307, 588, 428, 198, 2, 37250, 343, 2670, 3256, 705, 343, ...
2.035455
10,069
from django.urls import path,include from rest_framework.routers import DefaultRouter from profiles_api import views router=DefaultRouter() router.register('hello-viewset',views.HelloViewSet,basename='hello-viewset') urlpatterns=[ path('hello-api/',views.HelloApi.as_view()), path('',include(router.urls)) ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 17256, 198, 6738, 1334, 62, 30604, 13, 472, 1010, 1330, 15161, 49, 39605, 198, 6738, 16545, 62, 15042, 1330, 5009, 198, 198, 472, 353, 28, 19463, 49, 39605, 3419, 198, 472, 353, 13, ...
2.917431
109
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ################################################## # Copyright (c) 2019 Zhao Xiang Lim. # Distributed under the Apache License 2.0 (the "License"). # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 29113, 14468, 2235, 198, 2, 15069, 357, 66, 8, 13130, 29436, 45641, 7576, 13, 198, 2, 4307, 6169, 739, 262, ...
3.718894
217
from collections import OrderedDict import pytest from numpy.testing import assert_array_equal from keanu.plots import traceplot from keanu.vartypes import sample_types @pytest.fixture
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 11748, 12972, 9288, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 18747, 62, 40496, 198, 198, 6738, 885, 42357, 13, 489, 1747, 1330, 12854, 29487, 198, 6738, 885, 42357, 13, 85, 4...
3.392857
56
# -*- coding: utf-8 -*- import collections from lexical_analyzer_helpers import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 17268, 198, 198, 6738, 31191, 605, 62, 38200, 9107, 62, 16794, 364, 1330, 1635, 628, 628, 628, 628, 198 ]
2.628571
35
#!/usr/bin/env python3 """ Build everything from source. Handles: 1. Install npm dependencies and build the UI client 2. Build source and binary distributions of the python package. """ import os import shutil import subprocess import sys WEB_CLIENT_DIR = os.path.join( os.path.dirname(__file__), "pytest_commande...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 15580, 2279, 422, 2723, 13, 198, 198, 12885, 829, 25, 198, 16, 13, 15545, 30599, 20086, 290, 1382, 262, 12454, 5456, 198, 17, 13, 10934, 2723, 290, 13934, 24570, 286, ...
2.992126
127
from src.util.ints import uint32, uint64 def calculate_block_reward(height: uint32) -> uint64: """ Returns the coinbase reward at a certain block height. 1 Chia coin = 16,000,000,000,000 = 16 trillion mojo. """ return uint64(14000000000000) def calculate_base_fee(height: uint32) -> uint64: "...
[ 6738, 12351, 13, 22602, 13, 29503, 1330, 20398, 2624, 11, 20398, 2414, 628, 198, 4299, 15284, 62, 9967, 62, 260, 904, 7, 17015, 25, 20398, 2624, 8, 4613, 20398, 2414, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16409, 262, 10...
2.890244
164
# -*- coding: utf-8 -*- from __future__ import absolute_import from dp_tornado.engine.helper import Helper as dpHelper from Crypto.Cipher import AES
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 288, 79, 62, 45910, 4533, 13, 18392, 13, 2978, 525, 1330, 5053, 525, 355, 288, 79, 47429, 198, 6738, 36...
2.980392
51
import numpy as np import matplotlib import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import matplotlib.cm from scipy.signal.windows import gaussian import sklearn.metrics from DataSet import createDataSetFromFile from Utils import getProjectPath from Evaluation import getSpecificCol...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 13, 1891, 2412, 13, 1891, 437, 62, 12315, 1330, 350, 7568, 47798, 198, 11748, 2603...
2.796875
192
# Python Object Oriented Programming by Joe Marini course example # implementing default values in data classes # Default Values always have to come first - i.e. before non-default values. from dataclasses import dataclass, field import random @dataclass b1 = Book("War and Peace", "Leo Tolstoy", 1225) b2 = Book("T...
[ 2, 11361, 9515, 17954, 4714, 30297, 416, 5689, 1526, 5362, 1781, 1672, 198, 2, 15427, 4277, 3815, 287, 1366, 6097, 198, 2, 15161, 27068, 1464, 423, 284, 1282, 717, 532, 1312, 13, 68, 13, 878, 1729, 12, 12286, 3815, 13, 220, 198, 198...
3.310345
116
import os import sys import logging from telegram.ext import MessageHandler from telegram.ext import CommandHandler from telegram.ext import Filters from telegram.ext import BaseFilter from telegram.ext.dispatcher import run_async from picture import Picture logger = logging.getLogger(__name__) BASE_F...
[ 11748, 28686, 201, 198, 11748, 25064, 201, 198, 11748, 18931, 201, 198, 201, 198, 6738, 573, 30536, 13, 2302, 1330, 16000, 25060, 201, 198, 6738, 573, 30536, 13, 2302, 1330, 9455, 25060, 201, 198, 6738, 573, 30536, 13, 2302, 1330, 7066,...
2.627551
196
import numpy as np """Observations module class. Dependencies: numpy scipy """ class Observations(object): """Observations class. Parameters: ---------- observatory : string Observatory for tiles ('apo' or 'lco'; default 'apo') Attributes: ---------- nobservations : np.int...
[ 11748, 299, 32152, 355, 45941, 198, 198, 37811, 31310, 712, 602, 8265, 1398, 13, 198, 198, 35, 2690, 3976, 25, 628, 299, 32152, 198, 629, 541, 88, 198, 198, 37811, 628, 198, 4871, 19243, 602, 7, 15252, 2599, 198, 220, 220, 220, 3722...
2.206284
732
from typing import Callable, Literal, Tuple from PyQt5.QtWidgets import QApplication, QComboBox, QWidget from PyQt5.QtGui import QPixmap from gui import Gui from logic.luigi_sacco import luigi_sacco_encrypt, luigi_sacco_decrypt, confirm_text_in_correct_lang, format_key_and_input_text from logic.route_encryption imp...
[ 6738, 19720, 1330, 4889, 540, 11, 25659, 1691, 11, 309, 29291, 198, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 11, 1195, 5377, 2127, 14253, 11, 1195, 38300, 198, 6738, 9485, 48, 83, 20, 13, 48, 83,...
2.678767
5,124
""" this program kills humans """ import sys import time import random import builtins import termcolor PRINT_SPEED = 0.005 DEBUG_MODE = False class human: """ a human exists... to die """ def checkWound(self): """ checks if a human is wounded """ dmg = random.randint(1, 4) print("{...
[ 37811, 428, 1430, 12847, 5384, 37227, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 4738, 198, 11748, 3170, 1040, 198, 11748, 3381, 8043, 198, 198, 4805, 12394, 62, 4303, 41841, 796, 657, 13, 22544, 198, 30531, 62, 49058, 796, 10352, ...
2.25383
2,415
from Tools.NumericalTextInput import NumericalTextInput from Screens.VirtualKeyBoard import VirtualKeyBoard from Components.ActionMap import NumberActionMap
[ 6738, 20003, 13, 45, 6975, 605, 8206, 20560, 1330, 399, 6975, 605, 8206, 20560, 198, 6738, 1446, 5681, 13, 37725, 9218, 29828, 1330, 15595, 9218, 29828, 198, 6738, 36109, 13, 12502, 13912, 1330, 7913, 12502, 13912, 628 ]
4.27027
37
from Bio.PDB.PDBParser import PDBParser from Bio.PDB.PDBIO import PDBIO import numpy as np import shutil f = open("log.txt", "a") parser = PDBParser(PERMISSIVE=1) structure_id = "3rgk" filename = "../1-1-build/MYO_HEME_MUT.pdb" structure = parser.get_structure(structure_id, filename) atoms = structure.get_atoms() lis...
[ 6738, 16024, 13, 5760, 33, 13, 5760, 20866, 28198, 1330, 350, 11012, 46677, 198, 6738, 16024, 13, 5760, 33, 13, 5760, 3483, 46, 1330, 14340, 3483, 46, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4423, 346, 198, 198, 69, 796, 1280,...
1.788976
3,592
"""A set of utility functions """ from collections import OrderedDict import pkgutil from typing import Dict, Tuple import numpy as np # type: ignore import scipy as sp # type: ignore from scipy import stats from typing import List from .util_funcs import (avail_approaches, read_param_file, _check_bounds, _check_g...
[ 37811, 32, 900, 286, 10361, 5499, 198, 198, 37811, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 279, 10025, 22602, 198, 6738, 19720, 1330, 360, 713, 11, 309, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 220, 1303, 2099, ...
2.412651
4,047
# -*- coding: utf-8 -*- import json import re import subprocess import sys import time from requests_oauthlib import OAuth1Session # 取得したConsumer Key等と置き換えてください CK = 'consumer_key' CS = 'consumer_secret' AT = 'access_token' AS = 'access_token_secret' FILTER_URL = 'https://stream.twitter.com/1.1/statuses/filter.json'...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 640, 198, 6738, 7007, 62, 12162, 1071, 8019, 1330, 440, 30515, 16, 36044, 198, ...
2.062176
193
# # PySNMP MIB module ASCEND-MIBTRANSACTION-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ASCEND-MIBTRANSACTION-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:12:43 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3....
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 25400, 10619, 12, 8895, 33, 5446, 15037, 44710, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, ...
3.03775
2,649
#! /usr/bin/env python from __future__ import division from scipy.integrate import ode import numpy as np import matplotlib.pyplot as plt from solution import SIR #, SIRS, SIS from scikits import bvp_solver # Example() # Exercise1() # Exercise2() # Exercise2a() # Exercise2b() Exercise3() # Exercise4()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 629, 541, 88, 13, 18908, 4873, 1330, 267, 2934, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 35...
2.79646
113
# Single place version should be set. __version__ = '0.2.2'
[ 2, 14206, 1295, 2196, 815, 307, 900, 13, 220, 198, 834, 9641, 834, 796, 705, 15, 13, 17, 13, 17, 6, 198 ]
2.772727
22
import json from typing import Dict, Any, Sequence from abc import ABC, abstractmethod from typing import List from app.base_types import Image from app.result_types import BaseResult class BaseWrapper(ABC): """ Base class for creating custom wrappers for models based on neural networks """ @abs...
[ 11748, 33918, 198, 6738, 19720, 1330, 360, 713, 11, 4377, 11, 45835, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 198, 6738, 19720, 1330, 7343, 198, 6738, 598, 13, 8692, 62, 19199, 1330, 7412, 198, 6738, 598, 13, 20274, 62, ...
2.460123
489
################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). ...
[ 29113, 29113, 14468, 2, 198, 2, 220, 220, 15069, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.16092
3,741
import mock import pytest from flask_wtf import Form from wtforms.fields.core import Field from wtforms.validators import StopValidation, ValidationError from app.main.forms import AdminEmailAddressValidator, NotInDomainSuffixBlacklistValidator from ..helpers import BaseApplicationTest @mock.patch('app.main.forms.d...
[ 11748, 15290, 198, 11748, 12972, 9288, 198, 6738, 42903, 62, 86, 27110, 1330, 5178, 198, 6738, 266, 83, 23914, 13, 25747, 13, 7295, 1330, 7663, 198, 6738, 266, 83, 23914, 13, 12102, 2024, 1330, 13707, 7762, 24765, 11, 3254, 24765, 12331...
3.484536
97
import jinja2 from jinja2.ext import Extension from django.template.loader import render_to_string from django.utils.safestring import mark_safe from .models import SendinBlueSettings @jinja2.contextfunction settings = SendinBlueExtension
[ 11748, 474, 259, 6592, 17, 198, 6738, 474, 259, 6592, 17, 13, 2302, 1330, 27995, 198, 198, 6738, 42625, 14208, 13, 28243, 13, 29356, 1330, 8543, 62, 1462, 62, 8841, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317,...
3.324324
74
import database import os DIRECTORY = "pages/" # helper script to add target contents to db # could be refactored to accept a list of files via shell expansion if __name__ == "__main__": # test script db = database.Database() for path, dirs, files in os.walk(os.path.abspath(DIRECTORY)): for singu...
[ 11748, 6831, 198, 11748, 28686, 198, 198, 17931, 23988, 15513, 796, 366, 31126, 30487, 198, 198, 2, 31904, 4226, 284, 751, 2496, 10154, 284, 20613, 198, 2, 714, 307, 1006, 529, 1850, 284, 2453, 257, 1351, 286, 3696, 2884, 7582, 7118, ...
2.379464
224
if __name__ == '__main__': main()
[ 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.166667
18
import os import glob import sys from ansibleflow import log from ansibleflow.config import get_config from ansibleflow.venv import execute_under_env, env_exists
[ 11748, 28686, 198, 11748, 15095, 198, 11748, 25064, 198, 198, 6738, 9093, 856, 11125, 1330, 2604, 198, 6738, 9093, 856, 11125, 13, 11250, 1330, 651, 62, 11250, 198, 6738, 9093, 856, 11125, 13, 574, 85, 1330, 12260, 62, 4625, 62, 24330, ...
3.428571
49
from SciDataTool.Functions.Plot.plot_2D import plot_2D from SciDataTool.Functions.Plot import ( unit_dict, norm_dict, axes_dict, COLORS, ) from SciDataTool.Functions.Load.import_class import import_class from SciDataTool.Classes.Norm_indices import Norm_indices from numpy import ( squeeze, split...
[ 6738, 10286, 6601, 25391, 13, 24629, 2733, 13, 43328, 13, 29487, 62, 17, 35, 1330, 7110, 62, 17, 35, 198, 6738, 10286, 6601, 25391, 13, 24629, 2733, 13, 43328, 1330, 357, 198, 220, 220, 220, 4326, 62, 11600, 11, 198, 220, 220, 220, ...
1.809258
11,471
#!/usr/bin/python3 import json import falcon from database import Database
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 33918, 198, 11748, 24215, 1102, 198, 6738, 6831, 1330, 24047, 198 ]
3.454545
22
from .utils import get_X_y, evaluate_binary_classifier, load_img, ColumnSelector try: from inspect import signature except ImportError: from funcsigs import signature __all__ = [ 'get_X_y', 'evaluate_binary_classifier', 'load_img', 'ColumnSelector', 'signature' ]
[ 6738, 764, 26791, 1330, 651, 62, 55, 62, 88, 11, 13446, 62, 39491, 62, 4871, 7483, 11, 3440, 62, 9600, 11, 29201, 17563, 273, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 10104, 1330, 9877, 198, 16341, 17267, 12331, 25, 198, 220, ...
2.672727
110
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 24893, 1087, 318, 10607, 284, 1104, 262, 1280, 2723, 2055, 416, 1642, 5525, 241, 251, 165, 110, 116, 162, 247, 118, 12859, 239, 47, 7252, 50, 33176, 111, 2...
3.665
200
import re s = "is this a string?!" print("The original string is : " + s) res = re.sub(r'[^\w\s]', '', s) #remove any char that is not a word, space, or tab using regex print("The string after removing punctuation is: " + res)
[ 11748, 302, 198, 198, 82, 796, 366, 271, 428, 257, 4731, 30823, 198, 198, 4798, 7203, 464, 2656, 4731, 318, 1058, 366, 1343, 264, 8, 198, 198, 411, 796, 302, 13, 7266, 7, 81, 6, 58, 61, 59, 86, 59, 82, 60, 3256, 705, 3256, 264...
2.8875
80
class IllegalCarError(Exception): """Raised when the attributes of Car class are wrong""" pass
[ 4871, 42272, 9914, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 21762, 1417, 618, 262, 12608, 286, 1879, 1398, 389, 2642, 37811, 198, 220, 220, 220, 1208, 628 ]
3.586207
29
import os from peewee import * from NavigationDB.Premise.PremiseDB import Premise os.chdir('../../..') PremiseRemove() PremiseAdd()
[ 11748, 28686, 198, 6738, 613, 413, 1453, 1330, 1635, 198, 6738, 42115, 11012, 13, 24914, 786, 13, 24914, 786, 11012, 1330, 6929, 786, 628, 198, 198, 418, 13, 354, 15908, 10786, 40720, 40720, 492, 11537, 198, 24914, 786, 27914, 3419, 198...
2.977778
45
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making GameAISDK available. This source code file is licensed under the GNU General Public License Version 3. For full details, please refer to the file "LICENSE.txt" which is provided as part of this source code package. Copyright...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 24893, 1087, 318, 10607, 284, 1104, 262, 1280, 2723, 2055, 416, 1642, 3776, 32, 1797, 48510, 1695, 13, 198, 198, 1212, 2723, 2438, 2393, 318, 11971, 739, 262...
3.660256
156
# -*- coding: utf-8 -*- """ Created on Thu May 9 10:29:45 2019 @author: DiPu """ from collections import OrderedDict od=OrderedDict() while True: user_inp = input("Enter Product: ") if user_inp == "": break user_inp = user_inp.split() key = " ".join(user_inp[:-1]) value = int(user_inp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 1737, 220, 860, 838, 25, 1959, 25, 2231, 13130, 198, 198, 31, 9800, 25, 6031, 47, 84, 198, 37811, 198, 6738, 17268, 1330, 14230, 1068, 3...
1.988848
269
# Copyright 2013, Big Switch Networks # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
[ 2, 15069, 2211, 11, 4403, 14645, 27862, 198, 2, 1439, 6923, 33876, 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, ...
3.43128
211
### soma de números print('Iremos somar números ímpares que são múltiplos de 3') s = 0 p = 0 for c in range(1,501,2): print(c, end=' ') if c%3==0: p = p + 1 s = s + c print('\nA soma de todos os números ímpares que são múltiplos de 3 é {}.\n O total de números múltiplos é {}.'.format(s, p))
[ 21017, 3870, 64, 390, 299, 21356, 647, 418, 198, 4798, 10786, 40, 2787, 418, 3870, 283, 299, 21356, 647, 418, 6184, 255, 3149, 3565, 8358, 264, 28749, 285, 21356, 2528, 24705, 418, 390, 513, 11537, 198, 82, 796, 657, 198, 79, 796, 6...
1.956522
161
import os import pprint import re import sys import time import paramiko from scp import SCPClient import functest.utils.functest_utils as ft_utils import functest.utils.openstack_utils as os_utils FUNCTEST_REPO = ft_utils.FUNCTEST_REPO NAME_VM_1 = ft_utils.get_functest_config('vping.vm_name_1') NAME_VM_2 = ft_utils...
[ 11748, 28686, 198, 11748, 279, 4798, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 640, 198, 198, 11748, 5772, 12125, 198, 6738, 629, 79, 1330, 17527, 11792, 198, 198, 11748, 1257, 310, 395, 13, 26791, 13, 12543, 310, 395, 62, 26791, ...
2.432792
677
from spikelearn.data import io, select, to_feature_array, SHORTCUTS from spikelearn.models.shuffle_decoding import shuffle_cross_predict from catboost import CatBoostClassifier from sklearn.linear_model import BayesianRidgeRegression import pickle allres = {} for rat, dset in product(SHORTCUTS['group']['eletro'], DSE...
[ 6738, 20240, 35720, 13, 7890, 1330, 33245, 11, 2922, 11, 284, 62, 30053, 62, 18747, 11, 6006, 1581, 4825, 3843, 50, 198, 6738, 20240, 35720, 13, 27530, 13, 1477, 18137, 62, 12501, 7656, 1330, 220, 36273, 62, 19692, 62, 79, 17407, 198,...
2.517808
365
from decimal import Decimal from .. import logic from ..portfolio import VirtualAccount # class Calculator: # def __init__(self, allocated_margin: Decimal): # self.margin = allocated_margin # def calc_amount_and_round_by_unit(self, real_price: Decimal, min_unit: Decimal): # return logic.calc_...
[ 6738, 32465, 1330, 4280, 4402, 198, 198, 6738, 11485, 1330, 9156, 198, 6738, 11485, 634, 13652, 1330, 15595, 30116, 198, 198, 2, 1398, 43597, 25, 198, 2, 220, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 19171, 62, 36153, 25, ...
2.313043
345
"""A multi-thread tool to crop large images to sub-images for faster IO.""" import os import os.path as osp import sys from multiprocessing import Pool import numpy as np import cv2 from PIL import Image sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__)))) from utils.util import ProgressBar # noqa: E402 im...
[ 37811, 32, 5021, 12, 16663, 2891, 284, 13833, 1588, 4263, 284, 850, 12, 17566, 329, 5443, 24418, 526, 15931, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 25064, 198, 6738, 18540, 305, 919, 278, 1330, 19850...
2.942029
138
import torch as T import torch import torch.nn.functional as F import numpy as np import tqdm import random import sys, os from matplotlib import pyplot as plt from sympy.combinatorics.graycode import GrayCode import time import ipdb from torch.autograd import Variable, Function def pairwise_distances(x, y=No...
[ 11748, 28034, 355, 309, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 256, 80, 36020, 198, 11748, 4738, 198, 11748, 25064, 11, 28686, 198, 6738, 2603, 29487, 8...
2.229474
475