text
stringlengths
2
999k
#!/usr/bin/python # # Copyright 2018-2022 Polyaxon, 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 ...
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
#!/usr/bin/env python import os import codecs import argparse import file_util import sys import re ID,FORM=0,1 def sent_set(inp): sents={} #key: sentence text value: count for comment,lines in file_util.trees(inp): txt=u" ".join(line[FORM] for line in lines if line[ID].isdigit()) sents[txt]=...
"""Container class for MultiLine data.""" import typing as ty import numpy as np from ._multiline_utils import get_data_limits, make_multiline_color, make_multiline_line class MultiLineList: """Multi-line class.""" def __init__(self): self._data = {"xs": [], "ys": []} self._color = np.empty...
""" Manage AWS Step Functions state machines and executions. """ from __future__ import absolute_import, division, print_function, unicode_literals import os, sys, argparse, json, time, concurrent.futures from botocore.exceptions import ClientError from . import batch, logger from .ls import register_parser, regist...
from time import sleep #variaveis compostas: são divididas me tuplas, listas e dicionarios #nestas aulas serão estudadas tuplas # exemplo # lanche = {conteudo} (lanche recebe amburguer) # lanche = {amburguer}(desta vez substituindo amburguer com suco) # desta forma o resultado anterior do primeiro lanche se perde pois...
import os from setuptools import setup, find_packages # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): return open(os.path....
"""Compatibility constants and helpers for Python 2.x and 3.x. """ import sys # NB If this module grows to more than a handful of items it is probably # to bite the bullet and depend on the six package. __all__ = [ 'string_types', 'binary_type', 'text_type', 'int2byte', 'byte2int' ] # Needed f...
from fsa.fsa import FSA, sp_fsa
#!/usr/bin/env python from setuptools import setup __version__ = "3.1.0" with open("README.md", "r") as fh: long_description = fh.read() extra_reqs = { "test": ["pytest"], } setup( name="stac_validator", version=__version__, author="James Banting, Jonathan Healy", author_email="jhealy@spark...
__all__ = ['ttypes', 'constants', 'RpcServiceBase']
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Utilities to aid in testing. """ import subprocess import os class MockSourceRepo(object): """ Represents a source repository on the local filesystem for mocking purposes. The repository is setup to have some history and tags. """ def __init__...
""" package for remotely controling denon avr via telnet based on webserver """
# coding: utf-8 import os import subprocess from scilib.iterlib import chunks BASE_DIR = os.path.dirname(__file__) CLI_PATH = os.path.join(BASE_DIR, 'cli.go') def batch_classify(names): first_names = [i.split()[0].replace(',', '') for i in names] output_results = {} for chunk in chunks(first_names, siz...
# Generated by Django 2.1.10 on 2019-07-17 17:46 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("modeladmintest", "0007_friend"), ] operations = [ migrations.CreateModel( name="SoloBook", ...
from __future__ import print_function, absolute_import import os import glob import re import sys import os.path as osp import numpy as np import random from time import time """Cross-Modality ReID""" def eval_sbir(distmat, q_pids, g_pids, max_rank = 20): num_q, num_g = distmat.shape if num_g < max_rank: ...
""" Ory APIs Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501 The version of the OpenAPI document: v0.0.1-alpha.71 Contact: support@ory.sh Generated by: htt...
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
import lib.utils from collections import defaultdict class Seg: ID = "" header = "" txs = [] chrom = "" length = 0 geneID = "" startLoc = 0 endLoc = 0 exs = [] strand = "+" posInTx = [] def __init__(self, header): self.header = header tokens = header...
# -*- coding: utf-8 -*- # # Flood Prediction ML documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration v...
def enclosing(): str = 'closed over' def local_func(): print(str) return local_func lf = enclosing() lf() print(lf.__closure__)
import numpy as np from .binarystep import binarystep from .gaussian import gaussian from .identity import identity from .leakyrelu import leakyrelu from .mish import mish from .relu import relu from .selu import selu from .sigmoid import sigmoid from .silu import silu from .softmax import softmax from .softplus import...
import numpy as np import cv2 from numpy.core.fromnumeric import trace import mediapipe_utils as mpu from pathlib import Path from FPS import FPS, now import depthai as dai import marshal import sys from string import Template from math import sin, cos SCRIPT_DIR = Path(__file__).resolve().parent POSE_DETECTION_MODEL ...
# 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...
from dagster import ( DependencyDefinition, InputDefinition, Int, Output, OutputDefinition, PipelineDefinition, lambda_solid, solid, ) from dagster.core.execution.api import create_execution_plan, execute_plan from dagster.core.instance import DagsterInstance def define_two_int_pipelin...
import discord from discord.ext import commands from arquivo import * colour = 1015823 class Servers(commands.Cog): '''Minecraft Servers commands''' def __init__(self, bot): self.bot = bot @commands.command(name = 'servers', help = 'Mostra os servidores disponíveis. !servers') async de...
#!/usr/bin/env python3 from unittest import TestCase, main from g2p import make_g2p from g2p.exceptions import InvalidLanguageCode, NoPath from g2p.transducer import CompositeTransducer, Transducer class NetworkTest(TestCase): """Basic Test for available networks""" def setUp(self): pass def t...
from django.db import models from sorl.thumbnail import ImageField # Create your models here. class Post(models.Model): text = models.CharField(max_length=140, blank=False, null=False) image = ImageField() def __str__(self): return self.text
from ._radius_to_kernel_size import radius_to_kernel_size from ._sigma_to_kernel_size import sigma_to_kernel_size from ._categories import categories from ._create import ( create, create_zyx, create_like, create_binary_like, create_labels_like, create_from_pointlist, create_pointlist_from_l...
import math import random import numpy as np import matplotlib.pyplot as plt def noise_sine(length=10000, level=0.2, mu=2.4, discard=1000): """Simulate the noise-driven sine map described in Freitas et al (2009), "Failure in distinguishing colored noise from chaos using the 'noise titration' techniq...
# -*- coding: utf-8 -*- # @Author : xmh # @Time : 2021/1/22 9:01 # @File : Module.py """ file description:: """ import torch.nn as nn import torch import math import copy import torch.nn.functional as F from tqdm import trange def gelu(x): return 0.5 * x * (1 + torch.tanh(math.sqrt(2 / math.pi) * (x + 0...
import nuke import revealInFinder print "Passing through revealInFinder menu.py" node_classes = ["Read", "Write", "Camera", "Camera2", "ReadGeo", "ReadGeo2", "WriteGeo"] for node in node_classes: nuke.addOnUserCreate(revealInFinder.add_reveal_button, nodeClass=node) nuke.addKnobChanged(revealInFinder.reveal_in_fin...
from PySide2.QtWidgets import QApplication, QWidget, QMessageBox, QListWidget from PySide2.QtGui import QPixmap, QImage from PySide2.QtCore import Qt from segmentpy._taskManager.ActViewer_design import Ui_actViewer from segmentpy._taskManager.nodes_list_logic import node_list_logic from segmentpy._taskManager.file_dia...
# coding: utf-8 # # This code is part of cmpy. # # Copyright (c) 2022, Dylan Jones import logging import numpy as np import matplotlib.pyplot as plt from cmpy.models import SingleImpurityAndersonModel from cmpy import exactdiag as ed logger = logging.getLogger("cmpy") logger.setLevel(logging.DEBUG) def main(): ...
from pydantic import BaseSettings class Settings(BaseSettings): PROJECT_NAME: str = "ymir monitor" INTERVAL_SECONDS: int = 20 MONITOR_SENTRY_DSN: str = "" REDIS_TESTING: bool = False MONITOR_RUNNING_KEY: str = "MONITOR_RUNNING_KEY:v1" MONITOR_FINISHED_KEY: str = "MONITOR_FINISHED_KEY:v1" ...
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.backend.native.subsystems.libc_dev import LibcDev from pants.backend.native.subsystems.utils.parse_search_dirs import ParseSearchDirs from pants.engine.platform import Platform ...
#!/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', 'PhoneSearch.settings') try: from django.core.management import execute_from_command_line ...
# Copyright 2003-2008 by Leighton Pritchard. All rights reserved. # # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. # # Contact: ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos is used to denote the index...
from django import forms, template from django.forms.formsets import all_valid from django.forms.models import modelform_factory, modelformset_factory, inlineformset_factory from django.forms.models import BaseInlineFormSet from django.contrib.contenttypes.models import ContentType from django.contrib.admin import widg...
# Generated by Django 3.0.6 on 2020-05-23 19:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gallery', '0004_gallery_post'), ] operations = [ migrations.AddField( model_name='gallery', name='caption', ...
from django.db.models import CharField, BooleanField, TextField from apps.vadmin.op_drf.models import CoreModel class CeleryLog(CoreModel): name = CharField(max_length=256, verbose_name='任务名称', help_text='任务名称') func_name = CharField(max_length=256, verbose_name='执行函数名称', help_text='执行函数名称') kwargs = Tex...
import subprocess from .autograd import Variable from graphviz import Digraph def viz(variable: Variable, filename: str) -> Digraph: f = Digraph(filename=filename) f.attr(rankdir='LR') f.attr('node', shape='rectangle') def loop(var: Variable): if var.op: f.node(str(id(var)), f"{...
import requests from datetime import datetime def get_country(country): url = 'https://corona.lmao.ninja/countries/' + country response = requests.get(url) data = [ response.json()['country'], response.json()['cases'], response.json()['todayCases'], response.json()['deaths'...
# 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 ...
import pymongo from flask import Flask, render_template, request, url_for, redirect, session import bcrypt from flask_pymongo import PyMongo import pymongo app = Flask(__name__) app.secret_key = "testing" client = pymongo.MongoClient("mongodb+srv://ClaudioS:ProTech21!@studytogheterdb.dzubs.mongodb.net/StudyTogheterDB...
from __future__ import unicode_literals default_app_config = 'mayan.apps.weblinks.apps.WebLinksApp'
# -*- coding: utf-8 -*- r""" Permutations The Permutations module. Use ``Permutation?`` to get information about the Permutation class, and ``Permutations?`` to get information about the combinatorial class of permutations. .. WARNING:: This file defined :class:`Permutation` which depends upon :class:`Combinat...
import argparse import csv import logging import math import pickle import random from collections import deque import blosc import numpy as np import torch import torch.nn as nn from fixed_replay_buffer import FixedReplayBuffer from mingpt.model_atari import GPT, GPTConfig from mingpt.trainer_atari import Trainer, Tr...
from dataclasses import dataclass, field from typing import List, Optional @dataclass class FooType: class Meta: name = "fooType" foo: Optional["FooType.Foo"] = field( default=None, metadata={ "type": "Element", "namespace": "", "required": True, ...
""" Author: Jan Suleiman Organization: terrestris GmbH & Co. KG Contact: suleiman@terrestris.de Created on: 09.11.20 """ class AbortedException (Exception): """ Class for asynchronous task abortion. This class should only be used for identifying manually aborted asynchronous classes, e.g. shared_tas...
from migen import * from migen.build.xilinx.common import XilinxMultiReg from migen.build.xilinx.vivado import XilinxVivadoToolchain from migen.fhdl import verilog from migen.genlib.cdc import * if __name__ == "__main__": ps = PulseSynchronizer("from", "to") v = verilog.convert(ps, {ps.i, ps.o}, sp...
# Generated by Django 2.2.1 on 2019-05-05 02:41 from decimal import Decimal import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('publicgoods', '0002_auto_20190504_0340'), ] operations = [ migrations.AlterField( ...
# 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...
# Natural Language Toolkit: Penn Treebank Reader # # Copyright (C) 2001-2019 NLTK Project # Author: Steven Bird <stevenbird1@gmail.com> # Edward Loper <edloper@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Corpus reader for corpora that consist of parenthesis-delineated par...
import unittest from arithmetic_slices_ii_subsequence import Solution class Test(unittest.TestCase): def test_1(self): solution = Solution() self.assertEqual(solution.numberOfArithmeticSlices([2, 4, 6, 8, 10]), 7) def test_2(self): solution = Solution() self.assertEqual(solut...
import markdown import bleach from django.db.models import ( Model, BooleanField, CharField, DateTimeField, IntegerField, TextField, BigAutoField, ) from django.utils.translation import gettext_lazy as _ class Announcement(Model): """ An announcement is a block of html text for the...
# Authors: Alexandre Gramfort <gramfort@nmr.mgh.harvard.edu> # Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # # License: BSD (3-clause) import copy import numpy as np from scipy import signal from ..fiff.pick import pick_channels_cov from ..utils ...
import os import time import fcntl import selectors import multiprocessing from typing import List, Tuple, Callable, Iterable F_SETPIPE_SZ = 1031 def fork_and_run(max_jobs: int, client_func: Callable[[int, int, int, int], None], task_size: int, min_sz: int = 32) ->...
import os class PathBuilder(): """Util class for intuitivly join and walk through paths using operators overload""" def __init__(self, initial_path: str): """C'tor PathBuilder""" self.initial_path = initial_path self.current_path = self.initial_path def __add__(self, other: str) ...
# pylint: disable=access-member-before-definition from __future__ import absolute_import #typing #overrides import torch from allennlp.data.fields.field import Field from allennlp.data.fields.sequence_field import SequenceField class SpanField(Field): u""" A ``SpanField`` is a pair of inclusive, zero-index...
#https://leetcode.com/problems/top-k-frequent-elements/
# Copyright 2016 Red Hat, 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 writing...
import torch import torch.nn.functional as F import numpy as np from tqdm import tqdm from collections import OrderedDict from maml.utils import update_parameters, tensors_to_device, compute_accuracy __all__ = ['ModelAgnosticMetaLearning', 'MAML', 'FOMAML'] class ModelAgnosticMetaLearning(object): """Meta-learn...
"""Utility functions for use in templates / controllers *PLEASE NOTE*: Many of these functions expect an initialized RequestConfig object. This is expected to have been initialized for EACH REQUEST by the web framework. """ import os import re import urllib from routes import request_config class RoutesException(Ex...
# qubit number=5 # total number=50 import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import ...
from __future__ import unicode_literals from prompt_toolkit2.application.current import get_app from prompt_toolkit2.filters import Condition from prompt_toolkit2.key_binding.key_bindings import KeyBindings from prompt_toolkit2.layout.containers import ( ConditionalContainer, Float, FloatContainer, HSp...
from pdb import set_trace import json from copy import copy, deepcopy import numpy as np from numpy.random import randint, rand from abc import abstractmethod from pyDOE import lhs from scipy.special import logit # TODO: rename `sampling` --> `sample` # TODO: add conditional parameters TRANS = { 'log': np.log,...
from __future__ import ( unicode_literals, absolute_import, print_function, division, ) from uuid import UUID from .model import datadefs from . import core from .utils import register_class def short_name(name): for s in ('DataDef_', 'ContainerDef_'): name = name.replace(s, "") r...
########################################################################## # # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2018, The pgAdmin Development Team # This software is released under the PostgreSQL Licence # ########################################################################## """ Implements In...
arr=[1,0,-1,0,-2,2] target=0 def four_sum( arr, target): hash_map = dict() arr.sort() result = set() for i in range(len(arr)): for j in range(i + 1, len(arr)): curr_sum = arr[i] + arr[j] diff = target - curr_sum if diff in hash_map: ...
from flask import Blueprint posts=Blueprint('posts',__name__) from . import views,errors
#!/usr/bin/env python3 ''' ############################################################################### ############################################################################### ## ## ## _ ___ ___ ___ ___ ___ ...
import numpy as np from multiprocessing import Pool from datetime import datetime from argparse import ArgumentParser from COVID_Model import City from pathlib import Path import json from bayes_opt import BayesianOptimization import pandas as pd import setproctitle setproctitle.setproctitle('Thane_SEIR@hanzhenyu') MU...
# -*- 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 or...
from channels.generic.websocket import AsyncWebsocketConsumer from . import views from .utils import get_config, get_API from django.http import Http404 import json class ApiRespondCourse(AsyncWebsocketConsumer): async def connect(self): config = get_config() self.unicode = self.scope['url_route'][...
import os.path import re import sys version = sys.argv[2] lib_suffix = "" if len(sys.argv) < 4 else sys.argv[3] with open(sys.argv[1], "r") as f_in: with open("static_link.sh", "w") as f_out: if os.path.isfile(f"libtensorflow_framework.{version}.dylib-2.params"): p_cd = re.compile(r"...
from collections import Counter, namedtuple from random import random DataPoint = namedtuple('DataPoint', ['count', 'compound', 'splitlocs']) def merge_counts(data): store = {} for dp in data: if dp.compound in store: store[dp.compound] = dp._replace(count=store[dp.compound].count + dp.c...
from unittest import mock import pytest from mlflow.utils import ( get_unique_resource_id, _chunk_dict, _truncate_dict, _get_fully_qualified_class_name, ) def test_get_unique_resource_id_respects_max_length(): for max_length in range(5, 30, 5): for _ in range(10000): assert le...
# coding: utf-8 # # Copyright 2019 Amazon.com, Inc. or its 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. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "lice...
import numpy as np from scipy import sparse from scipy.sparse import linalg as la from scipy import optimize as opt from ss_model import linear_operators as lo from utils.tt_dataset import AgentType def make_ss_matrices(sigma_x, dt): """ To make Q full-rank for inversion (so the mle makes sense), use: Q =...
"""empty message Revision ID: cae5e85415c2 Revises: 34632e9e90f3 Create Date: 2020-08-06 13:31:19.185791 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'cae5e85415c2' down_revision = '34632e9e90f3' branch_labels = None depends_on = None def upgrade(): # ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `ProjectParallelProgrammeren` package.""" import os import sys import pytest from click.testing import CliRunner from click import echo import projectparallelprogrammeren """def test_greet(): expected = "Hello John!" greeting = greet("John") ...
""" Copyright 2013 Steven Diamond 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...
import sys sys.path.append("..") from check.param_check import * from check.func_check import * from utils.api_request import api_request from utils.util_log import test_log as log TIMEOUT = 20 # keep small timeout for stability tests # TIMEOUT = 5 class ApiCollectionWrapper: collection = None def init_c...
#!/usr/bin/env python import os, logging, gym from baselines import logger from baselines.common import set_global_seeds from baselines.common.misc_util import boolean_flag from baselines import bench from baselines.a2c.a2c import learn from baselines.common.vec_env.subproc_vec_env import SubprocVecEnv from baselines.c...
import os import pygame from constants import * from find_data import find_data_file class Inventory(): def __init__(self): self.image = pygame.image.load(find_data_file(os.path.join('data', 'images', 'inventory', 'inventory.png'))).convert() self.rect = self.image.get_rect() ...
''' @author: Monkey Coders @version: 1 Este prototipo en Python con estandar MVC, filtra y procesa los datos para poder ser exportado a otras plataformas. Condiciones: 2010 - Actualidad ''' class ControladorDatos: def controlador_poblacion_2010(self, database, datos): entidades_federativas = [] p...
# 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 u...
# Adding rank and tournament selections by Choi, T # Adding one- and two-point crossovers by Choi, T # Adding sharing method by Choi, T """ Visualize Genetic Algorithm to find a maximum point in a function. Visit my tutorial website for more: https://morvanzhou.github.io/tutorials/ """ import numpy as np import matpl...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Author: Bertrand256 # Created on: 2017-03 import hashlib import sqlite3 import threading from functools import partial from typing import Optional, Tuple, List, ByteString, Callable, Dict import sys import usb1 from PyQt5 import QtWidgets import hatch_utils from common...
import asyncio import logging import logging.handlers import queue import threading import urllib.request from pathlib import Path from typing import List, NamedTuple try: from typing import Literal except ImportError: from typing_extensions import Literal # type: ignore import cv2 import matplotlib.pyplot a...
""" Imports the various compute backends """ from typing import Set from ..exceptions import InputError, ResourceError from .adcc import AdccHarness from .cfour import CFOURHarness from .dftd3 import DFTD3Harness from .dftd4 import DFTD4Harness from .gamess import GAMESSHarness from .gcp import GCPHarness, MCTCGCPHar...
#!/usr/bin/env python # -*- coding: utf-8 -*- from pcompile.operations import react from pcompile.helper import step_wrapper @step_wrapper def step(env, rxn, inputs=None): '''Enzymatic cellular lysis.''' env.rprotocol.step('lysis', 'Enzymatic cellular lysis.') lys, prp = rxn.reactions s = react(env,...
import enum import operator import os from functools import partial, reduce import attr import yaml from acconeer.exptool import configs from acconeer.exptool.modes import Mode, get_mode BYTEORDER = "little" BO = BYTEORDER class Category(enum.Enum): GENERAL = "general" CONFIG = "config" SESSION_INFO =...
import os import glob import sys import openmc from tests.testing_harness import PyAPITestHarness class VolumeTest(PyAPITestHarness): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.exp_std_dev = 1e-01 self.exp_rel_err = 1e-01 self.exp_variance = 5e-...
# -*- coding: utf-8 -*- ''' Created on Mar 22, 2011 @author: mhaa ''' from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() from builtins import * from ...
import crypto_tools import crypto_native def openssl_aes_128_little_doc(): return "short example of encryption and decryption using openssl" def openssl_aes_128_full_doc(): return """ openssl_aes_128_full_doc """ def openssl_aes_128_pre_processing(key, iv): if len(key) > 16: raise Valu...
import gym import matplotlib from matplotlib import pyplot as plt import itertools import numpy as np import sys import sklearn.pipeline import sklearn.preprocessing from lib import plotting from sklearn.linear_model import SGDRegressor from sklearn.kernel_approximation import RBFSampler if "./" not in sys.path: s...
from datetime import datetime import logging as log class p4Logging(object): def __init__(self, file_name = None): self.log = log date = datetime.now() str_date = date.strftime('%Y-%m-%d.%H:%M:%S') self.file_name = "log/p4Controler-" + str_date log.basicConfig(filename=self...