text
stringlengths
6.04k
39.5k
import os import logging import numpy as np import pandas as pd from astropy import units as u from astropy.convolution import convolve_fft, Gaussian2DKernel, convolve from astropy.coordinates import SkyCoord, Angle from astropy.io import fits from astropy.table import Table from regions import CircleSkyRegion import d...
import os import copy import skimage.io as skio from skimage import img_as_ubyte, exposure import warnings import geopandas as gpd from rasterio import features import rasterio from shapely.ops import unary_union from shapely.geometry import shape, box import us import xarray import rioxarray from numpy import uint8 fr...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from django.shortcuts import render, HttpResponseRedirect from django.http import HttpResponse, JsonResponse from django.shortcuts import get_object_or_404, render from django.views.decorators.csrf import csrf_protect import numpy as np np.set_printoptions(suppress=True) import pandas as pd from sklearn.cluster import...
# The MIT License (MIT) # Copyright (c) 2016, 2017 by the ESA CCI Toolbox development team and contributors # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including wi...
# __ __ __ # .-----.-----.----|__| | .---.-. # | _ | _ | _| | | | _ | # |___ |_____|__| |__|__|__|___._| # |_____| # """ NOTE: The contents of this file have been inlined from the gorilla package's source code https://github.com/christophercrouzet/gorilla/blob/v0.3.0/gorilla.p...
import random, os import pygame import thorpy import RpgMap.logic.constants as const def sgn(x): if x < 0: return -1 elif x > 0: return 1 class MapObject: current_id = 1 @staticmethod def get_saved_attributes(): return ["name", "quantity", "fns", "factor", "new_type",...
# -*- coding: utf-8 -*- """Create direct, total and mediation Graphviz graph from dot_str using pydot.""" from typing import Dict, Sequence, Optional from itertools import chain import numpy as np from numpy import allclose, isnan from causing import utils from causing.estimate import tvals from causing.model import M...
# -*- coding: utf-8 -*- ''' ELAN module for manipulating ELAN transcript files (\*.eaf, \*.pfsx) ''' # Copyright (c) 2020, <NAME> <<EMAIL>> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software...
import re import six import phonenumbers from postal.near_dupe import near_dupe_hashes from postal.dedupe import place_languages, duplicate_status, is_name_duplicate, is_street_duplicate, is_house_number_duplicate, is_po_box_duplicate, is_unit_duplicate, is_floor_duplicate, is_postal_code_duplicate, is_toponym_duplic...
#!/usr/bin/env python3 import argparse import datetime import multiprocessing import os import sys import about import check import shared import tax def parse_arguments(): parser = argparse.ArgumentParser(prog='CAT contigs', description='Run Contig Annotation Tool ' ...
import torch from torch import nn as nn from torch.nn import functional as F import numpy as np from basicsr.models.archs.arch_util import (ResidualBlockNoBN, make_layer, RCAB, ResidualGroup, default_conv, RCABWithInputConv) from einops import rearrange, repeat from einops.layers.torch import Rearrange from positional...
from urllib.request import urlretrieve import os import pandas as pd import numpy as np from datetime import datetime DATA_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../data')) UCI_DATASETS = [] def _UCI(C): UCI_DATASETS.append(C) return C class Dataset: ndim_x = None ndim...
from app import db from app import ma from datetime import datetime from marshmallow_sqlalchemy import field_for from marshmallow import fields from app.basic_master.model import Department , DepartmentSchema , LocationSchema , Location ,Uom , UomSchema , ProductCategory , ProductCategorySchema , Leader , LeaderSchema...
import json import os from collections import OrderedDict from itertools import count from multiprocessing import cpu_count from tempfile import TemporaryDirectory as InTemporaryDirectory from types import MethodType from joblib import Parallel, delayed from checkpoint import __version__ as version from checkpoint.cr...
########## # Part of the code modified from: # https://github.com/asappresearch/emergent-comms-negotiation ########## import torch from torch import nn, autograd from torch.autograd import Variable import torch.nn.functional as F import numpy as np eps = 1e-6 class NumberSequenceEncoder(nn.Module): def __init__...
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.distributions.normal import Normal from torch.utils.data import DataLoader import numpy as np from datetime import datetime import time from pathlib import Path import argparse import math from collections import d...
#!/usr/bin/env python import argparse from cyvcf2 import VCF, Writer import numpy as np import re import math import subprocess version = '0.3.7.1' def __main__(): parser = argparse.ArgumentParser(description='Convert a VCF file with genomic variants to a file with tab-separated values (TSV). One entry (TSV line...
#Author: <NAME> #email : <EMAIL> # # The originals of these scripts can be found from the StellarGraph website, here we modified them for our needs #------------------------------------------------------------------------------------------------------ # #These code are writen for a research project, published in OIR. I...
"""Unitary tests for eToken contract""" from functools import partial from collections import namedtuple import pytest from ethproto.contracts import RevertError, Contract, IntField, ERC20Token, ContractProxyField from ethproto.wrappers import get_provider from prototype import ensuro from ethproto.wadray import _W, _...
import random import configparser from Loading.Objects import env_l1_set, spriteDictionary, getUid, env_l2_list from Classes.Middle.Particle import Particle from Classes.Base.Vector import Vector config = configparser.ConfigParser() config.read_file(open('Classes/config')) def getRandomString(string, range): num ...
import boto3 import json import mimetypes from zipfile import ZipFile from io import BytesIO from dcicutils.ff_utils import ( get_metadata, ) from tibanna.base import ( SerializableObject ) from collections import namedtuple from .exceptions import ( FdnConnectionException ) class QCArgument(SerializableO...
#! /usr/bin/python # -*- coding: utf-8 -*- import inspect from abc import abstractmethod import tensorflow as tf import tensorlayer as tl from tensorlayer import logging from tensorlayer.decorators import (deprecated_alias, private_method, protected_method) from tensorlayer.files import utils from tensorlayer.layers...
# -*- coding: utf-8 -*- """Mesh based data transformation and mapping, interpolation, extrapolation.""" import numpy as np import pygimli as pg def nodeDataToCellData(mesh, data): """Convert node data to cell data. Convert node data to cell data via interpolation to cell centers. Parameters -------...
""" Create the raw data for the reprot """ from datetime import date import numpy as np import pandas as pd from collections import OrderedDict from datetime import datetime from vpalette import get_colors from . import constants as c from .functions import filter_by_date from .functions import resample from .f...
import csv import json import pysam import numpy as np import pandas as pd import random from .bamutils import fetch_upto_next_ID from . import gtfutils DEFAULT_ANNOT=['?','?','?','?',int(0)] def model(file_ambiv_gps, file_expression_model): #load ambivalence gps with open(file_ambiv_gps) as f: jso...
#!/usr/bin/env python3 from cum import config, exceptions, output, version from functools import wraps import click import concurrent.futures class CumGroup(click.Group): def command(self, check_db=True, *args, **kwargs): def decorator(f): @wraps(f) def wrapper(*args, **kwargs): ...
import codecs import copy import hashlib import os import pickle import re import logging from lxml import etree from regparser import api_writer, content from regparser.federalregister import fetch_notice_json, fetch_notices from regparser.history.notices import ( applicable as applicable_notices, group_by_eff_d...
# coding=utf-8 ############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"...
#! /usr/bin/env python3 # https://eco.mtk.nao.ac.jp/cgi-bin/koyomi/cande/horizontal.cgi import os import sys from datetime import datetime, timedelta, timezone import json import argparse import re from pathlib import Path import ephem import numpy as np import matplotlib.pyplot as plt from tabulate import tabulate d...
#!/usr/bin/env python import argparse import os import subprocess import sys import pandas as pd import logging import logging.handlers import csv, json import shutil import time import errno import pathlib import warnings import glob import base64 import gzip import datetime #******************************************...
import json import logging import types from . import collection as COL from . import consts as CONST from . import graph as GR from .document import Document from .graph import Graph from .query import AQLQuery from .theExceptions import CreationError, UpdateError, AQLQueryError, TransactionError, AQLFetchError __a...
import sys import os import os.path import time import numpy as np from math import radians, pi, cos, sin, asin, sqrt, atan2, tan, atan, exp, log from scipy.cluster.hierarchy import linkage, fcluster import csv from statistics import mean ''' ------------------------------------------ This file contains Python (v2.7) ...
""" Contains the protocols, commands, and client factory needed for the Server and Portal to communicate with each other, letting Portal work as a proxy. Both sides use this same protocol. The separation works like this: Portal - (AMP client) handles protocols. It contains a list of connected sessions in a d...
import enum import time import types import typing import h2.config import h2.connection import h2.events import h2.exceptions import h2.settings from .._exceptions import ( ConnectionNotAvailable, LocalProtocolError, RemoteProtocolError, ) from .._models import Origin, Request, Response from .._synchroni...
#This source code is licensed under the MIT license found in the #MIT-LICENSE file in the root directory of this source tree. import sys import os import csv import math import numpy as np import matplotlib from matplotlib import colors import matplotlib.pyplot as plt import random #count the slices of a processed cif ...
import torch import torch.utils from torch.utils.data import Dataset, IterableDataset, DataLoader from dataclasses import dataclass import glob import os.path import pig.preprocess import moviepy.editor as m import pytorch_lightning as pl import logging import pig.util import json import pickle from typing import Un...
# encoding: utf-8 import logging import random from datetime import date import voting import waffle from actstream import Follow, Action, action from django.conf import settings from django.contrib.comments.models import Comment from django.contrib.contenttypes.models import ContentType from django.core.cache import ...
"""Generate and submit a job using a set of input parameters.""" import json, glob, os, shutil import numpy as np import subprocess import sys from . import geometry, tabu, design TURBIGEN_ROOT = os.path.join("/".join(__file__.split("/")[:-1]), "..") TS_SLURM_TEMPLATE = os.path.join(TURBIGEN_ROOT, "submit.sh") TABU_S...
import datetime import itertools import multiprocessing import pickle import random from collections import defaultdict from dataclasses import dataclass from enum import Enum from multiprocessing.context import Process from pathlib import Path from typing import List, Dict, Tuple, Callable import numpy as np from ex...
# Copyright 2020 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
# coding=utf-8 # Copyright 2022 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 sys import xlwt from datetime import datetime import numpy as np from PyQt5.QtWidgets import QApplication, QMainWindow, QMenu, QVBoxLayout, QSizePolicy, QMessageBox, QWidget, \ QPushButton, QFileDialog, QTextEdit, QAction, QGridLayout from matplotlib.figure import Figure import matplotlib matplotlib....
import os import json import numpy as np from numpy import inf from scipy import signal from scipy.io import loadmat, savemat import torch from torch.utils.data import Dataset import logging # import neurokit2 as nk from iterstrat.ml_stratifiers import MultilabelStratifiedShuffleSplit import matplotlib.pyplot as plt #...
# coding=utf-8 """ Core classes used across modules. """ from __future__ import absolute_import, division import logging import math from collections import namedtuple, OrderedDict import numpy import os from affine import Affine from osgeo import osr from pathlib import Path from rasterio.coords import BoundingBox ...
import ast import json import os import pathlib import re import shutil import textwrap from contextlib import contextmanager from importlib import import_module from os import environ as env from os.path import join from tempfile import TemporaryDirectory from typing import Any, Dict, Iterator, List, Optional, Set, Tu...
""" Markov switching autoregression models Author: <NAME> License: BSD-3 """ import numpy as np import statsmodels.base.wrapper as wrap from statsmodels.tsa.tsatools import lagmat from statsmodels.tsa.regime_switching import ( markov_switching, markov_regression) from statsmodels.tsa.statespace.tools import ( ...
# -*- coding: utf-8 -*- """ 为了适应中国雷达在不同仰角的探测距离不同以及前几层仰角 dop和ref分开扫描的问题 提出PRD Object,以方便后续的算法及绘图 """ import numpy as np import xarray as xr import pyproj from ..configure.default_config import DEFAULT_METADATA, CINRAD_field_mapping from ..core.transforms import cartesian_to_geographic_aeqd,\ antenna_vectors_to_cart...
#!/usr/bin/env python # Copyright 2016 Check Point Software Technologies 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 # # ...
import torch import torch.nn.functional as F import argparse import cv2 import numpy as np from glob import glob import matplotlib.pyplot as plt from collections import OrderedDict import os from copy import copy # embedding vector Z_dim = 128 # L1 reconstruction loss balance reconstruction_loss_lambda = 1. # to avo...
from dataclasses import dataclass from typing import Hashable, Optional, Sequence, Union import dask.array as da import numpy as np from dask.array import Array, stats from xarray import Dataset, concat from .. import variables from ..typing import ArrayLike from ..utils import conditional_merge_datasets, create_data...
#!/usr/bin/env python """ Copyright (c) 2014 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publi...
# ====================================================================================================================== # boostIV MC: Multivariate non-linear design # ====================================================================================================================== import pandas as pd import num...
#!/usr/bin/env python from generator.actions import Actions import random import string from struct import pack class DateTime(): #borrowed from divelogger def __init__ (self, year=0, month=0, day=0, hour=0, min=0, sec=0): self.year = year self.month = month self.day = day self.ho...
# @lint-ignore-every LICENSELINT # Adapted from https://github.com/lioryariv/idr # Copyright (c) 2020 <NAME> from typing import Any, Callable, Tuple import torch import torch.nn as nn from pytorch3d.implicitron.tools.config import Configurable class RayTracing(Configurable, nn.Module): """ Finds the interse...
import numpy as np from netCDF4 import Dataset from datetime import datetime from datetime import timedelta import os import sys import matplotlib.pyplot as plt from matplotlib import gridspec import matplotlib.colors as mcolors import matplotlib.patches as patches from tools_LT import read_evar_only quick = True q...
# -*- coding: utf-8 -*- """Beautifultools module. Beautifultools is a module containing all the functions related to a scraping project carried out within Siemens Italy Digital Industries. The module contains several functions aiming at implementing the pipeline pinned down by Kelly et al. paper "Predicting Returns...
""" pgxnclient -- commands package This module contains base classes and functions to implement and deal with commands. Concrete commands implementations are available in other package modules. """ # Copyright (C) 2011-2020 <NAME> # This file is part of the PGXN client import os import sys import shlex import loggi...
""" torch.distributed.deprecated provides an MPI-like interface for exchanging tensor data across multi-machine networks. It supports a few different backends and initialization methods. """ import torch import atexit import warnings from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors class dist...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Functions to calculate frequency spectra.""" from __future__ import (absolute_import, division, print_function) from .base import hen_root, common_name, _empty, _assign_value_if_none from .io import sort_files, get_file_type, lo...
""" ..module:: process_new_RFI_files.py :synopsis: From the beginning of the RFI processing to the end, this script seeks out the unprocessed sdfits RFI files, determines which ones are new or old, gleans the necessary information to process this file in GBTIDL, processes it in GBTIDL, and uploads that informa...
# -*- coding: utf-8 -*- '''This module contains classes for different types of network layers.''' from __future__ import division import numpy as np import theano import theano.sparse as SS import theano.tensor as TT from .. import activations from .. import util __all__ = [ 'Concatenate', 'Input', 'Fl...
import sys sys.path.append('../') import os import numpy as np from keras.callbacks import ModelCheckpoint, TensorBoard, EarlyStopping, CSVLogger from dataset_specific.kits import DataGenerator as train_gen from dataset_specific.kits import weighted_model from utility.parallel_gpu_checkpoint import ModelCheckpointP...
"""Visualization helpers.""" from contextlib import contextmanager import copy import os.path as op import numpy as np from scipy import linalg from mne import read_proj, read_events, pick_types from mne.utils import verbose from mne.viz.utils import tight_layout, plt_show from ._sss import compute_good_coils from ...
# Licensed under Apache License Version 2.0 - see LICENSE """ API: Additional recipes ----------------------- """ # Built-ins from collections import OrderedDict from itertools import chain, islice, repeat, product, combinations from operator import itemgetter # This module from iteration_utilities import nth, uniqu...
import numpy as np import os import multiprocessing as mp import util import os import re import tqdm import time from functools import partial import tensorflow as tf from tensorflow import flags FLAGS = flags.FLAGS if __name__ == "__main__": flags.DEFINE_integer("sample_rate", 16000, "The rate at which the so...
from __future__ import print_function, absolute_import, division import re import sys import os import traceback import unittest import threading import subprocess from time import sleep from . import six from gevent._config import validate_bool from gevent._compat import perf_counter from gevent.monkey import get_ori...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat June 6, 2020 @author: <NAME> """ import bpy from math import radians class Polyhedron: """ Designed to be subclassed, not used directly """ def scale(self, scalefactor): if hasattr(self, "volume"): self.volume ...
""" This script is dedicated to testing the window matrix for cutsky mocks, in the flat sky approximation. First generate Gaussian mocks:: (mpiexec -np 4) python mock_window_fft_global_los.py --todo mock --irun 0 20 # start - end of mock ids Then compute window matrix:: # you can split in as many parts as yo...
# Copyright 2020 The PyMC 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
# SPDX-License-Identifier: Apache-2.0 """ tf2onnx.tfjs_utils - utilities for parsing tfjs files into onnx graphs Main functions of interest are graphs_from_tfjs and read_tfjs_graph """ import json import os import base64 import gzip import struct import logging from onnx import numpy_helper, helper import numpy as...
import matplotlib.pyplot as plt from tkinter import * import os import random from mpl_toolkits.mplot3d import Axes3D import numpy as np def read(): filename=e[0].get() f=open(filename,'r') data=f.readlines() random.shuffle(data) data=[list(map(float,line.split())) for line in data] dimens...
from __future__ import print_function, division import os.path as osp import math import warnings import sys import os import csv import random import mmcv import numpy as np from mmcv.parallel import DataContainer as DC import torch import torch.nn as nn from torch.utils.data import Dataset from torchvis...
# IMPORTS try: import numpy as np except: raise Exception("numpy is not installed.") try: import pandas as pd except: raise Exception("pandas is not installed.") try: import seaborn as sns except: raise Exception("seaborn is not installed.") ...
# -*- coding: utf8 -*- """ Copyright 2014-2016 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicab...
# ------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. # ----------------------------------------------------------------------...
# Copyright (c) 2019 PaddlePaddle 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 appli...
""" (c) 2018 Adobe. All rights reserved. This file is licensed to you 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 t...
from itertools import combinations import itertools from random import * import random import pdb from lifelines.utils import concordance_index from sklearn import preprocessing import functools import random import time import pandas as pd import torch.multiprocessing as mp import torch.distributed as dist from torch...
import tensorflow as tf import numpy as np from PIL import Image from core.Util import calculate_ious, calculate_ioas from datasets import DataKeys from datasets.util.BoundingBox import get_bbox_from_segmentation_mask_np from functools import partial from skimage.transform import integral_image # TODO: clean this up...
import pygame import random from settings import * pygame.init() pygame.display.set_caption('Greedy Crab') class Main: def __init__(self): self.crab = Crab() self.board = Board() self.menus = Menus() self.manager = Manager() self.jellyfish_1 = Enemy(1) ...
from hashlib import sha256 from hmac import new as hmac from random import randint from re import fullmatch from socket import socket from struct import pack as encode from subprocess import PIPE, STDOUT, Popen from goodix import FLAGS_TRANSPORT_LAYER_SECURITY_DATA, Device from protocol import USBProtocol from tool im...
# -*- coding: utf-8 -*- ''' osm_address_training_data.py ---------------------------- This script generates several training sets from OpenStreetMap addresses, streets, venues and toponyms. Note: the combined size of all the files created by this script exceeds 100GB so if training these models, it is wise to use a s...
# -*- coding: utf-8 -*- from six import iterkeys import os import time from threading import Thread, RLock, Event, current_thread import logging import traceback from abc import ABCMeta, abstractmethod import paho.mqtt.client as mqtt # pip install paho-mqtt import ssl import uuid from utils import path_helpers f...
"""Provides minimum weight arborescences from digraph.""" from pathlib import Path from random import sample from typing import ( Any, Dict, FrozenSet, Iterable, List, Optional, Set, Tuple, Union, ) class Node(str): """Node representation. Attributes: value: str va...
# Copyright (c) 2015 VMware, 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-2.0 # # Unless required b...
import PIL.Image import os from roomEditor import RoomEditor, Object, ObjectHorizontal, ObjectVertical, ObjectWarp class RenderedMap: WALL_UP = 0x01 WALL_DOWN = 0x02 WALL_LEFT = 0x04 WALL_RIGHT = 0x08 def __init__(self, floor_object): self.objects = {} for y in rang...
from django.http import StreamingHttpResponse, HttpResponse, HttpResponseForbidden from django.views.generic.base import View from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.models import User from django.contrib.auth import authenticate, login import davvy from lxml import etree from djan...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for :mod:`orion.algo.evolution_es`.""" import copy import hashlib import numpy as np import pytest from orion.algo.evolution_es import BracketEVES, EvolutionES, compute_budgets from orion.algo.space import Fidelity, Real, Space from orion.testing.algo import Bas...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2020 <NAME> <<EMAIL>> # # Distributed under terms of the GNU-License license. """ """ import numpy as np import uqra import os import itertools from tqdm import tqdm import scipy.stats as stats import math def test_OptD(): """ Te...
import argparse import asyncio import json import logging import math import os import time import wave import cv2 import numpy from aiohttp import web from aiortc import RTCPeerConnection, RTCSessionDescription from aiortc.mediastreams import (AudioFrame, AudioStreamTrack, VideoFrame, ...
from functools import partial from rcon.workers import temp_welcome_standalone, temporary_welcome, temporary_welcome_in from typing import Counter from rcon.settings import SERVER_INFO import time from datetime import datetime, timedelta import logging from threading import Thread import os import redis import re from ...
from __future__ import print_function import numpy as np import cv2 import matplotlib.pyplot as plt # #cv2.namedWindow('image', cv2.WINDOW_NORMAL) # # #Load the Image # imgo = cv2.imread('/home/keyong/Downloads/IMAG2049.jpg') # # height, width = imgo.shape[:2] # # #Create a mask holder # mask = np.zeros(imgo.shape[:2],...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ dshelper is a GUI for visualization of pandas dataframes. In addition, it provides some functionalities in helping with some exploratory analysis and examination of raw data Copyright (c) 2018 - 2019, Minchang (<NAME>. License: MIT (see LICENSE for details) """ impo...
#!/usr/bin/env python """ Script to launch spot instances in Amazon's EC2 as specified by a json launch specification file. Default behavior is to only submit a launch request to AWS and return immediately. See --wait and --fullwait for other levels of spot request fulfillment confirmation from AWS. Use -h to see oth...
import keras.backend as K from keras.engine.topology import InputSpec from keras.engine.topology import Layer from keras.layers.merge import _Merge from keras import activations import tensorflow as tf import numpy as np #---------------------------------------------------------------------------- # Resize ...
# author jmategk0 # Goals: # 1. Produce an intermediate level python library with more features than the built-in stats module in # python 3.4+ but with a simplified interface and syntax compared with more robust libraries like pandas. # 2. The code will by compatible with python 2.7 and python 3.5 # 3. Library has no ...
"""Module for analyzing images, either film or EPID, for flatness and symmetry.""" import io import os.path as osp from typing import Tuple, Union import matplotlib.pyplot as plt import numpy as np from pylinac.core.utilities import open_path from .core.exceptions import NotAnalyzed from .core.io import retrieve_demo...
from django.db import models from django.contrib.auth.models import User import random import string import plistlib from xml.parsers.expat import ExpatError import base64 import bz2 from datetime import datetime from watson import search as watson from dateutil.parser import * def GenerateKey(): key = ''.join(ran...
"""Convert output of the RetroPath2.0 workflow. Copyright (C) 2016-2017 <NAME>, JL Faulon's research group, INRA Use of this source code is governed by the MIT license that can be found in the LICENSE.txt file. """ from __future__ import annotations import sys import csv import json import urllib import logging i...