text
stringlengths
2
999k
from datetime import date import pytest from envinorma.models import AMMetadata, AMSource, AMState, Classement, Regime from back_office.components.edit_metadata.handle_form import FormHandlingError, _extract_am_metadata def test_extract_am_metadata(): expected = AMMetadata( aida_page='5619', tit...
''' SPDX-License-Identifier: Apache-2.0 Copyright 2017 Massachusetts Institute of Technology. ''' import glob import os import sys from keylime import config from keylime import keylime_logging logger = keylime_logging.init_logging('tpm_ek_ca') trusted_certs = {} tpm_cert_store = config.get('tenant', 'tpm_cert_store...
# Copyright (C) 2019 Project AGI # # 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 writi...
from flask import Flask app = Flask(__name__) @app.route('/', methods = ['GET']) def home(): message = "<body><h1>" + 'Hello World!!!' + "</h1></body>" return (message), 200 if __name__ == '__main__': app.run(port= 8000, debug= True)
""" entrada sueldo-->int-->s salidas nuevo_sueldo-->str-->ns """ s=int(input("ingrese su sueldo $")) if s<900000: ns=s+(s*0.15) else: ns=s+(s*0.12) print("su nuevo sueldo es "+str (ns))
# Copyright 2020 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...
from django.contrib import admin from .models import Post, Group, Comment, Follow class PostAdmin(admin.ModelAdmin): # перечисляем поля, которые должны отображаться в админке list_display = ("pk", "text", "pub_date", "author", "group") # добавляем интерфейс для поиска по тексту постов search_fields =...
import jwt from flask import request from hive.main.hive_file import HiveFile from hive.settings import hive_setting from hive.util.constants import SCRIPTING_EXECUTABLE_CALLER_DID, SCRIPTING_EXECUTABLE_PARAMS, \ SCRIPTING_EXECUTABLE_CALLER_APP_DID, VAULT_ACCESS_R, VAULT_ACCESS_WR, SCRIPTING_SCRIPT_TEMP_TX_COLLEC...
# # Copyright 2016 BloomReach, Inc. # Copyright 2016 Ronak Kothari <ronak.kothari@gmail.com>. # # 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....
# ============================================================================= # srtUtils.py # by: Rob Dachowski # For questions or feedback, please contact robdac@amazon.com # # Purpose: The program provides a number of utility functions for creating SubRip Subtitle files (.SRT) # # Change Log: # 6/...
import tkinter as tk from core import get_modifiers from crafting import GridCrafter, GridCrafterView, CraftingWindow from block import ResourceBlock class FurnaceBlock(ResourceBlock): """Furnace block for extended crafting and smelting, inherited from ResourceBlock class """ def __init__(self, block...
from ..source import GitSource from ..package import Package from ..patch import LocalPatch from ..util import target_arch class Libxslt(Package): source = GitSource('https://github.com/QPYPI/libxslt.git', alias='libxslt', branch='qpyc-1.1.32') patches = [ #LocalPatch('0001-Fix-libtoolize-s-issue-in-au...
import collections.abc import event_model from functools import partial import intake import intake.catalog import intake.catalog.local import intake.source.base import pymongo import pymongo.errors from .core import parse_handler_registry from .core import to_event_pages from .core import to_datum_pages class _Entr...
import os import sys import json import time import logging import data_helper import numpy as np import tensorflow as tf from text_cnn import TextCNN from tensorflow.contrib import learn from sklearn.model_selection import train_test_split logging.getLogger().setLevel(logging.INFO) def train_cnn(): """Step 0: load ...
from .Instrument import Instrument from .Catalog import Catalog try: from .Extensions import InitializeSF2Instrument from .Extensions import SF2InstrumentListPresets as ListPresets Catalog['Engines'] += ['SF2Instrument - Instrument'] class SF2Instrument(Instrument): def __init__(self, sfPath, preset_index): ...
# Generated by Django 3.1.1 on 2020-09-21 18:23 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...
from collections import defaultdict from twisted.internet import defer class Listenable(object): """Implements basic listener/observer model for derivative classes.""" def __init__(self): self.listeners = defaultdict(list) def listen(self, event, callback): """ Assign a callback...
# -*- coding:utf-8 -*- from __future__ import print_function import math import numpy as np import logging import time import os import argparse import cv2 import sys from deeploader.eval.run_verify import * def _extract_feature_each(extractor, img_list): feat_list = [] n = le...
# Copyright 2012-2016 The Meson development team # 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 agree...
# -*- coding: utf-8 -*- import payplug class TestBase: def setup_method(self, method): payplug.secret_key = None payplug.api_version = None
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright (c) 2002-2019 "Neo4j," # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. # # 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 L...
# import the necessary packages import numpy as np from sklearn.preprocessing import LabelBinarizer class AnprLabelProcessor: # init the label binarizers. Maps classes to a set of one-hot vectors def __init__(self, plateChars, plateLens): # convert the labels from integers to vectors self.plate_lb = LabelB...
# Copyright 2022 Garda Technologies, 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 applic...
"""Application factory for external relations service.""" from flask import Flask, Response, jsonify from werkzeug.exceptions import HTTPException, Forbidden, Unauthorized, \ BadRequest, MethodNotAllowed, InternalServerError, NotFound from arxiv.base import Base, logging from arxiv.base.middleware import wrap, re...
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'people.settings') try: from django.core.management import execute_from_command_line except Impor...
"""Support for binary (door/window/smoke/leak) sensors.""" from datetime import timedelta import logging import async_timeout import voluptuous as vol from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorEntity from homeassistant.const import ( CONF_HOST, CONF_TOKEN ) import homeas...
import sys from loguru import logger from OHIO_RIVER_LEVEL_SCRAPING import display_cached_forecast_data2 as do logger.remove() logger.add(sys.stdout, format="{time} {level} {message}", level="DEBUG") logger.info('Start') do(6) logger.info('End')
from flask import Flask, redirect, json, render_template from flask_restful import reqparse, abort, Api, Resource from controllers import AlgorithmController, AlgorithmListController, GraphController, AlgorithmTypesController app = Flask(__name__, template_folder="./static/dist") api = Api(app) ################# API...
"""Benchmark of optimized count-eq versus baseline.""" import os import time from cffi import FFI # type: ignore import pytest ffi = FFI() ffi.cdef(""" size_t diablo_count_eq (uint8_t const * const src, size_t const off, size_t const len, uint8_...
""" This file offers the methods to automatically retrieve the graph Candidatus Hydrothermarchaeota archaeon JdFR-18. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STR...
import logging import requests import time import json import requests import libxml2 from os import path, mkdir, makedirs from ..hooks.builtin import pipeline_ended from ..hooks.register import run_on, run_threaded_on from . import hooks LOGGER = logging.getLogger(__name__) # following lines should be controllable b...
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from gripper_pkg/stepActionAction.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import genpy import actionlib_msgs.msg import gripper_pkg.msg import std_msgs.msg class ...
class SyntaxTree(object): def add_child(self, node): assert isinstance(node, SyntaxTree) self.children.append(node) def __init__(self, name='root', children=None): self.name = name self.children = [] if children is not None: for child in children: ...
""" Copyright (c) 2018, salesforce.com, inc. All rights reserved. SPDX-License-Identifier: BSD-3-Clause For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause Fact scoring networks. Code adapted from https://github.com/TimDettmers/ConvE/blob/master/model.py ...
from cleanSent import cleanSentence import numpy as np import pandas as pd def sent2vec(s, model): res = np.zeros(200) # sent = cleanSentence(s) words = s.split() num = 0 for w in words: if model.__contains__(w): res += model[w] else: res += model["method"] ...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 requir...
#!/usr/bin/env python # encoding: utf-8 from exp_tools import Trial from psychopy import visual, event class FlashInstructions(Trial): """ Class that runs an Instructions trial. This is a parent for FlashInstructionsPractice. A FlashInstructions trial draws a *single* text screen, records keyboard respons...
from .siren import *
import pylab as pyl import h5py as hdf from scipy import stats def find_indices(bigArr, smallArr): from bisect import bisect_left, bisect_right ''' Takes the full halo catalog and picks out the HALOIDs that we are interested in. Only returns their indexes. It will need to be combined with the result c...
import contextlib import discord async def safe_delete_message(message: discord.Message) -> None: with contextlib.suppress(discord.NotFound): await message.delete()
#!/usr/bin/env/python3 # -*- coding: utf-8 -*- from collections import defaultdict from contextlib import suppress from copy import deepcopy from typing import Iterable class Production: def __init__(self, index, name, syms, func=None): self.index = index self.name = name self....
# -*- coding: utf-8 -*- # Import Python Libs from __future__ import absolute_import import os import textwrap # Import Salt Testing libs from tests.support.case import ModuleCase from tests.support.paths import FILES from tests.support.unit import skipIf # Import Salt Libs import salt.utils.platform import salt.util...
import numpy as np import sys import hashcode as hc def parse_and_execute_command(command, matrix): cmds = {'PAINT_SQUARE' : hc.PAINT_SQUARE, 'PAINT_LINE' : hc.PAINT_LINE, 'ERASE_CELL' : hc.ERASE_CELL } cmds[command[0]](*map(int, command[1:]), matrix = matrix) def execute(commands,...
from geopy import distance from trianglesolver import solve from RDP import rdp from math import degrees from scipy.spatial import ConvexHull def remove_duplicates(coords = []): '''Steps through the list of coordinates to find and remove coordinates that appear more than once Parameters ---------- c...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # (c) Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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.apa...
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
#!/usr/bin/python import pdb import time import picamera import socket import json import itertools import subprocess import socket import os import tarfile import zipfile import shutil import re from fractions import Fraction from datetime import datetime, timedelta from contextlib import contextmanager from glob imp...
import argparse import numpy as np import os from xgboost_ray.tests.utils import create_parquet if __name__ == "__main__": if "OMP_NUM_THREADS" in os.environ: del os.environ["OMP_NUM_THREADS"] parser = argparse.ArgumentParser(description="Create fake data.") parser.add_argument( "filename...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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 ...
# 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 writing, software # distributed under t...
from fastapi.testclient import TestClient import pytest import os from ..main import app, session from sqlmodel import SQLModel, Session, create_engine from sqlmodel.pool import StaticPool from ..api.epic_area import get_session @pytest.mark.order(1) def test_post_epic_area(client): response = client.post( ...
from __future__ import print_function import datetime import json import logging import os import re import sys from contextlib import contextmanager from queue import Queue from typing import Union, Any, Generator import demisto_client.demisto_api import pytz import requests import urllib3 from google.api_core.excep...
# Lint as: python2, python3 # 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 req...
# -*- coding:utf-8 -*- """ 统一config调配 """ __author__ = 'zcj' import www.config_default class Dict(dict): ''' Simple dict but support access as x.y style. ''' def __init__(self, names=(), values=(), **kw): super(Dict, self).__init__(**kw) for k, v in zip(names, values): ...
#---------------------------------------------- #--- Author : Ahmet Ozlu #--- Mail : ahmetozlu93@gmail.com #--- Date : 27th July 2019 #---------------------------------------------- # Imports import tensorflow.compat.v1 as tf tf.disable_v2_behavior() # Object detection imports from utils i...
#!/usr/bin/env python # -*- coding=utf-8 -*- import enum from base import BaseModule, BaseMonitorDimension class MonitorNamespace(enum.Enum): CVM = "qce/cvm" DC_LINE = "qce/dc_line" CDB = "qce/cdb" CBS = "qce/cbs" class MonitorMetricName(enum.Enum): DISK_READ_TRAFFIC = "disk_read_traffic" DI...
# ************************************ # Author: Ziqin Wang # Email: ziqin.wang.edu@gmail.com # Github: https://github.com/Storife # ************************************ import torch import torch.nn as nn import numpy as np from numpy.random import normal from numpy.linalg import svd from math import sqrt from torch.nn...
import dataclasses import itertools from typing import List, Optional, Tuple import nltk import torch from .downloader import load_trained_model from ..parse_base import BaseParser, BaseInputExample from ..ptb_unescape import ptb_unescape, guess_space_after TOKENIZER_LOOKUP = { "en": "english", "de": "germa...
""" The :mod:`util` module gathers utility functions """ import util.RandUtil import util.OptimizerForPi from util.PrettyPrintUtil import np2flatstr, flatstr2np from util.PrettyPrintUtil import split_str_into_fixed_width_lines from util.MatMultUtil import dotATA, dotATB, dotABT from util.MemoryUtil import getMemUsage...
from setuptools import setup, find_packages import flask_hcaptcha PACKAGE = flask_hcaptcha with open("README.md", "r") as fh: long_description = fh.read() setup( name=PACKAGE.__NAME__, version=PACKAGE.__version__, license=PACKAGE.__license__, author=PACKAGE.__author__, author_email='info@knugi...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from __future__ import print_function import torch import torch.nn.functional as F from torch import nn from maskrcnn_benchmark.layers import GradientScalarLayer from .loss import make_da_heads_loss_evaluator class DAImgHead(nn.Module): """ ...
import numpy as np import matplotlib.pyplot as plt import nibabel as nib import nilearn.plotting as niplot def _scale_data(data, limit_mode=None, stdevs=4, quantile=0.01, limits=None): """Returns a copy of data scaled such that the bulk of the values are mapped to the range [0, 1]. Upper and lower limits ...
""" Custom random class """ import random SEED = 42 def sample(population, k): random.seed(SEED) return random.sample(population, k)
# Copyright 2018 The Cirq Developers # # 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 or agreed to in ...
import os from importlib import import_module from importlib.util import module_from_spec, spec_from_file_location from pathlib import Path from .printer import printer def abs_path(path, format_kwargs={}, relative_to=None, keep_slash=False): """Get abs. path for ``path``. ``path`` may be a relative or abso...
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
# -*- coding: utf-8 -*- """ Defines the unit tests for the :mod:`colour.plotting.quality` module. """ import unittest from matplotlib.pyplot import Axes, Figure from colour.colorimetry import ( SDS_ILLUMINANTS, SDS_LIGHT_SOURCES, SpectralShape, reshape_sd, ) from colour.plotting import ( plot_sing...
<!DOCTYPE html> <html><head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta charset="utf-8"> <title>problem_unittests.py</title> <link rel="shortcut icon" type="image/x-icon" href="http://54.197.23.25:8888/static/base/images/favicon.ico?v=97c6417ed01bdc0ae3ef32ae4894fd03"> <m...
import argparse import os import pandas as pd import evaluate_experiment import perform_experiment from composite import read_metadata def read_args(): parser = argparse.ArgumentParser() parser.add_argument('--experiment-metadata', type=str, required=True) parser.add_argument('--experiment-dir', type=st...
# encoding: utf-8 """ listener.py Created by Thomas Mangin on 2013-07-11. Copyright (c) 2013-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ import os import uuid import copy import socket from exabgp.util.errstr import errstr from exabgp.protocol.ip import IP from exabgp...
# Copyright 2018 Open Source Robotics Foundation, 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...
from app.utils_dependency import * from app.models import ( Activity, NaturalPerson, Position, Organization, OrganizationType, OrganizationTag, ModifyPosition, Notification, ModifyOrganization, Wishes, Participant, ) from app.notification_utils import ( notification_creat...
# block.py
# Copyright 2013-2022 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.package import * class RPreprocesscore(RPackage): """A collection of pre-processing functions. A ...
from pathlib import Path import re from typing import Iterable from typing import List from typing import Optional from typing import Union import warnings import g2p_en from typeguard import check_argument_types from espnet2.text.abs_tokenizer import AbsTokenizer g2p_choices = [ None, "g2p_en", "g2p_en...
# Copyright (c) 2018 Fujitsu Limited # 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...
# Copyright 2020 The SQLFlow 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 applicable law o...
"""probing statistics as dict Revision ID: 03ddf61b5b3c Revises: 8b783114dc9a Create Date: 2022-01-11 19:00:16.273260 """ import sqlmodel.sql.sqltypes # revision identifiers, used by Alembic. from sqlalchemy.dialects.postgresql import JSON from alembic import op revision = "03ddf61b5b3c" down_revision = "8b783114d...
# -*- encoding: utf-8 -*- """ @Time : 2019-08-17 10:49 @Author : alexanderwu @Email : alexanderwu@fuzhi.ai @Software: PyCharm """ import os # config for final. FT_GPU_ENV = "DEV" # DEV or PROD IF_Sniffer = False # Ture or False IF_Down_Pretrained_Mode = True # common MAX_SEQ_LEN = 64 bs = 16 MAX_VOCAB_SIZE = ...
from . import services from cartola import sysexits from firenado import service import functools from getpass import getpass, getuser import sys def authenticated(method): """ Decorates a method to continue only if the user is authenticated """ @service.served_by(services.UserService) @functools.wra...
from django.db.models.signals import post_save from django.contrib.auth.models import User from django.dispatch import receiver from .models import Profile @receiver(post_save, sender=User) def create_profile(sender,instance,created,**kwargs): if created: Profile.objects.create(user=instance) @receiver...
from setuptools import setup from torch.utils.cpp_extension import BuildExtension, CUDAExtension setup( name="roipool3d", ext_modules=[ CUDAExtension( "roipool3d_cuda", ["src/roipool3d.cpp", "src/roipool3d_kernel.cu",], extra_compile_args={"cxx": ["-g"], "nvcc": ["-...
import pytest import os import sys sys.path.append (os.getcwd () + "/src") from config import Config class TestConfig: @pytest.mark.parametrize ("string, pickit_type, include, exclude, include_type", [ ("0",0, [], [], "OR"), ("1",1, [], [], "OR"), ("2",2, [], [], "OR"), ("1, (AMAZONSKILLER, ASSASINSKIL...
from __future__ import unicode_literals from django.contrib.admin.utils import quote from django.core.urlresolvers import reverse from django.template.response import TemplateResponse from django.test import TestCase from django.test.utils import override_settings from .models import Action, Person, Car @override_s...
# 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 from...
""" Test env with random actions """ import time import gym import gym_envs import subprocess from collections import OrderedDict import pandas as pd import matplotlib.pyplot as plt env = gym.make('ReachingJaco-v7') plot_filename = "plot_ReachingJaco-v7_rand.png" env.render() env.reset() log_df = pd.DataFrame() lo...
import os.path import json import sys from typing import Optional import weaviate from semi.config.manage import create_new_config import semi.config.config_values as cfg_vals _cli_config_sub_path = ".config/semi_technologies/" _cli_config_file_name = "configs.json" class Configuration: def __init__(self, user...
# 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 __a...
import csv import itertools class SigirBatchedGenerator: """ Class to read a csv file in batched number of lines. File must contain a header row with the names of the columns. Uses csv.DictReader. Meant to be used with with keyword. Methods ------- get_batches(batch_size=1000) Yi...
from scipy.signal import savgol_filter import numpy as np import matplotlib.pyplot as plt def normalize_by_baseline(timeseries, baseline_length=4): baseline = timeseries.iloc[:baseline_length].mean(axis=0) normalized_timeseries = np.log2(timeseries / baseline) normalized_timeseries = normalized_timeseries...
__all__ = ["ArangoClient"] from json import dumps, loads from typing import Any, Callable, Optional, Sequence, Union from arango.connection import ( BasicConnection, Connection, JwtConnection, JwtSuperuserConnection, ) from arango.database import StandardDatabase from arango.exceptions import ServerCo...
import logging import sentry_sdk from sentry_sdk.integrations.django import DjangoIntegration from sentry_sdk.integrations.logging import LoggingIntegration from sentry_sdk.integrations.celery import CeleryIntegration from .base import * # noqa from .base import env # GENERAL # ------------------------------------...
# # 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...
''' CHypre (Complex Hypre) CHypreVec : ParVector CHypreMat : ParCSR container object to support complex using real value hypre it should work with pure real or pure imaginary case too. it follows the mathod naming convetion used in scipy.sparse. However, since it inherits the list object, __seti...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'newsletter_signup.tests.settings') from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2021-2025 Skinok # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publishe...
# Copyright 2013 Novo Nordisk Foundation Center for Biosustainability, # Technical University of Denmark. # # 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/LI...
import logging import lzma import os from binascii import hexlify from io import BytesIO from uuid import UUID from .object import ObjectInfo from .type import TypeMetadata from .utils import BinaryReader class Asset: @classmethod def from_bundle(cls, bundle, buf, name=None, offset=None, size=None): ret = cls() ...
from project.software.software import Software class ExpressSoftware(Software): TYPE = "Express" def __init__(self, name, capacity_consumption, memory_consumption): super().__init__(name, "Express", capacity_consumption, int(memory_consumption * 2)) # self.type = ExpressSoftware.TYPE ...
import nose import nosehtml import StringIO import os folder = os.path.expanduser("~/Libs/python/Reactive") my_template = os.path.expanduser("~/Desktop/html/nose_template.html") my_report = os.path.expanduser("~/Desktop/report2.html") if __name__ == '__main__': # create a new instance of the plugin class ...