text
stringlengths
1
927k
import emmental import numpy as np from fonduer import Meta from emmental.modules.embedding_module import EmbeddingModule from emmental.data import EmmentalDataLoader from emmental.model import EmmentalModel from emmental.learner import EmmentalLearner from fonduer.learning.utils import collect_word_counter from fondu...
## # Copyright (c) 2012-2017 Apple Inc. 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 l...
# -*- coding: utf-8 -*- # Copyright (c) 2011 Plivo Team. See LICENSE for details from gevent import monkey monkey.patch_all() import grp import os import pwd import signal import sys import optparse from flask import Flask import gevent from gevent.wsgi import WSGIServer from gevent.pywsgi import WSGIServer as PyWSG...
import lightgbm as lgb import neptune.new as neptune import neptune.new.integrations.optuna as optuna_utils import optuna from sklearn.datasets import load_breast_cancer from sklearn.metrics import roc_auc_score from sklearn.model_selection import train_test_split def objective(trial): data, target = load_breast_...
# encoding: utf-8 """ config_file_backing_store.py Created by Scott on 2014-08-12. Copyright (c) 2014 Scott Rice. All rights reserved. """ import ConfigParser import backing_store class ConfigFileBackingStore(backing_store.BackingStore): def __init__(self, path): super(ConfigFileBackingStore, self).__init__...
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.8 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2, 6, 0): def swig_import_helper(): from os.path imp...
# -*- coding: utf-8 -*- """The graphical part of a Control Parameters step""" import seamm from seamm_util import ureg, Q_, units_class # noqa: F401 import seamm_widgets as sw import control_parameters_step # noqa: F401 import Pmw import pprint # noqa: F401 import tkinter as tk import tkinter.ttk as ttk class Tk...
from lux._config import config from lux._config.config import ( register_action, remove_action, actions, update_actions, config, )
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import os import sys import shutil import asyncio from azure_functions_worker import protos from azure_functions_worker import testutils async def vertify_nested_namespace_import(): test_env = {} request = protos.Fu...
from unittest import TestCase from pykechain.utils import is_url, is_valid_email, Empty, get_in_chunks from tests.classes import SixTestCase class TestIsURL(SixTestCase): def test_is_url_returns_true_on_valid_url(self): addresses = [ u"http://foobar.dk", u"http://foobar.museum/foo...
#! /usr/bin/python #-*- coding:utf-8 -* import os import conf from web.models import Shelter, ShelterPicture from bootstrap import db from PIL import Image def create_shelters_thumbnails(): shelters = Shelter.query.all() pictures = ShelterPicture.query.all() for picture in pictures: filepath...
from .wrapper import get_dataset from .adversarial import class_indices
from .env import DecisionEnv from .base import BaseRL from .ddpg import * from .dqn import * __all__ = ['DecisionEnv']
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
import torch from . import _base from . import utils from .so2 import SO2Matrix class SE2Matrix(_base.SEMatrixBase): """See :mod:`liegroups.SE2`""" dim = 3 dof = 3 RotationType = SO2Matrix def adjoint(self): rot_part = self.rot.as_matrix() if rot_part.dim() < 3: rot_p...
# This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # # spec/fixtures/responses/whois.nic.net.ng/status_registered # # and regenerate the tests with the following script # # $ scripts/generate_tests.py # from nose.tools import * from dateutil.parser import par...
#Copyright (c) 2017 Andre Santos # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, distribute,...
import numpy as np from ge.classify import read_node_label, Classifier from ge import Node2Vec from sklearn.linear_model import LogisticRegression import matplotlib.pyplot as plt import networkx as nx from sklearn.manifold import TSNE def evaluate_embeddings(embeddings): X, Y = read_node_label('../data/wiki/wik...
# Write results to this file OUTFILE = 'runs/src2-tgt1/seq-bro-iter10000.result.csv' # Source computers for the requests SOURCE = ['10.0.0.1', '10.0.0.3'] # Should Bro be enabled on the source machines? SOURCE_BRO = [True, True] # Target machines for the requests (aka server) TARGET = ['10.0.0.2'] # Should Bro be e...
"""Test around scalar constructors and scalar methods.""" import riptable as rt import numpy as np import pytest from numpy.testing import assert_almost_equal, assert_warns class TestScalarConstructor(object): # Type-coercion from strings test cases adapted from numpy/core/tests/test_scalar_ctors.py. # https...
import biokbase.narrative.clients as clients from biokbase.narrative.app_util import ( app_version_tags, check_tag, app_param ) import json from jinja2 import Template from IPython.display import HTML class SpecManager(object): __instance = None app_specs = dict() type_specs = dict() def...
# Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. from .analyze_db import AnalyzeDbTask from .create_db import CreateDbTask from .create_generic_db import CreateGenericDbTask from .parse_folder import ParseFolderTask from .parse_s3 import ParseS3Task __all__ = [ 'AnalyzeDbTask', 'CreateDbT...
import unittest.mock from programy.brain import Brain from programy.bot import BrainFactory from programy.bot import Bot from programy.config.bot.bot import BotConfiguration from programy.config.programy import ProgramyConfiguration from programy.clients.events.console.config import ConsoleConfiguration from programy....
class TSException(Exception): """Exception related to tsbot""" class TSResponseError(TSException): """Raised when response from server has error_id set to other than 0.""" def __init__(self, message: str, error_id: int) -> None: self.message = message self.error_id = error_id def __s...
import logging logger = logging.getLogger(__name__) TuneSearchCV = None TuneGridSearchCV = None try: from tune_sklearn import TuneSearchCV, TuneGridSearchCV except ImportError: logger.info("tune_sklearn is not installed. Please run " "`pip install tune-sklearn`.") __all__ = ["TuneSearchCV", ...
""" Set of specific utilities for combining PySeg with Subtomogram Averaging tools (PyTom) # Author: Antonio Martinez-Sanchez (Max Planck Institute for Biochemistry) # Date: 1.06.16 """ __author__ = 'Antonio Martinez-Sanchez' from .plist import TomoPeaks, SetTomoPeaks, Score, SingleTiltWedge, Particle, ParticleList,...
# Portal to Manon sm.warp(240020401, 3)
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.j...
#!/usr/bin/python # pure python keytool import os import sys import json import base64 import hashlib import datetime assert sys.version_info < (3,0), "Python 2.7 required" TZ = '+02:00' b = 256 q = 2**255 - 19 l = 2**252 + 27742317777372353535851937790883648493 def H(m): return hashlib.sha512(m).digest() def ...
# Copyright 2018 Google Inc. 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 ...
#!/usr/bin/env python3 # encoding: utf-8 #Linea 1 - “Shebang”,le indicamos a la máquina con qué programa lo vamos a ejecutar. #Linea 2 - Python 3 - asume que solo se utiliza ASCII en el código fuente #para usar utf-8 hay que indicarlo al principio de nuestro script encoding: utf-8 ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Apr 19 08:11:51 2021 @author: vik748 """ import json import numpy as np import matplotlib.pyplot as plt import sys,os import pandas as pd def tracks_histogram(recon_file, tracks_file, ax, model_num=0, bins=np.linspace(2,15,14)): ''' How the tra...
import sqlalchemy as sa from .base import Base __all__ = ['Role'] class Role(Base): __tablename__ = 'role' __table_args__ = {'schema': 'system'} name = sa.Column(sa.String(256), primary_key=True) is_default = sa.Column(sa.Boolean(), default=False) can_reset_password = sa.Column(sa.Boolean(), de...
from flask import Flask, send_from_directory import os import connexion from connexion.resolver import RestyResolver from flask_socketio import SocketIO, send, emit # Constants STATIC_FILES_DIR = 'static' # The application server app = connexion.FlaskApp(__name__, specification_dir='swagger/', resolver=RestyResolver(...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="is-natural-number", version="1.0.0", author="Adam Zerella", author_email="hello@adamzerella.com", description="Check if a value is a natural number", long_description=long_description,...
# Copyright 2017-2019 David Grote # # This file is part of WarpX. # # License: BSD-3-Clause-LBNL """Provides wrappers around field and current density on multiFABs Available routines: ExWrapper, EyWrapper, EzWrapper BxWrapper, ByWrapper, BzWrapper JxWrapper, JyWrapper, JzWrapper """ import numpy as np try: from...
from __future__ import absolute_import from __future__ import unicode_literals from mb.lib.memoize import memoize class SomeClass: def __init__(self): self._x = 0 def _the_test(self, number): self._x += 1 return number * self._x @memoize def TestCache1(self, number): ...
import astropy.io.fits as fits from specutils import SpectrumList from specutils.io.registers import data_loader from .loaders import FITS_FILE_EXTS, SINGLE_SPLIT_LABEL GALAH_CONFIG = { "hdus": { "0": {"purpose": "science"}, "1": {"purpose": "error_stdev"}, "2": {"purpose": "unreduced_scie...
# (c) Copyright [2017] Hewlett Packard Enterprise Development LP # # 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 appli...
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
from flask import render_template,request,url_for,redirect,flash,abort from . import main from .forms import BlogForm, CommentForm, UpdateProfile from ..models import User, Comment , Blog from flask_login import login_required, current_user from .. import db, photos import datetime from ..requests import getQuotes @ma...
from PyQt5.QtGui import QImage, QTextDocument, QIcon, QKeySequence, QFont from PyQt5.QtWidgets import QTextEdit, QApplication, QMainWindow, QAction, QMessageBox, QVBoxLayout, QWidget, \ QStatusBar, QToolBar, QFontComboBox, QComboBox, QActionGroup, QFileDialog, QColorDialog, QDialog, QStyle from PyQt5.QtCore import ...
# Copyright 2021 The TensorFlow 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 required by applica...
""" Created on 3 Oct 2019 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) Used by version 1 Handhelds. Tuned for 2 x Nitecore IMR 18650 (3.7 V, 3100 mAh) https://www.nitecore.co.uk/Shop/Products/Batteries/13663-Nitecore-IMR-18650-Battery-for-TM28-Torch.html#Features """ import json from scs_psu.batt_pac...
''' Created on Oct 11, 2017 @author: seth_ ''' from .PlaygroundStandardPacketEncoder import PlaygroundStandardPacketEncoder, PacketEncoder from .PacketFramingStream import PacketFramingStreamAdapter class PlaygroundFramingPacketEncoder(PlaygroundStandardPacketEncoder): def encode(self, stream, fieldType): ...
import logging import urllib from typing import Any, Dict, List import tornado.web from django import http from django.core import signals from django.core.handlers import base from django.core.handlers.wsgi import WSGIRequest, get_script_name from django.urls import set_script_prefix from django.http import HttpReque...
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'adv_1_2.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise Import...
#!/usr/bin/env python3 import datetime import logging import os import subprocess import sys import ncscli.batchRunner as batchRunner class k6FrameProcessor(batchRunner.frameProcessor): '''defines details for using k6 for a simplistic load test''' def installerCmd( self ): return 'tar -vzxf k6Worker...
#! /usr/bin/env python3 # Copyright (c) 2021 Dave McCoy (dave.mccoy@cospandesign.com) # # NAME is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # any later version. # # NAME...
# coding=utf-8 # Copyright 2019 The ML Fairness Gym Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
import re from django.template.defaultfilters import force_escape import django from cms.models import CMSPlugin from cms.plugins.utils import downcast_plugins from distutils.version import LooseVersion from django.utils.functional import LazyObject from django.core.files.storage import get_storage_class import os OB...
import torch import torch.nn as nn import torch.nn.functional as F from .block import Mish, SeparableConv2d, Block class WideTipXception(nn.Module): def __init__(self, num_class): super(WideTipXception, self).__init__() self.conv1 = nn.Conv2d(1, 192, 3, 2, 1, bias=True) self.bn1 = nn.Batc...
class response(): def __init__(self) -> None: self.num = 5 def call_result(self): return(self.num)
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import torch ################################################################################ ################################################################################ def roll_nn(X,...
"""mysql.utilities.command"""
from __future__ import print_function from keras.models import Sequential from keras.layers.embeddings import Embedding from keras.layers.core import Activation, Dense, Merge, Permute, Dropout from keras.layers.recurrent import LSTM from keras.datasets.data_utils import get_file from keras.preprocessing.sequence import...
''' A rouch implementation of the following paper M. Nickel+, "Poincaré Embeddings for Learning Hierarchical Representations", NeurIPS2017 https://arxiv.org/pdf/1705.08039.pdf ''' import argparse from pathlib import Path import itertools import math import numpy as np import torch import torch.nn as nn import torch.op...
#!/usr/bin/env python # -*- coding: utf-8 -*- def main(): from setuptools import setup version_dict = {} init_filename = "boxtree/version.py" exec(compile(open(init_filename, "r").read(), init_filename, "exec"), version_dict) setup(name="boxtree", version=version_dict["VERS...
from typing import List, Optional import aiosqlite from shamrock.types.blockchain_format.coin import Coin from shamrock.types.blockchain_format.sized_bytes import bytes32 from shamrock.types.coin_record import CoinRecord from shamrock.types.full_block import FullBlock from shamrock.util.db_wrapper import DBWrapper fr...
import streamlit as st import plotly.express as px import pandas as pd import pickle import os import base64 from io import BytesIO from datetime import datetime def to_excel(df): output = BytesIO() writer = pd.ExcelWriter(output, engine='xlsxwriter') df.to_excel(writer, index=False, sheet_name='Sheet1') ...
import json import logging import pytest import tempfile from typing import Any, Dict, Iterator, Optional import sdk_cmd import sdk_install import sdk_jobs import sdk_plan import sdk_utils from security import transport_encryption from tests import config log = logging.getLogger(__name__) @pytest.fixture(scope="m...
def frequencyQueries(queries): collection = {} cumOperationThree = [] for i in range(0, len(queries)): operation = queries[i][0] numToAdd = queries[i][1] if operation == 1: if numToAdd in collection.keys(): collection[numToAdd] += 1 else: ...
from datetime import timedelta from typing import Any, Dict, Optional, Sequence from physlearn.names import DataBaseName, LabelType, NonSignalDataType, SignalType from physlearn.typing import Array class Signal: """A signal base class. Args: start_time: The time from the beginning of the record until ...
import tensorflow as tf import os import time import json import pandas as pd """ Script to train a sequential NN. Takes a df, filters based on `condition` (default None), and separates into test/train based on time NN trains on training data, all results output to disk """ def train_test_split(df,filter_condition...
from __future__ import unicode_literals import vmraid def execute(): vmraid.reload_doc("workflow", "doctype", "workflow_transition") vmraid.db.sql("update `tabWorkflow Transition` set allow_self_approval=1")
def get_urls(releases, **kwargs): # Pypi has a old bugtracker_url which points to a separate repo which causes invalid # changelogs to be generated by this tool. ret = {'https://raw.githubusercontent.com/vertexproject/synapse/master/CHANGELOG.md'} return ret, set()
from __future__ import absolute_import, division, print_function import collections from contextlib import closing import errno import gzip import logging import os import re import socket import ssl import sys from tornado.escape import to_unicode from tornado import gen from tornado.httpclient import AsyncHTTPClien...
from setuptools import setup, find_packages setup( name='django-osme', version=__import__('osme').__version__, packages=find_packages(), zip_safe=False, install_requires=[ 'Django>=1.9.8', 'requests>=2.23.0', 'jsonfield>=2.1.1', ], package_data={ 'osme': [ ...
from sqllite import CDataBase as sqllite from kademliaGetSet import CDataBase import socket from isolated_functions import * instance_kade = None class CSQLLite(): def __init__(self): global instance_kade if instance_kade is None: node_identifier = socket.gethostbyname(socket.gethostn...
"""Initialising Optimisers""" import torch def create_optimisers( optim_enc, optim_dec, lr_enc, lr_dec, mom_enc, mom_dec, wd_enc, wd_dec, param_enc, param_dec, ): """Create optimisers for encoder, decoder Args: optim_enc (str) : type of optimiser for encoder ...
# Standard library imports import unittest # Local imports from IPython.frontend.qt.console.ansi_code_processor import AnsiCodeProcessor class TestAnsiCodeProcessor(unittest.TestCase): def setUp(self): self.processor = AnsiCodeProcessor() def test_clear(self): """ Do control sequences for c...
###################################################################### # This file should be kept compatible with Python 2.3, see PEP 291. # ###################################################################### import sys, os # find_library(name) returns the pathname of a library, or None. if os.name == "nt": de...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __...
import asyncio from datetime import datetime from string import hexdigits from time import time import aiohttp import aiohttp_jinja2 from aiohttp import web async def handle_command(payload, user_id, state_manager): if payload in {'/start', '/close'} and state_manager: await state_manager.drop_active_dia...
# Copyright [2018-2020] Peter Krenesky # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# -*- coding: utf-8 -*- """ Plugin to create a Yambo input file and run a calculation with the yambo executable. """ from __future__ import absolute_import import os import six from aiida.engine import CalcJob from aiida_quantumespresso.calculations import _lowercase_dict, _uppercase_dict from aiida.common.datastruc...
# Generated by Django 3.0.3 on 2020-03-02 14:44 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
import pytest from ...annotations import skip_if_continuous_integration try: from pyglet.media.drivers import pulse has_pulse = True except ImportError: has_pulse = False try: from pyglet.media.drivers import openal has_openal = True except ImportError: has_openal = False try: from pygl...
import datetime import os from airflow.models.dag import DAG from airflow.operators.bash_operator import BashOperator from airflow.utils.dates import days_ago from dagster import DagsterEventType, execute_pipeline from dagster.core.instance import AIRFLOW_EXECUTION_DATE_STR from dagster.core.storage.compute_log_manage...
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket 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 applicab...
# Generated by Django 3.1.3 on 2021-03-27 10:49 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('recipes', '0011_auto_20210327_1046'), ] operations = [ migrations.AlterField( model_name='ingredie...
"""Test move to well commands.""" from mock import AsyncMock # type: ignore[attr-defined] from opentrons.protocol_engine.commands import ( MoveToWellRequest, MoveToWellResult, ) def test_move_to_well_request() -> None: """It should be able to create a MoveToWellRequest.""" request = MoveToWellReques...
import os import sys from os import path current_dir = path.dirname(path.abspath(__file__)) while path.split(current_dir)[-1] != r'Heron': current_dir = path.dirname(current_dir) sys.path.insert(0, path.dirname(current_dir)) from Heron import general_utils as gu Exec = os.path.abspath(__file__) # <editor-fold ...
from simply_block.simply_sign import SimplySign # Token public_key = "hmac_pub_1" private_key = "hmac_priv_1" # Required Params url = "http://127.0.0.1:8000/v1/eth/contract/build/" file_path = "/home/lenovo/Documents/simplyblock/ethereum-service/contracts/DappToken.sol" data = { 'contract_name': 'contract_22'...
from django.urls import path,re_path from groups import views app_name = 'groups' urlpatterns = [ path('',views.ListGroup.as_view(), name= 'all'), path('new/',views.CreateGroup.as_view(), name='create'), path('posts/in/<slug>/',views.SingleGroup.as_view(),name='single'), path('join/<slug>/',views.Join...
""" Skills to control teufel raumfeld streaming devices RaumfeldTVWakeup is a Skill that wakes up a speaker when the TV is turned on. Copyright (c) 2021 Timo Haeckel """ from skills import SkillWithState import raumfeld RAUMFELD_URI_PLACEHOLDER = "dlna-playcontainer://uuid%3Abd4f7f00-aa40-4e4a-a54e-ec64e9944e23?sid...
""" This file belongs to https://github.com/bitkeks/python-netflow-v9-softflowd. The test packets (defined below as hex streams) were extracted from "real" softflowd exports based on a sample PCAP capture file. Copyright 2016-2020 Dominik Pataky <software+pynetflow@dpataky.eu> Licensed under MIT License. See LICENSE....
from __future__ import annotations import inspect import sys from functools import partial, reduce from importlib import import_module from operator import attrgetter, not_ from textwrap import dedent from types import MethodType from typing import Any, Callable, Dict, Generic, TypeVar, Union, overload from .utils im...
# 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...
import FWCore.ParameterSet.Config as cms import RecoVertex.BeamSpotProducer.beamSpotOnlineProducer_cfi as _mod onlineBeamSpotProducer = _mod.beamSpotOnlineProducer.clone( src = 'scalersRawToDigi', setSigmaZ = -1, #negative value disables it...
# coding: utf-8 """ SendinBlue API 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 can download our wrappers at h...
import sense_hat from sense_hat import SenseHat import time from enum import Enum class Colors(Enum): Green = (0, 255, 0) Yellow = (255, 255, 0) Blue = (0, 0, 255) Red = (255, 0, 0) White = (255,255,255) Nothing = (0,0,0) Pink = (255,105, 180) Orange = (255,165, 0) class DisplayManager...
# Copyright 2020 Proyectos y Sistemas de Mantenimiento SL (eProsima). # # 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...
import os import re import glob import subprocess from collections import OrderedDict # We need to define our own `Action` method to control the verbosity of output # and whenever we need to run those commands in a subprocess on some platforms. from SCons.Script import Action from SCons import Node from SCons.Script i...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RRhtslib(RPackage): """HTSlib high-throughput sequencing library as an R package. ...
import os import sys sys.path.append( '../' ) from rtfng import * def MakeExample1() : doc = Document() ss = doc.StyleSheet section = Section() doc.Sections.append( section ) # text can be added directly to the section # a paragraph object is create as needed section.append...
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use ...
from enum import Enum import pandas as pd from typing import Dict import json class SupportedDataTypes(Enum): number_type = 1 string_type = 2 list_type = 3 bool_type = 4 def is_bool(value) -> bool: return str(value).lower() in ["true", "false"] def is_number(value) -> bool: try: fl...
from __future__ import absolute_import, print_function, unicode_literals # Environment variables to disable Git stdin prompts for username, password, etc GIT_NO_PROMPTS = { "GIT_SSH_COMMAND": "ssh -oBatchMode=yes", "GIT_TERMINAL_PROMPT": "0", } BREWWEB_URL = "https://brewweb.engineering.redhat.com/brew" # En...