text stringlengths 28 881k |
|---|
# (C) Copyright Artificial Brain 2021.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLIN... |
"""NEWLINEUnionFind.pyNEWLINENEWLINESource: http://www.ics.uci.edu/~eppstein/PADS/UnionFind.pyNEWLINENEWLINEUnion-find data structure. Based on Josiah Carlson's code,NEWLINEhttp://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/215912NEWLINEwith significant additional changes by D. Eppstein.NEWLINE"""NEWLINENEWLINEfro... |
"""This test creates two top level actors and one sub-actor andNEWLINE verifies that the actors can exchange sequences of messages."""NEWLINENEWLINEimport timeNEWLINEfrom thespian.actors import *NEWLINEfrom thespian.test import *NEWLINENEWLINEclass rosaline(Actor):NEWLINE name = 'Rosaline'NEWLINENEWLINEclass Romeo... |
"""This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license.NEWLINE"""NEWLINE"""NEWLINEDjango Base settings for Label Studio.NEWLINENEWLINEFor more information on this file, seeNEWLINEhttps://docs.djangoproject.c... |
from enum import EnumNEWLINEimport loggingNEWLINEimport randomNEWLINEimport reNEWLINEimport requestsNEWLINEfrom r2d7.core import DroidCoreNEWLINENEWLINElogger = logging.getLogger(__name__)NEWLINENEWLINEclass Talkback(DroidCore):NEWLINE """NEWLINE Chat responses unrelated to other commandsNEWLINE """NEWLINE ... |
import numpy as npNEWLINEimport unittestNEWLINENEWLINEimport chainerNEWLINEfrom chainer import optimizersNEWLINEfrom chainer import testingNEWLINEfrom chainer.testing import attrNEWLINENEWLINEfrom chainercv.links.model.ssd import GradientScalingNEWLINENEWLINENEWLINEclass SimpleLink(chainer.Link):NEWLINENEWLINE def _... |
# exported from PySB model 'model'NEWLINENEWLINEfrom pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILDNEWLINENEWLINEModel()NEWLINENEWLINEMonomer('Ligand', ['Receptor'])NEWLINEMonomer('ParpU', ['C3A'])NEWLINEMonomer('C8A', ['BidU', 'C3pro'])NEWLIN... |
import torchNEWLINEimport torch.nn as nnNEWLINENEWLINEfrom . import EmbeddingFeedForwardNEWLINEfrom .. import utilNEWLINEfrom ..distributions import TruncatedNormal, MixtureNEWLINENEWLINENEWLINEclass ProposalUniformTruncatedNormalMixture(nn.Module):NEWLINE def __init__(self, input_shape, num_layers=2, mixture_compon... |
# -*- coding: utf-8 -*-NEWLINE# Generated by Django 1.10.4 on 2018-03-13 00:29NEWLINEfrom __future__ import unicode_literalsNEWLINENEWLINEfrom django.db import migrationsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('board', '0006_merge_20180310_2200'),NEWL... |
"""This test creates two top level actors and one sub-actor andNEWLINE verifies that the actors can exchange sequences of messages."""NEWLINENEWLINEimport timeNEWLINEfrom thespian.actors import *NEWLINEfrom thespian.test import *NEWLINENEWLINEclass rosaline(Actor):NEWLINE name = 'Rosaline'NEWLINENEWLINEclass Romeo... |
import yamlNEWLINEimport typesNEWLINEimport pandas as pdNEWLINEfrom Handler.mongo_handler import MongoHandlerNEWLINEfrom Utils.utils import LogNEWLINEyaml.warnings({'YAMLLoadWarning': False})NEWLINEwith open("config.yaml", "rt", encoding="utf-8") as stream:NEWLINE CONFIG = yaml.load(stream)['StockCrawler']NEWLINENEW... |
# Copyright 2020 Google LLC. All Rights Reserved.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0NEWLINE... |
"""NEWLINEThe script is for creating a new graphml including nodes and edges NEWLINEbased on the subset geopackage created by "sv_createSubsetData.py".NEWLINEThis can reduce the volume of graphml, which can reduce the usage of memory in pc and NEWLINEimprove performace.NEWLINENEWLINE"""NEWLINEimport osmnx as oxNEWLINEi... |
#!/usr/bin/pythonNEWLINE#NEWLINE# Copyright: Ansible ProjectNEWLINE# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)NEWLINENEWLINEfrom __future__ import absolute_import, division, print_functionNEWLINE__metaclass__ = typeNEWLINENEWLINEANSIBLE_METADATA = {'metadata_version': '1... |
def isMatch(s: str, p: str) -> bool:NEWLINE m, n = len(s), len(p)NEWLINE dp = [[False] * (n + 1) for _ in range(m + 1)]NEWLINE dp[0][0] = TrueNEWLINE for i in range(1, n + 1):NEWLINE if p[i - 1] == "*":NEWLINE dp[0][i] = TrueNEWLINE else:NEWLINE breakNEWLINENEWLINE for... |
# -*- coding: utf-8 -*-NEWLINE# Generated by Django 1.10.5 on 2017-11-03 13:12NEWLINEfrom __future__ import unicode_literalsNEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('main', '0003_profile'),NEWLINE ... |
"""This is the one place the version number is stored."""NEWLINENEWLINE__version__ = '0.5.1'NEWLINE |
import torchNEWLINENEWLINEfrom .resnet import NormalizationNEWLINEfrom .preact_resnet import preact_resnetNEWLINEfrom .resnet import resnetNEWLINEfrom .wideresnet import wideresnetNEWLINENEWLINEfrom .preact_resnetwithswish import preact_resnetwithswishNEWLINEfrom .wideresnetwithswish import wideresnetwithswishNEWLINENE... |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and ContributorsNEWLINE# MIT License. See license.txtNEWLINEfrom __future__ import unicode_literalsNEWLINENEWLINEimport frappe, unittestNEWLINENEWLINEfrom frappe.model.db_query import DatabaseQueryNEWLINEfrom frappe.desk.reportview import get_filters_condNEWLINENEWLIN... |
# Copyright 2022 AI SingaporeNEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# https://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLINE# Unless re... |
from sklearn.model_selection import StratifiedKFoldNEWLINEfrom scipy import sparseNEWLINEfrom skml.datasets import sample_down_label_spaceNEWLINE# liac-arffNEWLINEimport arffNEWLINEimport randomNEWLINENEWLINErandom.seed(2018)NEWLINENEWLINENEWLINEdef load_from_arff(filename, labelcount, endian="big",NEWLINE input_fea... |
"""Test whether all elements of cls.args are instances of Basic. """NEWLINENEWLINE# NOTE: keep tests sorted by (module, class name) key. If a class can'tNEWLINE# be instantiated, add it here anyway with @SKIP("abstract class) (seeNEWLINE# e.g. Function).NEWLINENEWLINEimport osNEWLINEimport reNEWLINEimport warningsNEWLI... |
import setuptoolsNEWLINENEWLINEwith open("README.md", "r", encoding="utf-8") as f:NEWLINE long_description = f.read()NEWLINENEWLINEsetuptools.setup(NEWLINE name="sunnyvale",NEWLINE version="0.0.1",NEWLINE author="Gunhoon Lee",NEWLINE author_email="gunhoon@gmail.com",NEWLINE description="A small exampl... |
# -*- coding: utf-8 -*-NEWLINE"""NEWLINETests for the Py2-like class:`basestring` type.NEWLINE"""NEWLINENEWLINEfrom __future__ import absolute_import, unicode_literals, print_functionNEWLINEimport osNEWLINENEWLINEfrom past import utilsNEWLINEfrom future.tests.base import unittestNEWLINEfrom past.builtins import basestr... |
import importlibNEWLINEimport osNEWLINEimport timeNEWLINEimport randomNEWLINENEWLINEimport torchNEWLINEimport torch.nn.functional as FNEWLINEimport numpy as npNEWLINEimport ComputePostBNNEWLINEfrom utils.setlogger import get_loggerNEWLINENEWLINEfrom utils.model_profiling import model_profilingNEWLINEfrom utils.config i... |
# Copyright 2021 The Flax Authors.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLINE# Unles... |
import matplotlib.pyplot as pltNEWLINEfrom sklearn.manifold import TSNENEWLINENEWLINE# Tsne PlotNEWLINEdef tsneplot(embeddings,labels,fig_path):NEWLINE print("********************* tSNE Plot*********************")NEWLINE X = TSNE(n_components=2,perplexity=100,n_iter=1000).fit_transform(embeddings)NEWLINE color... |
# proxy moduleNEWLINEfrom traitsui.wx.boolean_editor import *NEWLINE |
import pathlibNEWLINEimport randomNEWLINEimport reNEWLINENEWLINENEWLINEclass Tip:NEWLINE def __init__(self, html=None, ref_url=None, ref_name=None):NEWLINE self.html = htmlNEWLINE self.ref_url = ref_urlNEWLINE self.ref_name = ref_nameNEWLINENEWLINE @staticmethodNEWLINE def parse_meta(meta)... |
from django.db import modelsNEWLINEfrom django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \NEWLINE PermissionsMixinNEWLINENEWLINEclass UserManager(BaseUserManager):NEWLINE def create_user(self, email, password=None, **extra_fields):NEWLINE """creates and saves a new user"""NEWLINE if not e... |
n = int(input())NEWLINEfor j in range(n):NEWLINE word = input()NEWLINE if len(word) <= 10:NEWLINE print(word)NEWLINE else:NEWLINE print(word[0] + str(len(word)-2) + word[-1])NEWLINE |
import torchNEWLINENEWLINE#from tinydfa import DFA, DFALayer, FeedbackPointsHandlingNEWLINEfrom tinydfa.light_dfa import DFA, DFALayerNEWLINENEWLINENEWLINEclass VeryTinyNeRFModel(torch.nn.Module):NEWLINE r"""Define a "very tiny" NeRF model comprising three fully connected layers.NEWLINE """NEWLINENEWLINE def _... |
"""NEWLINEWSGI config for DjangoECom project.NEWLINENEWLINEIt exposes the WSGI callable as a module-level variable named ``application``.NEWLINENEWLINEFor more information on this file, seeNEWLINEhttps://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/NEWLINE"""NEWLINENEWLINEimport osNEWLINENEWLINEfrom django.core.... |
# import the generic views you want, and the models NEWLINE# they apply to.NEWLINEfrom django.views.generic import ListViewNEWLINENEWLINE# Import the models you want to use.NEWLINEfrom snippets.models import SnippetNEWLINENEWLINE# Create a class for your model that subclassesNEWLINE# the generic view you want. This... |
# Copyright © 2019 Province of British ColumbiaNEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0NEWLINE#N... |
import pyaf.Bench.TS_datasets as tsdsNEWLINEimport tests.artificial.process_artificial_dataset as artNEWLINENEWLINENEWLINENEWLINENEWLINEart.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 7, transform = "RelativeDifference", sigma = 0.0, exog_count = 0, ar_order = 12); |
# coding=utf-8NEWLINE# Copyright 2020 The TensorFlow GAN Authors.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LI... |
#NEWLINE# Copyright (c) 2016-2021 JEP AUTHORS.NEWLINE#NEWLINE# This file is licensed under the the zlib/libpng License.NEWLINE#NEWLINE# This software is provided 'as-is', without any express or impliedNEWLINE# warranty. In no event will the authors be held liable for anyNEWLINE# damages arising from the use of this sof... |
#!/usr/bin/env pythonNEWLINE# -*- coding: utf-8 -*-NEWLINE# **************************************************************************NEWLINE# Copyright © 2016 jianglinNEWLINE# File Name: __init__.pyNEWLINE# Author: jianglinNEWLINE# Email: xiyang0807@gmail.comNEWLINE# Created: 2016-11-25 17:45:36 (CST)NEWLINE# Last Upd... |
from typing import ListNEWLINENEWLINEfrom .en import FILTERS as EN_FILTERSNEWLINEfrom .de import FILTERS as DE_FILTERSNEWLINEfrom .fr import FILTERS as FR_FILTERSNEWLINEfrom .es import FILTERS as ES_FILTERSNEWLINEfrom .mx import FILTERS as MX_FILTERSNEWLINEfrom .ru import FILTERS as RU_FILTERSNEWLINEfrom .cn import FIL... |
#ABC089eNEWLINEimport sysNEWLINEinput = sys.stdin.readlineNEWLINEsys.setrecursionlimit(10**6)NEWLINE |
from __future__ import absolute_importNEWLINENEWLINEimport sixNEWLINEimport pytzNEWLINENEWLINEfrom datetime import datetimeNEWLINENEWLINEfrom sentry.coreapi import APIUnauthorizedNEWLINEfrom sentry.mediators import Mediator, ParamNEWLINEfrom sentry.mediators.token_exchange.validator import ValidatorNEWLINEfrom sentry.m... |
# -*- coding: utf-8 -*-NEWLINE# Copyright 2020 Google Inc.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-... |
# coding=utf-8NEWLINEimport shelveNEWLINENEWLINENEWLINEdef store_person(db): # 存储用户输入数据到shelf对象中NEWLINE pid = input('Enter unique ID number: ')NEWLINE person = {}NEWLINE person['name'] = input('Enter name: ')NEWLINE person['age'] = input('Enter age: ')NEWLINE person['phone'] = input('Enter phone number:... |
"""NEWLINE Copyright (c) 2019-2020 Intel CorporationNEWLINE Licensed under the Apache License, Version 2.0 (the "License");NEWLINE you may not use this file except in compliance with the License.NEWLINE You may obtain a copy of the License atNEWLINE http://www.apache.org/licenses/LICENSE-2.0NEWLINE Unless required... |
import os.pathNEWLINENEWLINEimport torchNEWLINEimport seaborn as snsNEWLINEfrom pandas import DataFrameNEWLINEfrom torch.utils.data import DataLoaderNEWLINEfrom transformers import RobertaTokenizerNEWLINENEWLINEfrom bond.data import DatasetName, DatasetType, SubTokenDataset, load_dataset, load_tags_dictNEWLINEfrom bond... |
from game.combat.effects.moveeffect.basemoveeffect import BaseMoveEffectNEWLINEfrom game.combat.effects.partialeffect.applystatuseffect import ApplyStatusNEWLINEfrom game.combat.effects import statuseffectNEWLINENEWLINENEWLINEclass Confusion(BaseMoveEffect):NEWLINE def after_action(self):NEWLINE if self.scene... |
"""NEWLINEThe MIT License (MIT)NEWLINENEWLINECopyright (c) 2015-present RapptzNEWLINENEWLINEPermission is hereby granted, free of charge, to any person obtaining aNEWLINEcopy of this software and associated documentation files (the "Software"),NEWLINEto deal in the Software without restriction, including without limita... |
#!/usr/bin/env pythonNEWLINE# -*- coding: utf-8 -*-NEWLINE"""NEWLINEIn this example, we are going to make a dark code editor widget and make it show visualNEWLINEwhitespaces.NEWLINENEWLINE"""NEWLINEimport sysNEWLINEimport osNEWLINEos.environ['QT_API'] = 'pyside2'NEWLINE# os.environ['QT_API'] = 'pyqt5'NEWLINEfrom pyqode... |
#!/usr/bin/env pythonNEWLINEfrom __future__ import division, print_function, absolute_importNEWLINENEWLINEimport numpy as npNEWLINEfrom numpy.testing import (run_module_suite, assert_allclose, assert_,NEWLINE assert_raises)NEWLINENEWLINEimport pywtNEWLINENEWLINENEWLINEdef test_dwt_idwt_basic()... |
from neo.Prompt.Commands.Invoke import InvokeContract, InvokeWithTokenVerificationScriptNEWLINEfrom neo.Core.Fixed8 import Fixed8NEWLINEfrom neo.Core.UInt160 import UInt160NEWLINEfrom neo.Network.common import blocking_prompt as promptNEWLINEfrom decimal import DecimalNEWLINEfrom neo.Core.TX.TransactionAttribute import... |
# Copyright 2019, Google LLC.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLINE# Unless re... |
# Copyright (c) 2017-2019 Uber Technologies, Inc.NEWLINE# SPDX-License-Identifier: Apache-2.0NEWLINENEWLINE"""NEWLINEThis example demonstrates how to use the Causal Effect Variational AutoencoderNEWLINE[1] implemented in pyro.contrib.cevae.CEVAE, documented atNEWLINEhttp://docs.pyro.ai/en/latest/contrib.cevae.htmlNEWLI... |
"""Config Flow for PlayStation 4."""NEWLINEfrom collections import OrderedDictNEWLINEimport loggingNEWLINENEWLINEimport voluptuous as volNEWLINENEWLINEfrom homeassistant import config_entriesNEWLINEfrom homeassistant.components.ps4.const import (NEWLINE DEFAULT_NAME, DEFAULT_REGION, DOMAIN, REGIONS)NEWLINEfrom homea... |
from .. import fstNEWLINENEWLINENEWLINEdef fstFromDict(initDict):NEWLINE """NEWLINE fstInitMealy = {NEWLINE 'initState': 'S0',NEWLINE 'inAlphabet': ( 0, 1, ),NEWLINE 'transition': { 'S0': ( 'S1', 'S0', ),NEWLINE 'S1': ( 'S1', 'S0', ), },NEWLINE 'out... |
import torchNEWLINEimport loggingNEWLINENEWLINEimport models.modules.UNet_arch as UNet_archNEWLINElogger = logging.getLogger('base')NEWLINENEWLINENEWLINE####################NEWLINE# define networkNEWLINE####################NEWLINE#### GeneratorNEWLINEdef define_G(opt):NEWLINE opt_net = opt['network_G']NEWLINE whi... |
"""Auto-generated file, do not edit by hand. 81 metadata"""NEWLINEfrom ..phonemetadata import NumberFormatNEWLINENEWLINEPHONE_ALT_FORMAT_81 = [NumberFormat(pattern='(\\d{3})(\\d{2})(\\d{4})', format=u'\\1-\\2-\\3', leading_digits_pattern=['(?:12|57|99)0']), NumberFormat(pattern='(\\d{3})(\\d{2})(\\d{2})(\\d{2})', forma... |
"""This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license.NEWLINE"""NEWLINE"""NEWLINEDjango Base settings for Label Studio.NEWLINENEWLINEFor more information on this file, seeNEWLINEhttps://docs.djangoproject.c... |
# Copyright (c) 2017-2019 Uber Technologies, Inc.NEWLINE# SPDX-License-Identifier: Apache-2.0NEWLINENEWLINE"""NEWLINEThis example demonstrates how to use the Causal Effect Variational AutoencoderNEWLINE[1] implemented in pyro.contrib.cevae.CEVAE, documented atNEWLINEhttp://docs.pyro.ai/en/latest/contrib.cevae.htmlNEWLI... |
# coding: utf-8NEWLINENEWLINE"""NEWLINE KubernetesNEWLINENEWLINE No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501NEWLINENEWLINE The version of the OpenAPI document: v1.20.7NEWLINE Generated by: https://openapi-generator.techNEWLINE"""NE... |
# -*- coding: utf-8 -*-NEWLINE# Generated by Django 1.11.20 on 2019-02-25 16:08NEWLINEfrom __future__ import unicode_literalsNEWLINENEWLINEimport django.contrib.postgres.fields.hstoreNEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies ... |
# creating list out of dictionariesNEWLINENEWLINEpen_1 = {'color': 'black',NEWLINE 'price': '2.5',NEWLINE 'brand': 'faber castel'NEWLINE }NEWLINENEWLINEpen_2 = {'color': 'blue',NEWLINE 'price': '2.5',NEWLINE 'brand': 'faber castel'NEWLINE }NEWLINENEWLINEpen_3 = {'color': 'red',... |
"""NEWLINEImplementation of custom solvers: advection equation with forward-time, backward-space; Burgers' equation withNEWLINEMacCormack scheme and Korteweg-de Vries equation with Zabusky and Kruska scheme.NEWLINE"""NEWLINEimport numpy as npNEWLINEimport matplotlib.pyplot as pltNEWLINEimport matplotlib as mplNEWLINEim... |
from __future__ import unicode_literalsNEWLINENEWLINEfrom .theplatform import ThePlatformFeedIENEWLINEfrom ..utils import (NEWLINE ExtractorError,NEWLINE int_or_none,NEWLINE find_xpath_attr,NEWLINE xpath_element,NEWLINE xpath_text,NEWLINE update_url_query,NEWLINE)NEWLINENEWLINENEWLINEclass CBSBaseIE(T... |
# -*- coding:utf-8 -*-NEWLINE# @Time: 2021/1/18 8:49NEWLINE# @Author: Zhanyi HouNEWLINE# @Email: 1295752786@qq.comNEWLINE# @File: syntaxana.pyNEWLINE# -*- coding: utf-8 -*-NEWLINE'''NEWLINEpowered by NovalIDENEWLINE来自NovalIDE的词法分析模块NEWLINE作者:侯展意NEWLINE词法分析模块的重要组成单元、NEWLINE依靠各种正则表达式进行特征的提取。NEWLINENEWLINE'''NEWLINEfrom t... |
import numpy as npNEWLINEimport copyNEWLINENEWLINEfrom . import ekf_utilsNEWLINENEWLINEgtrack_MIN_DISPERSION_ALPHA = 0.1NEWLINEgtrack_EST_POINTS = 10NEWLINEgtrack_MIN_POINTS_TO_UPDATE_DISPERSION = 3NEWLINEgtrack_KNOWN_TARGET_POINTS_THRESHOLD = 50NEWLINENEWLINENEWLINE# GTRACK Module calls this function to instantiate GT... |
import numpy as npNEWLINEimport sysNEWLINEimport osNEWLINEimport timeNEWLINEimport copyNEWLINEimport datetimeNEWLINEimport pickleNEWLINEimport torch.nn as nnNEWLINEfrom torch.utils.data import DataLoaderNEWLINEimport torch.optim as optimNEWLINEimport torch.optim.lr_scheduler as lr_schedulerNEWLINEimport argparseNEWLINE... |
class StatusAuditoria:NEWLINE CONCLUIDO = "OK"NEWLINE NAO_CONCLUIDO = "NOK"NEWLINE |
import gymNEWLINEimport randomNEWLINEimport numpy as npNEWLINEimport argparseNEWLINEfrom arguments import get_argsNEWLINEfrom actorcritic import Actor, second, act, actorNEWLINEimport torchNEWLINEfrom torch.autograd import VariableNEWLINEimport torch.nn.functional as FNEWLINEimport torch.optim as optimNEWLINEimport tor... |
# -*- coding: utf-8 -*-NEWLINE# Copyright 2020 Google Inc.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-... |
#!/usr/bin/env pythonNEWLINE__author__ = 'mike knowles'NEWLINENEWLINEif __name__ == '__main__':NEWLINE pass |
# -*- coding: utf-8 -*-NEWLINENEWLINEimport ioNEWLINEimport reNEWLINENEWLINEimport demjsonNEWLINEimport requestsNEWLINEimport pandas as pdNEWLINENEWLINEfrom zvt.api.common import china_stock_code_to_idNEWLINEfrom zvt.api.technical import init_securities, df_to_dbNEWLINEfrom zvt.domain import Provider, StockIndex, Stock... |
from __future__ import divisionNEWLINENEWLINEimport numpy as npNEWLINEfrom skimage.util.dtype import dtype_rangeNEWLINEfrom skimage import drawNEWLINEfrom skimage import measureNEWLINENEWLINEfrom .plotplugin import PlotPluginNEWLINEfrom ..canvastools import ThickLineToolNEWLINENEWLINENEWLINE__all__ = ['LineProfile']NEW... |
# -*- coding: utf-8 -*-NEWLINE#NEWLINE# Copyright 2020 Google LLCNEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# https://www.apache.org/licenses/L... |
import osNEWLINEimport matplotlib.pyplot as pltNEWLINEimport numpy as npNEWLINEimport subprocessNEWLINEfrom tempfile import TemporaryDirectoryNEWLINENEWLINESEMIHDP_HOME_DIR = os.path.dirname(os.path.realpath(__file__))NEWLINESEMIHDP_EXEC = os.path.join(SEMIHDP_HOME_DIR, 'build/run_from_file')NEWLINEBASE_CMD = SEMIHDP_... |
#!/usr/bin/env python3NEWLINENEWLINE"""NEWLINEIf we list all the natural numbers below 10 that are multiples of 3 or 5,NEWLINEwe get 3, 5, 6 and 9. The sum of these multiples is 23.NEWLINENEWLINEFind the sum of all the multiples of 3 or 5 below 1000.NEWLINENEWLINEhttps://projecteuler.net/problem=1NEWLINENEWLINE"""NEWLI... |
import osNEWLINEimport pickleNEWLINEimport uuidNEWLINENEWLINEimport dagstermillNEWLINEfrom dagstermill.io_managers import local_output_notebook_io_managerNEWLINENEWLINEfrom dagster import (NEWLINE Field,NEWLINE FileHandle,NEWLINE InputDefinition,NEWLINE Int,NEWLINE List,NEWLINE ModeDefinition,NEWLINE ... |
# -*- coding: utf-8 -*-NEWLINE"""NEWLINETests for the Py2-like class:`basestring` type.NEWLINE"""NEWLINENEWLINEfrom __future__ import absolute_import, unicode_literals, print_functionNEWLINEimport osNEWLINENEWLINEfrom past import utilsNEWLINEfrom future.tests.base import unittestNEWLINEfrom past.builtins import basestr... |
from django.core.files.base import ContentFileNEWLINENEWLINEfrom readable.models import DocumentsNEWLINENEWLINEfrom .utils import TestCaseNEWLINENEWLINENEWLINEclass TestDocuments(TestCase):NEWLINE def setUp(self) -> None:NEWLINE super(TestDocuments, self).setUp()NEWLINE self.user = self.create_user("st... |
# coding=utf-8NEWLINE# Copyright 2020 The HuggingFace NLP Authors.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/L... |
import rlkit.misc.hyperparameter as hypNEWLINEfrom rlkit.demos.source.dict_to_mdp_path_loader import EncoderDictToMDPPathLoaderNEWLINEfrom rlkit.launchers.experiments.ashvin.awac_rig import awac_rig_experimentNEWLINEfrom rlkit.launchers.launcher_util import run_experimentNEWLINEfrom rlkit.launchers.arglauncher import r... |
# -*- coding: utf-8 -*-NEWLINENEWLINE# Form implementation generated from reading ui file '/media/raul/OS/Users/king_/Desktop/carrera/curso2018-2019/2oCuatri/TFG/gui_dbjudge/sql_judge/view/qt_view/custom_types/custom_type_row.ui'NEWLINE#NEWLINE# Created by: PyQt5 UI code generator 5.13.2NEWLINE#NEWLINE# WARNING! All ch... |
"""This module contains miscellaneous utilities."""NEWLINENEWLINE__author__ = "Damián Silvani"NEWLINE__copyright__ = "Dymaxion Labs"NEWLINE__license__ = "MIT"NEWLINENEWLINENEWLINEdef flatten(list):NEWLINE return [item for sublist in list for item in sublist]NEWLINE |
import argparseNEWLINEimport torchNEWLINEimport numpy as npNEWLINEimport osNEWLINEimport pickleNEWLINEfrom post_process.kcenter_greedy import kCenterGreedyNEWLINEfrom sklearn.random_projection import SparseRandomProjectionNEWLINENEWLINEfrom data_loader.one_class_dataset import get_train_dataloaderNEWLINEfrom model.one_... |
# -*- coding: utf-8 -*-NEWLINE#NEWLINE# Copyright (C) 2021 Graz University of Technology.NEWLINE# Copyright (C) 2021 CERN.NEWLINE# Copyright (C) 2021 TU Wien.NEWLINE#NEWLINE# Invenio-Records-Permissions is free software; you can redistribute itNEWLINE# and/or modify it under the terms of the MIT License; see LICENSE fi... |
import sys, os, reNEWLINEimport timeNEWLINENEWLINEsys.path.append("lib")NEWLINEimport utilsNEWLINENEWLINEimport requestsNEWLINEfrom bs4 import BeautifulSoupNEWLINENEWLINEtail_number_records = utils.read_json_lines_file('data/tail_numbers.jsonl')NEWLINENEWLINEaircraft_records = []NEWLINE# Loop through the tail numbers, ... |
import importlibNEWLINEimport inspectNEWLINEimport osNEWLINEimport pathlibNEWLINENEWLINEimport pkg_resourcesNEWLINEfrom clvm_tools.clvmc import compile_clvm as compile_clvm_pyNEWLINEfrom flax.types.blockchain_format.program import Program, SerializedProgramNEWLINENEWLINEcompile_clvm = compile_clvm_pyNEWLINENEWLINE# Han... |
"""NEWLINEtorch.multiprocessing is a wrapper around the native :mod:`multiprocessing`NEWLINEmodule. It registers custom reducers, that use shared memory to provide sharedNEWLINEviews on the same data in different processes. Once the tensor/storage is movedNEWLINEto shared_memory (see :func:`~torch.Tensor.share_memory_`... |
import argparseNEWLINEimport jsonNEWLINEimport pandas as pdNEWLINEpd.options.display.float_format = '{:,.2f}'.formatNEWLINEimport randomNEWLINEimport numpy as npNEWLINEimport tqdmNEWLINENEWLINEfrom src.sim import SimNEWLINENEWLINEdef run(params):NEWLINE """simulates the investment on the S&P500 index similar toNEWLI... |
import osNEWLINEimport matplotlib.pyplot as pltNEWLINEimport numpy as npNEWLINEimport subprocessNEWLINEfrom tempfile import TemporaryDirectoryNEWLINENEWLINESEMIHDP_HOME_DIR = os.path.dirname(os.path.realpath(__file__))NEWLINESEMIHDP_EXEC = os.path.join(SEMIHDP_HOME_DIR, 'build/run_from_file')NEWLINEBASE_CMD = SEMIHDP_... |
from os import mkdirNEWLINEfrom os.path import existsNEWLINENEWLINEfrom .dist_tree import DistTreeNEWLINEfrom ...typehint import *NEWLINENEWLINENEWLINEdef main(conf: TConf):NEWLINE """ Create dist-side tree (all empty folders under `dst_root`) """NEWLINE _precheck(conf)NEWLINE NEWLINE # create main folders ... |
NEWLINE"""NEWLINEPERIODSNEWLINE"""NEWLINENEWLINEnumPeriods = 60NEWLINENEWLINE"""NEWLINESTOPSNEWLINE"""NEWLINENEWLINEnumStations = 6NEWLINENEWLINEstation_names = (NEWLINE "Hamburg Hbf", # 0NEWLINE "Landwehr", # 1NEWLINE "Hasselbrook", # 2NEWLINE "Wansbeker Chaussee*", # 3NEWLINE "Friedrichsberg*", # 4NEWLINE "Barmb... |
#!/usr/bin/env/ pythonNEWLINEprint ("Hola mundo")NEWLINENEWLINE# TIPOS DE DATOSNEWLINENEWLINE# Esto e unha cadeaNEWLINEc = "Hola mundo"NEWLINENEWLINE# Esto e un enteiroNEWLINEe = 23NEWLINENEWLINE# Esto e un longNEWLINElong = 23NEWLINENEWLINE# Numero en octalNEWLINEoctal = 0o27NEWLINENEWLINE# Numero en HexadecimalNEWLIN... |
# Third-partyNEWLINEimport astropy.units as uNEWLINENEWLINENEWLINEdef quantity_from_hdf5(dset):NEWLINE """NEWLINE Return an Astropy Quantity object from a key in an HDF5 file,NEWLINE group, or dataset. This checks to see if the input file/group/datasetNEWLINE contains a ``'unit'`` attribute (e.g., in `f.att... |
# Twitter AUTH:NEWLINEAPP_KEY = 'APP_KEY_HERE' NEWLINEAPP_SECRET = 'APP_SECRET_HERE' NEWLINEOAUTH_TOKEN = 'TOKEN_HERE'NEWLINEOAUTH_TOKEN_SECRET = 'TOKEN_SECRET_HERE'NEWLINENEWLINE# Telegram options:NEWLINETELEGRAM_CHANNEL = 'CHANNEL_NAME_HERE'NEWLINETELEGRAM_TOKEN = 'TOKEN_HERE'NEWLINENEWLINE# Misc:NEWLINETWITTER_USER_... |
# Copyright (c) 2017-present, Facebook, Inc.NEWLINE# All rights reserved.NEWLINE#NEWLINE# This source code is licensed under the license found in the LICENSE file inNEWLINE# the root directory of this source tree. An additional grant of patent rightsNEWLINE# can be found in the PATENTS file in the same directory.NEWLIN... |
# encoding: utf-8NEWLINE"""Event loop integration for the ZeroMQ-based kernels."""NEWLINENEWLINE# Copyright (c) IPython Development Team.NEWLINE# Distributed under the terms of the Modified BSD License.NEWLINENEWLINEfrom functools import partialNEWLINEimport osNEWLINEimport sysNEWLINEimport platformNEWLINENEWLINEimport... |
from __future__ import divisionNEWLINENEWLINEimport numpy as npNEWLINEfrom skimage.util.dtype import dtype_rangeNEWLINEfrom skimage import drawNEWLINEfrom skimage import measureNEWLINENEWLINEfrom .plotplugin import PlotPluginNEWLINEfrom ..canvastools import ThickLineToolNEWLINENEWLINENEWLINE__all__ = ['LineProfile']NEW... |
NEWLINEimport numpy as npNEWLINENEWLINEclass Variable():NEWLINENEWLINE def __init__(self, data, creator=None):NEWLINENEWLINE if data is None:NEWLINE raise ValueError("data is not allowed to be None.")NEWLINE if not isinstance(data, np.ndarray):NEWLINE data = np.array(data)NEWLINE... |
import pytestNEWLINEimport osNEWLINEimport numpy as npNEWLINENEWLINEfrom .utils import get_dataNEWLINEfrom ..wb_attack_data_generator import WBAttackGeneratorNEWLINENEWLINENEWLINEdef test_data():NEWLINE """NEWLINE The Data Generator should not crashNEWLINE """NEWLINE model, x_train, x_test, y_train, y_test ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.