text
stringlengths
8.04k
46.5k
# Copyright 2015 Google 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 by applicable law or ag...
import os import logging import traceback import warnings import pandas as pd import numpy as np from pandas.core.common import SettingWithCopyWarning from common.base_parser import BaseParser from common.constants import * from common.database import get_database warnings.simplefilter(action="ignore", category=Sett...
import itertools import logging from collections import defaultdict from z3 import z3 import teether.util.utils from teether.cfg import opcodes from teether.constraints import check_model_and_resolve, model_to_calls from teether.evm.evm import Context, run from teether.evm.exceptions import IntractablePath from teeth...
# -*- coding: utf-8 -*- """ Created on Fri 2015-03-20 @author: <NAME> """ import unittest, sys import inspect, os import sympy as sp import symbtools as st import symbtools.noncommutativetools as nct import pickle from ipydex import IPS if 'all' in sys.argv: FLAG_all = True else: FLAG_all = False # s, ...
# -------------------------------------------------------- # SiamMask # Licensed under The MIT License # Written by <NAME> (wangqiang2015 at ia.ac.cn) # -------------------------------------------------------- from __future__ import absolute_import from __future__ import division from __future__ import print_function f...
# -*- coding: utf-8 -*- """ Copyright (c) 2019 <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, ...
"""Everthing ThreatHunter process related. """ import datetime import logging from io import StringIO from contextlib import redirect_stdout from typing import Dict, Union, List from cbinterface.psc.query import yield_events from cbapi.psc.threathunter import CbThreatHunterAPI, Process, Event from cbapi.errors impo...
"""Functions for creating 3D geometric representations of trees.""" import json import subprocess import numpy as np import pandas as pd import geopandas as gpd import rasterio import pdal from shapely.geometry import Point, Polygon def arrays_equal_shape(*args, raise_exc=True): """Confirms all inputs, when conv...
#!/usr/bin/env python # coding: utf-8 """ Primary analysis of statistical maps """ import numpy import argparse import pandas import nibabel import os import json import glob import nilearn.image import nilearn.input_data import nilearn.plotting import sklearn import sys import inspect import matplotlib.pyplot as plt...
import json from flare.utils.element_coder import NumpyEncoder, element_to_Z, Z_to_element import os, logging, warnings import numpy as np import multiprocessing as mp from copy import deepcopy from math import ceil, floor from scipy.linalg import solve_triangular from typing import List from flare.env import Atomic...
# -*- coding: utf-8 -*- """StatsBomb event stream data to SPADL converter.""" import os from typing import Any, Dict, List, Tuple import pandas as pd # type: ignore import pandera as pa from pandera.typing import DataFrame, DateTime, Series from . import config as spadlconfig from .base import ( CompetitionSchem...
# # Copyright (c) 2019 ISP RAS (http://www.ispras.ru) # Ivannikov Institute for System Programming of the Russian Academy of Sciences # # 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 # # h...
from abc import ABC from collections import Counter from dataclasses import dataclass from functools import lru_cache from collections import deque import numpy as np import random as rnd import networkx as nx from enum import Enum, auto class Cell(ABC): def __init__(self, x, y): self.x = x self.y ...
from .music_makers import make_music from .music_makers import make_music_heterophonic from .music_makers import make_music_plot from .music_makers import make_music_heterophonic_plot from .listen import ppitch from .musifuncs import hz_to_midi from functools import reduce import random import numpy as np import matpl...
# # Generate ground truth data from ground truth blender file # # For instance, open the project # # ground-truth-pavillion/3d/full/pavillon_barcelone_v1.2-cam-baked-007.blend # # Then select the desired animated camera and set as active camera # # Then run this script. It will play frame by frame and export the 3x4 ca...
#!/usr/bin/env python3 import os import sys sys.path.append( '..' ) import MotifTable import pickle import distributions import GenomeBindingTable as gbt import FragExtract as Frag import ChipSeq import PCR import numpy as np import pandas as pd import scipy import matplotlib.pyplot as plt cbcolors = {'sky blue': (8...
import numpy as np import monai import porchio from porchio import Queue from torchvision import datasets, transforms, models from torch.utils.data import DataLoader, Dataset from PIL import Image import pandas as pd import os import argparse import torchvision import torch import torch.nn as nn import torch.nn.functio...
import asyncio import json import os import pytest import shakedown import shlex import time import uuid import sys import retrying from datetime import timedelta from dcos import http, mesos from dcos.errors import DCOSException, DCOSHTTPException from distutils.version import LooseVersion from json.decoder import JS...
import os import json from collections import OrderedDict import ctaplot import numpy as np import matplotlib.pyplot as plt from matplotlib.lines import Line2D import pandas as pd from ipywidgets import HBox, Tab, Output from sklearn.metrics import roc_curve, roc_auc_score def load_data(experiment, experiments_direc...
#!/usr/bin/python #-*- coding: utf-8 -*- from .Language import Language from .Timestamp import Timestamp from .Metadata import Metadata from .Bits import Bits from texas.view.AnnotationViewSet import AnnotationViewSet from texas.view.Tokens import Tokens from texas.view.TokenView import TokenView from texas.view.SpanV...
# -*- coding: utf8 -*- import re import sys import math import itertools import collections import copy import heapq import random import numpy as np import pandas as pd import scipy.sparse import sklearn.cluster import kite.canonicalization.utils as utils WILDCARD_SYMBOL = '*' BLANK_SYMBOL = ' ' # a unicode char...
# partially copied from tensorflow example project from __future__ import absolute_import import argparse import json import logging import os import shutil import subprocess import time import uuid import random from multiprocessing import Pool import tensorflow as tf # pylint: disable=E0611 from tensorflow.python....
from __future__ import absolute_import, unicode_literals import time import pytest from datetime import datetime, timedelta from itertools import count from django.contrib.admin.sites import AdminSite from django.contrib.messages.storage.fallback import FallbackStorage from django.test import RequestFactory from ce...
# sslutil.py - SSL handling for mercurial # # Copyright 2005, 2006, 2007, 2008 <NAME> <<EMAIL>> # Copyright 2006, 2007 <NAME> <<EMAIL>> # Copyright 2006 <NAME> <<EMAIL>> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __futur...
""" Automorphisms of Quadratic Forms """ from sage.interfaces.gp import gp from sage.libs.pari.all import pari from sage.matrix.constructor import Matrix from sage.rings.integer_ring import ZZ from sage.misc.mrange import mrange from sage.misc.all import cython_lambda from sage.modules.all import FreeModule from sage....
def sqrt(n): ans = n ** 0.5 return ans def factorial(n): k = 1 for i in range(1, n+1): k = i * k return k def degrees(x): pi = 3.14159265359 y=x/pi*180.0 return y def radians(x): pi = 3.14159265359 y=x/180.0*pi return y def sin(x): pi = 3.14159265359 #n ...
# ----------------------------------------------------------------------------------------------------- # CONDOR # Simulator for diffractive single-particle imaging experiments with X-ray lasers # http://xfel.icm.uu.se/condor/ # -------------------------------------------------------------------------------------------...
from . import ast, util import rply NAME_LIKE = { 'and', 'as', 'break', 'class', 'continue', 'def', 'elif', 'else', 'except', 'for', 'from', 'if', 'import', 'in', 'is', 'not', 'or', 'pass', 'raise', 'return', 'trait', 'try', 'while', 'yield', } def lexer(): lg = rply.LexerGenerator() lg.add('ARROW', '->') lg.ad...
#!/usr/bin/env python import pygame, sys import datetime import numpy as np #Versuch email: import imaplib import email username = '<EMAIL>' password = '<PASSWORD>' #mail = imaplib.IMAP4_SSL("imap.gmail.com") #mail.login(username,password) #mail.select("inbox") #result, data = mail.uid('search',None, "ALL") #...
# Copyright 2014-2015 Canonical Limited. # # This file is part of jujubigdata. # # jujubigdata is free software: you can redistribute it and/or modify # it under the terms of the Apache License version 2.0. # # jujubigdata is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the i...
# Auxialary functions # # <NAME>, 2020 # <EMAIL> import math import torch import numpy as np import matplotlib.pyplot as plt import sklearn import copy from tqdm import tqdm from sklearn import metrics from scipy import stats import scipy.special as special import icenet.tools.prints as prints import numba def sp...
# lots of thoughts needed. """ ------------------------------------------------------------------------- --------- comments ------------- // is a single line comment. # is also a single line comment. Where comments can appear: 1. Inside a block: on an independent line that does not contain scalar data 2. Insi...
from __future__ import print_function import sys, re # from yapps import runtime import yapps_runtime as runtime # give distinctive values to some useful keywords mc_inflection, mc_derivation = range(2) prefix, core, infix, suffix, pattern = range(5) left, right = range(2) # Begin -- grammar generated by Yapps clas...
# %% [markdown] # ## The goal of this notebook: # investigate regularization approaches, for now, just on the full graph # these include # - truncate high degree # - truncate low degree # - plus c # - levina paper on row normalization # - others? # %% [markdown] # ## import os import time import wa...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ sbpy Activity: Dust =================== All things dust coma related. """ __all__ = [ 'phase_HalleyMarcus', 'Afrho', 'Efrho' ] from warnings import warn import abc import numpy as np import astropy.units as u from .. import bib from...
""" Course API Views """ from completion.exceptions import UnavailableCompletionData from completion.utilities import get_key_to_last_completed_block from django.conf import settings from django.urls import reverse from django.utils.translation import ugettext as _ from edx_rest_framework_extensions.auth.jwt.authentic...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Aug 11 13:58:05 2019 Methodology: 0) run code with --prep drdump on all rinex files 1) run code with either --prep edit24hr or --prep edit30hr on all datarecords files 2) run code with --gd2e 30hr or --gd2e 24hr for either solve ppp on 24...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # --------------------------------------------------------------------------- # ___ __ __ __ ___ # / | \ | \ | \ / Automatic # \__ |__/ |__/ |___| \__ Annotation # \ | | |...
import pathlib import pickle import time from collections import defaultdict import torch import numpy as np from skimage import io as imgio from libs.ops import box_np_ops from libs import preprocess as prep from libs.geometry import points_in_convex_polygon_3d_jit from libs.ops.point_cloud.bev_ops import points_to_...
import logging logging.debug("loading pyami.py") import sys import os import re import glob import lxml.etree as etree import pprint import ast from collections import Counter import traceback from pathlib import Path #from cmd_runner import CommandRunner from dict_lib import AmiDictionary from file_lib import FileLib...
from .comment_bridge import CommentBridge from PIL import Image, ImageDraw, ImageFont from matplotlib.pyplot import imshow import numpy as np import cv2 from typing import List, Dict import random import os import shutil import random as r from pydub import AudioSegment import moviepy.editor as mpe from enum import Int...
import traceback from chatterbot import ChatBot from chatterbot.trainers import ListTrainer import requests import wikipedia import pyttsx3 from selenium import webdriver from rihanna_bot import rihanna_football, rihanna_speak, rihanna_tweet, rihanna_news, rihanna_skype, rihanna_one_char, \ rihanna_time, rihanna_m...
from . import persistent_dict from . import task_manager # Must be included before hachoir so stdout override works. from . import thread_pool from . import thread_safe_print import six import collections import datetime import glob import re import fnmatch if six.PY2: from hachoir_metadata import extractMetadata ...
import random from dataclasses import dataclass from typing import Any, Callable, cast, List, Sequence, TypeVar, Union T = TypeVar('T') c_str = Callable[[], str] S = Union[str, c_str] def is_function(x: Any) -> bool: return hasattr(x, '__call__') def random_element(*itens: T) -> T: return random.sample(itens...
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by <NAME> and contributors. :license: BSD, see LICENSE for mo...
"""Functions for GUI layout building. These functions build the layout of the GUI. It controls what elements are available and where they are placed in the GUI. Styling controls the overall look and feel of the elements within this space. AUTHOR: <NAME>, ANL, Fall 2019. """ import os from sys import platform from ty...
''' dash_wrapper This module provides a DjangoDash class that can be used to expose a Plotly Dasb application through a Django server Copyright (c) 2018 <NAME> and others - see CONTRIBUTIONS.md Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation ...
import datetime import enum import itertools from bisect import bisect_left from bisect import bisect_right from copy import deepcopy from typing import Any, Dict, Generator, List, Optional, Sequence, Tuple, Union import pandas as pd from betfairlightweight import APIClient from betfairlightweight import StreamListene...
import bottleneck as bn import numpy as np from photutils import (DAOStarFinder, aperture_photometry, CircularAperture, CircularAnnulus, centroid_sources, extract_stars) from astropy.coordinates import SkyCoord, EarthLocation from astropy.table import vstack from astropy import units as u from a...
""" Reads shapefiles, feature classes, table into a spatial dataframe """ from __future__ import print_function from __future__ import division import os import six import copy import logging import tempfile from warnings import warn import numpy as np import pandas as pd from six import iteritems, integer_types from d...
#!/usr/bin/env python # coding=utf-8 # Copyright [2019] [Apache Software Foundation] # # 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 # # Unl...
from __future__ import print_function import argparse import json import os import string import sys import cv2 import numpy as np import scipy import skvideo from keras_preprocessing.image import load_img, img_to_array from tqdm import tqdm from moviepy.editor import VideoFileClip from keras.models import Model # f...
# Copyright 2018 Novo Nordisk Foundation Center for Biosustainability, DTU. # # 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 requir...
# -*- coding: UTF-8 -*- import datetime import re import simplejson as json from threading import Thread from collections import OrderedDict from django.db import connection, transaction from django.utils import timezone from django.conf import settings from django.shortcuts import render, get_object_or_404 from djang...
""" Functions for p17d-sulphur-eas-eqm/analysis_draft2018a/. Warning: The complete functionality of these functions has not been extensively tested. They have only been tested for the specific purposes used in the draft2018a analysis. Dependencies: - climapy (https://github.com/grandey/climapy, https://do...
""" This module provides a class enabling tabular compilations from the PUDL DB. Many of our potential users are comfortable using spreadsheets, not databases, so we are creating a collection of tabular outputs that contain the most useful core information from the PUDL data packages, including additional keys and hum...
# -*- coding: utf-8 -*- # Copyright (c) 2020 <NAME> # Copyright (c) 2020 Phryk # Copyright (c) 2001 <NAME> # This file is licensed under # The Python Software Foundation License Version 2 # https://github.com/python/cpython/blob/2.7/LICENSE """ pydocmk preprocessor """ import __builtin__ import os import re import sys...
#!/usr/bin/env python # coding: utf-8 # # Non-correspondences # In[1]: import os import sys module_path = os.path.abspath(os.path.join('..')) if module_path not in sys.path: sys.path.append(module_path) print(module_path) # get_ipython().run_line_magic('matplotlib', 'inline') # from IPython.core.display import ...
# Copyright 2021 The Commplax 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...
# pylint: disable=R0201 import os import numpy as np import pytest from PartSegImage import Image, ImageWriter, TiffImageReader from PartSegImage.image import FRAME_THICKNESS class TestImageBase: image_class = Image def needed_shape(self, shape, axes: str, drop: str): new_axes = self.image_class.ax...
from sklearn.svm import SVR from sklearn.linear_model import LinearRegression import os import random import sys import csv import numpy as np import pandas as pd import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import TensorDataset, DataLoader, RandomSampler, SequentialSampler f...
import torch from quiver.shard_tensor import ShardTensor, ShardTensorConfig, Topo from quiver.utils import reindex_feature, CSRTopo from typing import List import numpy as np from torch._C import device __all__ = ["Feature", "DistFeature", "PartitionInfo", "DeviceConfig"] class DeviceConfig: def __init__(self, g...
from functools import reduce from random import choice try: import binutil # required to import from dreamcoder modules except ModuleNotFoundError: import bin.binutil # alt import if called as module from dreamcoder.utilities import parseSExpression as parse from dreamcoder.program import Abstraction, Index, ...
import torch import torch.nn as nn import torch.nn.functional as functional import numpy as np class STLoss(nn.Module): def __init__(self, ignore_index=-1, num_class=19, deque_capacity_factor=2.0, feat_channel=2048, device='cuda'): super(STLoss, self).__init__() if num_class == 19: # GTA5 ...
# parse chem ontology import urllib.request import zipfile from io import BytesIO import re from pathlib import Path import numpy as np import math import pkg_resources import json from glob import glob import collections import pandas import json import gzip FormulaPattern = re.compile(r"([A-Z][a-z]?)(\d*)") class Fo...
# # Copyright (c) 2020, 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 License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# 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/python """ Copyright ©️: 2020 Seniatical / _-*™#7519 License: Apache 2.0 A permissive license whose main conditions require preservation of copyright and license notices. Contributors provide an express grant of patent rights. Licensed works, modifications, and larger works may be distributed un...
import re from datetime import date from applications.enums import ( ApplicationStatus, AttachmentRequirement, AttachmentType, BenefitType, OrganizationType, ) from applications.models import ( Application, ApplicationBasis, ApplicationLogEntry, Attachment, DeMinimisAid, Emp...
"""Minimal Learning Machine classes for regression and classification.""" import numpy as np from scipy import fftpack from scipy.spatial.distance import cdist from scipy.optimize import least_squares # from fcmeans import FCM from sklearn_extensions.fuzzy_kmeans import FuzzyKMeans as FCM from mrsr import MRSR from .u...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import _init_paths import os import sys import numpy as np import argparse import pprint import pdb import time import pickle import torch from torch.autograd import Variable import torch.nn as nn import torch...
import matplotlib.pylab as plt import matplotlib import numpy as np import functools from ephysiopy.common.binning import RateMap from ephysiopy.common.spikecalcs import SpikeCalcsGeneric from ephysiopy.dacq2py import tintcolours as tcols from mpl_toolkits.axes_grid1 import make_axes_locatable import matplotlib.transfo...
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Some code is from https://github.com/princeton-vl/pose-ae-train/blob/454d4ba113bbb9775d4dc259ef5e6c07c2ceed54/utils/group.py # Written by <NAME> (<EMAIL>) # Modified by <NAME> (...
import collections, random, sys, traceback from dbsim import * class UncommittedClobber(AbortTransaction): '''WW conflict with uncommitted write''' pass class InvisibleClobber(AbortTransaction): '''WW conflict with committed-but-invisible write''' pass class WaitDepth(AbortTransaction): '''Blocki...
################################################################################ # _ ____ ___ # # / \ / ___|_ _| # # / _ \| | | | ...
""" Yolov3 code adapted from https://github.com/ultralytics/yolov3 """ from typing import Union import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from super_gradients.training.models import SgModule from super_gradients.training.models.detection_models.darknet53 import Darknet53, D...
# Apache License Version 2.0 # Copyright 2022 <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...
from pyviability import libviability as lv import heapq as hq import functools as ft import matplotlib.pyplot as plt import mpl_toolkits.mplot3d as plt3d import matplotlib.ticker as ticker from matplotlib import animation import numpy as np import operator as op import pickle import signal import sys import warning...
import os, sys import collections import pprint import pandas as pd import pysam class Call: def __init__(self, call, quality = None, is_error = False): self.call = call self.quality = quality self.is_error = is_error self.is_indel = len(call) > 1 def get_call_for_pileup_read(pile...
# -*- coding: utf-8 -*- import re import settings import pluginKodi import pluginEcho import pluginMail import pluginUpdate import pluginJokes import gpio import pluginBrowser import pluginSystem def checkMatch(match): global matchCounter if match: if matchCounter == 0: gpio.setLe...
import collections import sys from abc import ABCMeta from typing import * import functools import types import operator __all__ = ['TypedDict', 'Final', 'Literal'] GenericAlias = List[int] class _Final: """Mixin to prohibit subclassing""" __slots__ = ('__weakref__',) def __init_...
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- from __future__ import print_function, division import sys if( sys.version_info[0] == 2 ): range = xrange import re try: import cStringIO as io except: import io try: import cPickle as pickle except: import pickle import qm3.mol import qm3.e...
try: import bpy import bmesh import numpy as np import time except ImportError: pass big_t = 0.0 def rt_(num=None): global big_t t = time.time() if num is not None: print(t - big_t, "timer", num) big_t = t def deselect(ob, sel=None, type='vert'): """Deselect all...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ sfftkplus.formats.roi Copyright 2017 EMBL - European Bioinformatics Institute 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.o...
import logging import os import numpy as np import argparse import warnings import yaml from os.path import join as pjoin import sys sys.path.append(sys.path[0] + "/..") import pandas as pd import torch from tensorboardX import SummaryWriter from agent import RLAgent from helpers.generic import SlidingAverage, to_np f...
import queue from dataclasses import dataclass from typing import Any, Callable, List, Optional, Tuple, Union import numpy as np import tokenizers import torch from torch import nn from torch.nn.utils import rnn from whitespace_repair.utils import common, constants logger = common.get_logger("INFERENCE") @datacl...
# ***** BEGIN GPL LICENSE BLOCK ***** # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distribute...
import numpy as np import pandas as pd import matplotlib.cm as cm import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import seaborn as sns from scipy import stats import warnings import os from itertools import combinations import multiprocessing from multiprocessing import Pool from ...
import os, sys import traceback from collections import OrderedDict, deque import json import random import argparse import time import vlc from iheart import ( __version__, vlc_is_installed, iHeart, Track, Station, LiveStation, SongStation, ArtistStation, ) from iheart.colors import Colors try: from msvcrt...
import sys import time from orangecontrib.shadow.als.widgets.gui.shadow4_ow_electron_beam import OWElectronBeam from orangecontrib.shadow.als.widgets.gui.shadow4_plots import plot_data1D from oasys.widgets import gui as oasysgui from orangewidget import gui as orangegui from orangewidget.settings import Setting # fr...
import datetime import integrationutils as ius import matplotlib.pyplot as plt import numpy as np import os import pathlib import pandas as pd import seaborn as sns sns.set() import sqlite3 import sys import warnings """ Direct questions and concerns regarding this script to <NAME> <EMAIL> """ ...
"""Tests to ensure that the lxml tree builder generates good trees.""" import re from bs4 import BeautifulSoup from bs4.builder import LXMLTreeBuilder, LXMLTreeBuilderForXML from bs4.element import Comment, Doctype, SoupStrainer from bs4.testing import SoupTest class TestLXMLBuilder(SoupTest): """A smoke test f...
""" flex imzML & mis file reader class @author: <NAME> / MR Cancer / MH / ISB / NTNU Trondheim Norway <EMAIL> """ from dataclasses import dataclass, field from pyimzml.ImzMLParser import ImzMLParser import xml.etree.ElementTree as ET import re import cv2 import os from matplotlib import pyplot as plt import numpy as n...
import json import logging from typing import List from typing import Optional from requests import request from .exception import IssuerNotFound from .jwe.jwe import alg2keytype as jwe_alg2keytype from .jws.utils import alg2keytype as jws_alg2keytype from .key_bundle import KeyBundle from .key_issuer import KeyIssue...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
import re import typing import warnings from collections.abc import Iterable from contextlib import suppress from itertools import zip_longest import numpy as np Spacing = typing.Tuple[typing.Union[float, int], ...] _DEF = object() FRAME_THICKNESS = 2 DEFAULT_SCALE_FACTOR = 10 ** 9 def minimal_dtype(val: int): ...
# -*- coding: utf-8 -*- from stereosim.compute_coordinates import compute_coordinates from stereosim.camera_orientation import CAHVmodel import numpy as np from planetaryimage import PDS3Image from PIL import Image import exifread import argparse import os.path import six import yaml import pvl import io class PDSGen...
from config import token, players, MEUJEU, MEUJEU_ID,HEX_SIZE from toolbox import * from timeline import * from player import * import discord import numpy as np import random import json import pprint from time import sleep from PIL import Image, ImageDraw import os file_name = "cards.json" players_json = "players....
import numpy as np from scipy.optimize import minimize_scalar, minimize from scipy.stats import norm, multivariate_normal def sample_data(): dt = 1/12 maturity = np.array([1,3,5,10,20]) data = np.array([ [0.01995,0.02039,0.02158,0.02415,0.02603], [0.01981,0.02024,0.02116,0.02346,0.02518], ...
import numpy as np import os import glob import healpy as hp from rubin_sim.photUtils import Sed, Bandpass from .twilightFunc import twilightFunc from scipy.interpolate import InterpolatedUnivariateSpline, interp1d from rubin_sim.data import get_data_dir # Make backwards compatible with healpy if hasattr(hp, 'get_inte...