text
stringlengths
8.04k
46.5k
# # Copyright (c) 2014, <NAME> <<EMAIL>; <EMAIL>>, # All rights reserved. # # This program is a free software; you can redistribute it and/or modify # it under the terms of the BSD license. See LICENSE.txt for details. # # It's a UI for Coudict(https://github.com/lang010/cloudict) based on Python 3. # Other con...
# -*- coding: utf-8 -*- import os from argparse import Namespace from typing import Dict, List, Optional, Tuple, Union import click import torch import yaml from model.bottleneck_layer import BottleneckSummary from model.scalar_mix import ScalarMixWithDropout from model.utils import move_to_cuda, move_to_cpu, pad_sequ...
# tox_core.py import os import sys import tty import termios from typing import Callable, List, Dict, Tuple from collections import OrderedDict import logging logging.basicConfig(filename=f"{os.environ.get('HOME','/tmp')}/.tox_core.log", filemode='a', format='%(a...
# coding=utf-8 import os import sys import xml.etree.ElementTree as ET import shutil import xlwt import cv2 import pickle from pylab import * from PyQt5.QtWidgets import QWidget, QApplication, QMainWindow, \ QLineEdit, QLabel, QPushButton, QProgressBar, QRadioButton, QFileDialog from PyQt5.QtCore import Qt, pyqtS...
# ******************************************************************************* # Copyright (C) 2020 INAF # # This software is distributed under the terms of the BSD-3-Clause license # # Authors: # <NAME> <<EMAIL>> # ******************************************************************************* import gammalib impo...
from turtle import st from random import randint from math import ceil import numpy as np import matplotlib.pyplot as plt import matplotlib.colors from numpy.core.records import array LEVEL_SIZE = 28 GENERATED_LEVELS = 2 START_LEVEL = 1 DRAWIT= False PIG_RANGE = [1,6] NUMBER_OF_PIGS = 0 # blocks number and size # Di...
""" Defines functions for the alpha-beta fireball characterization by Gritsevich 2012. Adapted from: https://github.com/desertfireballnetwork/alpha_beta_modules """ import numpy as np import scipy.special import scipy.optimize from wmpl.Utils.Math import meanAngle from wmpl.Utils.Physics import dynamicPressure #...
import argparse import torch import torch.distributed as dist import torch.nn as nn import torch.nn.functional as F from torchvision import datasets, transforms from torch.nn.parallel import DistributedDataParallel as DDP import time import os import wandb from models import * ## timm from timm.data import create_data...
#!/usr/bin/python # -*- coding: utf-8 -*- import os.path, cPickle, re import Web2Korpus, News2Korpus, ConvertText import locale import text_graph locale.setlocale(locale.LC_CTYPE, '') # LC_CTYPE beeinflusst String-Operationen locale.setlocale(locale.LC_COLLATE, '') # LC_COLLATE beeinflusst das Sortier-Verhalten ...
"""Module to provide functionality to import structures.""" import os import tempfile import datetime from collections import OrderedDict from traitlets import Bool import ipywidgets as ipw from aiida.orm import CalcFunctionNode, CalcJobNode, Node, QueryBuilder, WorkChainNode, StructureData from .utils import get_ase...
# Definition of PoseNet # author: ynie # date: March, 2020 import torch import torch.nn as nn from models.registers import MODULES from configs.data_config import number_pnts_on_template, pix3d_n_classes from models.modules import resnet from models.modules.resnet import model_urls import torch.utils.model_zoo as mode...
import json from django.db.models.expressions import F, Q from django.views.generic.list import ListView from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import UserPassesTestMixin, LoginRequiredMixin from django.contrib.auth...
import numpy as np import cv2 from skimage.exposure import rescale_intensity as rescale_int import matplotlib.cm as cm import SimpleITK as sitk """Different image utils.""" __author__ = '<NAME>' def get_pad_crop_bound(size): """Gets the padding or cropping bounds using the max of the input (padding) or output ...
import sys sys.path.append('../lib') from discoverlib import geom, graph import json import numpy import math from PIL import Image import random import rtree import scipy.ndimage import sys import time import matplotlib.pyplot as plt DEBUG = False class Path(object): def __init__(self, gc, tile_data, start_loc...
#!/usr/bin/python import numpy as np from sklearn import metrics from . import tree from .tree import _tree from functools import partial from functools import reduce from scipy import stats import matplotlib.pyplot as plt from sklearn.base import (clone, ClassifierMixin, ...
import numpy as np import os import math, cmath from scipy.integrate import cumtrapz from scipy.optimize import brent from gpt.tools import is_floatable from gpt.tools import cvector from gpt.tools import rotation_matrix from gpt.tools import deg, rad from gpt.tools import get_arc from gpt.tools import write_ecs from g...
#!/usr/bin/env python """ MeteWIBELE: quantify_prioritization module 1) Define quantitative criteria to calculate numerical ranks and prioritize the importance of protein families 2) Prioritize the importance of protein families using unsupervised or supervised approaches Copyright (c) 2019 Harvard School of Public H...
""" autor: <NAME> email: <EMAIL> / <EMAIL> data: 18/11/2021 """ # AUXILIAR def aux_tuplo_lista(t): lst = [] for i in t: lst.append(i) return lst def aux_lista_tuplo(lst): tp = () for i in lst: tp += (i,) return tp # TAD posicao --> R(x, y) = [x, y] def ...
import datetime from accounts.models import Managers, Tenants from complaints.models import Complaints, UnitReport from config.settings import DEFAULT_FROM_EMAIL from django.contrib import messages from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required, user_passes_tes...
from __future__ import division import numpy as _np import pandas as _pd from .utils import thru_op as _thru_op from .abstracts import Trace as _Trace, Hashmap as _Hashmap, _maybe_hashmap, _copy_hashmaps from warnings import warn as _Warn import copy as _copy __all__ = ['summarize', 'mcse', 'psrf', 'geweke', 'hpd_inte...
""" Kitchen environment for long horizon manipulation """ #!/usr/bin/python # # 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/licens...
import time import datetime # import geojson # import eventlet import pandas as pd import geopandas as gpd from shapely.geometry import LineString from typing import Optional from pathlib import Path from src.python_plots.plot_classes import PyPlot from multiprocessing import Manager from abc import ABCMeta, abstractm...
#!/usr/bin/env python # coding=utf-8 # aeneas is a Python/C library and a set of tools # to automagically synchronize audio and text (aka forced alignment) # # Copyright (C) 2012-2013, <NAME> (www.albertopettarin.it) # Copyright (C) 2013-2015, ReadBeyond Srl (www.readbeyond.it) # Copyright (C) 2015-2017, <NAME> (www...
#! /usr/bin/env python3 import re import math import json import inspect import pkg_resources import numpy as np import pandas as pd from time import time from joblib import Parallel, delayed from typing import Any, Dict, List, Optional, Union from pathlib import Path from pkg_resources import resource_filename from p...
"""Implementation of the 'trim' command. """ from collections import Sequence, defaultdict import logging import os import sys import textwrap from atropos.commands.base import ( BaseCommandRunner, Summary, Pipeline, SingleEndPipelineMixin, PairedEndPipelineMixin) from atropos.commands.stats import ( Single...
import os import random import argparse import time import numpy as np import txaio import threading from contextlib import contextmanager from socs.Lakeshore.Lakeshore370 import LS370 ON_RTD = os.environ.get('READTHEDOCS') == 'True' if not ON_RTD: from ocs import ocs_agent, site_config from ocs.ocs_twisted i...
#!/usr/bin/env python3 #-*- coding: iso-8859-1 -*- ############################################################################### # # This module contains an implementation of file interface (periodic polling # of a shared directory) and resource (reading/writing files in a shared directory). # # The interface process...
#!/usr/bin/env python3 # coding=utf-8 import os import sys import getopt as go import subprocess as sp import json import atexit import shlex # Cross platform terminal colors # https://pypi.python.org/pypi/colorama # https://github.com/tartley/colorama import colorama as cr # Cross platform trashing of files # https:/...
import logging_setup import logging import numpy as np import openfermion as of import os import qiskit as qk import qiskit.opflow as qk_opflow import qiskit.quantum_info as qk_qi import uccsd_evolution import scipy.linalg as spla import warnings try: from hubbard_bqskit import BQSKit_Hubbard_Optimizer except Impo...
# -*- coding: utf-8 -*- """ Created on Thu Oct 8 16:34:52 2015 Description: see https://github.com/Sachagobeyn/SDMIT/ or https://github.com/Sachagobeyn/SDMIT/releases/ @author: <NAME> (<EMAIL> or <EMAIL>) """ import os import re import sys from copy import deepcopy import numpy as np import pandas as pd # pd.set_op...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os os.environ["CUDA_VISIBLE_DEVICES"] = "1" import argparse import numpy as np import tensorflow as tf import cv2 from scipy.misc import imread import time import os, random from...
# -*- coding: utf-8 -*- """ This module contains the class `HintStripper` which is used to strip type hints from a Python file. It also contains the function `process_command_line` which is used to run the program as a command-line script. When run as a script the program takes a filename argument and any other argu...
# Problema Broscoceilor import time start_time = time.time() """ Input: nume_folder_intrare nume_folder_iesire numarul de solutii dorit timpul de timeout """ ############################################ 9) Afisarea in fisierele de output ################################################ output = o...
from src.dmi import DMI, DMIState from src.rsi import RSI, RSIState from typing import List from requests import Session from io import BytesIO from logging import Logger, getLogger from PIL import Image, ImageChops import os from time import sleep logger: Logger = getLogger(__name__) # Ghetto: used for guns REPO_D...
# -*- coding: utf-8 -*- """ Created on Thu Jul 29 13:49:20 2021 @author: alber """ import re import os import pandas as pd import numpy as np import spacy import pickle import lightgbm as lgb import imblearn from sklearn import preprocessing from sklearn.semi_supervised import ( LabelPropagation, LabelSpread...
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. 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...
import torch.utils.data as data from PIL import Image import os import os.path import torch import numpy as np import torchvision.transforms as transforms from libs.transformations import euler_matrix import argparse import time import random import numpy.ma as ma import copy import math import scipy.misc import scipy....
from __future__ import division from sympy.stats import (P, E, where, density, variance, covariance, skewness, given, pspace, cdf, ContinuousRV, sample, Arcsin, Benini, Beta, BetaPrime, Cauchy, Chi, ChiSquared, ChiNoncen...
#################################################################################################### ## ## Project: Embedded Learning Library (ELL) ## File: darknet_to_ell.py (importers) ## Authors: <NAME>, <NAME> ## ## Requires: Python 3.x ## ##################################################################...
# -*- coding: utf-8 -*- """ Configuration management """ import sys from dynamic_dynamodb.config import config_file_parser from dynamic_dynamodb.config import command_line_parser try: from collections import OrderedDict as ordereddict except ImportError: from ordereddict import OrderedDict as ordereddict DEFA...
#!/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. r""" Monte-Carlo Acquisition Functions for Multi-objective Bayesian optimization. References .. [Daulton2020qehvi] ...
""" This file contains the code that judges a submission. Note: This implementation can only handle one submission at a time. Currently, the queuing system from RQ is used to achieve a first come, first served structure. """ import subprocess import shutil import rq import yaml import glob import requests from misc.l...
import ast import enum import textwrap import inspect import itertools from functools import wraps import functools import operator from collections import namedtuple import os import six from . import cache_definition from .common import deprecated, setattrs, Stack, OrderedIdentitySet from .interface import * from .w...
# # Copyright (c) 2017 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 # # Unless required by applicable law or agreed to...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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 ...
import torch import torchvision.transforms as transforms import torch.utils.data as data from datasets import SubDataset, AbstractDomainInterface, ExpandRGBChannels import os import os.path as osp import csv import subprocess from PIL import Image from skimage import io import numpy as np N_CLASS = 5 N_CLASS_SV = 15 C...
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import unicode_literals import re import textwrap import bindings as bi class JavaTypeTranslator(bi.TypeTranslator): def __init__(self): bi.TypeTranslator.__init__(self) self.types["string"] = "String" type_adapter = JavaTypeTranslat...
''' PointGroup train.py Written by <NAME> ''' import random import math import torch import torch.optim as optim import time, sys, os, random from tensorboardX import SummaryWriter import numpy as np import torch.nn as nn from util.config import cfg from util.log import logger import util.utils as utils from spconv.p...
import json from collections import OrderedDict from datetime import date, datetime, timedelta from flask import abort, Blueprint, render_template, request from config.constants import (ALL_DATA_STREAMS, complete_data_stream_dict, processed_data_stream_dict, REDUCED_API_TIME_FORMAT) from database.data_access_mode...
from big_ol_pile_of_manim_imports import * class SideGigToFullTime(Scene): def construct(self): morty = Mortimer() morty.next_to(ORIGIN, DOWN) self.add(morty) self.side_project(morty) self.income(morty) self.full_time(morty) def side_project(self, morty): ...
""" A Python Database API Specification v2.0 implementation that provides configuration loading, variable substitution, logging, query banding, etc and options to use either ODBC or REST""" # The MIT License (MIT) # # Copyright (c) 2015 by Teradata # # Permission is hereby granted, free of charge, to any person obta...
# Copyright 2000 <NAME>. 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. """Extract information from alignme...
# Copyright 2014-2016 Insight Software Consortium. # Copyright 2004-2008 <NAME>. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt """ Define a few algorithms that deal with different properties of std containers. """ import string from . import cpptyp...
import argparse import gc import logging import os import sys import time from collections import defaultdict import torch import torch.nn as nn import torch.optim as optim from sgan.data.loader import data_loader from sgan.losses import gan_g_loss, gan_d_loss, l2_loss from sgan.losses import displacement_error, fin...
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------- # Name: text.py # Purpose: music21 classes for text processing # # Authors: <NAME> # Authors: <NAME> # # Copyright: Copyright © 2009-2012, 2015 <NAME> and the music21 Project # License: ...
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2019, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
""" Run assays and get information on molecules. """ import os import arcade import pandas as pd from combine import MolChoose from descriptors import get_descriptors, lipinski from filters import run_filters from rdkit import Chem import global_vars from analysis import AnalysisView # Constants SCREEN_WIDTH = 1000 SC...
# Copyright © 2019 Province of British Columbia # # 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 agr...
""" This is the loadable seq2seq trainer library that is in charge of training details, loss compute, and statistics. See train.py for a use case of this library. Note: To make this a general library, we implement *only* mechanism things here(i.e. what to do), and leave the strategy ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :copyright: (c) 2013-2016 by <NAME> :license: CC0 1.0 Universal, see LICENSE for more details. """ import os import json import uuid import types import errno import shutil import logging import datetime import argparse import pytz import redis import jinja2 import ro...
import sys import time import pprint import logging import argparse import hashlib import subprocess from collections import defaultdict from confluent_kafka import Consumer, Producer, TopicPartition from confluent_kafka.admin import AdminClient class OffsetTranslator(): """Translates consumer group offsets as part ...
# -*- coding: utf-8 -*- from PyQt5.QtWidgets import QMessageBox from PyQt5 import QtCore, QtGui, QtWidgets from Calculate import cal class MyMessageBox(QMessageBox): """ 继承QMessageBox,是为了能够重载它的closeEvent,减少它的一些不必要的功能。 否则,点击右上角红色X后,reply将直接赋值为QMessageBox.Abort(值为262144), 将会直接退出主程序,而这与用户习惯严重不符...
import math import numpy as np import tensorflow as tf from tensorflow.python.util import nest from tensorflow.python.ops import math_ops from tensorflow.python.ops import array_ops from tensorflow.python.ops import init_ops from tensorflow.python.ops import nn_ops from tensorflow.python.ops import clip_ops from tens...
""" MIT License Copyright (c) 2020-present shay (shayypy) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,...
# Copyright 2017 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...
#!/usr/bin/python3 # -*- coding: utf8 -*- # Copyright (c) 2021 Baidu, Inc. 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...
#!/usr/bin/python3 from __future__ import print_function from lxml import etree from os import path from xml_docstring import XmlDocString import sys template_file_header = \ """#ifndef DOXYGEN_AUTODOC_{header_guard} #define DOXYGEN_AUTODOC_{header_guard} #include "{path}/doxygen.hh" """ template_file_footer = \ """...
""" Scoring Functions <NAME>, December 7, 2020 """ import golly as g import numpy as np import random as rand import csv import math import scoring_parameters as sparams # # cell_list_to_set(cell_list) -- return cell_set # def cell_list_to_set(cell_list): """ Golly represents a cell list as [x1, y1...
import asyncio import re from pathlib import PurePath from typing import Any, Awaitable, Callable, Dict, List, Optional, Set, TypeVar, Union, cast import aiohttp from aiohttp import hdrs from bs4 import BeautifulSoup, Tag from ...auth import Authenticator, TfaAuthenticator from ...config import Config from ...logging...
#!/usr/bin/env python3 import ruamel.yaml # YAML parser used in Ansible import sys import jinja2 import jinja2.sandbox import os import difflib # used for misspelled keyword suggestions import textwrap import argparse verbosity = 0 # set to False to return success when there is no parser error, # but jinjalint had ...
import collections as col import cooler import clodius.tiles.format as hgfo import clodius.tiles.utils as hgut import h5py import itertools as it import numpy as np import pandas as pd import logging logger = logging.getLogger(__name__) global mats mats = {} transform_descriptions = {} transform_descriptions["weight...
import random from itertools import product import numpy as np import math import pickle import os import shutil import matplotlib.pyplot as plt from matplotlib import style from mpl_toolkits.mplot3d import axes3d, Axes3D #<-- Note the capitalization! from PIL import Image, ImageDraw, ImageFont from sklearn.cluster...
# ***************************************************************************** # Copyright (c) 2019, Intel 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 sou...
""" Make an organized hdf5 file out of PIVLab txt outputs and other measurements Nomenclature: cinedir: directory where cine is stored. | e.g.- /Volumes/labshared4/takumi/old_data/sample_piv_cine/ | basedir: directory where parentdirs are housed. All PIVLab outputs are sorted by (Inter. Area, Dt, step) |...
""" Created on Wed Feb 27 15:12:14 2019 @author: cwhanse """ import numpy as np import pandas as pd from pandas.testing import assert_series_equal from datetime import datetime import pytz import pytest from solarforecastarbiter.validation import validator import pvlib from pvlib.location import Location @pytest.fi...
import datetime import math import os from abc import ABC import numpy as np import ray import torch from utils import DotDict from .abstract_game import AbstractGame IDLE = 1 RUNNING = 2 COMPLETED = 3 # NUM_OFFICER = 3 # NUM_TASK = 2 # NUM_EVENT = 2 def input_config(): ### Input config for Dispatch args ...
import time import sys import os import glob os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import pandas as pd import numpy as np import tensorflow as tf # comment this if running on GPU tf.config.set_visible_devices([], 'GPU') from sklearn.model_selection import train_test_split import preprocess_sequences import utils ...
from typing import Dict, List, Tuple from itertools import product import re import yaml from pathlib import Path import numpy as np import os import shutil from abc import ABCMeta, abstractmethod import nncase import tensorflow as tf import torch import onnx from onnx import version_converter, helper import onnxsim im...
import collections import heapq from typing import List, Optional, Any import binarytree from binarytree import Node def count_good_nodes_in_binary_tree(root: Node): def passdown(max_so_far, node): good_nodes = 0 if node: if node.value >= max_so_far: good_nodes += 1 ...
from functools import reduce import logging import numpy as np import vaex.promise from vaex.column import str_type from .utils import (_ensure_strings_from_expressions, _ensure_string_from_expression, _ensure_list, _is_limit, _isnumber, _issequence, _is_string, _parse_reduction, _pars...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. # import argparse import inspect import typing import unittest from io import StringIO f...
#!/usr/bin/env python3 import os import sys import re import csv import pickle from collections import OrderedDict import simplejson as json import pandas as pd import numpy as np import scipy as sc import fastparquet from tqdm.auto import tqdm from IPython.display import display from tax import RANKS ...
"""Tests for vumi.application.sandbox.""" import os import sys import json import pkg_resources from collections import defaultdict from twisted.internet.defer import inlineCallbacks, fail, succeed from twisted.internet.error import ProcessTerminated from twisted.trial.unittest import TestCase, SkipTest from vumi.me...
from __future__ import absolute_import, print_function from ..plotting import figure, curdoc from ..plot_object import PlotObject from ..models import ServerDataSource, GlyphRenderer, Range1d, Color from ..properties import (Instance, Any, Either, Int, Float, List, Bool, String) from six impo...
import re import os import time import numpy as np import gc import math from statistics import mean #Similarity layer class Logcluster: def __init__(self, logTemplate='', st=0.1, outcell=None): self.logTemplate = logTemplate self.updateCount = 0 self.st = st self.base = -1 self.initst = -1 self.outcell =...
import time import math import random import numpy as np import basis.robot_math as rm import networkx as nx import matplotlib.pyplot as plt from operator import itemgetter from scipy.optimize import minimize from scipy.optimize import Bounds import rtree_point as rtp # NOTE: write your own extend_state_callback and ...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Implement the classes to handle the agent positions and orders related to each instrument subscribed, as well as the functions required to include new orders in the market and manipulate them @author: ucaiado Created on 07/05/2018 ''' import os import yaml from itertoo...
#!/usr/bin/env python from __future__ import print_function import os import time import yaml import pprint import random import pickle import shutil import inspect import argparse from collections import OrderedDict, defaultdict import torch import numpy as np import torch.nn as nn import torch.optim as optim from tqd...
# -*- coding: utf-8 -*- """ Implements classical-quantum circuits. Objects are :class:`BitsAndQubits` generated by two basic types :code:`bit` and :code:`qubit`. Arrows are diagrams generated by :class:`QuantumGate`, :class:`ClassicalGate`, :class:`Discard`, :class:`Measure` and :class:`Encode`. """ import random ...
# Copyright 2020 The TensorFlow Probability 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 law o...
#!/usr/bin/env python3 # Copyright (c) Microsoft Corporation # All rights reserved. # # MIT License # # 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 limi...
# (ytz): eigenvalue problem solvers come from # ported from Numerical diagonalization of 3x3 matrcies (sic), v1.1 # https://www.mpi-hd.mpg.de/personalhomes/globes/3x3/index.html import jax import numpy as onp import jax.numpy as np DBL_EPSILON = 2.2204460492503131e-16 def dsyevc3(A): de = A[0][1] * A[1][2] ...
#!/usr/bin/env python """ usage: eap_proxy [-h] [--ping-gateway] [--ping-ip PING_IP] [--ignore-when-wan-up] [--ignore-start] [--ignore-logoff] [--restart-dhcp] [--set-mac] [--vlan-id VLAN_ID] [--daemon] [--pidfile PIDFILE] [--syslog] [--run-as USER[:GROUP]] ...
from batch import Buckets from batch import run_go import yaml from make_rawr_tiles import wait_for_jobs_to_finish from make_rawr_tiles import wc_line, head_lines from run_id import assert_run_id_format from contextlib import contextmanager from collections import namedtuple import boto3 import os import json import io...
''' Created on Apr 18, 2012 @author: danieles ''' import sys from src.physical import Array, Scalars, Constant #from math import * from copy import copy #from src.alexpr import * from src.dsls.ll import Quantity, Operator, G, S, llLoop, llBlock, Sacc,\ ParamMat, Assign from src.dsls.sigmall import NewSum, Sum, ...
import numpy as np import scipy as scp from scipy import optimize from .fairness import * import cvxpy as cp import matplotlib.pyplot as plt """ Trade-off analysis with fairness linear system and convex optimization scheme """ def get_fairness_mats(fm, verbose=False): """ :param fm: FairnessMeasu...
"""Generated message classes for clouderrorreporting version v1beta1. Groups and counts similar errors from cloud services and applications, reports new errors, and provides access to error groups and their associated errors. """ # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base....
import os from copy import deepcopy import numpy from summer.model import ( StratifiedModel, split_age_parameter, create_sloping_step_function, find_name_components, find_stem, ) from summer.model.utils.parameter_processing import ( get_parameter_dict_from_function, logistic_scaling_functio...
import re import pandas as pd import numpy as np import pathlib from collections import OrderedDict from pyutil import read_table, intersection BASE_PAIR = { 'A': 'T', 'T': 'A', 'G': 'C', 'C': 'G' } def check_flip(a1, a2, b1, b2): res = [] for _a1, _a2, _b1, _b2 in zip(a1, a2, b1, b2): ...
from __future__ import print_function import os import argparse import torch import torch.backends.cudnn as cudnn import numpy as np import time import model from data import DatasetLoader import cv2 import torchvision.models as models import numpy as np from scipy.optimize import leastsq import random import torch.nn....