text
stringlengths
2
999k
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
# from pywaterml.waterML import WaterMLOperations import sys sys.path.append("/Users/ElkiGio/pypack/pywaterml") import pywaterml from pywaterml.waterML import WaterMLOperations import time import pandas as pd url_testing = [ # # ["http://gs-service-production.geodab.eu/gs-service/services/essi/view/whos-country/hi...
# Copyright 2015 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...
''' Tipo: Concepto, Ejercicio, Pregunta... Fuente: libro, curso, ... Este chunk de código tiene como propósito... Convert a Number to Base-2 Create a function that returns a base-2 (binary) representation of a base-10 (decimal) string number. To convert is simple: ((2) means base-2 and (10) means base-10) ...
from .utils import * filepath,_ = os.path.split(os.path.realpath(__file__)) filepath,_ = os.path.split(filepath) filepath,_ = os.path.split(filepath) # Set the appropriate paths of the datasets here. _MINI_IMAGENET_DATASET_DIR = 'data/Mini-ImageNet/' class MiniImageNet(ProtoData): img_size = (84, 84) def _...
import os import sys def is_active(): return True def get_name(): return "OSX" def can_build(): if (sys.platform == "darwin" or os.environ.has_key("OSXCROSS_ROOT")): return True return False def get_opts(): return [ ('force_64_bits','Force 64 bits binary','no'), ('osxcross_sdk','OSXCross SDK...
# Copyright 1997 - 2018 by IXIA Keysight # # 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, p...
import pytest import torch import numpy as np import gym from d3rlpy.dataset import MDPDataset, Episode from d3rlpy.preprocessing import create_action_scaler from d3rlpy.preprocessing import MinMaxActionScaler @pytest.mark.parametrize("scaler_type", ["min_max"]) def test_create_action_scaler(scaler_type): scaler...
#!/usr/bin/env python3 """ Unit testing suite for config module. """ # --------------------------------- MODULES ----------------------------------- import collections import os if "posix" == os.name: import pwd elif "nt" == os.name: import getpass import unittest from skaff.config import SkaffConfig from tem...
import os import re from flask import Flask, jsonify, render_template, request, url_for from flask_jsglue import JSGlue from cs50 import SQL from helpers import lookup # configure application app = Flask(__name__) JSGlue(app) # ensure responses aren't cached if app.config["DEBUG"]: @app.after_request def aft...
# Standard Libraries # Third party packages from pydantic import root_validator from pydantic.typing import Union, Optional, List, Literal, List # Local package from net_models.fields import GENERIC_OBJECT_NAME, VRF_NAME, VLAN_ID, ROUTE_TARGET, ROUTE_DISTINGUISHER, AFI, SAFI # Local module from .BaseNetModels import Ve...
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import numpy as np from data_loader import get_data_loaders from typing import List, Union, Tuple class SimpleNeuralNetModel(nn.Module): """SimpleNeuralNetModel [summary] [extended_summary] :param layer_sizes:...
""" Support for IP Cameras. This component provides basic support for IP cameras. For the basic support to work you camera must support accessing a JPEG snapshot via a URL and you will need to specify the "still_image_url" parameter which should be the location of the JPEG image. As part of the basic support the foll...
from pythonforandroid.recipe import CompiledComponentsPythonRecipe, Recipe from multiprocessing import cpu_count class ThisRecipe(CompiledComponentsPythonRecipe): site_packages_name = 'scikit-learn' version = '0.23.2' url = f'https://github.com/{site_packages_name}/{site_packages_name}/archive/{version}....
# Copyright 2020 Cortex Labs, 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 agreed to in wri...
''' This is the test file for the MapColumn datatype used to provide a mapping from an internal numeric value into the related external value, this is meant to provide an easily maintained list of valid values for fields where there is a limited range of values, such as gender. ''' import unittest from clubadmin.confi...
# Copyright (c) 2018, NVIDIA CORPORATION. import os.path import numpy as np import pyarrow as pa import pytest from numba import cuda from cudf import DataFrame, Series from cudf.comm.gpuarrow import GpuArrowReader from cudf.testing._utils import assert_eq def read_data(): import pandas as pd basedir = os....
import os import copy import mock import yaml import pytest from deepdiff import DeepDiff from deploy.utils import WORKSPACE from deploy import environment from deploy import daisy_server from deploy.daisy_server import DaisyServer from deploy.environment import ( DaisyEnvironmentBase, BareMetalEnvironment, ...
# Copyright (c) 2013 NEC Corporation # 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...
"""Core API v2 serializers.""" from django.utils import formats from django.utils.translation import ugettext_lazy, ugettext as _ from django.contrib.auth import password_validation import django_otp from rest_framework import serializers from modoboa.lib import fields as lib_fields from ... import constants from ...
# ----------------------------------------------------------------------------- # Functions for parsing args # ----------------------------------------------------------------------------- import yaml import os from ast import literal_eval import copy class CfgNode(dict): """ CfgNode represents an internal no...
"""https://open.kattis.com/problems/goatrope""" x, y, x1, y1, x2, y2 = list(map(int, input().split())) minDist = 0 # return the distance two points (x, y) and (a, b) def dist(x, y, a, b): return ((x - a)**2 + (y - b)**2)**0.5 if x not in range(x1, x2+1) and y in range(y1, y2+1): minDist = min(abs(x...
#!/usr/bin/env python3 # Author: Roma Sokolkov (r7vme) 2018 ''' Label images. Script does following: - show jpg image - ask user for input - write user input to json file - repeat steps above every image in directory Usage: ./obstacle_label.py <path to images> ''' import os import json import sy...
import pytest from tests.setup_transaction_tests import chain as s, tester as t, ethereum_utils as u, check_gas, \ get_contract_with_gas_estimation def test_extract32_code(): extract32_code = """ y: bytes <= 100 @public def extrakt32(inp: bytes <= 100, index: num) -> bytes32: return extract32(inp, index) ...
# Copyright (C) 2012 The Android Open Source Project # # 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 ...
import re import pytest from invoke.context import Context from test.test_utils import LOGGER, ec2, get_framework_and_version_from_tag def test_stray_files(image): """ Test to ensure that unnecessary build artifacts are not present in any easily visible or tmp directories :param image: ECR image URI ...
from __future__ import print_function from builtins import object from lib.common import helpers class Module(object): def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Spawn', 'Author': ['@harmj0y'], 'Description': ('Spawns a new agent in a new powersh...
import random word_list = ["aardvark", "baboon", "camel"] chosen_word = random.choice(word_list) # TODO-1: - Create an empty List called display. guess = input("Guess a letter: ").lower() display = [] for i in range(0, len(chosen_word)): display.append('_') # TODO-2: - Loop through each position in th...
"""The tests for the DirecTV Media player platform.""" from datetime import datetime, timedelta from typing import Optional from asynctest import patch from pytest import fixture from requests import RequestException from homeassistant.components.directv.media_player import ( ATTR_MEDIA_CURRENTLY_RECORDING, A...
from pyenzyme.enzymeml.core.protein import Protein from pyenzyme.enzymeml.core.ontology import SBOTerm class TestProtein: def test_content(self): # Test consistency of inputs protein = Protein( name="SomeProtein", vessel_id="v0", init_conc=10.0, unit="mmole / l", constant=...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.13.5 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import pdb def hidden_init(layer): fan_in = layer.weight.data.size()[0] lim = 1. / np.sqrt(fan_in) return (-lim, lim) class ActorNetwork(nn.Module): def __init__(self, state_size, hidden_in_dim, hidden_out_dim, act...
# encoding: utf-8 __author__ = 'Aleksei Maliutin' """ __init__.py.py Created by lex at 2019-07-30. """ from NetEmbs.GraphSampling.sampling import graph_sampling, pairs_construction
from ._base import * DEBUG = True WEBSITE_URL = "http://127.0.0.1:8000" # without trailing slash MEDIA_URL = f"{WEBSITE_URL}/media/"
import wx.lib.newevent # Event for alerting the UI that the project has changed in some way ProjectChangedEventBase, EVT_COMMAND_PROJECT_CHANGED = wx.lib.newevent.NewEvent() class ProjectChangedEvent(ProjectChangedEventBase): ADDED_VISUALIZATION = 'added_visualization' ADDED_FOLDER = 'added_folder' ADDE...
import math import random import numpy as np import matplotlib import matplotlib.pyplot as plt from collections import namedtuple from itertools import count from PIL import Image import cv2 import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torchvision.transforms as T...
import os from flask import Flask, jsonify from flask_pymongo import PyMongo from werkzeug.exceptions import InternalServerError from backends.mongo import find_records, MongoJSONEncoder, ObjectIdConverter, get_record_by_id app = Flask(__name__) app.config['MONGO_URI'] = os.environ.get('MONGO_URI') app.json_encoder ...
''' Exercise 1 (ungraded). Explain what the following code cell does. ''' edges_raw_trans = pd.DataFrame({'Source': edges_raw['Target'], 'Target': edges_raw['Source']}) edges_raw_symm = pd.concat([edges_raw, edges_raw_trans]) edges = edges_raw_symm.drop_duplicates() V_names = set(edges...
""" Quick script to benchmark bgen reading. Uses the local simplebgen module which is a thin wrapper around the bgen library. """ import sys import os import argparse import time import simplebgen parser = argparse.ArgumentParser() parser.add_argument("input", type=str, help="Input bgen file") parser.add_argument( ...
import re from collections import namedtuple from contextlib import contextmanager import warnings DeprecatedOption = namedtuple('DeprecatedOption', 'key msg rkey removal_ver') RegisteredOption = namedtuple( 'RegisteredOption', 'key msg rkey removal_ver' ) _deprecated_options = {} # holds deprecated option m...
import asyncio import pandas from dask.dataframe.shuffle import partitioning_index, shuffle_group from distributed.protocol import to_serialize import cudf from . import comms async def send_df(ep, df): if df is None: return await ep.write("empty") else: return await ep.write([to_serialize...
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
"""example URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
import argparse import base64 from datetime import datetime import os import shutil import cv2 import numpy as np import socketio import eventlet import eventlet.wsgi from PIL import Image from flask import Flask from io import BytesIO from keras.models import load_model import h5py from keras import __version__ as k...
def multiply_tuple(tup, fval): tup = tuple(i*fval for i in tup) return tup
#!/usr/bin/env python3 from parsuite.abstractions.xml.masscan import * from xml.etree.ElementTree import ElementTree from re import match,search from sys import exit def parse_masscan(tree,no_services): if tree.__class__ != ElementTree: raise TypeError( 'tree should be an xml.etree.ElementTre...
import pathlib, re from pickletools import optimize from PIL import Image, ImageDraw from numpy import dtype import numpy as np def listar_imagens(img_dir): lista = [str(l) for l in list(pathlib.Path(img_dir).glob('*.png'))] aux = [] for img_path in lista: epoch = int(re.findall(r'[0-9]{1,}', img_p...
''' Faça um Programa que mostre a mensagem "Alo mundo" na tela. ''' print('Alô, mundo!')
"""Cholesky decomposition functions.""" from numpy import asarray_chkfinite, asarray, atleast_2d # Local imports from .misc import LinAlgError, _datacopied from .lapack import get_lapack_funcs __all__ = ['cholesky', 'cho_factor', 'cho_solve', 'cholesky_banded', 'cho_solve_banded'] def _cholesky(a, lower...
from __future__ import division, print_function, absolute_import from ._ufuncs import _lambertw def lambertw(z, k=0, tol=1e-8): r""" lambertw(z, k=0, tol=1e-8) Lambert W function. The Lambert W function `W(z)` is defined as the inverse function of ``w * exp(w)``. In other words, the value of ``...
from ssg.utils import parse_template_boolean_value def preprocess(data, lang): data["missing_parameter_pass"] = parse_template_boolean_value(data, parameter="missing_parameter_pass", default_value=False) return data
""" Функции команд бота. """ import logging import random import re from typing import List, Dict import pkg_resources import requests from sqlalchemy.orm import selectinload from telegram import Update, ParseMode, InlineKeyboardMarkup, InlineKeyboardButton, ChatAction from telegram.ext import CallbackContext from po...
import math import numpy as np def aknfe(v2): """ Returns the attenuation due to a single knife edge - the Fresnel integral (in decibels, Eqn 4.21 of "The ITS Irregular Terrain Model, version 1.2.2: The Algorithm" – see also Eqn 6.1) evaluated for nu equal to the square root of the input argument. ...
# Copyright 2015 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 #ac # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
#!/usr/bin/env python """ Script that completes a PDB structure with missing residues or atoms. It uses MODELLER as backend, it automatically builds a MODELLER align file and then performs the completion with a MODELLER model and its tools. Requires BioPython>=1.74 and Modeller>=9.21. """ import os import argparse ...
from .default_settings import set_default_setting
import typing def main() -> typing.NoReturn: n, k = map(int, input().split()) ab = [tuple(map(int, input().split())) for _ in range(n)] ab.sort(key=lambda x: x[0]) x = k for a, b in ab: if a <= x: x += b continue print(x) return print(x) mai...
# -*- coding: utf8 -*- # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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...
# -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2008 EVO Sistemas Libres <central@evosistemas.com> # 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 F...
def set_phrase(): phrase = input('What phrase would you like to hang? ') template = ['_'] * len(phrase) space = ' ' indicies = get_index(space, phrase) template = update(space, indicies, template) return phrase, template def get_index(char, phrase): # return list of index values of ch...
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose" file="range_document.py"> # Copyright (c) 2021 Aspose.Words for Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a copy # of th...
""" test.test_component_sun ~~~~~~~~~~~~~~~~~~~~~~~ Tests Sun component. """ # pylint: disable=too-many-public-methods,protected-access import unittest import datetime as dt import ephem import homeassistant as ha import homeassistant.components.sun as sun class TestSun(unittest.TestCase): """ Test the sun mod...
import numpy as np class NeuralNetwork: """ Neural Network Architecture """ def __init__(self, layers, optimizer, minibatch_size=100, learning_rate=0.001): """ Initialization function for Neural Network class """ self._layers = layers self._optimizer = optimizer self._learning_...
#!/usr/bin/python """ run with: spark-submit ./irc1.py local[2] 10.0.0.1 9999 """ import sys # if you are running in standalone and want to run as a __main__ or unittest # you need to add SPARK_HOME to PYTHONPATH so that pyspark module # would be available # you'd also need to do 'pip install py4j' from pyspark impor...
# 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...
# -*- coding: utf-8 -*- # Copyright Hannah von Reth <vonreth@kde.org> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of condi...
from api.component import Component from api.shapes import Rectangle as Rect class Rectangle(Component): def defParameters(self): self.newParameter("l") self.newParameter("w") def defInterfaces(self): self.newInterface("t") self.newInterface("b") self.newInterface("l") self.newInterface("...
from namespace import project if __name__ == "__main__": dummy = project.Dummy() dummy.setVal(42) print(dummy.getVal()) dummy = project.Dummy(42)
import komand from .schema import QuarantineInput, QuarantineOutput from komand.exceptions import ConnectionTestException # Custom imports below class Quarantine(komand.Action): def __init__(self): super(self.__class__, self).__init__( name='quarantine', description='Quara...
import tensorflow as tf import configparser from distutils.version import StrictVersion import cv2 import glob from using_function import draw_box, read_pbtxt, get_inAndout_tensor, convert_type, read_image if StrictVersion(tf.__version__) < StrictVersion('1.12.0'): raise ImportError('Please upgrade your TensorFlow...
# # 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...
# Copyright 2020 Toyota Research Institute. All rights reserved. import torch import torch.nn.functional as F from realtime_panoptic.utils.bounding_box import BoxList from realtime_panoptic.utils.boxlist_ops import (boxlist_nms, cat_boxlist, remove_small_boxes) class PanopticFromDenseBox: """Performs post-process...
from collections import namedtuple from .resource import Resource class Endpoint(namedtuple('Endpoint', ['path', 'method'])): endpoints = {} def __init__(self, path, method): self.resource = Resource(self.path)
""" The MIT License (MIT) Copyright (c) 2021 - Oxy 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...
from selenium.webdriver.common.by import By from .base_page import BasePage from .locators import LoginPageLocators class LoginPage(BasePage): def should_be_login_page(self): self.should_be_login_url() self.should_be_login_form() self.should_be_register_form() def should_be_login_url...
#!/usr/bin/env python """ _WMCore_ Core libraries for Workload Management Packages """ __version__ = '1.3.2.pre5' __all__ = []
from .core import * from .menus import *
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from pmt/vec.msg. Do not edit.""" import codecs import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class vec(genpy.Message): _md5sum = "c5012a429e390f4ddcf2e02fa7cb0fc8" _type = "pmt/vec" ...
from http import HTTPStatus from cerberus import Validator # type: ignore from fastapi import status from fastapi.exceptions import HTTPException from fastapi.openapi.models import APIKey, APIKeyIn from fastapi.params import Security from fastapi.security.api_key import APIKeyHeader, APIKeyQuery from fastapi.security...
__all__ = ['__version__'] __version__ = '1.0.39.dev0'
import asyncio async def get_html(url): print(f"get {url} ing") # if url == "https://www.asp.net": # raise Exception("Exception is over") await asyncio.sleep(2) return f"<h1>This is a test for {url}</h1>" def callback_func(task): print(type(task)) if task.done(): print(f"done...
# ParentID: 33127 # ObjectID: 0 # Character field ID when accessed: 270000000
from astropy import units as u from poliastro.core.flybys import compute_flyby as compute_flyby_fast @u.quantity_input( v_spacecraft=u.km / u.s, v_body=u.km / u.s, k=u.km ** 3 / u.s ** 2, r_p=u.km, theta=u.deg, ) def compute_flyby(v_spacecraft, v_body, k, r_p, theta=0 * u.deg): """Computes ou...
# Copyright (c) 2018 The MKEcoin Project # # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are # permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this list of # condit...
""" Auxiliary functionality. """ import dataclasses from enum import Enum import os import subprocess from typing import Any, Dict, List, Optional, Tuple, Union # TODO: better naming # Languages supported in various # TODO: language names' normalization (c_sharp, C#, csharp -> C#), maybe within Enry? SUPPORTED_LANGUA...
#!/usr/sbin/env python import click import ipaddress import json import netaddr import netifaces import os import re import subprocess import sys import threading import time from socket import AF_INET, AF_INET6 from minigraph import parse_device_desc_xml from portconfig import get_child_ports from sonic_py_common im...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import django.utils.timezone class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations ...
# -*- coding: utf-8 -*- import unittest import os import re class MedialahanTest(unittest.TestCase): def test_should_not_be_duplicated_content_type(self): self_path = os.path.abspath(os.path.dirname(__file__)) yaml_file_path = '%s/../mime_types.yaml' % self_path f = open(yaml_file_path, '...
import pandas as pd df = pd.read_csv("hiworld\\python\\Arquivo.csv", encoding = "UTF-8", sep = ",") #dfj = pd.read_json("hiworld\python\Arquivo.json") #deu pau print(df)
# Generated by Django 3.0 on 2020-10-15 16:43 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('DeliverySystem', '0001_initial'), ('OrderAndDelivery', '0004_auto_20201015_2101'), ] operations = [ m...
from celery.schedules import crontab from celery.task import task, periodic_task from casexml.apps.stock.models import StockReport, StockTransaction from corehq.apps.users.models import CommCareUser from custom.ewsghana.alerts.ongoing_non_reporting import OnGoingNonReporting from custom.ewsghana.alerts.ongoing_stockout...
import os import re import pickle import uuid import cv2 as cv import numpy as np import xml.etree.ElementTree as ET import dataset.utils as utils from dataset.image_dataset import ImageDataset from dataset.voc.voc_eval import voc_eval # _CLASSES = ('__background__', # always index 0 # 'aeroplane', 'bicycl...
# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------...
# These are the only functions that ever yield back to the task runner. import types import enum from functools import wraps import attr import outcome from . import _run # Helper for the bottommost 'yield'. You can't use 'yield' inside an async # function, but you can inside a generator, and if you decorate your ...
#!/usr/bin/env python # encoding: utf-8 """ test_turbine_costsse.py Created by Katherine Dykes on 2014-01-07. Copyright (c) NREL. All rights reserved. """ import unittest from commonse.utilities import check_gradient_unit_test from turbine_costsse.turbine_costsse import TowerCostAdder, TowerCost from turbine_costss...
import pytest from os.path import join import pandas as pd from delphi_utils import read_params from delphi_nchs_mortality.pull import pull_nchs_mortality_data params = read_params() export_start_date = params["export_start_date"] export_dir = params["export_dir"] static_file_dir = params["static_file_dir"] token =...
"""Create your announcement views here.""" from django.contrib import messages from django.core.files.storage import default_storage from django.http import HttpResponse, HttpResponseRedirect from django.template.defaultfilters import safe, striptags, truncatewords from django.urls import reverse_lazy from django.view...
""" 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 the Li...
import pya # Load technology file tech = pya.Technology() tech.load(tech_file) layoutOptions = tech.load_layout_options # Load def file main_layout = pya.Layout() main_layout.read(in_def, layoutOptions) # Clear cells top_cell_index = main_layout.cell(design_name).cell_index() print("[INFO] Clearing cells...") for i...
from core.advbase import * from slot.a import * from slot.d import * def module(): return Halloween_Mym class Halloween_Mym(Adv): conf = {} conf['slots.a'] = Primal_Crisis()+An_Ancient_Oath() conf['acl'] = """ `dragon, s=1 `s3, not self.s3_buff `s1 `s2, cancel `...