text
stringlengths
8.04k
46.5k
from __future__ import absolute_import, unicode_literals import errno import os import signal import sys import tempfile import pytest from case import Mock, call, mock, patch, skip from celery import _find_option_with_arg, platforms from celery.exceptions import SecurityError from celery.five import WhateverIO from...
# ====================================================================== # # Cosmograil: cosmograil.tools.sextractor # # sextractor module. # # Author: <NAME> <<EMAIL>> # # $Id: sextractor.py,v 1.2 2005/07/06 21:40:43 hack Exp $ # # ====================================================================== # # "sextractor"...
""" Dataset or Dataloader for utterances or trials from a given file. Now, this interface support 3 formats: 1. only files of utterances, e.g., id00012/21Uxsk56VDQ/00001.wav id00012/21Uxsk56VDQ/00001.logfbank.npy 2. labeled files of utterances, e.g., id00012 id00012/21Uxsk56VDQ/00001....
import Chess from Board import Board from threading import * import copy results = [] highest = -999999 #Method to see if a piece is hanging (it can be captured but is not protected by one of its own pieces). def isHanging(b, x, y, opponentMoves, color): position = Chess.convertFilesRanks(x,y) piece ...
from .Sampling import evaluation_order import time import multiprocessing from pathlib import Path from .main_utils.dict_util import Tuning_dict from .main_utils.utils import Timer, plot_conditional_idx_improvment from .main_utils.model_surf_utils import show_gpr_gpc import numpy as np from sympy import Symbol, Or fro...
#!/usr/bin/env python import glob import numpy as np import cv2 from scipy import stats import os from moviepy.editor import VideoFileClip from PIL import ImageFont, ImageDraw, Image CAMERA_MATRIX = None DISTORTION_COEF = None PERSPECTIVE_MATRIX = None INV_PERSPECTIVE_MATRIX = None YM_PER_PIX = 30 / 720 # meters per ...
from operator import attrgetter from itertools import groupby from datetime import date as dt, timedelta as td from collections import OrderedDict as OD from bisect import bisect_left import db.cache import db.objects from common import AibError """ database date functions - sqlite3 (returns string, but can use a...
import cv2 import numpy as np import math from face_detector import get_face_detector, find_faces from face_landmarks import get_landmark_model, detect_marks import tkinter as tk import pyttsx3 import speech_recognition as sr import tensorflow as tf from tensorflow.keras import Model from tensorfl...
# -*- coding: utf-8 -*- # @Author: <NAME> # @Email: <EMAIL> # @Date: 2020-06-07 14:42:18 # @Last Modified by: <NAME> # @Last Modified time: 2021-06-22 14:37:08 import numpy as np from neuron import h, hclass from PySONIC.utils import logger from .pyhoc import Matrix from ..utils import seriesGeq from ..constants...
import numpy as np import time from scipy.special import gammaln, psi eps = 1e-100 class HDSP: """ hierarchical dirichlet scaling process (hdsp) <NAME>, <NAME>, 2014 """ def __init__(self, n_topic, n_voca, n_label, dir_prior=0.5): self.n_topic = n_topic self.n_voca = n_voca # v...
import re from itertools import groupby from operator import attrgetter import itertools import urllib import json from datetime import date, timedelta, datetime, MINYEAR from dateutil.relativedelta import relativedelta from dateutil import parser import requests import sqlalchemy as sa from collections import namedtup...
# 29 May, 2019 # Train a 2-layer MLP with task-based modulation (L1 -> L2, L2 -> L3, and their combinations) for object detection tasks # Works with Python 2.7 and Tensorflow 1.3.0 (CPU version) from __future__ import print_function from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_da...
import torch import torch.nn as nn import onnx import taso import onnxruntime as rt import numpy as np import time from datetime import datetime from collections import namedtuple import warnings import torch.nn.functional as F from torch.jit.annotations import Optional from torch import Tensor InceptionOutputs = ...
r"""This module contains useful plots for medical imaging""" import functools import warnings from collections.abc import Iterable import torch import numpy import matplotlib import matplotlib.pyplot as plt from IPython.core.display import display import PIL from torchvision import transforms import math import torchvi...
#!/usr/bin/env python """ Analysis configuration base module. For usage information, see ``jet_hadron.base.analysis_config``. .. codeauthor:: <NAME> <<EMAIL>>, Yale University """ import copy import dataclasses import enum import itertools import logging import string from typing import Any, Dict, Iterable, Iterato...
import re from typing import Union, Dict, Any import HABApp from HABApp.core import Items from HABApp.core.events import ValueChangeEvent, ValueUpdateEvent from HABApp.core.items.base_item import BaseItem from HABApp.openhab.events import ItemCommandEvent from HABApp.openhab.events import ItemStateEvent from HABApp.op...
# -*- coding: utf-8 -*- __author__ = "<NAME>" debug = False from queue import Queue from sortedcontainers import SortedDict import numpy as np import pandas as pd # class Appointment_Set: # # a set of appointments with the same show probability and group # def __init__(self, probability, group): # self...
import codecs import sys import re import time import math import urllib import dbf import time import math import pickle import fuzzyset from histcensusgis.s4utils.AmoryUtils import * from histcensusgis.text.standardize import isolate_st_name import numpy as np def standardize_hn(s): # recommended usage: # dfHNList...
import multiprocessing import time import copy import requests from sharepoint_utils import encode from urllib.parse import urljoin from elastic_enterprise_search import WorkplaceSearch from checkpointing import Checkpoint from sharepoint_client import SharePoint from configuration import Configuration import logger_ma...
import copy import json import torch from sklearn.metrics import classification_report from torch import nn from torch.optim import Adam, SGD from torch.optim.lr_scheduler import StepLR from torch.utils.data import DataLoader import matplotlib.pyplot as plt import numpy as np from preprocessing import Preprocessor fro...
#!/usr/bin/env python """moreno_method: this code creates analyzes the climate forest structure relationships """ __author__ = "<NAME>" __date__ = "05/14/2021" __credits__ = ["<NAME>"] __version__ = "01.0" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Draft" import sys import geopandas as gpd import ...
#<NAME> #BioCompute Object Creator Minimum Viable Product import os import json import jsons import sys import hashlib from json import JSONEncoder from pprint import pprint from datetime import datetime try: import cPickle as pickle except ModuleNotFoundError: import pickle class BCO(): def...
import numpy as np import scipy.stats as st import scipy.io as scio import json # This code takes p3 connectivity and through stochastic synapse # addition and removal attempt to evolve it into p7 connectivity # Get connectivity matrices # p3 p3cd = scio.loadmat('./data/connectivity_matrices/P3_Observed_PC_Connectivi...
# File: B (Python 2.4) from pandac.PandaModules import * from direct.directnotify import DirectNotifyGlobal from direct.interval.IntervalGlobal import * from direct.gui.DirectGui import * from pirates.minigame.TableGUI import TableGUI from pirates.minigame import PlayingCardGlobals from pirates.minigame import Playing...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import pandas as pd from scipy.spatial import distance from statistics import mean, stdev import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler import numpy as np from skimage.external import tifffile from registration_utils import translate,find...
# global import numpy as np # local import ivy_vision_tests.helpers as helpers from ivy_vision import rendering as ivy_ren from ivy_vision_tests.data import TestData class RenderingTestData(TestData): def __init__(self): super().__init__() # Pixel Quantization # # -------------------# ...
# -*- coding: utf-8 -*- # pylint: disable=F0401, E0611, C0103, R0902, R0913, R0914, E1101 # pylint: disable=wrong-import-order """ This module contains classes and functions to design networks with caffe. For the layer constructing functions, ``None`` is used to mark a parameter as unset (this is important in protobuf...
import copy from scipy.stats import binom, norm from scipy.optimize import minimize_scalar import numpy as np import statsmodels.api as sm from . import geno_functions def simulate_phenotypes_binary_outcome( exposure_1_causal, exposure_2_causal, exposure_1_n_causal, exposure_2_n_causal, exposu...
# -*- coding: utf-8 -*- # Copyright (C) 2020, HACERA, INC. All Rights Reserved. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM...
import torch from torch import nn, einsum, broadcast_tensors import torch.nn.functional as F from einops import rearrange, repeat from einops.layers.torch import Rearrange # types from typing import Optional, List, Union # pytorch geometric try: from torch_geometric.nn import MessagePassing from torch_geom...
#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np import cv2 import glob import matplotlib.pyplot as plt get_ipython().run_line_magic('matplotlib', 'inline') from pprint import pprint import pickle import os # ### [function] moving_average # In[2]: def moving_average(x, w): vectLen = len(x) ...
from TurboCor import Compressor, TurboCor from HeatExchanger import HeatExchanger, Heater, Condenser, Evaporator_fitted, Evaporator, AirWaterunit, GasCooler, \ Condenser_fitted from Fluids import Fluid import pandas as pd import openpyxl class HeatPump: def __init__(self, compressor: Compressor, condenser: Co...
import re import tkinter as tk from tkinter import ttk from tkinter import messagebox from astropy.time import Time from datetime import datetime from typing import Dict, Union, Callable, Tuple from functools import partial, reduce from src.pages.BasePage import BasePage from src.utils.cache import Cache from src.util...
# =============================================================================== # # Imports # # =============================================================================== import os import numpy as np import pandas as pd import joblib import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import Pdf...
# Copyright 2020 The Flax 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 or agreed to in wri...
""" Asymmetric random walkers on a directed graph and some useful functions. walker-- Basic biased random walker derived from nx.Digraph. patternWalker-- Random walker derived from walker, searching a binary pattern. count_pattern_duplicates-- Return number of duplicate patterns of a patternWalker. """ import num...
import os import math import numpy as np import pandas as pd import tensorflow as tf from keras.utils import to_categorical from sklearn.metrics import recall_score as recall from sklearn.metrics import confusion_matrix as confusion def attention(inputs, attention_size, time_major=False, return_alphas=False): ""...
import json, os, logging from typing import Tuple, Optional import pandas as pd from datetime import datetime from jinja2 import Environment, FileSystemLoader, select_autoescape from iplotter import ChartJSPlotter from iplotter import GCPlotter def read_bcl2fastq_stats_data_from_pandas(data: dict) -> Tuple[list, list...
from __future__ import print_function # import ## batteries import os import sys import json import string import itertools import collections ## 3rd party import numpy as np import pandas as pd ## package from pyTecanFluent import Fluent class utils(object): """Utility functions for labware """ def __i...
import os import math import numpy as np import six import megengine._internal as mgb from enum import Enum from py_proto import mace_pb2 from transform import base_converter from transform.base_converter import PoolingType from transform.base_converter import ActivationType from transform.base_converter import Eltwis...
import os import re import collections import copy import pickle import numpy as np import sklearn.datasets from scipy.sparse import csr_matrix, vstack AVAILABLE_DATASETS = ["20 Newsgroups", "RT Polarity", "RCV1", "RCV1-Vectors-Original", "RCV1-Vectors-Custom"] DEFAULT_VOCAB_SIZES = [10000, 5000, 10000, None, None] ...
import argparse from datetime import datetime import os from tqdm import trange import numpy as np from PIL import Image import gc try: from manta import * except ImportError: pass parser = argparse.ArgumentParser() # CHANGE many arguments please cross reference with liquid3_d_r parser.add_argument("--log_dir", typ...
import cPickle import json import re import uuid from django.contrib.gis.db import models from django.contrib.postgres.fields import JSONField from django.contrib.postgres.fields import ArrayField from django.contrib.auth.models import User from django.core.urlresolvers import reverse from anymail.signals import Even...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import glob, os, random, math, collections, time, argparse, shutil from utils.warp import feature_warping2, image_warping2 from matplotlib import cm # Parameter sett...
# Copyright 2022 Garda Technologies, LLC. 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...
import re from enum import Enum from typing import Any, List, Optional, Dict, Iterable, Mapping, Union, Set, TypedDict, cast from django.db import models from django.db.models.deletion import SET_NULL from django_extensions.db.models import TimeStampedModel from lazy import lazy from classification.enums import Crite...
"""Intersection class and related functions.""" from __future__ import annotations import logging as log from collections import defaultdict, deque from dataclasses import dataclass from enum import Enum from itertools import chain, combinations, count, dropwhile, islice, product from math import pi as PI from statis...
import matplotlib.pyplot as plt from pathlib import Path import numpy as np from tqdm import tqdm import matplotlib import pandas as pd import seaborn as sn from PIL import Image, ImageDraw from utils.general import xywh2xyxy import os import cv2 CLASSES = ['c_1' ,'c_2' ,'c_3' ,'c_4' ,'c_5' ,'c_6' ,'c_7'] base_pat...
from PIL import Image import torchfile from torch.utils.data import DataLoader, TensorDataset from torchvision import transforms import torchvision.transforms.functional as F import torch import torch.nn as nn import os import torchvision.utils as vutils import numpy as np import torch.nn.init as init import torch.util...
import sys import pprint import argparse import ruamel.yaml import numpy as np import pandas as pd # constants include the paths to the config files from python_tools.constants import * from python_tools.util import ( DELIMITER, INPUTS_FILE_DELIMITER, get_pos, reverse_complement, all_strings_are_su...
#!/usr/bin/env python # coding:utf-8 import json, re, os import time import logging from datetime import datetime from django.conf import settings from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger # 分页 from .error_code import ErrorCode log = logging.getLogger('log') # 初始化log def pagination_d...
# coding=utf-8 # Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
# Copyright 2021 The Private Cardinality Estimation Framework 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 b...
""" Primitive Classes based on <NAME>'s Ray Tracing in a Weekend (https://raytracing.github.io/books/RayTracingInOneWeekend.html) <NAME>, Copyright 2020 removed isinstance calls from Vec3 dunder methods (was very slow!) TODO: - add tiling pattern for plane textures (divmod on 1.0 and do different things on odd v...
#Author: <NAME> import cv2 import numpy as np import itertools import math from scipy.stats import mode from .contour_detections import * def edge_correction(filteredvertices, particlediscreteness,rows,cols,inlaycoords, testing = False, gimg = None): '''Filters out particles that are deformed by image borders ...
# @Author: <NAME> # @Date: Thu, July 2nd 2020, 3:39 am # @Email: <EMAIL> # @Filename: PNAS_train_pipeline.py #!/usr/bin/env python # coding: utf-8 # In[1]: from collections import OrderedDict from stuf import stuf import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import r...
import random import os import sys TILE_BLANK = 0 TILE_DOUBLE_LETTER = 2 TILE_TRIPLE_LETTER = 3 TILE_DOUBLE_WORD = 4 TILE_TRIPLE_WORD = 6 TILE_START = 7 DIRECTION_HORIZONTAL = 0 DIRECTION_VERTICAL = 1 tileScores = [[6,0,0,2,0,0,0,6,0,0,0,2,0,0,6], [0,4,0,0,0,3,0,0,0,3,0,0,0,4,0], [0,0,4,0,0,0,2,0,2,0...
#+ 数据科学常用工具 import matplotlib as mpl import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib.style as style import seaborn as sns from sklearn.preprocessing import PowerTransformer import category_encoders as ce from sklearn.model_selection import StratifiedKFold, KFold from joblib impo...
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
import io import pandas as pd import numpy as np import plotly.graph_objects as go import plotly.express as px from plotly.subplots import make_subplots import plotly.io as pio from sklearn.decomposition import PCA from sklearn.discriminant_analysis import LinearDiscriminantAnalysis from sklearn.discriminant_analysis...
import tensorflow as tf import tensorflow.contrib.distributions as tfd import numpy as np import os.path as opth import tqdm import os from sklearn.utils import shuffle import argparse import math parser = argparse.ArgumentParser() HOME = os.path.expanduser('~') os.environ["CUDA_VISIBLE_DEVICES"] = "2"; layers = tf.ke...
import colorsys import math import os import random from yawrap import NavedYawrap, EmbedCss, EmbedJs def make_random_data(hit_probability=0.1, max_frames=1024): assert 0.0 < hit_probability < 1.0 for frame in range(max_frames): for sub_frame in range(10): if hit_probability > random.uni...
""" Get counts for all items we care about, and some we don't .... """ import time import functools from copy import deepcopy import numpy as np import requests from networkx.readwrite.graphml import write_graphml_xml as _write_graphml from requests import HTTPError from tqdm import tqdm from wikidataintegrator.wdi_co...
import matplotlib.pyplot as plt import numpy as np from astropy.table import Table from scipy.interpolate import CubicSpline from scipy.ndimage import median_filter from scipy.signal import find_peaks from scipy.signal.windows import gaussian as gaussian_kernel from scipy.ndimage import gaussian_filter from collections...
import torch.nn as nn import torch.geometric import torch.nn.functional as F from torch_geometric.nn import RGCNConv, GraphConv from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence import copy import time import torch from tqdm import tqdm from sklearn import metrics class GCN(nn.Module): ...
import binascii import gzip import hashlib import os import re import statistics import sys from collections import Counter, defaultdict, deque VARIANT_RELATED_FIELDS = ['Variant', 'CHROM', 'POS', 'ID', 'REF', 'ALT', 'VariantType', 'cytoBand', 'SVTYPE', 'SVLEN', 'END', 'MLEN', 'TSD', 'IMPRECISE', 'MULTI_ALLELIC', 'ME...
import numpy as np import argparse import os import torch import torch.nn as nn from smoke.modeling.detector import build_detection_model from smoke.config import cfg from smoke.utils.model_serialization import load_state_dict def arg_parse(): parser = argparse.ArgumentParser(description="SMOKE Prunning script")...
#!/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/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
import numpy as np import csv import sqlite3 from sqlalchemy import * from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker import itertools import functools import pandas as pd import matplotlib.pyplot as plt Base = declarative_base() #Database Tables class Budget(Base): __...
# -*- coding:utf-8 -*- # Database module: save and classify gadgets from enum import Enum from ropgenerator.Gadget import GadgetType, Gadget, GadgetException from ropgenerator.Expressions import SSAExpr, ConstExpr, MEMExpr, OpExpr, Op, Expr from ropgenerator.Conditions import CTrue from ropgenerator.IO import info, e...
# # Author: <NAME> # GitHub: https://github.com/lesterjackson # Title: MPSUtilityPython # Published: Initial September 6, 2021 # Description: A menu driven console utility coded in Python for PlayFab Multiplayer Server developers. # The utility provides three functions: (1) Alloca...
from typing import Any, Dict, List, NamedTuple, Tuple import time import numpy as np import tensorflow as tf from kite.model.model import Model as BaseModel from kite.utils.aggregator import SummaryInfo from .config import Config, SearchConfig from .feeder import Feed from .transformer import transformer_block, pos...
from flask import Flask, render_template, request, redirect, session, jsonify from flask.helpers import make_response import random import smtplib import mysql.connector import os from werkzeug.utils import secure_filename app = Flask(__name__) app.secret_key = os.urandom(10) mydb = mysql.connector.connect( ...
from numba import jit import numpy as np from numpy import pi import matplotlib.pyplot as plt import time # General Constants MASS_E = 9.10938291e-31 # electron mass MASS_P = 1.67262178e-27 # proton mass STEF_BOLT = 5.670373e-8 # Stefan-Boltzmann constant K_BOLT = 1.381e-23 # Boltzmann constant C = 299792458 # sp...
#!/usr/bin/env python """ tailed_parameters.py For distributions of RMSD or TFDs of force field geometries with respect to reference geometries, identify outlier molecules in the high RMSD (TFD) tails above a predetermined cutoff value. For each force field parameter in the molecule set, determine the fraction of out...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os import json import netifaces from schema import Schema, And, Optional, Regex, Or, SchemaError from nni.package_utils import create_validator_instance, get_all_builtin_names, get_builtin_algo_meta from .constants import SCHEMA_TYPE_ERROR...
# Natural Language Toolkit: Glue Semantics # # Author: <NAME> <<EMAIL>> # # Copyright (C) 2001-2014 NLTK Project # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from __future__ import print_function, division, unicode_literals import os import nltk from nltk.internals import Counter from nltk.com...
""" Class responsible for processing Serpent outputs """ import warnings import copy from functools import wraps import textwrap import math import collections import typing from abc import ABC, abstractmethod import numpy import serpentTools from hydep import DataWarning from hydep.internal import MaterialDataArray,...
# 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...
#!/usr/bin/env python3.8 # Released under the MIT License. See LICENSE for details. # """General project related functionality.""" from __future__ import annotations import os import sys import subprocess from dataclasses import dataclass from typing import TYPE_CHECKING from efro.error import CleanError from efro.t...
# Copyright 2018 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...
from itertools import product import platform import matplotlib import matplotlib.pyplot as plt from matplotlib import cbook from matplotlib.cbook import MatplotlibDeprecationWarning from matplotlib.backend_bases import MouseEvent from matplotlib.colors import LogNorm from matplotlib.transforms import Bbox, Transforme...
from typing import Any, List, Union from boa3.builtin import CreateNewEvent, NeoMetadata, metadata, public from boa3.builtin.contract import Nep17TransferEvent, abort from boa3.builtin.interop.blockchain import get_contract from boa3.builtin.interop.contract import call_contract from boa3.builtin.interop.runtime impor...
from typing import Optional, OrderedDict from allauth.socialaccount.models import SocialAccount from django.contrib.auth import get_user_model from django.template.loader import render_to_string from django.utils.translation import gettext_lazy as _ from drf_spectacular.extensions import OpenApiSerializerFieldExtensio...
# -*- coding: utf-8 -*- # Stdlib imports import base64 import datetime import hashlib import json import jwt import logging import re import threading from io import BytesIO # Imports from your apps from operator import add # Third-party app imports from codicefiscale import codicefiscale from dateutil import tz fro...
# Copyright 2018 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# -*- encoding: utf-8 -*- """ Loader and primary interface for nova modules See README for documentation Configuration: - hubblestack:nova:module_dir - hubblestack:nova:profile_dir - hubblestack:nova:saltenv - hubblestack:nova:autoload - hubblestack:nova:autosync """ from __future__ import absolut...
""" Convenience methods for plotting with matplotlib which I discovered I frequently use. Some of them are really just for typing (`subplots` is one of them). """ import enum import io import os import pathlib import sys import warnings from typing import TYPE_CHECKING, Optional, Union, Sequence, Tuple, Dict, List, Cal...
# coding: utf-8 import sys import json import re import os import functools import platform import threading try: from bs4 import BeautifulSoup as bs import requests as rq from argparse import ArgumentParser except: err = """ You haven't installed the required dependencies. Run 'python setup.py ...
""" Tests that load pages and check the contained text. """ import json from textwrap import indent import pytest from click.testing import Result from dateutil import tz from flask import Response from flask.testing import FlaskClient from requests_html import HTML, Element from cubedash import _model, _monitoring f...
from __future__ import unicode_literals from collections import defaultdict import datetime import json import logging import re import pytz from moto.core.exceptions import DryRunClientError from jinja2 import Environment, DictLoader, TemplateNotFound import six from six.moves.urllib.parse import parse_qs, urlpars...
# -*- coding: utf-8 -*- """ Created on Fri Aug 31 17:04:47 2018 ------------------------------------------------------------------------------- =============================== VarNet Library ================================ ------------------------------------------------------------------------------- Author...
# SPDX-License-Identifier: Apache-2.0 # Copyright Contributors to the Rez Project """ test package iteration, serialization etc """ from rez.packages import iter_package_families, iter_packages, get_package, \ create_package, get_developer_package, get_variant_from_uri, \ get_package_from_uri, get_package_fro...
from __future__ import unicode_literals from __future__ import absolute_import from collections import namedtuple import logging import re import sys from operator import attrgetter import six from docker.errors import APIError from docker.utils import create_host_config, LogConfig from . import __version__ from .con...
""" Defines and solves the Tractable Buffer Stock model described in lecture notes for "A Tractable Model of Buffer Stock Saving" (henceforth, TBS) available at http://econ.jhu.edu/people/ccarroll/public/lecturenotes/consumption/TractableBufferStock The model concerns an agent with constant relative risk aversion utili...
# Copyright (c) Facebook, Inc. and its affiliates. import numpy as np import torch import natsort import glob import open3d as o3d # rendering components from pytorch3d.renderer import ( FoVPerspectiveCameras,RasterizationSettings, MeshRenderer, MeshRasterizer, BlendParams, SoftSilhouetteShader, HardPhongSh...
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = '<NAME>, <NAME>' __maintainer__ = '<NAME>' __version__ = '2.0' from StringIO import StringIO import unittest import acl from acl import exceptions EXAMPLES_FILE = 'tests/data/junos-examples.txt' # Some representative match clauses: ios_matches = ('tcp 192.0.2.0...
import torch import re import os import collections from torch._six import string_classes, int_classes import cv2 from opt import opt from tqdm import tqdm import time import matplotlib.pyplot as plt from PIL import Image import numpy as np import math import copy RED = (0, 0, 255) GREEN = (0, 255, 0) ...
# coding: utf8 """This module contains the Pipeline abstract class needed for Clinica. Subclasses are located in clinica/pipeline/<pipeline_name>/<pipeline_name>_pipeline.py """ import abc from nipype.pipeline.engine import Workflow def postset(attribute, value): """Sets the attribute of an object after the e...
""" @author: Michael @version: 2021-07-22 """ # -*- coding: utf-8 -*- from ast import Pass from dis import show_code from sys import stderr from tkinter import Pack from typing import Any, Optional import numpy as np BSIZE = 9 # board size EBSIZE = BSIZE + 2 # extended board size BVCNT = BSIZE**2 # vertex count EB...