content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
""" create_ucs_sp_template.py Purpose: UCS Manager Create a UCS Service Profile Template Author: John McDonough (jomcdono@cisco.com) github: (@movinalot) Cisco Systems, Inc. """ from ucsmsdk.ucshandle import UcsHandle from ucsmsdk.mometa.ls.LsServer import LsServer from ucsmsdk.mometa.org.OrgOrg import Or...
[ 37811, 198, 17953, 62, 1229, 82, 62, 2777, 62, 28243, 13, 9078, 198, 198, 30026, 3455, 25, 198, 220, 220, 220, 49553, 9142, 13610, 257, 49553, 4809, 13118, 37350, 198, 13838, 25, 198, 220, 220, 220, 1757, 1982, 3987, 619, 357, 73, 2...
2.236842
342
# coding=utf-8 """ Handles EPAB's config file """ import logging import pathlib import elib_config CHANGELOG_DISABLE = elib_config.ConfigValueBool( 'changelog', 'disable', description='Disable changelog building', default=False ) CHANGELOG_FILE_PATH = elib_config.ConfigValuePath( 'changelog', 'file_path', de...
[ 2, 19617, 28, 40477, 12, 23, 198, 37811, 198, 12885, 829, 10193, 33, 338, 4566, 2393, 198, 37811, 198, 198, 11748, 18931, 198, 11748, 3108, 8019, 198, 198, 11748, 1288, 571, 62, 11250, 198, 198, 3398, 15567, 3698, 7730, 62, 26288, 175...
2.742151
1,497
import os import argparse if __name__ == '__main__': create_flask_app()
[ 11748, 28686, 198, 11748, 1822, 29572, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 197, 17953, 62, 2704, 2093, 62, 1324, 3419, 198 ]
2.642857
28
import os import click from flask import Flask from flask.cli import with_appcontext from flask_sqlalchemy import SQLAlchemy __version__ = (1, 0, 0, "dev") db = SQLAlchemy() def create_app(test_config=None): """Create and configure an instance of the Flask application.""" app = Flask(__name__, instance_rel...
[ 11748, 28686, 198, 198, 11748, 3904, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 13, 44506, 1330, 351, 62, 1324, 22866, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 198, 834, 9641, 834, 796, 357, 16, 11, ...
2.623568
611
import os, sys fn = sys.argv[1] if os.system('python compile.py %s __tmp.S' % fn) == 0: os.system('python asm.py __tmp.S %s' % fn[:-2])
[ 11748, 28686, 11, 25064, 198, 198, 22184, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 198, 361, 28686, 13, 10057, 10786, 29412, 17632, 13, 9078, 4064, 82, 11593, 22065, 13, 50, 6, 4064, 24714, 8, 6624, 657, 25, 198, 220, 220, 220, 2...
2.151515
66
#!/usr/bin/env python # coding: UTF-8 # # @package Actor # @author Ariadne Pinheiro # @date 26/08/2020 # # Actor class, which is the base class for Disease objects. # ##
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 41002, 12, 23, 198, 2, 198, 2, 2488, 26495, 27274, 198, 2, 2488, 9800, 6069, 324, 710, 13727, 258, 7058, 198, 2, 2488, 4475, 2608, 14, 2919, 14, 42334, 198, 2, 198, ...
2.741935
62
"""Convert a Decimal Number to a Binary Number.""" def decimal_to_binary(num: int) -> str: """ Convert a Integer Decimal Number to a Binary Number as str. >>> decimal_to_binary(0) '0b0' >>> decimal_to_binary(2) '0b10' >>> decimal_to_binary(7) '0b111' ...
[ 37811, 3103, 1851, 257, 4280, 4402, 7913, 284, 257, 45755, 7913, 526, 15931, 628, 198, 4299, 32465, 62, 1462, 62, 39491, 7, 22510, 25, 493, 8, 4613, 965, 25, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 38240, ...
2.276276
666
#!/usr/bin/python3 #-*- coding: utf-8 -*- import urllib.parse import json import base64 import requests import logging
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 12, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 2956, 297, 571, 13, 29572, 198, 11748, 33918, 198, 11748, 2779, 2414, 198, 11748, 7007, 198, 11748, 18931, 198 ...
2.727273
44
import libcst as cst import libcst.matchers as m from fixit import CstLintRule from fixit import InvalidTestCase as Invalid from fixit import ValidTestCase as Valid
[ 11748, 9195, 66, 301, 355, 269, 301, 198, 11748, 9195, 66, 301, 13, 6759, 3533, 355, 285, 198, 6738, 4259, 270, 1330, 327, 301, 43, 600, 31929, 198, 6738, 4259, 270, 1330, 17665, 14402, 20448, 355, 17665, 198, 6738, 4259, 270, 1330, ...
3.458333
48
# AUTOGENERATED! DO NOT EDIT! File to edit: source_nbs/13_model_fn.ipynb (unless otherwise specified). __all__ = ['variable_summaries', 'filter_loss', 'BertMultiTaskBody', 'BertMultiTaskTop', 'BertMultiTask'] # Cell from typing import Dict, Tuple from inspect import signature import tensorflow as tf import transform...
[ 2, 47044, 7730, 1677, 1137, 11617, 0, 8410, 5626, 48483, 0, 9220, 284, 4370, 25, 2723, 62, 77, 1443, 14, 1485, 62, 19849, 62, 22184, 13, 541, 2047, 65, 357, 25252, 4306, 7368, 737, 198, 198, 834, 439, 834, 796, 37250, 45286, 62, 8...
2.437262
526
import os import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import math from datetime import datetime from matplotlib.colors import ListedColormap, BoundaryNorm from matplotlib.collections import LineCollection from matplotlib import cm from SiMon.simulation import Simulation f...
[ 11748, 28686, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 6738, 4818,...
3.565217
115
""" Particle Size Models: Pure Oil Jet =================================== Use the ``TAMOC`` `particle_size_models` module to simulate a laboratory scale pure oil jet into water. This script demonstrates the typical steps involved in using the `particle_size_models.PureJet` object, which requires specification of all...
[ 37811, 198, 7841, 1548, 12849, 32329, 25, 220, 17129, 11474, 19013, 198, 10052, 18604, 198, 198, 11041, 262, 7559, 51, 2390, 4503, 15506, 4600, 3911, 1548, 62, 7857, 62, 27530, 63, 8265, 284, 29308, 257, 14010, 198, 9888, 5899, 3056, 12...
2.732644
1,354
import os.path import tron.Misc from tron import g, hub from tron.Hub.Command.Encoders.ASCIICmdEncoder import ASCIICmdEncoder from tron.Hub.Nub.SocketActorNub import SocketActorNub from tron.Hub.Reply.Decoders.ASCIIReplyDecoder import ASCIIReplyDecoder name = 'hal'
[ 11748, 28686, 13, 6978, 198, 198, 11748, 491, 261, 13, 44, 2304, 198, 6738, 491, 261, 1330, 308, 11, 12575, 198, 6738, 491, 261, 13, 16066, 13, 21575, 13, 4834, 19815, 364, 13, 1921, 25690, 2149, 9132, 27195, 12342, 1330, 25400, 40, ...
2.793814
97
from dataclasses import dataclass, field from decimal import Decimal from typing import Optional from xsdata.models.datatype import XmlDate
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 32465, 1330, 4280, 4402, 198, 6738, 19720, 1330, 32233, 198, 6738, 2124, 82, 7890, 13, 27530, 13, 19608, 265, 2981, 1330, 1395, 4029, 10430, 628, 628 ]
3.763158
38
# coding: utf-8 # # Copyright 2014 The Oppia Authors. 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 requi...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 15069, 1946, 383, 9385, 544, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743...
3.771845
206
#!/usr/bin/python # Copyright (c) 2020, 2022 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 15069, 357, 66, 8, 12131, 11, 33160, 18650, 290, 14, 273, 663, 29116, 13, 198, 2, 770, 3788, 318, 925, 1695, 284, 345, 739, 262, 2846, 286, 262, 38644, 513, 13, 15, 5964, 393, 262, 2...
2.363518
2,308
"""https://en.cppreference.com/w/c/io """ from rbc import irutils from llvmlite import ir from rbc.targetinfo import TargetInfo from numba.core import cgutils, extending from numba.core import types as nb_types from rbc.errors import NumbaTypeError # some errors are available for Numba >= 0.55 int32_t = ir.IntType(3...
[ 37811, 5450, 1378, 268, 13, 20322, 35790, 13, 785, 14, 86, 14, 66, 14, 952, 198, 37811, 198, 198, 6738, 374, 15630, 1330, 4173, 26791, 198, 6738, 32660, 85, 4029, 578, 1330, 4173, 198, 6738, 374, 15630, 13, 16793, 10951, 1330, 12744, ...
2.963636
110
from setuptools import setup try: import pypandoc long_description = pypandoc.convert_file('README.md', 'rst', extra_args=()) except ImportError: import codecs long_description = codecs.open('README.md', encoding='utf-8').read() long_description = '\n'.join(long_description.splitlines()) setup( n...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 279, 4464, 392, 420, 198, 220, 220, 220, 890, 62, 11213, 796, 279, 4464, 392, 420, 13, 1102, 1851, 62, 7753, 10786, 15675, 11682, 13, 9132, 3256, 70...
2.663978
372
# The MIT License (MIT) # # Copyright (c) 2015 braindead # # 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, modif...
[ 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 220, 198, 2, 15069, 357, 66, 8, 1853, 3632, 25124, 198, 2, 220, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788...
2.489897
2,029
# This file is part of Viper - https://github.com/viper-framework/viper # See the file 'LICENSE' for copying permission. import time import datetime from lib.common.out import * from lib.common.objects import File from lib.core.database import Database from lib.core.investigation import __project__ __sessions__ =...
[ 2, 770, 2393, 318, 636, 286, 34517, 532, 3740, 1378, 12567, 13, 785, 14, 8903, 525, 12, 30604, 14, 8903, 525, 198, 2, 4091, 262, 2393, 705, 43, 2149, 24290, 6, 329, 23345, 7170, 13, 198, 198, 11748, 640, 198, 11748, 4818, 8079, 19...
3.531915
94
#coding: utf-8 import xlrd from simple_report.core.document_wrap import BaseDocument, SpreadsheetDocument from simple_report.xls.workbook import Workbook from simple_report.xls.output_options import XSL_OUTPUT_SETTINGS
[ 2, 66, 7656, 25, 3384, 69, 12, 23, 201, 198, 201, 198, 11748, 2124, 75, 4372, 201, 198, 201, 198, 6738, 2829, 62, 13116, 13, 7295, 13, 22897, 62, 37150, 1330, 7308, 24941, 11, 31843, 21760, 24941, 201, 198, 6738, 2829, 62, 13116, ...
2.923077
78
# Copyright 2019 Huawei Technologies Co., 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 agreed to...
[ 2, 15069, 13130, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
3.80756
291
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: cancel_build.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobu...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 14241, 62, 11249, 13, 1676, 1462, 198, 198, 11748, 25064, 198, 62, 65, 2...
2.458227
1,951
''' This is a sample class for a model. You may choose to use it as-is or make any changes to it. This has been provided just to give you an idea of how to structure your model class. ''' from openvino.inference_engine import IENetwork, IECore import numpy as np import os import cv2 import sys
[ 7061, 6, 198, 1212, 318, 257, 6291, 1398, 329, 257, 2746, 13, 921, 743, 3853, 284, 779, 340, 355, 12, 271, 393, 787, 597, 2458, 284, 340, 13, 198, 1212, 468, 587, 2810, 655, 284, 1577, 345, 281, 2126, 286, 703, 284, 4645, 534, 2...
3.418605
86
NAMES_SAML2_PROTOCOL = "urn:oasis:names:tc:SAML:2.0:protocol" NAMES_SAML2_ASSERTION = "urn:oasis:names:tc:SAML:2.0:assertion" NAMEID_FORMAT_UNSPECIFIED = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" BINDINGS_HTTP_POST = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" DATE_TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ" ...
[ 45, 29559, 62, 49302, 43, 17, 62, 4805, 2394, 4503, 3535, 796, 366, 700, 25, 78, 17765, 25, 14933, 25, 23047, 25, 49302, 43, 25, 17, 13, 15, 25, 11235, 4668, 1, 198, 45, 29559, 62, 49302, 43, 17, 62, 10705, 17395, 2849, 796, 366...
1.898477
197
import math for _ in range(int(input())): n=int(input()) flag=0 for i in range(2,n//2+1): if check(i)==True and check(n-i)==True: #print(i,n-i,square(i),square(n-i),"Yes") print("YES") flag=1 break if flag==0: #print(i,n-i,square(i),square(...
[ 11748, 10688, 198, 1640, 4808, 287, 2837, 7, 600, 7, 15414, 28955, 2599, 198, 220, 220, 220, 299, 28, 600, 7, 15414, 28955, 198, 220, 220, 220, 6056, 28, 15, 198, 220, 220, 220, 329, 1312, 287, 2837, 7, 17, 11, 77, 1003, 17, 10,...
1.755
200
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='This repository hosts some work-in-progress experiments applying deep learning to predict age using tractometry data.', author='Joanna Qiao', license='BSD-3', )
[ 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 10677, 3256, 198, 220, 220, 220, 10392, 28, 19796, 62, 43789, 22784, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 13, 15,...
3.210526
95
#!/usr/bin/env python3 import argparse import os import random import requests import sys import tempfile import uuid from libs import colorprint from libs.cli import run_command SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__)) # assume well-known lvm volume group on host # ...later we'll figure out how to ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 7007, 198, 11748, 25064, 198, 11748, 20218, 7753, 198, 11748, 334, 27112, 198, 198, 6738, 9195, 82, 1330, 31...
2.068192
2,141
"""Criar uma funo que retorne min e max de uma sequncia numrica aleatria. S pode usar if, comparaes, recurso e funes que sejam de sua autoria. Se quiser usar laos tambm pode. Deve informar via docstring qual a complexidade de tempo e espao da sua soluo """ from math import inf def minimo_e_maximo(sequencia_numer...
[ 37811, 34, 380, 283, 334, 2611, 1257, 78, 8358, 1005, 8553, 949, 304, 3509, 390, 334, 2611, 33756, 19524, 544, 997, 30997, 198, 1000, 265, 7496, 13, 198, 198, 50, 279, 1098, 514, 283, 611, 11, 552, 3301, 274, 11, 664, 333, 568, 30...
2.111374
422
import dash_bootstrap_components as dbc import dash_html_components as html DBC_DOCS = ( "https://dash-bootstrap-components.opensource.faculty.ai/docs/components/" )
[ 11748, 14470, 62, 18769, 26418, 62, 5589, 3906, 355, 288, 15630, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 198, 35, 2749, 62, 38715, 50, 796, 357, 198, 220, 220, 220, 366, 5450, 1378, 42460, 12, 18769, 26418, 12, ...
2.819672
61
''' The visualization class provides an easy access to some of the visdom functionalities Accept as input a number that will be ploted over time or an image of type np.ndarray ''' from visdom import Visdom import numpy as np import numbers
[ 7061, 6, 198, 464, 32704, 1398, 3769, 281, 2562, 1895, 284, 617, 286, 262, 1490, 3438, 10345, 871, 198, 38855, 355, 5128, 257, 1271, 326, 481, 307, 458, 5191, 625, 640, 393, 281, 2939, 286, 2099, 45941, 13, 358, 18747, 198, 7061, 6,...
3.967213
61
"""Analyze condition number of the network.""" import numpy as np import matplotlib.pyplot as plt # import model def _get_sparse_mask(nx, ny, non, complex=False, nOR=50): """Generate a binary mask. The mask will be of size (nx, ny) For all the nx connections to each 1 of the ny units, only non connectio...
[ 37811, 37702, 2736, 4006, 1271, 286, 262, 3127, 526, 15931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 2, 1330, 2746, 198, 198, 4299, 4808, 1136, 62, 82, 29572, 62,...
2.109005
422
from rest_framework.authtoken.models import Token from rest_framework import serializers from applications.placement_cell.models import (Achievement, Course, Education, Experience, Has, Patent, Project, Publication, Skill, ...
[ 6738, 1334, 62, 30604, 13, 18439, 30001, 13, 27530, 1330, 29130, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 5479, 13, 489, 5592, 62, 3846, 13, 27530, 1330, 357, 32, 24957, 434, 11, 20537, 11, 7868, 11, 198, 220, ...
1.95122
205
import factory from concat_col_app.models import Color, Apple
[ 11748, 8860, 198, 198, 6738, 1673, 265, 62, 4033, 62, 1324, 13, 27530, 1330, 5315, 11, 4196, 628, 198 ]
3.421053
19
from pathlib import Path from typing import Dict from errors.common.exception import DppError
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 360, 713, 198, 198, 6738, 8563, 13, 11321, 13, 1069, 4516, 1330, 360, 381, 12331, 628, 628, 628, 628, 628 ]
3.586207
29
from .utility import * from .tricks import * from .tensorlog import * from .self_op import * from .resume import * from .optims import * from .metric import *
[ 198, 198, 6738, 764, 315, 879, 1330, 1635, 198, 6738, 764, 83, 23706, 1330, 1635, 198, 6738, 764, 83, 22854, 6404, 1330, 1635, 198, 6738, 764, 944, 62, 404, 1330, 1635, 198, 6738, 764, 411, 2454, 1330, 1635, 198, 6738, 764, 8738, 12...
3.037736
53
""" Copyright (C) 2018-2021 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
[ 37811, 198, 15069, 357, 34, 8, 2864, 12, 1238, 2481, 8180, 10501, 628, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 1...
3.849515
206
import cv2 from PIL import Image import argparse from pathlib import Path from multiprocessing import Process, Pipe,Value,Array import torch from config import get_config from mtcnn import MTCNN from Learner_trans_tf import face_learner from utils import load_facebank, draw_box_name, prepare_facebank, save_label_score,...
[ 11748, 269, 85, 17, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 1822, 29572, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 11, 36039, 11, 11395, 11, 19182, 198, 11748, 28034, 198, 6738, 4566, 1330, ...
2.057384
7,476
import time def event_call(other_arg, kwarg="-", result=None): """Call this metod, on returned result""" print(f"Bind Result, {result}\n"*10) print("other_arg", other_arg) print("kwarg", kwarg) if __name__ == "__main__": try: from dirio import Dirio except: from ..dirio impo...
[ 11748, 640, 628, 198, 198, 4299, 1785, 62, 13345, 7, 847, 62, 853, 11, 479, 86, 853, 2625, 12, 1600, 1255, 28, 14202, 2599, 198, 220, 220, 220, 37227, 14134, 428, 1138, 375, 11, 319, 4504, 1255, 37811, 198, 220, 220, 220, 3601, 7,...
2.188769
837
# -*- coding: utf-8 -*- # Copyright 2017, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """This module implements the abstract base class for backend modules. To create add-on backend modules subclass the Backend...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 2177, 11, 19764, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 1043, 287, 198, 2, 262, 38559, 24290...
2.367829
889
from typing import List import sys s = Solution() ans = s.jump([3,2,1,0,4]) print(ans)
[ 6738, 19720, 1330, 7343, 198, 11748, 25064, 198, 198, 82, 796, 28186, 3419, 198, 198, 504, 796, 264, 13, 43327, 26933, 18, 11, 17, 11, 16, 11, 15, 11, 19, 12962, 198, 4798, 7, 504, 8 ]
2.444444
36
import unittest from . import states
[ 11748, 555, 715, 395, 198, 198, 6738, 764, 1330, 2585, 628 ]
3.545455
11
from jinja2 import nodes from jinja2.ext import Extension
[ 6738, 474, 259, 6592, 17, 1330, 13760, 198, 6738, 474, 259, 6592, 17, 13, 2302, 1330, 27995, 628 ]
3.277778
18
import os def retrieve_molecule_number(pdb, resname): """ IDENTIFICATION OF MOLECULE NUMBER BASED ON THE TER'S """ count = 0 with open(pdb, 'r') as x: lines = x.readlines() for i in lines: if i.split()[0] == 'TER': count += 1 if i.split()[3] == resname: ...
[ 11748, 28686, 198, 198, 4299, 19818, 62, 76, 2305, 23172, 62, 17618, 7, 79, 9945, 11, 581, 3672, 2599, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 4522, 3525, 30643, 6234, 3963, 13070, 2538, 34, 24212, 36871, 13246, 29809, 196...
1.945205
219
# api.py # Part of PyBBIO # github.com/alexanderhiam/PyBBIO # MIT License # # Beaglebone platform API file. from bbio.platform.platform import detect_platform PLATFORM = detect_platform() if "3.8" in PLATFORM: from bone_3_8.adc import analog_init, analog_cleanup from bone_3_8.pwm import pwm_init, pwm_cleanup ...
[ 2, 40391, 13, 9078, 220, 198, 2, 2142, 286, 9485, 33, 3483, 46, 198, 2, 33084, 13, 785, 14, 1000, 87, 4066, 71, 1789, 14, 20519, 33, 3483, 46, 198, 2, 17168, 13789, 198, 2, 220, 198, 2, 1355, 19345, 15992, 3859, 7824, 2393, 13, ...
2.604878
205
import re import sys from urllib.parse import quote as _uriquote import requests from . import __version__, errors, utils from .converters import _county_types, _leaderboard_types, _vpn_types, _not_none from . import checks from .cog import request_cog GET='get' POST='post' def get_public_paths(self, **attrs...
[ 11748, 302, 198, 11748, 25064, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 9577, 355, 4808, 333, 1557, 1258, 198, 198, 11748, 7007, 198, 198, 6738, 764, 1330, 11593, 9641, 834, 11, 8563, 11, 3384, 4487, 198, 6738, 764, 1102, 332, 1010...
2.522854
897
import os from argparse import ArgumentParser from pathlib import Path import gym import ray import ray.tune.result as ray_results import yaml from gym.spaces import Tuple from ray.cluster_utils import Cluster from ray.rllib.utils import try_import_tf, try_import_torch from ray.tune import run_experiments, register_en...
[ 11748, 28686, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 11550, 198, 11748, 26842, 198, 11748, 26842, 13, 83, 1726, 13, 20274, 355, 26842, 62, 43420, 198, 11748, 331, 43695, 198, 6738,...
3.082621
351
#!/usr/bin/env python r""" This module contains keyword functions to supplement robot's built in functions and use in test where generic robot keywords don't support. """ import time from robot.libraries.BuiltIn import BuiltIn from robot.libraries import DateTime import re ###########################################...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 81, 37811, 198, 1212, 8265, 4909, 21179, 5499, 284, 10327, 9379, 338, 3170, 287, 198, 12543, 2733, 290, 779, 287, 1332, 810, 14276, 9379, 26286, 836, 470, 1104, 13, 198, 198, 3781...
2.668991
2,725
# Copyright (c) OpenMMLab. All rights reserved. from .builder import NODES from .faceswap_nodes import FaceSwapNode from .frame_effect_nodes import (BackgroundNode, BugEyeNode, MoustacheNode, NoticeBoardNode, PoseVisualizerNode, SaiyanNode, SunglassesNod...
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 6738, 764, 38272, 1330, 399, 3727, 1546, 198, 6738, 764, 32186, 86, 499, 62, 77, 4147, 1330, 15399, 10462, 499, 19667, 198, 6738, 764, 14535, 62, 10760, 62, ...
2.565217
322
#!/usr/bin/python3 import ibm_db import getopt import sys import os from toposort import toposort_flatten db = None host = "localhost" port = "50000" user = None pwd = None outfile = None targetdb = None try: opts, args = getopt.getopt(sys.argv[1:], "h:d:P:u:p:o:t:") except getopt.GetoptError: sys.exit(-1) f...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 24283, 76, 62, 9945, 198, 11748, 651, 8738, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 1353, 418, 419, 1330, 1353, 418, 419, 62, 2704, 41769, 198, 198, 9945, 796, 6045, ...
2.168365
1,865
import numpy as np DEFAULT_FILE_PATH = "utils/datasets/glove.6B.50d.txt" def loadWordVectors(tokens, filepath=DEFAULT_FILE_PATH, dimensions=50): """Read pretrained GloVe vectors""" wordVectors = np.zeros((len(tokens), dimensions)) with open(filepath) as ifs: for line in ifs: line = lin...
[ 11748, 299, 32152, 355, 45941, 198, 198, 7206, 38865, 62, 25664, 62, 34219, 796, 366, 26791, 14, 19608, 292, 1039, 14, 4743, 659, 13, 21, 33, 13, 1120, 67, 13, 14116, 1, 198, 198, 4299, 3440, 26449, 53, 478, 669, 7, 83, 482, 641, ...
2.05042
357
# Copyright 2021 MosaicML. All Rights Reserved. """Performance profiling tools. The profiler gathers performance metrics during a training run that can be used to diagnose bottlenecks and facilitate model development. The metrics gathered include: * Duration of each :class:`.Event` during training * Time taken by t...
[ 2, 15069, 33448, 5826, 18452, 5805, 13, 1439, 6923, 33876, 13, 198, 198, 37811, 32273, 31582, 4899, 13, 198, 198, 464, 1534, 5329, 43609, 2854, 20731, 1141, 257, 3047, 1057, 326, 460, 307, 973, 284, 37489, 3005, 11925, 721, 591, 290, ...
3.539797
691
''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
[ 7061, 6, 198, 26656, 15385, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 273, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 17080, 6169, 351, 428, 670, 329, 3224, 1321, 198, 2301, 13493, 6634, 9238, ...
2.764056
996
from typing import Optional, Sequence import plotly.graph_objects as go def bar(x: Sequence, y: Sequence, text: Optional[Sequence] = None, width: Optional[int] = None, col: Optional[str] = None, opacity: float = 1, name: Optional[str] = None, show_legend: bool = ...
[ 6738, 19720, 1330, 32233, 11, 45835, 198, 11748, 7110, 306, 13, 34960, 62, 48205, 355, 467, 198, 198, 4299, 2318, 7, 87, 25, 45835, 11, 198, 220, 220, 220, 220, 220, 220, 220, 331, 25, 45835, 11, 198, 220, 220, 220, 220, 220, 220,...
2.082397
534
# Copyright 2018-2021 Xanadu Quantum Technologies 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, 15069, 2864, 12, 1238, 2481, 47482, 324, 84, 29082, 21852, 3457, 13, 198, 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.172872
376
import pytorch_lightning as pl import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from pytorch_lightning.loggers import TensorBoardLogger from torch.utils.data import DataLoader from torchvision import transforms from torchvision.datasets import CelebA if __name__ == '__...
[ 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 6738, 12972, 13165, 354, ...
2.159332
659
# Import libraries import sys import pandas as pd from sqlalchemy import create_engine def load_data(messages_filepath, categories_filepath): """ Load the data from the disaster response csvs Parameters: messages_filepath (str): Path to messages csv categories_filepath (str): Path to categories csv...
[ 2, 17267, 12782, 198, 11748, 25064, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 628, 198, 4299, 3440, 62, 7890, 7, 37348, 1095, 62, 7753, 6978, 11, 9376, 62, 7753, 6978, 2599, 198, 220, ...
2.647335
638
#!/usr/bin/env python3 import subprocess import sys import json SERVICES = { 'control': [ 'control', 'nodemgr', 'named', 'dns', ], 'config-database': [ 'nodemgr', 'zookeeper', 'rabbitmq', 'cassandra', ], 'webui': [ 'web', ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 33918, 198, 198, 35009, 53, 34444, 796, 1391, 198, 220, 220, 220, 705, 13716, 10354, 685, 198, 220, 220, 220, 220, 220, 220, ...
1.830258
542
from flask import Flask, jsonify, request from flask_cors import CORS, cross_origin import simplejson as json from leaderboard.leaderboard import Leaderboard import uwsgidecorators import signalfx app = Flask(__name__) app.config['CORS_HEADERS'] = 'Content-Type' cors = CORS(app) highscore_lb_starship = Leaderboard('...
[ 6738, 42903, 1330, 46947, 11, 33918, 1958, 11, 2581, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 11, 3272, 62, 47103, 198, 198, 11748, 2829, 17752, 355, 33918, 198, 6738, 3554, 3526, 13, 27940, 3526, 1330, 10540, 3526, 198, 11748, ...
2.640777
206
import argparse import numpy as np from .._helpers import read, reader_map from ._helpers import _get_version_text
[ 11748, 1822, 29572, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 11485, 62, 16794, 364, 1330, 1100, 11, 9173, 62, 8899, 198, 6738, 47540, 16794, 364, 1330, 4808, 1136, 62, 9641, 62, 5239, 628, 198 ]
3.216216
37
import os, shutil from CCSLink import Spark_Session as SS def add_zipped_dependency(zip_from, zip_target): """ This method creates a zip of the code to be sent to the executors. It essentially zips the Python packages installed by PIP and submits them via addPyFile in the current PySpark context E...
[ 11748, 28686, 11, 4423, 346, 198, 6738, 327, 7902, 11280, 1330, 17732, 62, 36044, 355, 6723, 198, 198, 4299, 751, 62, 89, 3949, 62, 45841, 1387, 7, 13344, 62, 6738, 11, 19974, 62, 16793, 2599, 198, 220, 220, 220, 37227, 198, 220, 22...
2.674747
495
try: from .nbody_graph_search import Ugraph except (SystemError, ValueError): # not installed as a package from nbody_graph_search import Ugraph # This file defines how 3-body angle interactions are generated by moltemplate # by default. It can be overridden by supplying your own custom file. # To fi...
[ 28311, 25, 198, 220, 220, 220, 422, 764, 77, 2618, 62, 34960, 62, 12947, 1330, 24384, 1470, 198, 16341, 357, 11964, 12331, 11, 11052, 12331, 2599, 198, 220, 220, 220, 1303, 407, 6589, 355, 257, 5301, 198, 220, 220, 220, 422, 299, 26...
3.010909
825
#!/pxrpythonsubst # # Copyright 2016 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # ...
[ 2, 48443, 8416, 81, 79, 5272, 684, 549, 301, 198, 2, 198, 2, 15069, 1584, 46706, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 25189, 4891, 13789, 4943, 198, 2, 351, 262, 1708, 17613, 26, ...
2.848084
1,435
import sys import os sys.path.append('./code/') from skeleton import Skeleton from read_data import * from calibration import Calibration from ukf_filter import ukf_Filter_Controler from canvas import Canvas from regression import * import time from functools import wraps import os def make_folder(folder_name): if...
[ 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 33295, 7, 4458, 14, 8189, 14, 11537, 198, 198, 6738, 18328, 1330, 19460, 10565, 198, 6738, 1100, 62, 7890, 1330, 1635, 198, 6738, 36537, 1330, 2199, 571, 1358, 198, 6738, 334, ...
2.63198
394
from __future__ import print_function import json import os from django.conf import settings from django.contrib.auth.hashers import make_password from django.contrib.auth.models import User from wagtail.wagtailcore.models import Page, Site from v1.models import HomePage, BrowseFilterablePage
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 10134, 7084, 1330, 787, 62, 28712, 198...
3.505882
85
# Simple python3 script to compare output with a reference output. # Usage: python3 compareOutputs.py testOutput.h5 testRefOutput.h5 import sys import h5py import numpy as np if len(sys.argv) != 3: print("Expected two arguments. Output and reference output file.") sys.exit(1) filename = sys.argv[1] ref_filen...
[ 2, 17427, 21015, 18, 4226, 284, 8996, 5072, 351, 257, 4941, 5072, 13, 198, 2, 29566, 25, 21015, 18, 8996, 26410, 82, 13, 9078, 1332, 26410, 13, 71, 20, 1332, 8134, 26410, 13, 71, 20, 198, 198, 11748, 25064, 198, 11748, 289, 20, 90...
2.51468
579
# -*- coding: utf-8 -*- from rest_framework import serializers from .models import Tag
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 764, 27530, 1330, 17467, 628 ]
3
30
from amqpstorm.management import ApiConnectionError from amqpstorm.management import ApiError from amqpstorm.management import ManagementApi if __name__ == '__main__': API = ManagementApi('http://127.0.0.1:15672', 'guest', 'guest') try: result = API.aliveness_test('/') if result['status'] == 'o...
[ 6738, 716, 80, 79, 12135, 13, 27604, 1330, 5949, 72, 32048, 12331, 198, 6738, 716, 80, 79, 12135, 13, 27604, 1330, 5949, 72, 12331, 198, 6738, 716, 80, 79, 12135, 13, 27604, 1330, 8549, 32, 14415, 198, 198, 361, 11593, 3672, 834, 66...
2.39916
238
# -*- coding: utf-8 -*- from zvt.contract.api import df_to_db from zvt.contract.recorder import Recorder from zvt.domain.meta.stockhk_meta import Stockhk from zvt.recorders.em import em_api if __name__ == "__main__": recorder = EMStockhkRecorder() recorder.run() # the __all__ is generated __all__ = ["EMStoc...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 1976, 36540, 13, 28484, 13, 15042, 1330, 47764, 62, 1462, 62, 9945, 198, 6738, 1976, 36540, 13, 28484, 13, 8344, 2875, 1330, 3311, 2875, 198, 6738, 1976, 3654...
2.629921
127
from util.io import read_setting_json, read_0h_data, read_24h_data, draw_single_curve from util.convert import split_array_into_samples, calculate_avg_of_sample, convert_to_percentage from util.calculus import calculate_summary_of_sample, fit_sigmoid_curve import matplotlib.pyplot as plt import numpy as np import csv ...
[ 6738, 7736, 13, 952, 1330, 1100, 62, 33990, 62, 17752, 11, 1100, 62, 15, 71, 62, 7890, 11, 1100, 62, 1731, 71, 62, 7890, 11, 3197, 62, 29762, 62, 22019, 303, 198, 6738, 7736, 13, 1102, 1851, 1330, 6626, 62, 18747, 62, 20424, 62, ...
2.536683
2,508
# -*- test-case-name: twisted.names.test.test_rootresolve -*- # Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE for details. """ Resolver implementation for querying successive authoritative servers to lookup a record, starting from the root nameservers. @author: Jp Calderone todo:: robustify ...
[ 2, 532, 9, 12, 1332, 12, 7442, 12, 3672, 25, 19074, 13, 14933, 13, 9288, 13, 9288, 62, 15763, 411, 6442, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 5878, 12, 10531, 40006, 24936, 46779, 13, 198, 2, 4091, 38559, 24290, 329, 3307, 13,...
2.267093
2,033
# ================================================================ # MIT License # Copyright (c) 2021 edwardyehuang (https://github.com/edwardyehuang) # ================================================================ import os, sys rootpath = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pard...
[ 2, 46111, 4770, 25609, 18604, 198, 2, 17168, 13789, 198, 2, 15069, 357, 66, 8, 33448, 1225, 904, 5948, 13415, 648, 357, 5450, 1378, 12567, 13, 785, 14, 276, 904, 5948, 13415, 648, 8, 198, 2, 46111, 4770, 25609, 18604, 198, 198, 1174...
3.111864
295
from inspect import signature import json import time import os import glob import logging from pathlib import Path from watchdog.observers import Observer from watchdog.observers.polling import PollingObserver from watchdog.events import PatternMatchingEventHandler from EDScoutCore.FileSystemUpdatePrompter...
[ 6738, 10104, 1330, 9877, 201, 198, 11748, 33918, 201, 198, 11748, 640, 201, 198, 11748, 28686, 201, 198, 11748, 15095, 201, 198, 11748, 18931, 201, 198, 201, 198, 6738, 3108, 8019, 1330, 10644, 201, 198, 6738, 26856, 13, 672, 2655, 690,...
2.865772
298
import sqlite3 conn = sqlite3.connect('example.db') c = conn.cursor() import os import hashlib import time get_dir_data('./') # Save (commit) the changes conn.commit() conn.close()
[ 11748, 44161, 578, 18, 198, 37043, 796, 44161, 578, 18, 13, 8443, 10786, 20688, 13, 9945, 11537, 198, 198, 66, 796, 48260, 13, 66, 21471, 3419, 628, 198, 11748, 28686, 198, 11748, 12234, 8019, 198, 11748, 640, 628, 198, 198, 1136, 62,...
2.724638
69
""" Migration script to add 'ldda_parent_id' column to the implicitly_converted_dataset_association table. """ from sqlalchemy import * from sqlalchemy.orm import * from migrate import * from migrate.changeset import * import logging log = logging.getLogger( __name__ ) metadata = MetaData()
[ 37811, 198, 44, 4254, 4226, 284, 751, 705, 335, 6814, 62, 8000, 62, 312, 6, 5721, 284, 262, 31821, 62, 1102, 13658, 62, 19608, 292, 316, 62, 562, 41003, 3084, 13, 198, 37811, 198, 198, 6738, 44161, 282, 26599, 1330, 1635, 198, 6738,...
3.352273
88
import pandas as pd import numpy as np import matplotlib.pyplot as plt import prince from sklearn import utils from sklearn.cluster import DBSCAN import itertools from cmca import CMCA from ccmca import CCMCA from matplotlib import rc plt.style.use('ggplot') df = pd.read_csv("./uk2018.csv") df["prtclcgb"].replace({5: ...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19716, 198, 6738, 1341, 35720, 1330, 3384, 4487, 198, 6738, 1341, 35720, 13, 565, 5819, 1330,...
1.934537
1,329
""" Problem: Given a list of possibly overlapping intervals, return a new list of intervals where all overlapping intervals have been merged. The input list is not necessarily ordered in any way. For example, given [(1, 3), (5, 8), (4, 10), (20, 25)], you should return [(1, 3), (4, 10), (20, 25)]. """ from typing i...
[ 37811, 198, 40781, 25, 198, 198, 15056, 257, 1351, 286, 5457, 32997, 20016, 11, 1441, 257, 649, 1351, 286, 20016, 810, 198, 439, 32997, 20016, 423, 587, 23791, 13, 198, 198, 464, 5128, 1351, 318, 407, 6646, 6149, 287, 597, 835, 13, ...
2.62963
216
import time import emoji # Put your commands here COMMAND1 = "testing testing" COMMAND2 = "roger roger" BLUEON = str("blue on") BLUEOFF = str("blue off") REDON = str("red on") REDOFF = str("red off") GREENON = str("green on") GREENOFF = str("green off") YELLOWON = str("yellow on") YELLOWOFF = str("yellow off") CL...
[ 11748, 640, 198, 11748, 44805, 198, 198, 2, 5930, 534, 9729, 994, 198, 9858, 44, 6981, 16, 796, 366, 33407, 4856, 1, 198, 9858, 44, 6981, 17, 796, 366, 305, 1362, 686, 1362, 1, 198, 198, 9148, 8924, 1340, 796, 965, 7203, 17585, 31...
2.330221
1,178
# coding=utf-8 """RSES :)"""
[ 2, 19617, 28, 40477, 12, 23, 198, 37811, 6998, 1546, 14373, 37811, 198 ]
2.230769
13
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 19...
3.806452
341
"""Support for MQTT discovery.""" import asyncio import logging from hatasmota.discovery import ( TasmotaDiscovery, get_device_config as tasmota_get_device_config, get_entities_for_platform as tasmota_get_entities_for_platform, get_entity as tasmota_get_entity, has_entities_with_platform as tasmota...
[ 37811, 15514, 329, 337, 48, 15751, 9412, 526, 15931, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 198, 6738, 6877, 8597, 4265, 13, 67, 40821, 1330, 357, 198, 220, 220, 220, 309, 8597, 4265, 35, 40821, 11, 198, 220, 220, 220, 651, ...
2.56
500
# Copyright 2019 Google LLC. 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 required by applicable law or a...
[ 2, 15069, 13130, 3012, 11419, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.018405
1,467
def read() -> str: """Returns a string""" return "org.allnix"
[ 198, 198, 4299, 1100, 3419, 4613, 965, 25, 198, 220, 220, 220, 37227, 35561, 257, 4731, 37811, 198, 220, 220, 220, 1441, 366, 2398, 13, 439, 77, 844, 1, 198 ]
2.4
30
# from folder workMETRLA # MODEL CODE # -*- coding: utf-8 -*- """ Created on Mon Sep 28 10:28:06 2020 @author: wb """ import torch import torch.nn as nn import math # from GCN_models import GCN # from One_hot_encoder import One_hot_encoder import torch.nn.functional as F import numpy as np from sc...
[ 2, 422, 9483, 670, 47123, 7836, 32, 201, 198, 201, 198, 2, 19164, 3698, 42714, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 8621, 2579, 838, 25, 2078, 25, 3312, ...
2.20743
646
# animation for medium article from termcolor import colored import time import imageio import pyautogui pyautogui.FAILSAFE = True matrix = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0...
[ 2, 11034, 329, 7090, 2708, 198, 198, 6738, 3381, 8043, 1330, 16396, 198, 11748, 640, 198, 11748, 2939, 952, 198, 11748, 12972, 2306, 519, 9019, 198, 198, 9078, 2306, 519, 9019, 13, 7708, 4146, 4090, 15112, 796, 6407, 198, 198, 6759, 8...
1.6632
1,250
from django.db import models from products.models import Product from utils.models import Utility
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 3186, 13, 27530, 1330, 8721, 198, 6738, 3384, 4487, 13, 27530, 1330, 34030, 628, 628, 628, 198 ]
3.888889
27
from django.shortcuts import render from hierarchical_app.models import Folder # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 38958, 62, 1324, 13, 27530, 1330, 48107, 198, 2, 13610, 534, 5009, 994, 13, 628, 198 ]
4.115385
26
import sys import os import argparse import logging import json import time import subprocess from shutil import copyfile import numpy as np from sklearn import metrics from easydict import EasyDict as edict import torch from torch.utils.data import DataLoader import torch.nn.functional as F from torch.nn import DataP...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 850, 14681, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 357...
2.645588
680
groupSize = input() groups = list(map(int,input().split(' '))) tmpArray1 = set() tmpArray2 = set() for i in groups: if i in tmpArray1: tmpArray2.discard(i) else: tmpArray1.add(i) tmpArray2.add(i) for i in tmpArray2: print(i)
[ 8094, 10699, 796, 5128, 3419, 198, 24432, 796, 1351, 7, 8899, 7, 600, 11, 15414, 22446, 35312, 10786, 705, 22305, 198, 22065, 19182, 16, 796, 900, 3419, 198, 22065, 19182, 17, 796, 900, 3419, 198, 1640, 1312, 287, 2628, 25, 198, 220, ...
2.112903
124
import unittest from hf_src.main import soma
[ 11748, 555, 715, 395, 198, 6738, 289, 69, 62, 10677, 13, 12417, 1330, 3870, 64, 628 ]
2.875
16
import copy import json from oic.utils.authn.client import CLIENT_AUTHN_METHOD from oic.utils.keyio import KeyJar from oic.utils.keyio import KeyBundle __author__ = 'roland' import logging logger = logging.getLogger(__name__) def request_and_return(conv, url, response=None, method="GET", body=None, ...
[ 11748, 4866, 198, 11748, 33918, 198, 198, 6738, 267, 291, 13, 26791, 13, 18439, 77, 13, 16366, 1330, 45148, 62, 32, 24318, 45, 62, 49273, 198, 6738, 267, 291, 13, 26791, 13, 2539, 952, 1330, 7383, 47511, 198, 6738, 267, 291, 13, 267...
2.510638
564
import FWCore.ParameterSet.Config as cms hltPFPuppiNoLep = cms.EDProducer("PuppiProducer", DeltaZCut = cms.double(0.1), DeltaZCutForChargedFromPUVtxs = cms.double(0.2), EtaMaxCharged = cms.double(99999.0), EtaMaxPhotons = cms.double(2.5), EtaMinUseDeltaZ = cms.double(-1.0), MinPuppiWeight = cms...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 71, 2528, 47, 5837, 7211, 72, 2949, 43, 538, 796, 269, 907, 13, 1961, 11547, 2189, 7203, 47, 7211, 72, 11547, 2189, 1600, 198, 220, 220, 220, 16978, 57, 26254...
1.747246
1,543
# -*- coding: utf-8 -*- ## \package wizbin.build # MIT licensing # See: docs/LICENSE.txt import commands, os, shutil, subprocess, traceback, wx from dbr.functions import FileUnstripped from dbr.language import GT from dbr.log import DebugEnabled from dbr.log import Logger from dbr.md5 import WriteMD5 from ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2235, 3467, 26495, 266, 528, 8800, 13, 11249, 198, 198, 2, 17168, 15665, 198, 2, 4091, 25, 34165, 14, 43, 2149, 24290, 13, 14116, 628, 198, 11748, 9729, 11, 28686...
2.975166
604
from YoshiViz import Gui if __name__ == '__main__': #file director gui = Gui.Gui() """ report_generator.\ generate_pdf_report(fileDirectory, repositoryName, tempCommunityType) """ print('the type of', repositoryName, 'is', tempCommunityType, '\n"check .\YoshiViz\output"')
[ 6738, 38936, 53, 528, 1330, 1962, 72, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1303, 7753, 3437, 198, 220, 220, 220, 11774, 796, 1962, 72, 13, 8205, 72, 3419, 198, 220, 220, 220, 37227,...
2.54918
122
''' Wrap an __init__ function so that I don't have to assign all the parameters to a self. variable. ''' # https://stackoverflow.com/questions/5048329/python-decorator-for-automatic-binding-init-arguments import inspect from functools import wraps def lazy_init(init): ''' Create an annotation to assign all the p...
[ 7061, 6, 41028, 281, 11593, 15003, 834, 2163, 523, 326, 314, 836, 470, 423, 284, 8333, 477, 262, 198, 17143, 7307, 284, 257, 2116, 13, 7885, 13, 705, 7061, 198, 2, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 1120, ...
3.02649
151
# def register_feed(): import os import cv2 path = '/UserImage' cam = cv2.VideoCapture(0) name=input("Name: ") cv2.namedWindow("test") img_counter = 0 while True: ret, frame = cam.read() if not ret: print("failed to grab frame") break else: cv2.imshow("test", frame) k = c...
[ 2, 825, 7881, 62, 12363, 33529, 198, 11748, 28686, 198, 11748, 269, 85, 17, 198, 6978, 796, 31051, 12982, 5159, 6, 198, 20991, 796, 269, 85, 17, 13, 10798, 49630, 7, 15, 8, 198, 3672, 28, 15414, 7203, 5376, 25, 366, 8, 198, 198, ...
2.039164
383
# -*- encoding: utf-8 -*- ''' @Author : lance @Email : wangyl306@163.com ''' import time from model_cx.inceptionresnet import inceptionresnet from model_cx.vgg19two import vgg19_all_lr from model_cx.inceptionv3 import inceptionv3 from model_cx.densenet import densenet from model_cx.nasnet import nas...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 7061, 6, 201, 198, 31, 13838, 1058, 220, 220, 220, 220, 220, 300, 590, 220, 220, 201, 198, 31, 15333, 1058, 220, 220, 266, 648, 2645, 20548, 31, 24136, 13, 785,...
2.168447
1,217
"""Coordinate changes in state space models.""" import abc try: # cached_property is only available in Python >=3.8 from functools import cached_property except ImportError: from cached_property import cached_property import numpy as np import scipy.special # for vectorised factorial from probnum impor...
[ 37811, 7222, 45480, 2458, 287, 1181, 2272, 4981, 526, 15931, 198, 198, 11748, 450, 66, 198, 198, 28311, 25, 198, 220, 220, 220, 1303, 39986, 62, 26745, 318, 691, 1695, 287, 11361, 18189, 18, 13, 23, 198, 220, 220, 220, 422, 1257, 31...
3.431373
102
from allauth.socialaccount import providers from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth.provider import OAuthProvider from allauth.socialaccount import app_settings providers.registry.register(LinkedInProvider)
[ 6738, 477, 18439, 13, 14557, 23317, 1330, 9549, 198, 6738, 477, 18439, 13, 14557, 23317, 13, 15234, 4157, 13, 8692, 1330, 32549, 30116, 198, 6738, 477, 18439, 13, 14557, 23317, 13, 15234, 4157, 13, 12162, 1071, 13, 15234, 1304, 1330, 44...
4
70
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets from torch.autograd import Variable from sklearn.model_selection import train_test_split import time import pandas as pd import numpy as np import csv batch_size = 128 NUM_EPOC...
[ 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 11748, 28034, 13, 40085, 355, 6436, 201, 198, 6738, 28034, 10178, 1330, 40522, 201, 198, 6738, 28034, 13, ...
2.198242
1,024