text
stringlengths
6.04k
39.5k
#!/usr/bin/env python # -*- coding: utf-8 -*- # __coconut_hash__ = 0x6fca4188 # Compiled with Coconut version 2.0.0-a_dev9 [How Not to Be Seen] """ Utilities for use across all of bbopt. """ # Coconut Header: ------------------------------------------------------------- from __future__ import print_function, absolu...
import functools from collections import OrderedDict from itertools import product import numpy as np import pandas as pd from estimagic import batch_evaluators from estimagic.config import DEFAULT_N_CORES from estimagic.differentiation import finite_differences from estimagic.differentiation.generate_steps import ge...
import numpy as np from re import finditer import os, sys #### # functions for text processing of pandoc outputs #### def document_structure(ftex_in): """ read through entire pandoc'd file and extract outline, with line numbers for where each section heading is this prepares us to get article metadata...
from bs4 import BeautifulSoup from tqdm import tqdm import requests import os import re from datetime import datetime import nltk from nltk.stem import PorterStemmer import csv import json import pandas as pd import numpy as np import heapq from dateutil import parser # 1 DATA COLLECTION # 1.1 Get the list of animes #...
""" Utility Functions for various stereo vision-related operations """ import numpy as np import skimage.measure import vsi.utils.geometry_utils as geometry_utils import vsi.utils.camera_utils as camera_utils def rectify_calibrated_euclidean(camera0, camera1, img0_shape, img1_shape): """ compute epipolar rectificat...
#!/usr/bin/env python import pkg_resources import numpy as np import matplotlib.pyplot as plt from scipy.interpolate import interp1d from astropy.io import ascii from astropy.table import QTable, Column import astropy.units as u from astropy.convolution import Gaussian1DKernel, convolve from synphot import SpectralE...
import numpy as np import pandas as pd import matplotlib as mpl from matplotlib.colors import same_color, to_rgb, to_rgba import pytest from numpy.testing import assert_array_equal from seaborn.external.version import Version from seaborn._core.rules import categorical_order from seaborn._core.scales import Nominal,...
from itertools import product, permutations from math import ceil, floor, sqrt from typing import List from gurobipy import GRB, GenExpr, LinExpr, Model, tupledict, abs_, and_, max_, min_, or_, QuadExpr, GurobiError, Var from .classes import Layout, Element from optimizer import util def equal_width_columns(m: Mod...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Takes an AST (abstract syntax tree) and an environment in order to evaluate the AST under the environment """ import yalix.utils as utils from abc import ABCMeta, abstractmethod from yalix.environment import Env from yalix.exceptions import EvaluationError class Pri...
import numpy as np import torch.nn as nn import torch from torch.nn import functional as F from scipy.spatial.transform import Rotation as R from scipy.ndimage import gaussian_filter import scipy.io as sio def OnehotEncoding(arr, val, c): # val = np.repeat(np.array(val).reshape(2, 2).T, 3).reshape(-1, 1) ind ...
""" This is Roeland’s CMD color module, which abstracts away either the ANSI color codes on VT-style terminals, or the win32 console API. The latter is also called directly for printing text so you can print any Unicode character up to U+FFFF on the console. """ import functools as _functools import sys as _sys import...
######################################################################################## # Domoticz Tuya Smart Plug Python Plugin # # # # MIT License ...
# -*- coding: utf-8 -*- import sys reload(sys) sys.setdefaultencoding("utf-8") from PySide.QtGui import * from PySide.QtCore import * from Noriter.UI.ModalWindow import ModalWindow from Noriter.UI.Window import Window from Noriter.utils.Settings import Settings from Noriter.views.NoriterMainWindow import * from c...
# -*- coding: utf-8 -*- """ Lowland class for the simulation. """ import random from biosim.animal import Herbivore, Carnivore class Island: """The Island object collects all landscape cells in the map and keeps track of animals. :param map_str: The representation of cell types in the simulation :type ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jun 18 14:21:30 2019 @author: routhier """ import numpy as np import inspect from copy import deepcopy from .sequence import SeqIntervalDl, StringSeqIntervalDl from .normalization import Weights from .utils import ArgumentsDict, get_default_args clas...
# -*- coding: utf-8 -*- """Parsing functions using the funcparserlib library.""" import bibpy.date import bibpy.entry import bibpy.lexers from bibpy.name import Name from bibpy.tools import always_true import funcparserlib.parser as parser import funcparserlib.lexer as lexer import re def token_value(token): ""...
#!/usr/bin/env python # coding=utf-8 """ Edit a pdb file to provide missing data """ from __future__ import print_function import os import sys import argparse import numpy as np from md_utils.md_common import list_to_file, InvalidDataError, warning, process_cfg, create_out_fname, read_csv_dict, \ print_qm_kind, c...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 2...
import builtins import math import numpy as np import matplotlib.animation as animation import matplotlib.patches as patches import matplotlib.lines as mlines import matplotlib.transforms as transforms import random as rand def to_plt_color(args): max_value = 255.0 color = None if len(args) == 1: ...
from __future__ import print_function, division # pytorch imports import torch import torch.nn as nn import torch.optim as optim from torch.optim import lr_scheduler from torch.autograd import Variable import torchvision from torchvision import datasets, models, transforms from torch.utils.data import Dataset, DataLoa...
# -*- coding: utf-8 -*- """ .. wikisection:: overview :title: (5) Seeds (exactly matching kmers) The :mod:`biseqt.seeds` module provides tools for storing and analyzing exactly matching kmers, aka seeds. >>> from biseqt.seeds import SeedIndex >>> from biseqt.sequence import Sequence, Alphabet ...
import math import time import requests import pandas as pd import dask.delayed from time import sleep from dask import compute from bs4 import BeautifulSoup from datetime import date, datetime def get_page(url): """ returns a soup object that contains all the information of a given webpage """ tos = ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) CloudZero, Inc. All rights reserved. # Licensed under the MIT License. See LICENSE file in the project root for full license information. """ CloudZero Dyn-O-Tool! Tools for making life with DynamoDB easier Usage: dynotool list [--profile <name>] d...
import inspect from functools import partial from graphql import ( default_type_resolver, get_introspection_query, graphql, graphql_sync, introspection_types, is_type, print_schema, GraphQLArgument, GraphQLBoolean, GraphQLEnumValue, GraphQLField, GraphQLFloat, GraphQ...
import math import random import torch.nn as nn from transformers.models.fsmt.configuration_fsmt import FSMTConfig from transformers.models.fsmt.modeling_fsmt import ( SinusoidalPositionalEmbedding, EncoderLayer, DecoderLayer, FSMTModel as _FSMTModel, FSMTForConditionalGeneration as _FSMTForConditio...
""" A set of functions needed for DataCarousel app """ import random import logging import json import time import datetime import numpy as np import pandas as pd from sklearn.preprocessing import scale import urllib.request as urllibr from urllib.error import HTTPError import cx_Oracle from django.core.cache imp...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function import sys import argparse import yaml import numpy as np from scipy.sparse import csgraph from scipy.sparse.csr import csr_matrix from astropy.extern import six from astropy.table import Tab...
# ------------------------------------------------------------------------------ # 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 r...
import logging import tempfile import wx import wx.lib.newevent from mail import gmail from mail.gmail import check_credentials from model.columns import Column from pdf.generate import generate_invoices, generate_master from ui.PdfViewer import PdfViewer from util import MyBytesIO, PROGRESS_STYLE DEFAULT_BORDER = 5...
#!/usr/bin/env python3 """ Copyright (C) Smartsoftdev.eu SRL - All Rights Reserved For any license violations please contact: SmartSoftDev.eu This app computes and unique hash of an component located in a git repository,in multiple locations (files, directories). Then it saves the installed hash and information into s...
import json from logging import error, exception, warning, info from requests import post as request_post from uuid import UUID from django.db.models import ( CharField, DecimalField, ForeignKey, JSONField, PositiveIntegerField, PROTECT, ) from django.db.utils import IntegrityError from eth_uti...
# -*- coding: utf-8 -*- # # Dell EMC OpenManage Ansible Modules # Version 4.0.0 # Copyright (C) 2021 Dell Inc. or its subsidiaries. All Rights Reserved. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # from __future__ import (absolute_import, division, print_function) _...
import os from os.path import join as pjoin import re from Bio.Seq import Seq from Bio import SeqIO, SeqFeature from Bio.SeqRecord import SeqRecord import pandas as pd pd.options.mode.chained_assignment = None import numpy as np import warnings import time import sqlite3 as sql from collections import defaultdict imp...
import json import os import re import logging import time import datetime from ascii_graph import Pyasciigraph import requests from requests.exceptions import RequestException from lib.slacklib import SlackLib from lib.githublib import GithubLib from lib.influxlib import InfluxLib from lib.jenkinslib import JenkinsL...
#!/usr/bin/env python """pypozyx.definitions.constants - contains all Pozyx constants, such as error definitions, delays, physical convertions.""" # Pozyx status returns POZYX_FAILURE = 0x0 POZYX_SUCCESS = 0x1 POZYX_TIMEOUT = 0x8 class PozyxConstants: # Pozyx serial buffer sizes MAX_BUF_SIZE = 100 MAX_SE...
import requests from multiprocessing import Process, Manager import time import sqlite3 import os import sys from bs4 import BeautifulSoup from urllib.parse import urljoin, urlparse from harvester.lddatabase import LDHarvesterDatabaseConnector AUTO_PROCESS_OVERFLOW = True WORK_QUEUE_OVERFLOW_FILE = 'overflow.txt' DAT...
from compas.topology import breadth_first_paths from compas.datastructures import mesh_substitute_vertex_in_faces from compas.utilities import pairwise # from ..grammar_pattern import strip_polyedge_update __all__ = [ ] def add_strips(mesh, polyedges, callback=None, callback_args=None): to_add = polyedges[:] ...
# --depends-on config import enum import re import shlex import string import typing from src import EventManager, IRCLine, ModuleManager, utils from . import outs COMMAND_METHOD = "command-method" COMMAND_METHODS = ["PRIVMSG", "NOTICE"] STR_MORE = " (more...)" STR_MORE_LEN = len(STR_MORE.encode("utf8")) STR_CONTI...
from util import adict, tdict, tset, tlist, xset, idict from tnt_cards import draw_cards from tnt_units import add_unit ###################### # Game Processing ###################### def add_next_phase(G, phase): G.game.sequence.insert(G.game.index + 1, phase) def switch_phase(G, phase): G.game.sequen...
import gym import time import numpy as np import tensorflow as tf from overcooked_ai_py.mdp.actions import Direction, Action from overcooked_ai_py.mdp.overcooked_mdp import OvercookedGridworld from overcooked_ai_py.mdp.overcooked_env import OvercookedEnv from overcooked_ai_py.mdp.layout_generator import LayoutGenerato...
import itertools import math import numpy as np import pandas as pd import scipy.stats import statsmodels.stats.multitest from figures.figure1 import find_leaves from figures.util import experiments, mcc, get_subplots, produce_figure, plot_grid, plot_annotations, plot_scatter, \ to_col_name def generate_qval_da...
from redbot.core import Config, bank from redbot.core.data_manager import bundled_data_path import time import bisect import random import asyncio from operator import itemgetter from ast import literal_eval # Thanks stack overflow http://stackoverflow.com/questions/21872366/plural-string-formatting class ...
from datetime import datetime import traceback import flask_restful as restful from flask_restful import reqparse, fields, marshal_with, marshal from sqlalchemy.exc import SQLAlchemyError from flask import g from app.applicationModel.models import ApplicationForm, Question, Section, SectionTranslation, QuestionTrans...
import numpy as np from scipy.special import jv # Bessel Function of the first kind from scipy.linalg import eig from scipy.fftpack import fftn, ifftn, ifft # import progressbar from tqdm import tqdm from scipy.ndimage import filters as fi import math # An implementation of the Optimally Oriented # <NAME> and <NAME>,...
# -*- coding: utf-8 -*- from marshmallow import ValidationError __author__ = "<NAME>" __email__ = "ag<EMAIL>(at)cs.<EMAIL>" __status__ = "production" import unittest from bg.vertices import BGVertex_JSON_SCHEMA_JSON_KEY, BGVertex, BlockVertex, InfinityVertex, TaggedVertex, TaggedBlockVertex, \ TaggedInfinityVert...
import torch import torch.nn as nn from torch.nn.modules.batchnorm import _BatchNorm from mmcv.runner import load_checkpoint, BaseModule, load_state_dict from mmdet.utils import get_root_logger from ..builder import BACKBONES # RLA channel k: rla_channel = 32 (default) # https://github.com/moskomule/senet.pytorch/bl...
import pybullet as p import pybullet_data import numpy as np from numpy import array from .util_geom import euler2quat, quat2rot, quatMult, log_rot from .panda import Panda def full_jacob_pb(jac_t, jac_r): return np.vstack( (jac_t[0], jac_t[1], jac_t[2], jac_r[0], jac_r[1], jac_r[2])) def plot_frame_pb...
# Standard libraries import os import pathlib import pickle from datetime import datetime # Scientific stack import numpy as np import numpy.random as rnd import pandas as pd import sklearn.metrics as skmetrics # Chunked data import dask import zarr # Enable multiprocessing support for Zarr from numcodecs import blo...
from pytorch3d.structures import Pointclouds from pytorch3d.renderer import compositing from pytorch3d.renderer.points import rasterize_points import numpy as np import torch from torch import nn import nvdiffrast.torch as dr from utils.defaults import DEFAULTS import os import pytorch3d class RasterizePointsXYsBle...
#!venv/bin/python import os import random import string import struct from math import pi, sin, cos from threading import Thread, Timer from time import time, sleep from typing import Optional import can from flask import Flask from flask_socketio import SocketIO from tool.pid_settings.views import register_views, In...
#!/bluesky/fireweather/miniconda3/envs/fwf/bin/python """ Create a json file contains XX number of days of wmo weather station observations along with fwf/met model output for comaprison. USed to make plots on website gzip -k wx-zone-5-2021021506.json """ import context import io import json import requests from b...
import os import sys from tensorflow.keras import backend as K from tensorflow.keras.layers import RNN import numpy as np import tensorflow THIS_DIR = os.path.dirname(os.path.realpath(__file__)) sys.path.append(THIS_DIR + "/../../") from deep_disfluency.utils.tools import \ dialogue_data_and_indices_from_matrix imp...
#!/usr/bin/env python3 import board import copy DEBUG = False class Empty: def __str__(self): return "#" class Player: def __init__(self, name, email): self.name = name assert (len(str(name)) >= 1), "name must be one or more character" self.email = email # Unit # name: One...
# Lint as: python3 # Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# -*- coding: utf-8 -*- """ Created on Wed Dec 06 16:04:44 2017 @author: Xian_Work """ param_path="../Parameters/params_ui.json" execfile("prelim.py") from model_plotting import gen_evolve_share_series, mk_mix_agent ########################################### ####Calculate gradients for each moment#### ############...
#!/usr/bin/env python3 import sys import subprocess import os import os.path if len(sys.argv) > 1: pythonpath = sys.argv[1] else: pythonpath = sys.executable homepath = os.path.realpath(os.path.dirname(sys.argv[0])) ophispath = os.path.join(homepath, "..", "bin", "ophis") failed = 0 # These are some simple ...
import logging import traceback import matplotlib as mpl from os import sys, path from PyQt5.QtCore import pyqtSignal, QProcess from PyQt5.QtWidgets import QWidget, QPushButton, QGridLayout, QLineEdit, QFileDialog, QComboBox, QVBoxLayout, \ QApplication, QLabel, QRadioButton, QHBoxLayout # https://stackoverflow.c...
# this program is going to estimate parameters from simulated datasets that originate from an OU process # with noise added. The parameters of the simulation and the length of the simulation are set through # arguments import langevin import pandas as pd import numpy as np import argparse import pymc3 as pm import the...
""" periodic_porous script. """ import numpy as np import dolfin as df from meshpy import triangle as tri import os #from dolfin import info from .io import remove_safe, mpi_rank, mpi_is_root, mpi_barrier from .cmd import info import matplotlib.pyplot as plt import h5py def line_points(x_left, x_right, dx): N = i...
from .optaplanner_java_interop import ensure_init, _add_shallow_copy_to_class, _generate_planning_entity_class, \ _generate_problem_fact_class, _generate_planning_solution_class, _generate_constraint_provider_class, get_class from jpype import JImplements, JOverride from typing import Union, List, Callable, Type, A...
import re import pandas import cobra from fractions import Fraction def ReadExcel(excel_file, parse="cobra_string", Print=False): """ parse = "cobra_string" | "cobra_position" cobra_string % INPUT % fileName xls spreadsheet, with one 'Reaction List' and one 'Metabolite List' tab % % 'Reac...
# version: 0.5 # take out data from csv file and then visualize the data import os, sys import pandas as pd import numpy as np from datetime import datetime pd.options.display.float_format = '{:.3f}'.format import dash # from dash import dcc, html import dash_core_components as dcc import dash_html_comp...
''' Base driver class ''' import pandas as pd import requests import json from copy import deepcopy import pyperclip import math import re import inspect import yaml import itertools from datetime import datetime import warnings import functools from textwrap import dedent from datapungi_fed import generalSettings ...
""" modified from https://github.com/dingmyu/davit/blob/main/mmdet/mmdet/models/backbones/davit.py """ import itertools from typing import Tuple import torch import torch.nn as nn import torch.nn.functional as F from timm.models.layers import DropPath, to_2tuple, trunc_normal_ from detectron2.modeling.backbone impor...
# -*- coding: utf-8 -*- # $Id: wuiadmintestbox.py 69111 2017-10-17 14:26:02Z vboxsync $ """ Test Manager WUI - TestBox. """ __copyright__ = \ """ Copyright (C) 2012-2017 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free softwa...
import os from datetime import datetime from tqdm import tqdm import pickle import json import numpy as np import torch def conceptgraph2id( root='../data/conceptgraphEmbedding/TransE_l2_concetgraph_2/', name1='entities', name2='relations', format=".tsv"): ''' 加载 conceptgraph中实体和关系及其对应的id ...
# Project: squeezeDetOnKeras # Filename: evaluation # Author: <NAME> # Date: 08.12.17 # Organisation: searchInk # Email: <EMAIL> # Project: squeezeDetOnKeras # Filename: visualization # Author: <NAME> # Date: 07.12.17 # Organisation: searchInk # Email: <EMAIL> import numpy as np import libs.utils.utils as utils de...
# -*- coding: utf-8 -*- import logging import functools from collections import OrderedDict from fabric2.runners import Result from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.utils.text import camel_case_to_spaces from django.dispatch import Sig...
import torch import torch.nn as nn import torchvision.transforms as transforms from torchvision.utils import save_image from utils.CUBDataset import CUBDataset, image_dim from utils.CUBDataset_with_related_captions import CUBDataset_With_Related_Captions from utils.CUBDataset_with_related_captions import image_dim as r...
#<pycode(py_idp)> #---------------------------------------------------------------------------- # P R O C E S S O R M O D U L E S C O N S T A N T S #---------------------------------------------------------------------------- # ---------------------------------------------------------------------- # p...
# Copyright (c) 2017, Intel Research and Development Ireland Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
# MIT License # # Copyright (c) 2018-2019 Red Hat, Inc. # 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, m...
from django.db.models import Max from django.db.transaction import atomic from django.urls import reverse from django.utils.translation import gettext from . import input_validators from . import models from . import row_transforms from . import table_creation from permissions import daos as permissions_daos @atomic ...
""" Greynir: Natural language processing for Icelandic Spelling and grammar checking module Copyright (C) 2022 <NAME>. This software is licensed under the MIT License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated docume...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright(c) 2020 De Montfort University. All rights reserved. # # """ Backtracking Algorithm to solve The Gun Port Problem as first described by <NAME>. (1971), The Gunport Problem, Mathematics Magazine, Vol.44, pp.193-196 This is an optimisation problem to maximise...
"""Implements request and response body objects.""" from __future__ import absolute_import, division, print_function import json import six class DefaultAttrMixin(object): """Sets default attributes""" def _set_default_attr(self, default_attr): """Sets default attributes when None. Args: ...
import tkinter as tk from tkinter import font from random import choice import config # Other Setup DIFFICULTIES = { # Difficulty Name, Value "Easy (250 Words)": "easy", "Normal (1000 Words)": "normal", "Hard (3000 Words)": "hard", "Custom": "custom" ...
""" Copyright 2022 Objectiv B.V. """ import operator from abc import ABC, abstractmethod from copy import copy from functools import reduce from typing import Union, List, Optional, Dict, Any, cast, TypeVar, Tuple, Type, TYPE_CHECKING from bach import DataFrameOrSeries from bach.series.series import Series from bach.s...
import os import sys import time from enum import Enum from typing import Tuple, Optional import requests from bs4 import BeautifulSoup from pySmartDL import SmartDL from selenium import webdriver from selenium.common.exceptions import TimeoutException, StaleElementReferenceException from selenium.webdriver.common.by ...
import sys from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * from Flag import Flag from TOOL_MatGP2 import Trend class MainRight(QWidget): qss = """ QWidget { background: rgb(128, 128, 128); border: 2px solid rgb(0, 0, 0); font-size: ...
import os import tempfile import pandas import tensorflow as tf import zipfile import cloudpickle import numpy as np import random import gym from gym_gazebo.envs import gazebo_env import baselines.common.tf_util as U from baselines import logger from baselines.common.schedules import LinearSchedule from baselines imp...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 10 10:49:24 2020 @author: RC Validation test for comparing model outputs from python and cpp stationsim. We do this as follows: - Generate two random samples of models - Calculate corresponding Ripley's K (RK) curves for each model - Generate a da...
import gc import os import cv2 import keras import matplotlib.pyplot as plt import numpy as np import pandas as pd import tifffile as tiff from keras import backend as K from keras.backend import binary_crossentropy from keras.layers import concatenate, Conv2D, Input, MaxPooling2D, UpSampling2D, Cropping2D from keras....
import logging import json import base64 from django.core.paginator import Paginator # Create your views here. from rest_framework import viewsets, status from rest_framework.decorators import action, detail_route from rest_framework.generics import get_object_or_404 from rest_framework.response import Response from d...
import json import os import sys from hashlib import sha256 from random import randint from shlex import quote as shlex_quote from uuid import uuid4 import click import networkx from . import utils from .bash import Bash from .cache import Cache from .constants import INDENT_STYLES, DEFAULT_BAKEFILE_NAME from .except...
import argparse import os from itertools import combinations, product from multiprocessing import Pool import networkx as nx import pandas as pd from custom_utils import get_jaccard, get_structures_added, load_json from statics import STRUCTURE_TYPES def get_product_graph(g1, g2, graphicspath, resultspath): o1 ...
import sys import unittest import dask.array import dask.distributed as dd import numpy as np import xarray as xr # Import from directory structure if coverage test, or from installed # packages otherwise if "--cov" in str(sys.argv): from src.geocat.comp import dewtemp, heat_index, relhum, relhum_ice, relhum_wate...
from flask import Blueprint, render_template, g, request, flash import flask_sijax from main.models.loan import Loan from main.transaction.loan.forms import TransactionLoanForm from main.models.loan_detail import LoanDetail from main.transaction.loan.forms import TransactionLoanDetailForm from main.transaction.loan.for...
# This code is licensed under the MIT License (see LICENSE file for details) from PyQt5 import Qt from .. import image from .. import layer from .. import layer_stack from ..qdelegates import dropdown_list_delegate from ..qdelegates import slider_delegate from ..qdelegates import color_delegate from ..qdelegates impor...
""" A finder chart maker, designed for use with transients. TO USE: > import findermaker > findermaker.FinderMaker(ra='r.a. string',dec='declination string',name='object name') -<NAME>, 2015 """ import aplpy import os import time from subprocess import Popen, PIPE import coord from astrometryClient.client import Cli...
import asyncio import re from datetime import datetime from collections.abc import Mapping import discord from discord.embeds import EmptyEmbed from . import common def recursive_update(old_dict, update_dict): """ Update one embed dictionary with another, similar to dict.update(), But recursively update...
from selenium import webdriver from selenium.webdriver.support.ui import Select from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0 from selenium.webdriver.support import expected_conditions as EC # available since 2.26.0 from selenium.common.exceptions import NoSuchElementException # for...
# -*- coding: utf-8 -*- """Command line interface for diluvian.""" from __future__ import print_function import argparse import logging import os import random import re import six from .config import CONFIG def _make_main_parser(): """Construct the argparse parser for the main CLI. This exists as a sep...
from data import COCODetection, get_label_map, MEANS, COLORS from yolact import Yolact from utils.augmentations import BaseTransform, FastBaseTransform, Resize from utils.functions import MovingAverage, ProgressBar from layers.box_utils import jaccard, center_size, mask_iou from utils import timer from utils.functions ...
#!/usr/bin/env python3 import requests import json import pandas as pd import tweepy import os import config as cfg import time import asyncio import aiohttp from time import sleep from datetime import datetime, timedelta from pytz import timezone from bs4 import BeautifulSoup from selenium import webdriver from seleni...
# Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
""" Module implementing a program for executing a Floppy graph. The program can be called from the Floppy editor but will run independently from the calling process. Communication between the editor and the runner is realized via Sockets. The runner will report its status to the editor and the editor is able to send co...
# The chain (Rumors reference intended) # ----------------------------------------- Higher-level Chain functions ----------------------------------------------- def makeChain(functionDictList, preiterable=None, inMethod=None, in_kwargs=None, writeInfoExists=False, recordMethod=None, record_kwargs=None,...
# -*- coding: utf-8 -*- # Description: Document tree # Documentation: data_structures.txt from __future__ import print_function import re import os.path import string from Remark.DocumentType_Registry import documentType, strictDocumentType from Remark.FileSystem import unixDirectoryName, unixRelativePa...
# extract-snippets.py v1.2.0 6/24/2021 # <NAME>, Amazon Web Services # extracts tagged regions from source files and writes them to a snippets directory. # reads list of paths from stdin and extracts snippets from these files. Takes the # directory to which snippets should be extracted as a command line argument. Th...