text
stringlengths
28
881k
NEWLINEfrom .client import NetworkTableClientNEWLINEfrom .server import NetworkTableServerNEWLINEfrom .socketstream import SocketStreamFactory, SocketServerStreamProviderNEWLINEfrom .type import BooleanArray, NumberArray, StringArray, DefaultEntryTypesNEWLINE
# -*- coding: utf-8 -*-NEWLINENEWLINE'''NEWLINE**Wavelet Based in CUSUM control chart for filtering signals Project (module**NEWLINE``statsWaveletFilt.miscellaneous`` **):** A Miscellaneous of functions forNEWLINEwork with data and show wavelet coefficientsNEWLINENEWLINE*Created by Tiarles Guterres, 2018*NEWLINE'''NEWL...
#!/usr/bin/env pythonNEWLINE# coding=utf-8NEWLINENEWLINEimport socketNEWLINENEWLINEfrom urllib.parse import urlparseNEWLINEfrom http.server import HTTPServer, BaseHTTPRequestHandlerNEWLINENEWLINENEWLINEclass ProxyHandler(BaseException):NEWLINE """NEWLINE 参考链接:NEWLINE https://zhuanlan.zhihu.com/p/28737960NEWLI...
#===============================================================================NEWLINE#NEWLINE# FILE: parse_log_3.pyNEWLINE#NEWLINE# USAGE:NEWLINE#NEWLINE# DESCRIPTION:NEWLINE#NEWLINE# OPTIONS: NEWLINE# REQUIREMENTS: NEWLINE# BUGS: NEWLINE# NOTES: NEWLINE# AUTHOR: Debjit PalNE...
NEWLINE#-*-coding:utf-8-*- 设置utf-8编码NEWLINEprint "Hello World!"NEWLINEprint "Hello Again"NEWLINEprint "I like typing this."NEWLINEprint "This is fun."NEWLINEprint "Yay! Printing."NEWLINEprint "I'd much rather you 'not "NEWLINEprint 'I "said" do not touch this.'NEWLINE#print "我爱你们!"NEWLINE# A comment , this is so you ca...
from random import randintNEWLINEfrom tkinter import *NEWLINEfrom tkinter import ttkNEWLINENEWLINENEWLINEclass Node:NEWLINE def __init__(self, x, y, aValue):NEWLINE self.x = xNEWLINE self.y = yNEWLINE self.leftNode = 0NEWLINE self.bottomNode = 0NEWLINE self.rightNode = 0NEWLINE ...
# coding=utf-8NEWLINE# --------------------------------------------------------------------------NEWLINE# Copyright (c) Microsoft Corporation. All rights reserved.NEWLINE# Licensed under the MIT License. See License.txt in the project root for license information.NEWLINE# Code generated by Microsoft (R) AutoRest Code G...
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, ...
# pylint: disable=too-many-linesNEWLINE# coding=utf-8NEWLINE# --------------------------------------------------------------------------NEWLINE# Copyright (c) Microsoft Corporation. All rights reserved.NEWLINE# Licensed under the MIT License. See License.txt in the project root for license information.NEWLINE# Code gen...
import osNEWLINENEWLINEBINARIES_PATHS = [NEWLINE '/home/ttz/git/opencv-4.3.0/build/lib'NEWLINE] + BINARIES_PATHSNEWLINE
# Copyright 2017 Battelle Energy Alliance, 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# http://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLIN...
def DetectCollision(characterPosX, characterPosY, character, obstaclePosX, obstaclePosY, obstacle):NEWLINE MARGIN_ERROR = 18 # error with image pixelsNEWLINE collision = FalseNEWLINENEWLINE print("Character:",characterPosX, characterPosY, "\tObstacle", obstaclePosX, obstaclePosY)NEWLINE if ( characterPosX +...
import matplotlib.pyplot as pltNEWLINENEWLINENEWLINEdef analyze(context, perf):NEWLINE ax1 = plt.subplot(211)NEWLINE perf.portfolio_value.plot(ax=ax1)NEWLINE ax2 = plt.subplot(212, sharex=ax1)NEWLINE perf.AAPL.plot(ax=ax2)NEWLINE plt.gcf().set_size_inches(18, 8)NEWLINE plt.show()NEWLINE
"""NEWLINEModule: 'ujson' on micropython-v1.15-esp8266NEWLINE"""NEWLINE# MCU: {'ver': 'v1.15', 'port': 'esp8266', 'arch': 'xtensa', 'sysname': 'esp8266', 'release': '1.15', 'name': 'micropython', 'mpy': 9733, 'version': '1.15', 'machine': 'ESP module with ESP8266', 'build': '', 'nodename': 'esp8266', 'platform': 'esp82...
import torch.nn as nnNEWLINEimport numpy as npNEWLINEimport matplotlib.pyplot as pltNEWLINEfrom PIL import ImageNEWLINEimport cv2NEWLINENEWLINENEWLINEdef color2hist(color):NEWLINE color = np.asarray(color).flatten()NEWLINE padding_width = 255 - np.max(color)NEWLINE color = plt.hist(color, bins=np.max(color))[0...
# Copyright (c) Facebook, Inc. and its affiliates.NEWLINE#NEWLINE# This source code is licensed under the MIT license found in theNEWLINE# LICENSE file in the root directory of this source tree.NEWLINENEWLINEimport mathNEWLINENEWLINEimport torchNEWLINEimport torch.nn.functional as FNEWLINENEWLINEfrom fairseq import uti...
__all__ = [NEWLINE 'dates',NEWLINE 'dictionary',NEWLINE 'greetings',NEWLINE 'ircbot',NEWLINE 'js',NEWLINE 'listcommands',NEWLINE 'locator',NEWLINE 'pip',NEWLINE 'repeats',NEWLINE 'scheme',NEWLINE 'storedresponses',NEWLINE]NEWLINE
from unittest import TestCaseNEWLINEimport numpy as npNEWLINEimport osNEWLINEimport pickleNEWLINEimport loggingNEWLINENEWLINEfrom qcodes.data.data_array import DataArrayNEWLINEfrom qcodes.data.io import DiskIONEWLINEfrom qcodes.data.data_set import load_data, new_data, DataSetNEWLINEfrom qcodes.utils.helpers import Log...
import wxNEWLINENEWLINEfrom meerk40t.gui.scene.sceneconst import (NEWLINE RESPONSE_ABORT,NEWLINE RESPONSE_CHAIN,NEWLINE RESPONSE_CONSUME,NEWLINE)NEWLINEfrom meerk40t.gui.toolwidgets.toolwidget import ToolWidgetNEWLINEfrom meerk40t.svgelements import Ellipse, PathNEWLINENEWLINENEWLINEclass EllipseTool(ToolWidge...
'''NEWLINEData structure of the input .npz:NEWLINEthe data is save in python dictionary format with keys: 'acs', 'ep_rets', 'rews', 'obs'NEWLINEthe values of each item is a list storing the expert trajectory sequentiallyNEWLINEa transition can be: (data['obs'][t], data['acs'][t], data['obs'][t+1]) and get reward data['...
"""numpy.distutils.fcompilerNEWLINENEWLINEContains FCompiler, an abstract base class that defines the interfaceNEWLINEfor the numpy.distutils Fortran compiler abstraction model.NEWLINENEWLINETerminology:NEWLINENEWLINETo be consistent, where the term 'executable' is used, it means the singleNEWLINEfile, like 'gcc', that...
formatter = "%r %r %r %r"NEWLINEprint (formatter % (1 ,2 ,3 , 4))NEWLINEprint (formatter % ("one","two","three","four"))NEWLINEprint (formatter % (True, False, False, True))NEWLINEprint (formatter % (formatter ,formatter, formatter, formatter))NEWLINEprint (formatter % NEWLINE ("I had this thing.",NEWLINE ...
# simple_xls.py: write simple Excel spreadsheetsNEWLINE# Copyright (C) University of Manchester 2013-2019 Peter BriggsNEWLINE#NEWLINE########################################################################NEWLINE#NEWLINE# simple_xls.pyNEWLINE#NEWLINE##############################################################...
from __future__ import unicode_literalsNEWLINENEWLINEfrom django.conf import settingsNEWLINEfrom django import templateNEWLINEfrom django.contrib.humanize.templatetags.humanize import intcommaNEWLINEfrom django.template.defaultfilters import stringfilterNEWLINENEWLINEfrom wagtail.wagtailcore import hooksNEWLINEfrom wag...
# Generated by Django 3.0.6 on 2020-05-16 05:00NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINEimport django.db.models.deletionNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE initial = TrueNEWLINENEWLINE dependencies = [NEWLINE ('books', '0002_auto_20200513_0504'),NEW...
innings_format='{team} : {total}/{wickets} || {over}|{overs}\n\t\t\t{ball_by}'NEWLINEclass matchstats:NEWLINE NEWLINE def __init__(self,mcode,team1,team2,overs):NEWLINE self.match_stats={'mcode':mcode,'date_time':None,'team1':team1,'team2':team2,'overs':overs,'status':None,'score1':[None,0,0,0,overs,None...
# -*- coding: utf-8 -*-NEWLINE# BioSTEAM: The Biorefinery Simulation and Techno-Economic Analysis ModulesNEWLINE# Copyright (C) 2020, Yoel Cortes-Pena <yoelcortes@gmail.com>NEWLINE# NEWLINE# This module is under the UIUC open-source license. See NEWLINE# github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/LICENSE....
#!/usr/bin/env python3NEWLINE# Copyright (c) Meta Platforms, Inc. and affiliates.NEWLINE# All rights reserved.NEWLINE#NEWLINE# This source code is licensed under the BSD-style license found in theNEWLINE# LICENSE file in the root directory of this source tree.NEWLINENEWLINEfrom typing import List, OptionalNEWLINENEWLIN...
#!/usr/bin/env python2NEWLINEimport numpy as npNEWLINEimport path_parserNEWLINEfrom mpl_toolkits.mplot3d import Axes3DNEWLINEimport matplotlib.pyplot as pltNEWLINEfrom matplotlib import cmNEWLINEfrom matplotlib.ticker import LinearLocator, FormatStrFormatterNEWLINEfrom scipy.spatial import KDTreeNEWLINE#ruta='sample_ma...
# Copyright 2015 The Chromium Authors. All rights reserved.NEWLINE# Use of this source code is governed by a BSD-style license that can beNEWLINE# found in the LICENSE file.NEWLINE"""Determines support level for different steps for masters."""NEWLINENEWLINEfrom services.deps import GetOSPlatformNameNEWLINEfrom model.wf...
# coding: utf-8NEWLINENEWLINE"""NEWLINE SendinBlue APINEWLINENEWLINE SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You ...
# coding=utf-8NEWLINE"""NEWLINEThis code was generated byNEWLINE\ / _ _ _| _ _NEWLINE | (_)\/(_)(_|\/| |(/_ v1.0.0NEWLINE / /NEWLINE"""NEWLINENEWLINEfrom twilio.base import deserializeNEWLINEfrom twilio.base import valuesNEWLINEfrom twilio.base.instance_context import InstanceContextNEWLINEfrom twili...
#!/usr/bin/env python3NEWLINE# Copyright (c) 2014-2020 The Vadercoin Core developersNEWLINE# Distributed under the MIT software license, see the accompanyingNEWLINE# file COPYING or http://www.opensource.org/licenses/mit-license.php.NEWLINENEWLINE"""NEWLINE ZMQ example using python3's asyncioNEWLINENEWLINE Vaderc...
# Copyright 2021 UW-IT, University of WashingtonNEWLINE# SPDX-License-Identifier: Apache-2.0NEWLINENEWLINEfrom .utils import MOCK_SETTINGS, get_mock_manifest, generate_mocksNEWLINEfrom webpack_bridge.templatetags.webpack_bridge import render_webpack_entryNEWLINENEWLINEfrom django.test import TestCaseNEWLINEfrom django....
"""NEWLINE Created by howie.hu at 2022-01-21.NEWLINE Description: 执行分发动作NEWLINE - 执行命令: PIPENV_DOTENV_LOCATION=./pro.env pipenv run python src/sender/action.pyNEWLINE Changelog: all notable changes to this file will be documentedNEWLINE"""NEWLINEimport timeNEWLINENEWLINEfrom src.config import ConfigNEWL...
import numpy as npNEWLINEfrom sklearn.calibration import CalibratedClassifierCVNEWLINEfrom sklearn.datasets import load_breast_cancerNEWLINEfrom sklearn.ensemble import BaggingClassifierNEWLINEfrom sklearn.linear_model import LogisticRegressionNEWLINEfrom sklearn.linear_model import PerceptronNEWLINEfrom sklearn.model_...
#coding:utf-8NEWLINEimport codecsNEWLINEimport osNEWLINEimport sysNEWLINE NEWLINEtry:NEWLINE from setuptools import setupNEWLINEexcept:NEWLINE from distutils.core import setupNEWLINE"""NEWLINE打包的用的setup必须引入,NEWLINE"""NEWLINE NEWLINEdef read(fname):NEWLINENEWLINE return codecs.open(os.path.join(os.path.dirnam...
# Copyright 2019 The TensorFlow Authors. 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/LICENS...
from django.shortcuts import renderNEWLINEfrom django.contrib.auth.models import UserNEWLINEfrom django.http import Http404NEWLINEfrom django.views.generic import DetailViewNEWLINEfrom django.contrib.auth.decorators import login_requiredNEWLINEfrom django.utils.decorators import method_decoratorNEWLINEfrom django.short...
# coding=utf-8NEWLINE# --------------------------------------------------------------------------NEWLINE# Copyright (c) Microsoft Corporation. All rights reserved.NEWLINE# Licensed under the MIT License. See License.txt in the project root forNEWLINE# license information.NEWLINE#NEWLINE# Code generated by Microsoft (R)...
from service import ServiceScraper, ServiceSoundDetector, ServiceLanguageDetectorNEWLINENEWLINEif __name__ == "__main__":NEWLINE services = [ServiceScraper, ServiceSoundDetector, ServiceLanguageDetector]NEWLINENEWLINE for service in services:NEWLINE s = service()NEWLINE s.process()
#NEWLINE# Copyright (c) 2021 Project CHIP AuthorsNEWLINE# 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# ht...
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 ...
# ==============================================================================NEWLINE# zero.pyNEWLINE# ==============================================================================NEWLINENEWLINEimport osNEWLINEimport sysNEWLINENEWLINEERROR = FalseNEWLINENEWLINEdef main(function):NEWLINE try:NEWLINE argumen...
# coding=utf-8NEWLINE# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***NEWLINE# *** Do not edit by hand unless you're certain you know what you are doing! ***NEWLINENEWLINEimport jsonNEWLINEimport warningsNEWLINEimport pulumiNEWLINEimport pulumi.runtimeNEWLINEfrom typing import Unio...
# Generated by Django 3.1.4 on 2021-02-06 21:18NEWLINENEWLINEfrom django.db import migrationsNEWLINENEWLINENEWLINEdef register_micropub_scopes(apps, schema):NEWLINENEWLINE MMicropubScope = apps.get_model("indieweb", "MMicropubScope")NEWLINENEWLINE MMicropubScope.objects.get_or_create(key="create", name="Create")N...
"""Set up the Python API for dingz devices."""NEWLINEimport osNEWLINENEWLINEimport sysNEWLINENEWLINEfrom setuptools import setup, find_packagesNEWLINENEWLINEhere = os.path.abspath(os.path.dirname(__file__))NEWLINENEWLINEwith open(os.path.join(here, "README.rst"), encoding="utf-8") as readme:NEWLINE long_description ...
# -*- coding: utf-8 -*-NEWLINE"""NEWLINECreated on Thu Jan 14 12:58:41 2015NEWLINE@author: Tony SaadNEWLINE"""NEWLINE# -*- coding: utf-8 -*-NEWLINENEWLINEimport numpy as npNEWLINEimport argparseNEWLINEimport osNEWLINEfrom xml.dom import minidomNEWLINEfrom shutil import copyfileNEWLINEimport matplotlib.pyplot as pltNEWL...
import sysNEWLINEimport rdkitNEWLINEfrom argparse import ArgumentParserNEWLINEfrom rdkit import Chem, DataStructsNEWLINEfrom rdkit.Chem import AllChemNEWLINEfrom rdkit.Chem.Scaffolds import MurckoScaffoldNEWLINENEWLINEparser = ArgumentParser()NEWLINEparser.add_argument('--ref_path', required=True)NEWLINEargs = parser.p...
import unittestNEWLINENEWLINEfrom py_asciimath.utils.utils import UtilsMatNEWLINENEWLINENEWLINEclass TestUtilsMat(unittest.TestCase):NEWLINE def setUp(self):NEWLINE passNEWLINENEWLINE # Returns True if the string contains 4 a.NEWLINE def test_check_mat_ok_1(self):NEWLINE b, _ = UtilsMat.check_mat...
from struct import unpackNEWLINENEWLINENEWLINEclass FloatLookup:NEWLINE def __init__(self, data): # data: Tuple[float]NEWLINE self.data = dataNEWLINE self.range_ = len(data)NEWLINENEWLINE @staticmethodNEWLINE def get_lookup_from_double(file) -> 'FloatLookup':NEWLINE range_, = unpack('>i',...
import unittestNEWLINEimport osNEWLINEfrom ...BaseTestCase import BaseTestCaseNEWLINEfrom kombi.Task import TaskNEWLINEfrom kombi.Crawler.Fs import FsCrawlerNEWLINENEWLINEclass ResizeImageTaskTest(BaseTestCase):NEWLINE """Test ResizeImage task."""NEWLINENEWLINE __sourcePath = os.path.join(BaseTestCase.dataTestsDi...
"""NEWLINE :codeauthor: Megan Wilhite<mwilhite@saltstack.com>NEWLINE"""NEWLINENEWLINENEWLINEimport pytestNEWLINEimport salt.modules.mac_service as mac_serviceNEWLINEfrom salt.exceptions import CommandExecutionErrorNEWLINEfrom tests.support.mixins import LoaderModuleMockMixinNEWLINEfrom tests.support.mock import Magi...
# coding=utf-8NEWLINE# --------------------------------------------------------------------------NEWLINE# Copyright (c) Microsoft Corporation. All rights reserved.NEWLINE# Licensed under the MIT License. See License.txt in the project root forNEWLINE# license information.NEWLINE#NEWLINE# Code generated by Microsoft (R)...
class RenderContentBase():NEWLINE '''NEWLINE This defines the data common for all content type renderersNEWLINE '''NEWLINENEWLINE def __init__(self, question_bundle):NEWLINE self.question_list = question_bundle.splitlines()NEWLINENEWLINE self.close_tokens = ')」}>』'NEWLINE self.tokens = ...
# Licensed under a 3-clause BSD style license - see LICENSE.rstNEWLINENEWLINE"""NEWLINEThis module provides utility functions for the models packageNEWLINE"""NEWLINENEWLINENEWLINEfrom collections import dequeNEWLINEfrom collections.abc import MutableMappingNEWLINEfrom inspect import signatureNEWLINENEWLINEimport numpy ...
# -*- coding: utf-8 -*-NEWLINE"""NEWLINECreated on Thu Jan 14 12:58:41 2015NEWLINE@author: Tony SaadNEWLINE"""NEWLINE# -*- coding: utf-8 -*-NEWLINENEWLINEimport numpy as npNEWLINEimport argparseNEWLINEimport osNEWLINEfrom xml.dom import minidomNEWLINEfrom shutil import copyfileNEWLINEimport matplotlib.pyplot as pltNEWL...
from django.apps import AppConfigNEWLINENEWLINENEWLINEclass GiftConfig(AppConfig):NEWLINE name = 'gift'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 required by applicable law or agreed to in wri...
# Copyright (C) 2020-2021 Intel CorporationNEWLINE# SPDX-License-Identifier: Apache-2.0NEWLINENEWLINE"""You may copy this file as the starting point of your own model."""NEWLINENEWLINEimport numpy as npNEWLINEfrom logging import getLoggerNEWLINEfrom torchvision.datasets import ImageFolderNEWLINEfrom torchvision.transfo...
#!/usr/bin/env pythonNEWLINENEWLINEimport jsonNEWLINEimport sysNEWLINEimport requestsNEWLINEfrom bs4 import BeautifulSoupNEWLINENEWLINEresponse = requests.get('http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeInstances.html')NEWLINEsoup = BeautifulSoup(response.text)NEWLINENEWLINEsection...
"""NEWLINE Models to manage users and profilesNEWLINE"""NEWLINEfrom django.db import modelsNEWLINEfrom django.contrib.auth.models import UserNEWLINEfrom django.conf import settingsNEWLINEfrom django.utils.translation import gettext_lazy as _NEWLINENEWLINEfrom geotrek.common.utils import reifyNEWLINENEWLINENEWLINEcla...
import argparseNEWLINEimport osNEWLINEfrom math import log10NEWLINENEWLINEimport pandas as pdNEWLINEimport torch.optim as optimNEWLINEimport torch.utils.dataNEWLINEimport torchvision.utils as utilsNEWLINEfrom torch.autograd import VariableNEWLINEfrom torch.utils.data import DataLoaderNEWLINEfrom tqdm import tqdmNEWLINE...
# 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...
# 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/LICENSE-2.0NEWLINE#NEWLINE# Unless requ...
# GENERATED BY KOMAND SDK - DO NOT EDITNEWLINEfrom .action import SketchifyNEWLINE
from django_asservio_core.models import (NEWLINE CodeDictionary, NameDictionary,NEWLINE Dictionary, DescriptionDictionaryNEWLINE)NEWLINENEWLINENEWLINEclass Code(CodeDictionary):NEWLINE """Code dictionary."""NEWLINE passNEWLINENEWLINENEWLINEclass Name(NameDictionary):NEWLINE """Name dictionary."""NEWLINE ...
# This file is part of the Astrometry.net suite.NEWLINE# Licensed under a 3-clause BSD style license - see LICENSENEWLINENEWLINE# Generates FITS tables from CSV lists of OpenNGC entries and names.NEWLINENEWLINEfrom __future__ import print_functionNEWLINENEWLINEimport csvNEWLINENEWLINEfrom astrometry.util.fits import fi...
import reNEWLINENEWLINE_TESTS = [NEWLINE "//REL/RELIDO",NEWLINE "TS//SI-G/TK//RS/OC/NF",NEWLINE "TS//SI-ABC-DEF//OC/NF",NEWLINE "TS//SI-G ABCD EFGH-XYZ//OC/NF",NEWLINE "TS//ANB/SI/TK/XNB//NF",NEWLINE "TS//SAR-BP-123/CA-XYZ YYY//NF",NEWLINE "TS//RD-CNWDI//NF",NEWLINE "S//FRD-SIGMA 14 18//REL",NEW...
#!/usr/bin/env pythonNEWLINE#-*- coding:utf-8 -*-NEWLINE# Author: Donny You(youansheng@gmail.com)NEWLINE# Evaluation of cityscape.NEWLINENEWLINENEWLINEfrom __future__ import absolute_importNEWLINEfrom __future__ import divisionNEWLINEfrom __future__ import print_functionNEWLINENEWLINEimport fnmatchNEWLINEimport argpars...
# Copyright 2021 University College London. 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/LIC...
#!/usr/bin/env python3NEWLINE# Copyright 2020-present NAVER Corp. Under BSD 3-clause licenseNEWLINENEWLINEimport argparseNEWLINEimport osNEWLINEimport loggingNEWLINEimport pathlibNEWLINENEWLINEimport path_to_kapture_localization # noqa: F401NEWLINEimport kapture_localization.utils.loggingNEWLINEfrom kapture_localizati...
# Generated by Django 3.0 on 2020-04-21 20:13NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINEimport django.db.models.deletionNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE initial = TrueNEWLINENEWLINE dependencies = [NEWLINE ]NEWLINENEWLINE operations = [NEWLINE ...
# -*- coding: utf-8 -*-NEWLINEfrom __future__ import unicode_literalsNEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINEimport wagtail.core.fieldsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [("puput", "0001_initial")]NEWLINENEWLINE operations = [NEWLIN...
import numpy as np # linear algebraNEWLINEimport pandas as pd # data processingNEWLINEimport datetime as dt # date and time processing functionsNEWLINEimport matplotlib.pyplot as plt # basic plotting NEWLINEimport matplotlib.dates as mdates # date processing in matplotlibNEWLINEfrom matplotlib.offsetbox import Anchored...
import asyncioNEWLINEimport loggingNEWLINEimport pickleNEWLINENEWLINEimport timeNEWLINEfrom functools import partialNEWLINEfrom typing import Callable, Any, TypeVarNEWLINENEWLINEfrom aio_pika.exchange import ExchangeTypeNEWLINEfrom aio_pika.channel import ChannelNEWLINEfrom aio_pika.exceptions import UnroutableErrorNEW...
# Copyright 2020 Huawei Technologies Co., LtdNEWLINE#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...
# -*- coding: utf-8 -*-NEWLINE# Copyright 2020-2021 CERNNEWLINE#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.0N...
import sysNEWLINEfrom esky import bdist_eskyNEWLINEfrom distutils.core import setupNEWLINE NEWLINE# for freezing with eskyNEWLINE# uncomment the block you want to run depending on your freezerNEWLINE# > python setup.py bdist_eskyNEWLINENEWLINE# Using py2exeNEWLINE#setup(NEWLINE# name = "example-app",NEWLINE# v...
import cursesNEWLINEimport collectionsNEWLINEimport sysNEWLINEimport osNEWLINEfrom time import sleepNEWLINENEWLINE# File syntaxNEWLINE#NEWLINE# When there's not enough space for all elements UI will go into scroll modeNEWLINE#NEWLINE# Syntax:NEWLINE# script.py ui_example.txtNEWLINE#NEWLINE# an object is one line, split...
#! /usr/vin/env pythonNEWLINE# -*-coding:utf8-*-NEWLINENEWLINEfrom collections import OrderedDictNEWLINENEWLINENEWLINEclass LRUCache(OrderedDict):NEWLINE '''不能存储可变类型对象,不能并发访问set()''' NEWLINENEWLINE def __init__(self,capacity):NEWLINE self.capacity = capacityNEWLINE self.cache = OrderedDict()NEWLINEN...
# Copyright 2018 The TensorFlow Probability 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.0NEWL...
#!/usr/bin/env pythonNEWLINE# Copyright (c) 2011 Google Inc. All rights reserved.NEWLINE#NEWLINE# Redistribution and use in source and binary forms, with or withoutNEWLINE# modification, are permitted provided that the following conditions areNEWLINE# met:NEWLINE#NEWLINE# * Redistributions of source code must retai...
"""Testing handling with CoreState."""NEWLINENEWLINEfrom supervisor.coresys import CoreSysNEWLINENEWLINENEWLINEasync def test_timezone(run_dir, coresys: CoreSys):NEWLINE """Test write corestate to /run/supervisor."""NEWLINENEWLINE assert coresys.timezone == "UTC"NEWLINE assert coresys.config.timezone is NoneNE...
import abcNEWLINEimport numpy as npNEWLINENEWLINEfrom . import _base_modelNEWLINENEWLINENEWLINEclass SklearnModel(_base_model.BaseModel, abc.ABC):NEWLINE """NEWLINE Parent class based on :obj:`~easyPheno.model._base_model.BaseModel` for all models with a sklearn-like API to shareNEWLINE functionalities. See :o...
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-NEWLINE#NEWLINE# Copyright 2002 Ben Escoto <ben@emerose.org>NEWLINE# Copyright 2007 Kenneth Loafman <kenneth@loafman.com>NEWLINE#NEWLINE# This file is part of duplicity.NEWLINE#NEWLINE# Duplicity is free software; you can redistribute it and/or modify itNEWLINE# u...
# Generated by Django 2.2.4 on 2021-01-15 01:18NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('users', '0019_puzzlesolution'),NEWLINE ]NEWLINENEWLINE operations = [NEWLINE migrations.AddField...
# -*- coding: utf-8 -*-NEWLINE# Copyright (c) Facebook, Inc. and its affiliates. All Rights ReservedNEWLINEimport loggingNEWLINEimport copyNEWLINEimport torchNEWLINEimport torchvisionNEWLINEimport numpy as npNEWLINEimport cv2NEWLINEfrom PIL import ImageNEWLINEfrom fvcore.common.file_io import PathManagerNEWLINEfrom fvc...
"""Objects, functions and constants relating to OCP bounds.NEWLINENEWLINEAttributesNEWLINE----------NEWLINEDEFAULT_ASSUME_INF_BOUNDS : boolNEWLINE Default as to whether Pycollo should treat unspecified bounds as beingNEWLINE numerically infinite.NEWLINEDEFAULT_INF_VALUE : floatNEWLINE Default numerical value f...
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...
class ServerFlushed:NEWLINE def __init__(self, request):NEWLINE self.request = requestNEWLINE
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)...
custoUnitario = [0.35, 0.45] # variável globalNEWLINEunidadesPorMetro = [37, 30] # variável globalNEWLINEcustoMateriaisPorMetro = [9, 7] # variável globalNEWLINEmetragemParedes = 200 # variável globalNEWLINENEWLINEdef calculaPrecoConstrucao():NEWLINE custosTotais = [] # variável localNEWLINE for...
# Licensed to the Apache Software Foundation (ASF) under one or moreNEWLINE# contributor license agreements. See the NOTICE file distributed withNEWLINE# this work for additional information regarding copyright ownership.NEWLINE# The ASF licenses this file to You under the Apache License, Version 2.0NEWLINE# (the "Lic...
#!/usr/bin/env pythonNEWLINENEWLINE# Import modulesNEWLINEfrom pcl_helper import *NEWLINENEWLINENEWLINE# TODO: Define functions as requiredNEWLINENEWLINE# Callback function for your Point Cloud SubscriberNEWLINEdef pcl_callback(pcl_msg):NEWLINE # TODO: Convert ROS msg to PCL dataNEWLINE cloud = ros_to_pcl(pcl_msg...
# coding=utf-8NEWLINE# Copyright 2019 The Google Research 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 argparseNEWLINENEWLINEfrom .virsh_cleanup import DEFAULT_SKIP_LIST, clean_virsh_resources, logNEWLINENEWLINENEWLINEdef _get_parsed_args() -> argparse.Namespace:NEWLINE parser = argparse.ArgumentParser(description="Clear libvrt resources")NEWLINE group = parser.add_mutually_exclusive_group()NEWLINE group...
from Node import NodeNEWLINEfrom shutil import rmtreeNEWLINE# from config_creator import create_file_structureNEWLINEfrom sesamutils import sesam_loggerNEWLINEfrom os import mkdirNEWLINEfrom git import RepoNEWLINEimport subprocessNEWLINEfrom json import dumps as dump_jsonNEWLINENEWLINENEWLINEclass Gitter:NEWLINE def...
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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# A copy of the License is located atNEWLINE#NEWLINE# http://www.apache.org/license...
"""Testing handling with CoreState."""NEWLINENEWLINEfrom supervisor.coresys import CoreSysNEWLINENEWLINENEWLINEasync def test_timezone(run_dir, coresys: CoreSys):NEWLINE """Test write corestate to /run/supervisor."""NEWLINENEWLINE assert coresys.timezone == "UTC"NEWLINE assert coresys.config.timezone is NoneNE...