text
stringlengths
1
927k
"""empty message Revision ID: c8f4b08529a4 Revises: bbd324935815 Create Date: 2017-05-02 00:04:57.131824 """ # revision identifiers, used by Alembic. revision = 'c8f4b08529a4' down_revision = 'bbd324935815' from alembic import op import sqlalchemy as sa def upgrade(): # ### commands auto generated by Alembic ...
from dictization_functions import missing, StopOnError, Invalid from pylons.i18n import _ def identity_converter(key, data, errors, context): return def keep_extras(key, data, errors, context): extras = data.pop(key, {}) for extras_key, value in extras.iteritems(): data[key[:-1] + (extras_key,)] ...
from ...utils.dicttools import flatten, aggregate, propagate def prepare_log(details, level=5, delim='/'): prepared = aggregate(flatten(details, delim='.'), level=level, delim='.') return {k.replace('.', delim): v for k, v in prepared.items()} def weighted_sum(terms, **coef): # 1. compute the final loss...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Sep 26 17:33:03 2021 @author: ubuntu204 """ import numpy as np from scipy import stats import statsmodels.stats.multitest as multitest import matplotlib.pyplot as plt import os import pandas as pd from pandas import Series,DataFrame # import seaborn as...
""" Unit tests for the api controller utils of external API service """ import base64 import json import yaml import pytest from anchore_engine.services.apiext.api.controllers import utils as api_utils from anchore_engine.subsys import logger logger.enable_test_logging('INFO') spec_path = 'anchore_engine/services/api...
from django.shortcuts import render, redirect from django.http import HttpResponse from django.core import serializers from django.urls import reverse_lazy from django.views.generic import ListView, CreateView, UpdateView, DeleteView from apps.mascota.forms import MascotaForm from apps.mascota.models import Mascota ...
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Downloads and unpacks a toolchain for building on Windows. The contents are matched by sha1 which will be updated when the toolchain...
from pytest import mark from pantable.util import convert_texts, convert_texts_fast, eq_panflute_elems # construct some texts cases texts_1 = [ 'some **markdown** here', 'and ~~some~~ other?' ] texts_2 = [ 'some *very* intersting markdown [example]{#so_fancy}', '''# Comical Text # Totally comical ...
# https://rosalind.info/problems/mrep/ def fmtfa(fasta: list): prev = True header = [] seq = [] for f in fasta: if ">" in f: header.append(f[1:]) prev = True elif prev: seq.append(f) prev = False else: seq[-1] += f ...
import os import sys import psutil import numpy as np import pandas as pd sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) from utility.setting import ui_num, DICT_SET, columns_gj from utility.static import now, timedelta_sec, thread_decorator, strf_time, float2str1p6 class Strategy: d...
""" Frontier tester using recording data """ from frontera import FrontierManager, FrontierTester, Settings, graphs SETTINGS = Settings() SETTINGS.BACKEND = 'frontera.contrib.backends.memory_heapq.FIFO' SETTINGS.LOGGING_MANAGER_ENABLED = True SETTINGS.LOGGING_BACKEND_ENABLED = True SETTINGS.LOGGING_DEBUGGING_ENABLED =...
from django.utils import timezone from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.views.generic import DetailView from django.urls import path from .routes import routes from ..models import Membership, GroupMessage @method_decorator([login_re...
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. 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 requ...
# -*- coding: utf-8 -*- """ Created on Wed Aug 15 21:50:58 2018 @author: USER """ # Codes are free to use. Do whatever you want from __future__ import absolute_import """Read raw data""" ####################### LIBRARY ############################# # exceptions library from exceptions import (Data_Format_Exceptio...
def teste(): global s print(f'na funรงรฃo teste S vale {s+2}') print(f'na funรงรฃo teste N vale {n+1}') s=10 n=4 print(f'no programa N vale {n}') print(f'no programa S vale {s}') teste()
import json import logging from django.conf import settings from django.contrib import messages from django.http import Http404, HttpResponse, HttpResponseBadRequest from django.shortcuts import render from django.urls import reverse from django.utils.translation import ugettext as _ from django.views.decorators.http ...
from __future__ import annotations from copy import deepcopy from enum import Enum from typing import Dict, Iterable, List, Mapping, MutableSequence, Optional, Sequence, Union, overload from jschon.exceptions import JSONPatchError, JSONPointerError from jschon.json import JSON, JSONCompatible from jschon.jsonpointer ...
#!/usr/bin/env python # -*- coding=utf-8 -*- """ Manager ~~~~~~~ """ from cmds import cmds if __name__ == '__main__': cmds()
import atexit import logging import random import os import sys import termios import sortedcontainers import netifaces import cli_listen_handler import cli_session_handler import constants import interface import key import node import scheduler import stats import table OLD_TERMINAL_SETTINGS = None # pylint:disab...
"""Create a layout asset.""" import bpy from avalon import api from avalon.blender import lib import openpype.hosts.blender.api.plugin class CreateLayout(openpype.hosts.blender.api.plugin.Creator): """Layout output for character rigs""" name = "layoutMain" label = "Layout" family = "layout" ico...
import os import subprocess import time # ============================================================================= # Constants and settings # Each has: # - filepath # - directSpp inputFiles = [ # ["/home/gj/git/pbrt-v3-scenes/white-room/whiteroom-daytime.pbrt", 16], ["/home/gj/git/pbrt-v3-scenes-extra/ve...
# # Copyright (c) 2021, NVIDIA CORPORATION. # # 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 ...
# Copyright (c) 2016, The Bifrost Authors. All rights reserved. # Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must re...
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tracker_backend.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: rais...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('leonardo_form_pegastudio', '0018_pegastudioorders_file'), ] operations = [ migrations.CreateModel( name='Documen...
import pandas as pd from pre_processing.features import read_feature_dfs from util.helper import pop_labels, concat_dfs from health_stage_classification.health_stage_classifiers import cut_fpts from rul_prediction.ffnn import fit_ffnn from util.constants import LEARNING_SET, FEATURES_CSV_NAME, FULL_TEST_SET, BASIC_STA...
# -*- coding: utf-8 -*- # In this script we use a simple classifer called naive bayes and try to predict the violations. But before that we use # some methods to tackle the problem of our skewed dataset. :) # 11 May 2016 # @author: reyhane_askari # Universite de Montreal, DIRO import csv import numpy as np from skl...
import itertools from typing import List, Union import numpy as np from scipy import linalg from scipy.linalg import block_diag from ..utils.check_values import _process_parameter def generate_covariance_data(n: int, view_features: List[int], latent_dims: int = 1, view_sparsity: List[Un...
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
# -*- coding: utf-8 -*- """ The Salt loader is the core to Salt's plugin system, the loader scans directories for python loadable code and organizes the code into the plugin interfaces used by Salt. """ import os import re import sys import time import yaml import logging import inspect import tempfile import functool...
""" Tests for the update server state machine in otupdate.buildroot.update """ import asyncio import binascii import hashlib import zipfile import pytest from otupdate.buildroot import update, config, file_actions from otupdate.buildroot.update_session import UpdateSession, Stages def session_endpoint(token, endpoi...
import unittest,math from datatype import DataTypes import numpy as np from scipy import stats class TDD_GETTING_STARTED(unittest.TestCase): def test_mse(self): a=[1,2,3] b=[4,5,6] self.assertRaises(TypeError,DataTypes({'a':a}).getMSE,b) def test_datatypes(self): d=DataTypes(5) ...
''' Created on 19 Jan 2021 @author: ejimenez-ruiz ''' from SPARQLWrapper import SPARQLWrapper, JSON import time def queryRemoteGraph(endpoint_url, query, attempts=3): sparqlw = SPARQLWrapper(endpoint_url) sparqlw.setReturnFormat(JSON) try: sparqlw.setQuery(...
import random ## Class that holds population object class Population: def __init__(self, size, allele_frequency, a_advantage=0.0, A_advantage=0.0, mut_rate_a_to_A=0.0, mut_rate_A_to_a=0.0): self.size = size self.parent_allele_freq = float(allele_frequency) self.child_allele_freq = 0 ...
from Recommender_System.algorithm.NeuMF.model import NeuMF_model from Recommender_System.algorithm.train import train, test import tensorflow as tf def train_with_pretrain(n_user, n_item, train_data, test_data, topk_data, gmf_dim, mlp_dim, layers, l2): neumf_model, gmf_model, mlp_model = NeuMF_model(n_user, n_ite...
from flask import Flask, render_template, request, jsonify from colors import get_main_colors from base64 import decodebytes from io import BytesIO app = Flask(__name__, static_url_path='') @app.route('/', methods=['GET', 'POST']) def index(): if request.method == 'POST': if request.form: _, ...
#!/usr/bin/env python import os import sys import shutil import arxiv import requests from sys import platform from tqdm import tqdm from os.path import join version = '0.1.7' author = 'Timon Emken' year = '2020' temp_folder = ".temp_comparxiv" def compare_preprints(arxiv_ID, version_a, version_b,keep_temp,show_l...
import random letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] numbers = ['0', '1', '2', '3', '4',...
"""Common functions for tests.""" from homeassistant.components import dynalite from homeassistant.helpers import entity_registry from tests.async_mock import AsyncMock, Mock, call, patch from tests.common import MockConfigEntry ATTR_SERVICE = "service" ATTR_METHOD = "method" ATTR_ARGS = "args" def create_mock_devi...
import dataset db = dataset.connect('sqlite:///tasks.db') tasks = db['tasks']
import os, sys # os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true' os.environ['CUDA_VISIBLE_DEVICES'] = '1' import tensorflow as tf tf.compat.v1.enable_eager_execution() sys.path.append(r'/home/luca/Desktop/NERFPosit/Inference') import numpy as np import imageio import json import random import time import pprint from...
# source : https://github.com/squeaky-pl/japronto/blob/master/tutorial/1_hello.md from japronto import Application def hello(request): return request.Response(text='Hello world!') app = Application() app.router.add_route('/', hello) app.run(debug=True)
''' ๅ‡่ฎพๆŒ‰็…งๅ‡ๅบๆŽ’ๅบ็š„ๆ•ฐ็ป„ๅœจ้ข„ๅ…ˆๆœช็Ÿฅ็š„ๆŸไธช็‚นไธŠ่ฟ›่กŒไบ†ๆ—‹่ฝฌใ€‚ ( ไพ‹ๅฆ‚๏ผŒๆ•ฐ็ป„ย [0,1,2,4,5,6,7]ย ๅฏ่ƒฝๅ˜ไธบย [4,5,6,7,0,1,2]ย )ใ€‚ ๆœ็ดขไธ€ไธช็ป™ๅฎš็š„็›ฎๆ ‡ๅ€ผ๏ผŒๅฆ‚ๆžœๆ•ฐ็ป„ไธญๅญ˜ๅœจ่ฟ™ไธช็›ฎๆ ‡ๅ€ผ๏ผŒๅˆ™่ฟ”ๅ›žๅฎƒ็š„็ดขๅผ•๏ผŒๅฆๅˆ™่ฟ”ๅ›žย -1ย ใ€‚ ไฝ ๅฏไปฅๅ‡่ฎพๆ•ฐ็ป„ไธญไธๅญ˜ๅœจ้‡ๅค็š„ๅ…ƒ็ด ใ€‚ ไฝ ็š„็ฎ—ๆณ•ๆ—ถ้—ดๅคๆ‚ๅบฆๅฟ…้กปๆ˜ฏย O(logย n) ็บงๅˆซใ€‚ ็คบไพ‹ 1: ่พ“ๅ…ฅ: nums = [4,5,6,7,0,1,2], target = 0 ่พ“ๅ‡บ: 4 ็คบไพ‹ย 2: ่พ“ๅ…ฅ: nums = [4,5,6,7,0,1,2], target = 3 ่พ“ๅ‡บ: -1 ๆฅๆบ๏ผšๅŠ›ๆ‰ฃ๏ผˆLeetCode๏ผ‰ ้“พๆŽฅ๏ผšhttps://leetcode-cn.com/...
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class CodeGenAccumulator(object): """ Accumulates a variety of information and helps generate code based on the information. """ def __...
#!/usr/bin/env python3 # Script to audit the assets # Reads the asset (amount has all issuances) # Reads the balances in every address for the asset. # Compares the two numbers to checks that qty of all assets are accounted for import subprocess import json #Set this to your yiya-cli program cli = "yiya-cli" mode =...
# 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 # di...
import json import sys import unittest from contextlib import contextmanager if sys.version_info[0] < 3: from StringIO import StringIO else: from io import StringIO from mock import patch from auth0_client.Auth0Client import Auth0Client as class_to_test @contextmanager def captured_output(): new_out, new...
from ts_sdk import task def test_log(input, context: task.Context): logger = context.get_logger() logger.log({ "message": "Hello from test function!", "level": "info" }) def test_file_operations(input, context: task.Context): file = context.write_file(b'test-content', input.get('newFil...
# Webhooks for external integrations. from __future__ import absolute_import from django.utils.translation import ugettext as _ from django.http import HttpRequest, HttpResponse from zerver.models import get_client, UserProfile from zerver.lib.actions import check_send_message from zerver.lib.response import json_succe...
# -*- coding: utf-8 -*- from django.db.models.fields import CharField from ..forms.fields import TimeZoneInputField class TimeZoneField(CharField): """ A relatively dynamic TimeZone field for Django models. """ def __init__(self, *args, **kwargs): # Note, as of this writing, the max length of...
try: raise ValueError finally: <error descr="Python version 2.7 does not support this syntax. Raise with no arguments can only be used in an except block"><warning descr="Python version 2.6, 2.7 do not support this syntax. Raise with no arguments can only be used in an except block">raise</warning></error>
from io import BytesIO from zipfile import ZipFile import click import fire.cli from fire.api.model import ( Sagsevent, SagseventInfo, SagseventInfoMateriale, EventType, ) from fire.io.regneark import arkdef from . import ( find_faneblad, find_sag, niv, bekrรฆft, er_projekt_okay, )...
import threading from time import sleep import collections import requests import json import argparse import configparser from sensors.sensors import Sensors from backend.backend import Backend parser = argparse.ArgumentParser(description="Kicker activity indicator.") parser.add_argument('--debug', action='store_cons...
#!/usr/bin/env python3 if __name__ == '__main__': import numpy as np from multinormal import MultiNormal np.random.seed(0) data = np.random.multivariate_normal([12, 30, 10], [[36, -30, 15], [-30, 100, -20], [15, -20, 25]], 10000).T mn = MultiNormal(data) x = np.random.multivariate_normal([12, ...
# 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. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
# -*- coding: utf-8 -*- # Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# coding=utf8 # Copyright 2018 JDCLOUD.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.0 # # Unless required by applicable law or agreed ...
from pyteal import * def clear_state_program(): return Return(Int(1)) if __name__ == "__main__": print(compileTeal(clear_state_program(), Mode.Application))
import tarfile import os x = 1000 while x > 0: print(x) if not tarfile.is_tarfile("{}.tar".format(x)): break with tarfile.open("{}.tar".format(x)) as tar: tar.extractall('./') if x < 1000: os.unlink("{}.tar".format(x)) x -= 1
class BeanstalkInstance: def __init__(self): pass def create_application(self, conn, name, description): """ Create a new Beanstalk application :param conn: Elastic Beanstalk connection :param name: Application name :param description: Application description ...
๏ปฟSwap Two Numbers The program must accept two integersย Xย andย Yย as the input. The program mustย swapย and print those two integers as the output. Please fill in the blanks of code so that the program runs successfully. Example Input/Output 1: Input: 3 8 Output: 8 3 Example Input/Output 2: Input: 7 10 Output: 10 7 X, Y = [...
from setuptools import setup if __name__ == "__main__": with open("README.md", encoding="utf-8") as file: long_description = file.read() setup( packages=['pystache_cli'], keywords=["cli", "pystache", "template"], install_requires=["pystache"], name='pystache-cl...
# -*- coding: utf-8 -*- # a moลผe teraz? """ A drop-in replacement for the Mic class that gets input from named pipe. It can be anny source, by here the goal is to communicate with www flask server, where voice recognition is done through chrome browser. We get plain text with no need for stt engine (chrome browser uses...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2018 Alibaba Group Holding 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-...
import warnings from great_expectations.render.renderer import ValidationResultsPageRenderer from great_expectations.render.view import DefaultMarkdownPageView from great_expectations.validation_operators.types.validation_operator_result import ( ValidationOperatorResult, ) def render_multiple_validation_result_...
from Automation import Mods import datetime def Run () -> bool: for modNamespace in Mods.GetAllModNames(): # type: str Mods.BuildModRebuild(modNamespace) print("All mods built. " + datetime.datetime.now().strftime("%I:%M %p")) return True if __name__ == "__main__": if not Run(): exit(1)
class Text: """ The Plot Text Text Template """ def __init__(self, text=""): """ Initializes the plot text Text :param text: plot text text :type text: str """ self.text = text self.template = '\ttext = "{text}";\n' def to_str(self): """ ...
# As documented in the NRPy+ tutorial module # Tutorial-RK_Butcher_Table_Generating_C_Code.ipynb, # this module will produce the required C codes for # allocating required memory Method of Lines (MoL) timestepping, # implementing MoL timestepping, and deallocating memory # Authors: Brandon Clark # Za...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2018 Intel Corporation # # 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 # # Un...
from __future__ import unicode_literals from dvc.utils.compat import basestring, FileNotFoundError, str, urlparse import itertools import json import logging import tempfile from concurrent.futures import ThreadPoolExecutor from copy import copy from functools import partial from multiprocessing import cpu_count from ...
#!/usr/bin/python # Main library file containing all the protocol generation logic. def generate_main_code(type, main_header_file, resolver_cc_file, input_files): """ Main code generator. Takes input files and processes them into structures representing a Kafka message (request or response). These respon...
from atom.api import Atom, Enum, Int, Str class EnumTest(Atom): att = Enum(5, '4') et = EnumTest() et.att = 5 et.att = '5' et.att = 3.4
# -*- coding: utf-8 -*- """Flask extension pacakge for Sendgrid""" from . import FlaskExtension from sendgrid import SendGridClient, Mail class SendGrid(FlaskExtension): """A helper class for managing a the SendGrid API calls""" EXTENSION_NAME = 'sendgrid' def __init__(self, app=None): super...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Oct 28 11:35:01 2021 @author: mbonnema """ import numpy as np def FilterS1(D,A,WE,LE): D_f = {} A_f = {} WE_f = {} LE_f = {} for key in D: dates = D[key] areas = A[key] werrors = WE[key] lerrors = LE[...
# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """Run MPI benchmarks and tests.""" import sys as _sys def helloworld(comm, args=None, verbose=True): """Hello, World! using MPI.""" # pylint: disable=import-outside-toplevel from argparse import ArgumentParser parser = ArgumentParser(prog=__name...
from .fixtures import * from tenable.errors import * def test_event_field_name_typeerror(api): with pytest.raises(TypeError): api.audit_log.events((1, 'gt', '2018-01-01')) def test_event_filter_operator_typeerror(api): with pytest.raises(TypeError): api.audit_log.events(('date', 1, '2018-01-01...
#!/usr/bin/env python3 import datetime #'description': "This module examines Lightsail data fields and automatically enumerates them for all available regions. Available fields can be passed upon execution to only look at certain types of data. By default, all Lightsail fields will be captured.", import argparse fro...
from inputs import get_gamepad from asyncio import run from bleak import BleakClient from bluetooth_telescope import BluetoothTelescope async def main(): bluetoothClient = BleakClient('D8:A9:8B:7E:1E:D2') is_connected = await bluetoothClient.connect() if not is_connected: raise Exception('Device n...
#!/usr/bin/env python3 # # https://stackoverflow.com/a/48035123/1832058 # import scrapy from scrapy.commands.view import open_in_browser class MySpider(scrapy.Spider): name = 'myspider' start_urls = ['https://www.snapdeal.com/'] def parse(self, response): print('url:', response.url) ...
import asyncio import json import ssl from pathlib import Path from typing import Any, Dict, Optional import websockets from flora.server.server import ssl_context_for_client from flora.types.blockchain_format.sized_bytes import bytes32 from flora.util.config import load_config from flora.util.json_util import dict_t...
""" This file contains defines parameters for nipy that we use to fill settings in setup.py, the nipy top-level docstring, and for building the docs. In setup.py in particular, we exec this file, so it cannot import nipy """ # nipype version information. An empty _version_extra corresponds to a # full release. '.d...
from jumpscale.loader import j from jumpscale.packages.vdc.billing import auto_extend_billing from jumpscale.tools.servicemanager.servicemanager import BackgroundService class AutoExtendbillingService(BackgroundService): def __init__(self, interval=60 * 60, *args, **kwargs): """Provisioning wallet service...
import json import os import warnings from pathlib import Path from typing import Union, Dict, Any from .parameter_matrix_parsing import ParameterMatrixProxy class ParamConfigGenerator: FIXED_KEY = "fixed_params" SHARED_KEY = "shared_params" DEPENDENT_KEY = "dependent_params" OPTIMIZED_KEY = "optimiz...
from setuptools import setup, find_packages from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() classifiers = [ 'Development Status :: 3 - Alpha', 'Intended Audience :: Science/Resea...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from yandex.cloud.ydb.v1 import location_pb2 as yandex_dot_cloud_dot_ydb_dot_v1_dot_location__pb2 from yandex.cloud.ydb.v1 import location_service_pb2 as yandex_...
""" Django settings for server project. Generated by 'django-admin startproject' using Django 3.1.4. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ from pathlib ...
import dash import dash_core_components as dcc import dash_html_components as html import dash_table_experiments as dt import pandas as pd import plotly from dash.dependencies import Input, Output, State from plotly import graph_objs as go from augustus.systemabase_env import augustusEnvBase TRADE_LOG = augustusEnvBa...
import copy import pytest from pyconcepticon.models import * @pytest.fixture def sun1991(tmprepos): return tmprepos / 'concepticondata' / 'conceptlists' / 'Sun-1991-1004.tsv' def test_Conceptlist(sun1991, api): kw = dict( api=sun1991, id='Abc-1234-12', author='Some One', ye...
# Copyright 2019 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 armulator.armv6.opcodes.abstract_opcodes.asr_immediate import AsrImmediate from armulator.armv6.opcodes.opcode import Opcode from armulator.armv6.shift import decode_imm_shift from bitstring import BitArray class AsrImmediateT2(AsrImmediate, Opcode): def __init__(self, instruction, setflags, m, d, shift_n): ...
''' CrossLink Network ''' import torch import torch.nn as nn import torch.nn.functional as F def swish(x): return x * x.sigmoid() def mish(x): return x * torch.tanh(F.softplus(x)) class CrossLinkBlock(nn.Module): '''Cross-Link Block''' def __init__(self, in_channels, out_channels, kernel_size, p...
# 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 Re2c(AutotoolsPackage): """re2c: a free and open-source lexer generator for C and ...
# coding=utf-8 # Copyright 2019 The Google Research 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 design import debug from tech import drc from vector import vector from precharge import precharge class precharge_array(design.design): """ Dynamically generated precharge array of all bitlines. Cols is number of bit line columns, height is the height of the bit-cell array. """ def __ini...
import csv import gzip import logging import re import sys import tempfile import boto3 import mondrian from botocore.exceptions import ClientError from warehouse.components.constants import TRAINING_PERCENTAGE mondrian.setup(excepthook=True) logger = logging.getLogger() class PipelineConfig: """Configuration ...
from __future__ import division import os.path def write_disable_nomenclature_errors (f) : f.write("try :\n") f.write(" set_nomenclature_errors_on_read(\"ignore\")\n") f.write("except Exception :\n") f.write(" pass\n") def create_refinement_view_script ( mtz_file_name, pdb_file_name, coot_script...
import json import requests import pandas as pd import os baseurl = "http://exploreapiswith.tech/api/" categories = json.loads(requests.get( baseurl + "category").text) def get_category_api(category_name=None): category_apis = json.loads(requests.get( baseurl + "category/" + category_name).text) ...
try: from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import * except ImportError: from PyQt4.QtGui import * from PyQt4.QtCore import * #from PyQt4.QtOpenGL import * from libs.shape import Shape from libs.lib import distance CURSOR_DEFAULT = Qt.ArrowCursor CURSOR_POINT = ...
from setuptools import setup, find_packages from pyords import __version__ import os currdir = os.path.dirname(os.path.abspath(__file__)) long_description = '' with open(os.path.join(currdir, 'README.md')) as f: long_description = f.read() install_requires = [] with open(os.path.join(currdir, 'requirements.txt')...
# -*- coding: utf-8 -*- # # This file is part of Sequana software # # Copyright (c) 2016 - Sequana Development Team # # File author(s): # Thomas Cokelaer <thomas.cokelaer@pasteur.fr> # # Distributed under the terms of the 3-clause BSD license. # The full license is in the LICENSE file, distributed with this s...