text
stringlengths
3.07k
22.1k
import numpy as np from numpy.lib.arraysetops import isin import paddle from ..data_processor.readers import preprocess_inputs, preprocess_image, read_image, restore_image from ..data_processor.visualizer import sp_weights_to_image_explanation, overlay_threshold, save_image, show_vis_explanation from ._lime_base imp...
import collections import csv import tensorflow as tf from sklearn.metrics import * import pandas as pd import numpy as np from tensorflow.keras.callbacks import Callback import logging # Following is a dependency on the ssig package: #! git clone https://github.com/ipavlopoulos/ssig.git from ssig import art def ca_p...
# 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 applic...
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import unittest from dataclasses import dataclass, field from textwrap import dedent from typing import List from pants.engine.rules import RootRule, rule from pants.engine.scheduler impo...
""" This submodule contains formatting utilities and formatters which will work only on Python 3.6+. There is no inherent reasons why it would not work on earlier version of Python, it just makes use of features that are 3.6 only – Like f-strings – to make the code more readable. Feel free to send patches that makes it...
# 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...
from perceiver_io.perceiver_lm import PerceiverLM from perceiver_io.perceiver_in import PerceiverIN import os, sys import torch import torch.nn as nn import transformers from deepmind_assets import bytes_tokenizer import numpy as np import scipy.sparse as sp from tqdm import tqdm import scipy.sparse as sp # import xc...
# coding: utf-8 """ Collection of builder functions """ from typing import Callable, Optional, Generator import torch from torch import nn from torch.optim.lr_scheduler import _LRScheduler, ReduceLROnPlateau, \ StepLR, ExponentialLR from torch.optim import Optimizer from joeynmt.helpers import ConfigurationError ...
from copy import deepcopy from scipy import optimize import numpy as np from ptype.Column import MISSING_INDEX, ANOMALIES_INDEX from ptype.Machine import PI from ptype.utils import ( LOG_EPS, log_weighted_sum_normalize_probs, normalize_log_probs, ) def likelihoods(PI, logP, k): _, _, _, log_mx, sm = l...
from collections import defaultdict from app.model.types import Types, TypeCounter from app.view.attr import AttrH #=============================================== class AttrTypeChecker: sMAX_BAD_COUNT = 3 def __init__(self, name, base_attr = None, expect_type = None): self.mName = name self....
''' asfgenid =================================== Generates HeadingIDs, ElementID, and PermaLinks First find all specified IDs and classes. Assure unique ID and permalink Next find all headings missing IDs. Assure unique ID and permalink Generates a Table of Content ''' # from __future__ import unicode_literals import...
import os import cv2 import numpy as np import matplotlib.pyplot as plt import seaborn as sns import tensorflow as tf import keras from keras import Sequential, layers, activations from keras.models import Model, load_model from images.image import * from skimage.metrics import peak_signal_noise_ratio as psnr, structu...
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import locale from django.contrib.auth import get_user_model from django.contrib.auth.management.commands import createsuperuser from django.contrib.auth.models import User, AnonymousUser from django.contrib.auth.tests.test_custom_user import CustomUse...
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2012-2019 CNRS # 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 limita...
# -*- coding: utf-8 -*- """ Created on Mon Feb 6 15:54:54 2017 Optimization method test. @author: Robin """ import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d import pickle from scipy.optimize import minimize ##Max density from porosity calculation to show constraint bounda...
#!/usr/bin/env python3 import magnum as mn import examples.settings def perform_general_tests(attr_mgr, search_string): # get size of template library orig_num_templates = attr_mgr.get_num_templates() # make sure this is same value as size of template handles list assert orig_num_templates > 0 ...
# Copyright 1999-2021 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-2.0 # # Unless required by applicable law or a...
# -*- coding: utf-8 -*- """ A Theil-Sen Estimator for Multiple Linear Regression Model """ # Author: <NAME> <<EMAIL>> # # License: BSD 3 clause from __future__ import division, print_function, absolute_import import warnings from itertools import combinations import numpy as np from scipy import linalg from scipy.s...
import numpy as np import pytest from hypothesis import given from torch_hypothesis import class_logits from baal.active import get_heuristic from baal.active.heuristics import ( Random, BALD, Margin, Entropy, Certainty, Variance, BatchBALD, AbstractHeuristic, requireprobs, Prec...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function __metaclass__ = type # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = """ module: nxos_snapshot extends_documentation_fragment: - cisco.nxos.nxos sho...
""" Implementation of the standard :mod:`threading` using greenlets. .. note:: This module is a helper for :mod:`gevent.monkey` and is not intended to be used directly. For spawning greenlets in your applications, prefer higher level constructs like :class:`gevent.Greenlet` class or :func:`gevent.spaw...
__all__ = ["NN", "check_act_fn"] from weakref import WeakKeyDictionary try: from ai4water.tf_attributes import ACTIVATION_LAYERS, ACTIVATION_FNS, LAYERS, tf except ModuleNotFoundError: tf = None from . import backend as K if K.BACKEND == 'tensorflow': from ai4water.tf_attributes import LAYERS, tf else: ...
from collections import OrderedDict from json import dumps import re import os from docutils.parsers.rst import Parser as RstParser from docutils.statemachine import StringList from docutils.utils import new_document from jinja2 import Environment, PackageLoader from six import iteritems, string_types from sphinx.erro...
""" Module responsible for drawing the synthetic worm image """ import random from typing import Tuple import cv2 import numpy as np from wormpose import BaseFramePreprocessing from wormpose.dataset.image_processing import frame_preprocessor from wormpose.images.synthetic import ( MAX_OFFSET_PERCENT, GAUSSIA...
# coding: utf8 from zeit.cms.i18n import MessageFactory as _ import PIL.Image import six import zc.form.field import zc.form.interfaces import zc.sourcefactory.contextual import zeit.cms.content.contentsource import zeit.cms.content.interfaces import zeit.cms.content.sources import zeit.cms.interfaces import zeit.cms.r...
"""Implicit plotting module for SymPy The module implements a data series called ImplicitSeries which is used by ``Plot`` class to plot implicit plots for different backends. The module, by default, implements plotting using interval arithmetic. It switches to a fall back algorithm if the expression cannot be plotted ...
# 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...
"""Contains main for deps verb. Attributes: log (logging.Log): logger """ import sys import logging from os import path from argparse import ArgumentParser try: from catkin_pkg.packages import find_packages except ImportError as e: sys.exit( 'ImportError: "from catkin_pkg.topological_order import...
#!/usr/bin/python3 import sys, argparse, requests, json from auth import reef_pi_secrets def main(argv): if not validate_auth(): print("auth/reef_py_secrets.py must be updated with a valid userid and password") exit(1) parse_args(argv) switcher = { "list": list_handler, "...
""" byceps.blueprints.admin.dashboard.views ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2014-2022 <NAME> :License: Revised BSD (see `LICENSE` file for details) """ from datetime import date, timedelta from flask import abort from ....services.board import board_service from ....services.brand import ( s...
#!/usr/bin/env python3 """ Train an agent using an intelligent expert. The procedure starts with a small set of training demonstrations, and iteratively grows the training set by some percentage. At every step, the new demos used to grow the training set are demos the agent is currently failing on. A new model is tra...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from parlai.utils.distributed import is_distributed from parlai.core.torch_ranker_agent import TorchRankerAgent from parl...
""" .. module: lemur.sources.service :platform: Unix :copyright: (c) 2018 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. .. moduleauthor:: <NAME> <<EMAIL>> """ import arrow import copy from flask import current_app from lemur import database from lemur.sources.models...
import torch from utils_psgail import * import pickle as pk import logging import os import time from multiagent_traffic_simulator import MATrafficSim from multiagent_traffic_simulator_orig import MATrafficSimOrig, MATrafficSimOrigV from smarts.env.wrappers.parallel_env import ParallelEnv from traffic_simulator import ...
#!/usr/bin/env python3.5 # -*- coding: utf-8 -*- import threading import logging import time import serial import re import warnings from datetime import datetime, timedelta try: import Image import ImageDraw except ImportError: from PIL import Image from PIL import ImageDraw INIT = '*SQ;;*SQ;;*SQ...
import argparse import json import os import pandas as pd import requests import sys import numpy as np import time import netCDF4 as nc from pyhdf.SD import SD, SDC from typing import Iterable, Union from io import StringIO from shapely.geometry import shape, Point MIN_LAT_KEY = "min_lat" MAX_LAT_KEY...
# Copyright 2019 D-Wave Systems 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 w...
""" Based on code from https://github.com/fastai/fastai/blob/master/courses/dl2/pascal-multi.ipynb """ import numpy as np import torch import torch.nn as nn from torch.autograd import Variable as V from torch.nn import functional as F from torch import tensor as T from custom_types import TensorType from ty...
from argparse import ArgumentParser from utils import sequence_to_parenthesis, flat_list, rebuild_input_sentence from tree import SeqTree, SyntacticDistanceEncoder from collections import Counter import codecs import os import copy import sys import warnings """ To encode: python /home/david/Escritorio/encoding2multi...
#!/usr/bin/env python # coding: utf-8 # In[4]: from coilpy import * import jax.numpy as np import numpy as nnp import matplotlib.pyplot as plt from jax import grad from jax.ops import index, index_add, index_update from jax import vmap, device_put, jacfwd, jacrev from jax.experimental import loops from jax.numpy imp...
import cv2 import torch import numpy as np import BboxToolkit as bt PI = np.pi def regular_theta(theta, mode='180', start=-PI/2): assert mode in ['360', '180'] cycle = 2 * PI if mode == '360' else PI theta = theta - start theta = theta % cycle return theta + start def mintheta_obb(rbox): x, ...
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from collections import OrderedDict, defaultdict from itertools i...
from typing import Iterable, Dict from pathlib import Path import os import warnings import shutil import pickle from time import time_ns from datetime import datetime as Datetime from jinja2 import Environment, FileSystemLoader import yaml import webbrowser import uvicorn from ._web import create_app from .style impo...
import os, time, json, sys, gc import numpy as np import nltk, pandas import torch from sklearn.metrics import f1_score, recall_score, precision_score, accuracy_score, classification_report from scipy.sparse import csr_matrix, lil_matrix, save_npz, load_npz from torch_geometric.data import Data, DataLoader, GraphSAINTR...
# We need this for older python versions, otherwise it will not use the wavedrom module from __future__ import absolute_import import json import os from os import path from uuid import uuid4 from docutils import nodes from docutils.parsers.rst import directives from docutils.parsers.rst.directives.images import Imag...
#!/usr/bin/env python3 # A simple script invite members from all clients groups into the target group import os import sys import time import json import socks import signal from telethon import TelegramClient, events, sync from telethon.tl.functions.channels import GetParticipantsRequest from telethon.tl.functions.ch...
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 """ Generate C header from validated register JSON tree """ import io import logging as log import re import sys import textwrap import warnings def genout(outfile, msg):...
from django.shortcuts import render, redirect from .models import ( Pessoa, Veiculo, MovRotativo, MovMensalista, Mensalista, Marca, ) from .forms import ( PessoaForm, VeiculoForm, MovRotativoForm, MovMensalistaForm, MensalistaForm, MarcaForm, ) def home(request): ...
# Copyright 2018 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://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
# generates the ditance matrix for clustering def caldistance(lst1, lst2): # calculates the L1 distance between lst1, lst2. they represent two layers (chcknum1/2) with heir list of metabolomic values dist0 = 0 for ii in range(0, len(lst1)): tmp = abs(lst1[ii] - lst2[ii]) dist0 = dis...
import re import os from errno import ENOENT from fuse import FUSE, FuseOSError, Operations, fuse_get_context from queue import Queue from signal import signal, SIGINT from stat import S_IFDIR, S_IFLNK, S_IFREG from subprocess import Popen, PIPE from sys import argv, exit from threading import Thread, Condition from t...
# -*- coding: utf-8 -*- """ Templatetags for django-treebeard to add drag and drop capabilities to the nodes change list - @jjdelc """ import datetime import sys from django.db import models from django.conf import settings from django.contrib.admin.templatetags.admin_list import ( result_headers, result_hidden_...
import os import numpy as np import onnx import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.utils.data import DataLoader from torch.autograd import Variable from tqdm import tqdm import binarized_modules_multi as binarized_modules import esp_dl_utils import utils ...
# -*- coding: utf-8 -*- """Parser for Windows IIS Log file. More documentation on fields can be found here: https://msdn.microsoft.com/en-us/library/ms525807(v=vs.90).aspx """ from __future__ import unicode_literals import pyparsing from dfdatetime import time_elements as dfdatetime_time_elements from plaso.contai...
#! /usr/bin/env python3 """System Verilog Domain Assignment Checker Given a set of rules, check verilog files that all assignments meet the rules. Rules are to ensure that "domains" are maintained, for example pipe stage or clock domains. A rule is an instance of the DACrule dataclass, for example: DACrule(left="s2",...
import demistomock as demisto from CommonServerPython import * import traceback import requests # Disable insecure warnings requests.packages.urllib3.disable_warnings() DEFAULT_OUTGOING_MAPPER = "User Profile - SCIM (Outgoing)" DEFAULT_INCOMING_MAPPER = "User Profile - SCIM (Incoming)" class Client(BaseClient): ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Utilities to generate toymodel (fake) reconstruction inputs for testing purposes. Examples: .. code-block:: python >>> from ctapipe.instrument import CameraGeometry >>> geom = CameraGeometry.make_rectangular(20, 20) >>> showermodel = Gau...
# Copyright (c) 2017 UFCG-LSD. # # 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,...
#!/usr/bin/python3 from PIL import Image from imutils.video import VideoStream from imutils.video import FPS from imutils.object_detection import non_max_suppression import numpy as np import argparse import imutils import time import cv2 import pytesseract from pytesseract import Output import os import re def run():...
"""The pandas client implementation.""" import numpy as np import pandas as pd import toolz from pandas.api.types import CategoricalDtype, DatetimeTZDtype import ibis.expr.datatypes as dt import ibis.expr.operations as ops import ibis.expr.schema as sch from ibis.backends.base import Database infer_pandas_dtype = pd...
import scipy as _sp import time as _time import scipy.sparse as _sprs import OpenPNM as _op from scipy.spatial.distance import cdist as dist def find_path(network, pore_pairs, weights=None): r""" Find the shortest path between pairs of pores. Parameters ---------- network : OpenPNM Network Object...
# A module to define the banking classes from collections import defaultdict import copy import datetime import os from random import randint import sqlite3 import sys class Bank: def __init__(self): """ Create a bank to store the accounts, pins, and a ledger of transactions. """ ...
""" Tests for api module. """ # standard library from io import StringIO import os from pathlib import Path # third-party import pytest # from pyomo.environ import units as pyunits from pyomo.environ import Var, Set, Reals from watertap.ui.api import * # Mocking and fixtures class MockSubBlock1: name = "subblo...
#!/usr/bin/python # $Id:$ from pyglet.canvas.win32 import Win32Canvas from .base import Config, CanvasConfig, Context from pyglet import gl from pyglet.gl import gl_info from pyglet.gl import wgl from pyglet.gl import wglext_arb from pyglet.gl import wgl_info from pyglet.libs.win32 import _user32, _kernel32, _gdi32 ...
import math import logging from shazzam.py64gen import * from shazzam.py64gen import RegisterX as x, RegisterY as y, RegisterACC as a from shazzam.macros.aliases import color, vic from shazzam.macros.vasyl import * logger = logging.getLogger("shazzam") # BeamRacer * https://beamracer.net # Video and Display List copr...
#"MiniNero" by <NAME> mrl. Use at your own risk. import hashlib # for signatures import math from Crypto.Random import random as rand from . import Keccak # cn_fast_hash from . import mnemonic # making 25 word mnemonic to remember your keys import binascii # conversion between hex, int, and binary. Also for the cr...
# Copyright 2011-2013 <NAME> # Copyright 2011-2013 <NAME> # # 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...
from itertools import chain import torch import re import json import glob import os import pandas as pd import logging from torch.utils.data import Dataset from src.data.types import DataTypes from sklearn.model_selection import ParameterGrid class FlatTypedColumnDataset(Dataset): """ No sequence informati...
# # Copyright (c) 2015-2021 Canonical, Ltd. # # This file is part of Talisker # (see http://github.com/canonical-ols/talisker). # # 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 # regardin...
# V-Indexer - A Project by <NAME> aka she11z # Special thanks to <NAME> and @<NAME> # This is a tool alternative to SANS Voltaire # Please go through Readme.txt file before using import os import csv import sys import docx import xlrd import getpass import operator import optparse from docx.shared import ...
# Adapted from felixgwu's PR here: # https://github.com/felixgwu/vision/blob/cf491d301f62ae9c77ff7250fb7def5cd55ec963/torchvision/datasets/camvid.py import os import torch import torch.utils.data as data import numpy as np from PIL import Image from torchvision.datasets.folder import default_loader from ...utils.excep...
# Copyright 2013-2016 DataStax, 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 writi...
from egonetwork import EgoNetwork from evaluation import Evaluation from eval import evaluation from zliu import run_all_except import numpy as np NUM_CIRCLE = 6 ALPHA = 0.5 LAMBDA = 1 ''' This is our final implementation of CESNA framework. There are also 3 ways of initilization. conductance, no neighbor node and apr...
#!/usr/bin/env python from __future__ import print_function import os, re, sys, glob import optparse as opt import cmsPerfRegress as cpr from cmsPerfCommons import Candles, CandFname, getVerFromLog def getParameters(): global _debug global PROG_NAME PROG_NAME = os.path.basename(sys.argv[0]) parser = o...
import os import json import argparse import math import torch from torch import nn, optim from torch.nn import functional as F from torch.utils.data import DataLoader from torch.utils.tensorboard import SummaryWriter import torch.multiprocessing as mp import torch.distributed as dist from apex.parallel import Distribu...
""" Copyright (c) 2021 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import os import tempfile from pathlib import Path from typing import Any, Iterable import pytest from atomic_reactor.constants import DOCKER...
import pytest import xarray as xr import xarray.testing as xrt from anytree.resolver import ChildResolverError from datatree import DataTree from datatree.io import open_datatree from datatree.testing import assert_equal from datatree.tests import requires_h5netcdf, requires_netCDF4, requires_zarr def create_test_da...
# Barbooth 1.1 by Ano # Copyright © 2018 <NAME> # This game is probably illegal in some places but that does not matter # as this is only a personal project. It takes two player names, rolls # two random dices and prints out the winner. There are three game modes: # "highs" designates the highst dice as the winner; "l...
from bs4 import BeautifulSoup import random from mqdq import line_analyzer as la from mqdq import utils import pandas as pd import numpy as np import scipy as sp from scipy.stats import chi2 def explain(x, dist): """Calculate the Mahalanobis distance of a vector x from the distribution dist. This also returns...
# Copyright 2014-2016 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 applicabl...
from abc import ABC, abstractmethod from typing import Any, Dict, Generic, List, NamedTuple, Optional, Set, Type, TypeVar from ._fwd import config as Config T = TypeVar("T") U = TypeVar("U") class ParamSpec(NamedTuple): """ Attributes: req Whether this argument is required desc ...
import logging import threading from speedling import conf from speedling import localsh from speedling import util LOG = logging.getLogger(__name__) PKG_COMPOSOTION = set() # fantasy_gourp something like gentoo package classes # fantasy_element pkg name in one distro # Since these are fantasy names they will remain...
# Copyright 1999-2021 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-2.0 # # Unless required by applicable law or a...
# The MIT License (MIT) # Copyright (c) 2020 by Brockmann Consult GmbH and contributors # # 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...
# Copyright The PyTorch Lightning 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 agreed to i...
from ursina import * from ursina import distance as ursina_distance from math import inf from ursina.hit_info import HitInfo def prepare_terrain(terrain, debug=False, calculate_normals=True): #does calculations that are needed for every terraincast check, and sets up the entities that manage transofrmations ...
# This file is part of the pyMOR project (http://www.pymor.org). # Copyright 2013-2016 pyMOR developers and contributors. All rights reserved. # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) from pymor.analyticalproblems.elliptic import EllipticProblem from pymor.discretizations.basic imp...
import os import os.path as op from glob import glob def check_parameters(cfg, logger): """ Checks parameter settings and raises errors in case of incompatible parameters. """ if cfg['single_trial_id'] is None: logger.warn("No single-trial-id found! Treating trials as conditions") if cfg['bi...
# -*- coding: utf-8 -*- # Copyright © 2012-2015 <NAME> and others. # 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, c...
from gevent import monkey monkey.patch_all() import os import sys import json import time import spotipy # from gevent import monkey from functools import wraps from flask_socketio import SocketIO from flask import Flask, request, redirect, url_for, render_template, session, jsonify from libinit import * # altLyrics_...
"""""" import sys import importlib import traceback from typing import Sequence, Any from pathlib import Path from datetime import datetime from threading import Thread from pandas import DataFrame from trader.setting import SETTINGS from vnpy.event import Event, EventEngine from vnpy.trader.engine import BaseEngine...
import errno import asyncio import json import logging import os import sys import time from subprocess import call import base64 logging.basicConfig(format='%(asctime)s %(message)s', level=logging.INFO) if sys.platform.startswith('linux'): logging.info("Linux OS Detected, running test will be disabled.") SAV...
# coding: utf-8 from pypy.interpreter.baseobjspace import W_Root from pypy.interpreter.error import OperationError, oefmt from pypy.interpreter import unicodehelper from rpython.rlib.rstring import StringBuilder class W_FString(W_Root): def __init__(self, unparsed, raw_mode): assert isinstance(unparsed, s...
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
# -*- encoding: utf-8 -*- # Copyright (c) 2019 ZTE 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...
import abc import itertools import os from typing import ( List, Dict, Any, Generic, Optional, TypeVar ) from dbt.dataclass_schema import ValidationError from dbt import utils from dbt.clients.jinja import MacroGenerator from dbt.context.providers import ( generate_parser_model, generate_generate_componen...
import numpy as np from pupper.ServoCalibration import MICROS_PER_RAD, NEUTRAL_ANGLE_DEGREES from pupper.HardwareConfig import PS4_COLOR, PS4_DEACTIVATED_COLOR from enum import Enum # TODO: put these somewhere else class PWMParams: def __init__(self): self.pins = np.array([[2, 14, 18, 23], [3, 15, 27, 24],...
from typing import Union, List, Dict, Optional from datetime import datetime from decimal import Decimal import sys import time import math from binance.client import Client as BinanceClient from binance.exceptions import BinanceAPIException from binance.enums import TIME_IN_FORCE_GTC from .object_values.filters im...
import numpy as np import argparse #import cv2 #import mss import matplotlib.pyplot as plt import skimage.io import skimage.segmentation #import mss import cv2, time, sys, random, mss import pyautogui import win32gui, win32api, win32con, ctypes class Mouse: #"""It simulates the mouse""" MOUSEEVENTF_MOVE = ...
#!/usr/bin/env python # Copyright 2018 The clvk authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...