text
stringlengths
6.04k
39.5k
from .exceptions import AppNotConfiguredException from .exceptions import ProducerUnhealthyException from .exceptions import SchemaConflictException from .exceptions import StopConsumer from .kafka import KafkaTopicManager from .metrics import NOERROR from .metrics import PRODUCER_TOPIC_OFFSET from .metrics import PUBL...
import numpy as np import schedule import action import formatter # Creates an argumentation framework representing feasibility as an adjacency matrix def construct_feasibility_framework(m, n): ff = np.zeros((m, n, m, n), dtype=bool) for j in range(n): ff[:, j, :, j] = np.logical_not(np.identity(m)) return ff d...
""" BSD 3-Clause License Copyright (c) 2017, <NAME> 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 retain the above copyright notice, this list of conditions an...
#!/usr/bin/env python3 # Copyright 2019 Oath, Inc., see LICENSE.txt for full details """ Flurry's Crash service can symbolicate the crashes reported by Flurry's SDK. This script uploads the symbols required to properly symbolicate crashes from iOS applications. How to send iOS symbols ----------------------- 1. Ensure ...
#!/usr/bin/python # coding=UTF-8 import sys import json import urllib import psycopg2 import git import itertools import os import datetime import time import re import urllib.request student_amount = 300 #学生代码 db = psycopg2.connect(database="onlinejudge2", user="onlinejudge", password="<PASSWORD>", host="10.2.26.1...
from __future__ import print_function import os import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data from datasets.dataset_DIF import * import time import random import torchvision.utils as vutils from models.networks import * from models.DIF_net import * fro...
import json import logging import os from copy import deepcopy from enum import Enum from functools import partial from pathlib import Path from random import shuffle from typing import Dict, List, Tuple, Iterable, Callable, Iterator, Any, Optional import torch from torch import LongTensor, BoolTensor, FloatTensor fro...
#!/usr/bin/env python # coding: utf-8 """ Rename a string in CamelCase, snake_case and ALL_CAPS_CASE in code and filenames in one go. """ __version__ = '0.1.2' __author__ = '<NAME>' __license__ = 'MIT' import sys import logging import argparse import os import fnmatch import io import difflib import shutil import re...
import torch import torch.nn.functional as F def miso_multi_head_attention_forward(query, # type: Tensor key, # type: Tensor value, # type: Tensor ...
import os import sys import argparse import configparser import library.localstore as store import library.clients.alertsclient as ac import library.migrationlogger as logger import library.utils as utils import library.status.conditionstatus as cs import library.migrator.loc_failure_conditions as lfc_migrator import l...
import argparse import numpy as np import pandas as pd import cv2 from keras import backend as K from keras.callbacks import ModelCheckpoint from keras.models import Model from keras.layers import Input from keras.layers import Conv2D, MaxPooling2D, UpSampling2D, LeakyReLU, BatchNormalization, Activation # from keras....
from __future__ import absolute_import import csv import datetime import logging import sys from collections import OrderedDict from decimal import Decimal from pathlib import Path import click import yaml import yaml.resolver from click import echo import json from yaml import Node from datacube.index.index import ...
import utils import subprocess import os.path from pathlib import Path import argparse import matplotlib import matplotlib.pyplot as plt import matplotlib.font_manager import numpy as np from utils import cor from tqdm import tqdm _TRANCEGEN_DIR = os.environ['TRANCEGEN_DIR'] def construct_argparser(): parser = ar...
#Autores: <NAME> y <NAME> #Descripción: Micro sistema de archivos. import os import subprocess import time from datetime import datetime import math import getpass username = getpass.getuser() file_names = [] file_content_locator = [] file_sizes = [] file_system_name = 'FiUnamFS' file_system_version = '0.4' volum...
""" Copyright 2015, MASSACHUSETTS INSTITUTE OF TECHNOLOGY Subject to FAR 52.227-11 – Patent Rights – Ownership by the Contractor (May 2014). SPDX-License-Identifier: BSD-3-Clause Return codes ref: http://www.cardwerk.com/smartcards/smartcard_standard_ISO7816-4_6_basic_interindustry_commands.aspx ref: http:/...
# -*- coding: utf-8 -*- import logging import re try: import json except: import simplejson as json from hashlib import md5 from time import time from datetime import datetime,timedelta from urllib import urlencode from common import BaseHandler, authorized, safe_encode, cnnow, clear_cache_by_pathlist, quot...
# -*- coding: utf-8 -*- """ This module contains the definitions of our data base tables which store the index, sync history and cache of content hashes. Each table is defined by a subclass of :class:`maestral.utils.orm.Model` with properties representing database columns. Class instances then represent table rows. """...
import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl import math import enum import random import Map colors = ['white', 'black', 'red', 'blue', 'orange', 'green','brown','yellow'] bounds = [0,1,2,3,4,5,6,7,8] #entre 0 et 1 exclu: white,... cmap = mpl.colors.ListedColormap(colors) norm = mpl.c...
import csv import dataclasses import math import pathlib import threading import time from typing import Optional, Tuple, Dict, List, Callable, Union, Iterable, TypeVar, Sequence import numpy as np import stim from .decoding import sample_decode_count_correct from .probability_util import log_binomial, binary_search ...
from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import mean_absolute_error, accuracy_score from sklearn.model_selection import KFold, StratifiedKFold, train_test_split import os import numpy as np import shutil import time import multiprocessing i...
from matplotlib import colors import numpy as np import matplotlib.pyplot as plt from pskf.tools.run import pythonmodule as pm from pskf.tools.plot import plotarrays as pa from pskf.scripts.errorplot import arrays as ea ############################################################################### # ...
""" Copyright 2021 <NAME>, RedCastle Resources 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 ag...
import discord import os import time import re import datetime from PIL import Image, ImageFont, ImageDraw from finnhub import client as Finnhub # api docs: https://finnhub.io/docs/api import requests import matplotlib import mplfinance import stocks import pandas as pd FINNHUB_CHART_API_TOKEN_2 = os.environ.get('FINN...
import argparse import time import timeout_decorator import pickle import chainer import chainer.functions as F import networkx import networkx as nx import numpy as np import matplotlib.pyplot as plt import pandas as pd import sklearn.metrics import seaborn as sns import util from gnn import GNN np.random.seed(1124...
import os import numpy as np import qtawesome as qta from qtpy.QtCore import Qt from qtpy.QtWidgets import QDialog, QMessageBox, QDialogButtonBox, QFileDialog from common import parse_file, np_to_str from ui.preferences import Ui_preferencesDialog DISPLAY_SMOOTH_GRAPHS = 'display/smooth_graphs' STYLE_MATPLOTLIB_TH...
from py_vollib_vectorized.util.jit_helper import maybe_jit import numpy as np import py_lets_be_rational from py_lets_be_rational.lets_be_rational import DENORMALIZATION_CUTOFF, DBL_MIN, DBL_MAX, \ normalised_black_call, normalised_vega, DBL_EPSILON, SQRT_DBL_MAX implied_volatility_maximum_iterations = 2 def ...
# -*- coding: utf-8 -*- """ test_lgr_set.py - Unit testing of LGR tools/merge_set module. """ from __future__ import unicode_literals import unittest import re import os from datetime import date from lgr.action import Action from lgr.rule import Rule from lgr.matcher import RuleMatcher, ClassMatcher, StartMatcher fr...
import json from os.path import exists, join from time import time import numpy as np from scipy.stats import zscore from brainiak.funcalign.srm import SRM from gifti_io import read_gifti from split_stories import check_keys, load_split_data from target_isfc import (parcel_means, parcel_srm, ve...
import datetime import json from mongoengine import Document from mongoengine import StringField from mongoengine import DateTimeField from mongoengine import IntField from mongoengine import ReferenceField from mongoengine import ListField from mongoengine import FloatField from mongoengine import DictField from mong...
""" General functions. """ import re import os import sys import stat import ctypes import shutil import hashlib import logging import subprocess from smtplib import SMTP from datetime import datetime from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText try: PermissionError except Nam...
from numba import njit import numpy as np @njit(nogil = True) def returns(arrIn): arrOut = np.array([np.nan for _ in range(len(arrIn))]) for i in range(1, len(arrIn)): arrOut[i] = (arrIn[i] - arrIn[i-1])/arrIn[i-1] return arrOut @njit(nogil = True) def logReturns(arrIn): arrOut = np.array([np....
''' Created on Oct 2018 @author: maribelacosta @author: <NAME> ''' def parse_response(template, answers, var, queue, server, count, context, binding={}): card = 0 if template == 4: card = parseVarS(answers, var, queue, server, count, context, binding) elif template == 2: card = parseVar...
# Copyright 2022 MosaicML Composer authors # SPDX-License-Identifier: Apache-2.0 """Create compliant results file for MLPerf Training benchmark.""" import json import logging import os import platform import subprocess import sys import warnings from typing import Any, Dict, Iterable, Optional import torch from torc...
import networkx as nx import numpy as np import h5py from collections import Counter import time as tm from drg import graph_search import os, sys, argparse import cantera as ct import soln2ck import soln2cti import math from create_trimmed_model import trim from numpy import genfromtxt from readin_initial_conditions i...
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import math import pytest import torch from torch.nn.functional import pad import pyro.distributions as dist from pyro.distributions.util import broadcast_shape from pyro.ops.gamma_gaussian import ( GammaGaussian, gamma_a...
# Copyright (c) 2020 NVIDIA CORPORATION. # Copyright (c) 2018-2020 <NAME> (<EMAIL>). # # 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 ri...
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
import os import sys import random import math import numpy as np import skimage.io import matplotlib import matplotlib.pyplot as plt import glob import time import cv2 import requests import json from datetime import datetime #imports for dlib from imutils.video import FPS import numpy as np import argparse import i...
# Licensed under an MIT style license -- see LICENSE.md import numpy as np from pesummary.gw.file.standard_names import standard_names from pesummary.core.file.formats.base_read import ( Read, SingleAnalysisRead, MultiAnalysisRead ) from pesummary.utils.utils import logger from pesummary.utils.parameters import Pa...
# 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...
import os import time from collections import defaultdict from itertools import combinations, permutations from lib.report.report_tools import global_track_dt from lib.filters.structural_QC import identify_intronic_transcripts from lib.parsing.gtf_object_tools import create_gtf_object, write_gtf from lib.tools.other_t...
# pylint: disable=missing-function-docstring """GitHub View/URL classifier""" from dataclasses import dataclass, field from datetime import date import enum import functools import re from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple from selenium.webdriver.chrome.webdriver import WebDriver from...
# -*- coding: utf-8 -*- from flask import Flask, render_template, redirect, request, abort, url_for, Response from flask_login import LoginManager, login_user, login_required, logout_user, current_user from sqlalchemy import desc, asc from flask_restful import Api from forms.game import FindForm, FilterForm from forms...
import imp import collections import os import sys import threading import traceback import weakref import logging import h5py import numpy as np import activepapers.utility from activepapers.utility import ascii, utf8, isstring, execcode, \ codepath, datapath, path_in_section, owner,...
import numpy as np import os import math from cartopy import crs, feature from matplotlib import pyplot as plt, animation, rc import xarray as xr from datetime import datetime, timedelta def path(local = 1): '''Change with your paths''' if local == 1: path = {'NEMO': '/Users/jvalenti/MOAD/data/', ...
"""Monte Carlo Tree Search for stochastic environments.""" import asyncio import random import gin import gym_open_ai from alpaca.alpacka import data from alpaca.alpacka.agents import base from alpaca.alpacka.agents import core @gin.configurable def rate_new_leaves_with_rollouts( leaf, observation, mod...
from a10sdk.common.A10BaseClass import A10BaseClass class DistributeLists(A10BaseClass): """This class does not support CRUD Operations please use parent. :param distribute_list_direction: {"enum": ["in", "out"], "type": "string", "description": "'in': in; 'out': out; ", "format": "enum"} :param dis...
import filecmp import os import pytest from bitarray import bitarray import pyfastaq from cluster_vcf_records import utils, variant_tracking, vcf_file_read, vcf_record this_dir = os.path.dirname(os.path.abspath(__file__)) data_dir = os.path.join(this_dir, "data", "variant_tracking") def test_vcf_records_make_same_...
import copy from random import shuffle import numpy as np import json import os import time import matplotlib.pyplot as plt from sklearn.linear_model import SGDClassifier, PassiveAggressiveClassifier, Perceptron, SGDRegressor, PassiveAggressiveRegressor from sklearn.naive_bayes import MultinomialNB, GaussianNB, Bernoul...
# This file is part of beets. # Copyright 2011, <NAME>. # # 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, ...
import pomdp_py import random import numpy as np import sys import time import copy #from ....pomdp_py import * visited = np.zeros((5, 5), dtype=bool) class State(pomdp_py.State): def __init__(self, position_r,position_o,foundit,orientation_r,orientation_o,oriented): self.position_r = position_r se...
#!/usr/bin/env python3 # vim: ts=4:sw=4:et # SPDX-License-Identifier: GPL-2.0 OR GPL-3.0 # # lsusb-013.py # # Displays your USB devices in reasonable form. # # Copyright (c) 2009 <NAME> <<EMAIL>> # Copyright (c) 2013,2018 <NAME> <<EMAIL>> # # Usage: See usage() import getopt import os import re import sys HUB_ICLASS ...
import torch import torch.nn.functional as F import torch.nn as nn from activate_fun.Swish import Swish, Mish class SeprationConv(nn.Module): def __init__(self, in_ch, out_ch, k=33, last=False, mask=True, dilation=1, stride=1, drop_rate=0.1): super(SeprationConv, self).__init__() ...
""" Update incidents with results from a query """ import logging import json import copy import os import sys import tempfile import csv import threading from datetime import datetime import resilient_circuits.template_functions as template_functions from resilient import SimpleHTTPException from .datatable import Da...
#!/usr/bin/env python from __future__ import print_function from datetime import datetime import configparser import logging import logging.handlers import os import subprocess import sys from dlrnapi_client.rest import ApiException import dlrnapi_client # start_named_hashes - named hashes at promotion start # can c...
import datetime import io import pathlib import pickle import re import uuid import gym import numpy as np import tensorflow as tf import tensorflow.compat.v1 as tf1 import tensorflow_probability as tfp from tensorflow.keras.mixed_precision import experimental as prec from tensorflow_probability import distributions a...
#!/usr/bin/env python3 import argparse import decimal import multiprocessing import os import sys import about import check import shared import tax def parse_arguments(): parser = argparse.ArgumentParser( prog='CAT bins', description='Run Bin Annotation Tool (BAT) on a set of bins.', ...
import os import argparse import modeling import tokenization import numpy as np import tensorflow as tf from run_classifier import ColaProcessor, SstProcessor, MrpcProcessor, QqpProcessor, QnliProcessor, MnliProcessor, RteProcessor, SnliProcessor, WnliProcessor from run_classifier import file_based_input_fn_builder, f...
#!/usr/bin/python3 # There are major unfinished elements of this implementation, some # left unfinished by Spiewak, some by me. # Me: Lazy evaluation. The problem is that this is just very hard to # do in Python and will require major rearchitecting that I'm not sure # is worthwhile for a learning project. # Spiewa...
import tensorflow as tf import os import sys import tensorlayer as tl import numpy as np from tensorlayer.layers import * import random from glob import glob def Deconv(inputs, f_dim_in, dim, net, batch_size, f_dim_out = None, stride = 2 ): if f_dim_out is None: f_dim_out = f_dim_in/2 return tl.layers.DeConv...
# -*- coding: utf-8 -*- """GEModelClass Solves an Aiygari model """ ############## # 1. imports # ############## import time import numpy as np from numba import njit, prange # consav from consav import ModelClass, jit # baseline model class and jit from consav import linear_interp # linear interpolation from cons...
# -*- coding: utf-8 -*- """ Created on Thu May 2 07:50:48 2019 @author: chalbeisen This program is used to match generated embeddings with audio, to mix the matched audio files and put data into tfRecords """ import os import numpy as np import contextlib import wave from LookingToListen_Audio_clean i...
import os import numpy as np from tensorflow import set_random_seed from sklearn.preprocessing import MinMaxScaler from keras import Input from keras.layers import (Dense, LeakyReLU, Reshape, Conv2D, Conv2DTranspose, AveragePooling2D, BatchNormalization, ...
import asyncio import functools import logging import math import os import pathlib import re import discord import discord.ext.commands as commands import youtube_dl import checks def setup(bot): bot.add_cog(Music(bot)) def duration_to_str(duration): # Extract minutes, hours and days minutes, seconds = divmod(d...
# -- # Copyright (c) 2008-2021 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. # -- """The XHTML renderer This renderer only depends on the ``nagare.renderers.xml`` module. Having...
# -*- coding: utf-8 -*- """Utility methods for evaluating Wealth Prediction Models""" from matplotlib import pyplot as plt import pandas as pd import numpy as np import random import seaborn as sns from scipy import stats from math import sqrt from sklearn.decomposition import PCA from sklearn.pipeline import Pipeli...
#| Author: <NAME> __doc__ = 'This module contains a series of classes which contribute to the \ overall game play' from math import sin, cos, pi, acos, asin, radians, ceil from random import uniform, choice from library import System,Global,Sprite,Vector, Text, Time, Draw class Logo(Sprite): """ Main lo...
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT import functools import torch import torch.nn as nn import torch.nn.functional as F from . import BigGAN_layers as layers from networks.utils import init_weights, _len2mask, make_one_hot # Architectures for G # Atten...
import tkinter from tkinter import Label, Listbox, Message, IntVar, Checkbutton, Scrollbar, Toplevel, messagebox, filedialog from tkinter.constants import BOTH, DISABLED, GROOVE, LEFT, RIGHT, W, SUNKEN, END, Y import functions # Teste # Instancia a Janela root = tkinter.Tk() # Titulo da janela root.title("Con Control...
import os import h5py import numpy as np import torch from torch.utils.data import Dataset from graphics import Voxelgrid import trimesh import skimage from utils.metrics import evaluation, semantic_evaluation from utils.mapping import get_mapping from scipy.ndimage import median_filter class Database(Dataset): ...
import os import tensorflow as tf import math import numpy as np import pandas as pd import itertools import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib.animation as animation from matplotlib.lines import Line2D import matplotlib.patheffects as path_effects import matplotlib as mpl i...
# -*- coding: utf-8 -*- """ spcconvert - batch conversion and webpage building for SPC images """ import cvtools import cv2 import os import sys import glob import time import datetime import json import shutil import math import tarfile from multiprocessing import Pool, Process, Queue from threading import Thread im...
from typing import Tuple from numpy.core.records import record import jittor as jt from datasets.query_datasets import QueryDataset from datasets.shape_datasets import ShapeDataset import tqdm import jittor.transform as transform import os # from tensorboardX import SummaryWriter import warnings from utils import read...
import os from typing import Optional, TextIO import bpy from arm.exporter import ArmoryExporter import arm.log import arm.node_utils import arm.utils if arm.is_reload(__name__): arm.exporter = arm.reload_module(arm.exporter) from arm.exporter import ArmoryExporter arm.log = arm.reload_module(arm.log) ...
#! /usr/local/bin/python3 """ Populate tables of program requirements and mappings of courses to those requirements. A "program" is a requirement block with a block_type of MAJOR, MINOR, or CONC, but these blocks may reference OTHER blocks. DEGREE, LIBL, REQUISITE, and SCHOOL blocks are not handled here. [T...
from buildingArrays import BuildingFactory from random import randint, randrange import utilityFunctions import time #inputs are taken from the user. Here I've just showing labels, as well as letting the user define # what the main creation material for the structures is inputs = ( ("COMP4303 Final Project", "label")...
import numpy as np import quaternion import operator def isqrt(n): """ Return the integer part of the square root of the input. (math.isqrt from Python 3.8) """ n = operator.index(n) if n < 0: raise ValueError("isqrt() argument must be nonnegative") if n == 0: return 0 c...
#/usr/bin/python # Programmer: <NAME>, <<EMAIL>> #-- coding: utf-8 -- #Last-modified: 04 Apr 2017 17:06:45 import sys, os, argparse, string from collections import defaultdict def parse_cfgfile(cfg_file): ''' parse the configure file ''' NoDox_Counts_file='' DoxA_Counts_file='' DoxB_Coun...
#!/usr/bin/python3 # # Copyright (c) 2020 Saarland University. # # This file is part of AM Parser # (see https://github.com/coli-saar/am-parser/). # # 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...
# Copyright 2022 DeepL SE (https://www.deepl.com) # Use of this source code is governed by an MIT # license that can be found in the LICENSE file. import argparse import deepl import logging import os import pathlib import sys from typing import List # Program name for integration with click.testing name = "python -m...
# /usr/bin/env python # -*- coding: utf-8 -*- """ Module provide simple interface to save experiment outputs directory with spreadsheet and images. """ from loguru import logger import pandas as pd import os.path as op import os import warnings from pathlib import Path from typing import Union, List, Dict, Any import n...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch import torchvision import cv2 import glob import numpy as np from torch.utils.data import Dataset, DataLoader from maskrcnn_benchmark.structures.bounding_box import BoxList from maskrcnn_benchmark.structures.segmentation_mask import ...
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:maven_rules.bzl", "maven_jar") # Special thing to get around maven jar issues load("//closure:buildozer_http_archive.bzl", "buildozer_http_archive") # Special dart_sdk_repository load("//dart:sdk.bzl", "dart...
# -*- coding: <utf-8> -*- """ Module that implements a client and server interface useful for controlling a vim server. This module could be used for unit testing or integration testing for a Vim plugin written in Python. Or you can use it to interactively control a Vim editor by Python code, for example, in an Ipytho...
from importlib import import_module from operator import attrgetter from django import forms from django.apps import apps from django.conf import settings from django.core.exceptions import ValidationError, ObjectDoesNotExist from django.db import models from django.test.client import RequestFactory from django.utils ...
''' Character Class Character class for py-fighter game. Takes input of character data, screen, x position, and y position. Has functions to make move. - character_data takes the form of a Python dictionary with all key components and data for character. This is usually stored in a JSON. We have decided to impleme...
import os import sys import math import socket import argparse from time import gmtime, strftime from collections import deque import tensorflow as tf import numpy as np import utils from utils.analyse_utils import loss_analyzer_gan from utils import replaybuffer from utils import metrics from models import controlle...
import os # import cv2 import sys import time import datetime import argparse import numpy as np from random import shuffle import matplotlib.pyplot as plt #import matplotlib.image as mpimg import xml.etree.ElementTree as ET from scipy.misc import imread, imsave from collections import OrderedDict import torch as th f...
from a10sdk.common.A10BaseClass import A10BaseClass class Stats(A10BaseClass): """This class does not support CRUD Operations please use parent. :param elect_master_discard_challenger: {"description": "vMaster discard challenger counter of aVCS election", "format": "counter", "type": "number", "oid": "3...
"""Plotting methods.""" from collections import Counter from itertools import cycle from itertools import islice import os import pickle import sys import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator from matplotlib.ticker import FormatStrFormatter f...
#!/usr/bin/python # -*- coding: utf-8 -*- # <NAME> — July 2016 """ module for the Model Predictive Control aspect """ from __future__ import division, print_function, unicode_literals import numpy as np import warnings import cvxopt from dmpc.mat_help import block_toeplitz cvxopt.solvers.options['show_progress'] = ...
################################################################## #### OMOP Code ################################## #### <NAME>, MD, PhD; Woodsock, IL, USA ################# #### copyright 2020 ############################################# ################################################################## from neo4...
from enum import Enum import math try: import drawBot as db except ImportError: db = None YOYO = "ma" MINYISMAXY = False class Edge(Enum): MaxY = 1 MaxX = 2 MinY = 3 MinX = 4 CenterY = 5 CenterX = 6 def txt_to_edge(txt): if isinstance(txt, str): txt = txt.lower() ...
######################################## # written for Python 3 # # by <NAME> (<EMAIL>) # ######################################## ''' Dependencies: - electrons (in-house module) - os - numpy - matplotlib - pymatgen - json ''' # IMPORT PACKAGES import config import elect...
from imutils.video import VideoStream from imutils.video import FPS import numpy as np import argparse import imutils import time import cv2 import os from openvino.inference_engine import IECore #from BeamSearch import BeamEntry, BeamState, applyLM, addBeam, ctcBeamSearch import enchant import pygame from gtts import ...
from __future__ import absolute_import, unicode_literals import argparse import logging import os import re import sys import textwrap from collections import namedtuple from io import open from textwrap import dedent from warnings import warn from ksconf import KsconfPluginWarning from ksconf.conf.parser import (Con...
import copy import numpy import os import struct import sys class Piece: def __init__(self, name, parent, xyz0, rpw0): """ @param name, parent: strings """ self.xyz0 = copy.copy(list(xyz0)) self.rpw0 = copy.copy(list(rpw0)) self.xyz_offset = [0., 0., 0.] s...
from __future__ import print_function import os import numpy as np from tractor.ellipses import EllipseESoft from tractor.utils import _GaussianPriors def log_info(logger, args): msg = ' '.join(map(str, args)) logger.info(msg) def log_debug(logger, args): import logging if logger.isEnabledFor(logging...
#!/usr/bin/env python import collections import glob import multiprocessing from os import path import shelve import sys # Directory containing this program. PROGDIR = path.dirname(path.realpath(__file__)) # For parse_logs. sys.path.insert(0, path.join(PROGDIR, "..")) # For python_config. sys.path.insert(0, path.join(...
## # File: BinaryCifWrite.py # Date: 15-May-2021 jdw # # Write methods and encoders for binary CIF serialization. # # Updates: # ## import logging import struct import msgpack from mmcif.api.DataCategoryTyped import DataCategoryTyped from mmcif.io.BinaryCifReader import BinaryCifDecoders logger = logging.getLogge...