text
stringlengths
6.04k
39.5k
""" Get the all Xrefs on all disease items in Wikidata Using an owl file (from DO), get all xrefs Figure out what the differences are Generate a ROBOT file to implement all changes """ import os from collections import defaultdict, Counter from functools import reduce import requests from itertools import chain import...
import os import re import nltk import logging import textstat import argparse import mongoengine import numpy as np import multiprocessing as mp from typing import Union from collections import Counter from dateutil.parser import parse as parse_date from gfibot import CONFIG from gfibot.collections import * from mong...
import gc import os import sys import utime from uhttp_signature.authed_urequests import make_validated_request, RequestError, SignatureException from pozetron_config import * from credentials import KEY_ID, HMAC_SECRET from logger import log, exc_logline if isinstance(KEY_ID, bytes): KEY_ID = KEY_ID.decode('utf...
import logging import os import pickle import uuid from collections import namedtuple from glob import glob from typing import Tuple import jsonpickle import numpy as np import python_on_whales import requests import time from PIL import Image from emissor.representation.annotation import AnnotationType from emissor.r...
import numpy as np import pandas as pd import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import glob from keras.callbacks import Callback import cv2 import keras.backend as K import tensorflow as tf from spnet import models, diagnostics from spnet.config import * from spnet.utils import * from spn...
#!/usr/bin/env python # -*- coding: utf-8 -*- import importlib import json import logging import os import subprocess # nosec B404 import sys import types from configparser import ConfigParser from enum import Enum from inspect import isclass, isfunction from typing import TYPE_CHECKING from celery.app import Celery ...
#!/usr/bin/env python # _*_coding:utf-8_*_ from sqlalchemy import * from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship from handlers.base import engine BaseModel = declarative_base() # 新建表 def init_db(): BaseModel.metadata.create_all(engine) # 删除表 def drop_db(): ...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the ...
#!/usr/bin/env python3.6 # -*- coding: utf-8 -*- from datetime import datetime from collections.abc import Sequence class PyUntisError(Exception): WEBUNTIS_ERRORS = { -7004: "Date out of bounds", -8500: "Invalid school name", -8509: "Access to substitutions denied", -8998: "Worthless error message", -32...
import time import os from typing import Optional, Union, Tuple, List, Iterable, Any, Dict from datetime import datetime, timedelta from email.utils import parsedate_to_datetime import structlog from django.contrib.auth.models import AbstractUser from django.contrib.postgres.indexes import BrinIndex from django.db imp...
import sys from qt_widgets import QtWidgets, QtCore, QtGui from qt_widgets import HorizontalEntryBox from qt_widgets import VariableSlidersManager from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg from complex_graph import ComplexAnimator from typing import Union, Tuple, Any class SetGridInputWidget(Qt...
# Copyright (c) 2016, <NAME> # All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the BSD license. See the accompanying LICENSE file # or read the terms at https://opensource.org/licenses/BSD-3-Clause. from __future__ import absolute_import, pri...
import numpy as np import gym import copy import matplotlib.pyplot as plt from matplotlib import animation from collections import defaultdict from dps import cfg from dps.env.basic import game from dps.env.env import BatchGymEnv from dps.utils import Param, square_subplots, create_maze from dps.train import Hook from...
import getpass import os import platform import subprocess import sys import argparse import asyncio import aiohttp import pkg_resources from redbot import MIN_PYTHON_VERSION from redbot.setup import ( basic_setup, load_existing_config, remove_instance, remove_instance_interaction, create_backup, )...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # imports. from ssht00ls.classes.config import * from ssht00ls.classes import utils import os, sys, json, subprocess, pexpect # check default errors.. def check_errors(output): for i in [ "\nrsync: ", "\nrsync error: ", "\nssh: ", "\nssh error: ", "\nsshfs: "...
"""This module defines E2e integration tests for the scheduling algorithm of Krake. Module covers various test scenarios including constraints and metrics. Test constraints, metrics and metrics providers are globally defined as follows: Application cluster label constraints are tested with positive and negative ...
############################################################################## # NATS-Bench: Benchmarking NAS Algorithms for Architecture Topology and Size # ############################################################################## # Copyright (c) <NAME> [GitHub D-X-Y], 2020.07 # #########...
import requests from flask import request, flash from flask import render_template from flask import Flask, url_for, redirect from models import Schema from models import Dishes from models import Day from models import Days from models import Ingredients from models import Tags from models import TaggedDishes from ...
import numpy as np import xml.etree.ElementTree as ET class WindTurbines(): """Set of multiple type wind turbines""" def __init__(self, names, diameters, hub_heights, ct_funcs, power_funcs, power_unit): """Initialize WindTurbines Parameters ---------- names : array_like ...
# Run train.py to train the model import os import time import json import numpy as np import torch import torch.nn as nn from torch.autograd import Variable from torch.utils.data import DataLoader from torchvision.datasets import ImageFolder from torchvision import transforms from torchvision.models.resnet import * ...
from scipy import signal import pandas as pd import numpy as np import datetime import re import feather import os, sys, argparse import plotnine as p9 from matplotlib import gridspec import matplotlib.pyplot as plt # custom cwt function because signal.cwt doesn't work on morlets... def cwt_time(data, frequencies, dt,...
# ---------------------------------------------------------------------- # | # | DockerBuildImpl.py # | # | <NAME> <<EMAIL>> # | 2018-06-02 20:13:29 # | # ---------------------------------------------------------------------- # | # | Copyright <NAME> 2018. # | Distributed under the Boost Soft...
# # Copyright 2021 Nebulon, Inc. # All Rights Reserved. # # DISCLAIMER: THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO # EVENT SHALL THE AUTHORS OR COPYRIG...
# SIPEC # MARKUS MARKS # Behavioral Classification from tqdm import tqdm import pandas as pd import random from datetime import datetime from argparse import ArgumentParser import numpy as np from sklearn import metrics from scipy.stats import pearsonr from sklearn.model_selection import StratifiedKFold from sklearn....
"""JSON Keys core functions. JSON Key definition: An ordered sequence of one or more JSON pointer reference tokens (Object member key or array index) starting with a root-level key/index and ending with a reference to some value within the document. The last key can optionally be Python slice synt...
import http import ipaddress import logging import os import platform import re import threading import time import warnings from http.server import BaseHTTPRequestHandler from typing import Any, Callable, Dict, List, Optional, Union import requests import torch import pytorch_lightning as pl from pytorch_lightning.s...
# -*- coding: utf-8 -*- """ Created on Tue Feb 11 18:07:06 2020 @author: Raj """ import pyUSID as usid import ffta from ffta.pixel import Pixel from ffta.gkpfm.gkpixel import GKPixel from ffta.pixel_utils import badpixels import os import numpy as np from ffta.load import get_utils from sidpy.proc.comp_utils import p...
from __future__ import print_function import numpy as np from dataflow.lib import err1d def extend(a, b): """ Extend *a* to match the number of dimensions of *b*. This adds dimensions to the end of *a* rather than the beginning. It is equivalent to *a[..., None, None]* with the right number of None ...
import numpy as np import logging import time import concurrent.futures from hytra.core.probabilitygenerator import ( IlpProbabilityGenerator, computeDivisionFeaturesOnCloud, computeRegionFeaturesOnCloud, DummyExecutor, ) from hytra.util.progressbar import ProgressBar logger = logging.getLogger(__nam...
# -*- coding: utf-8 -*- import numpy as np import pandas as pd # + import seaborn as sns import matplotlib.pyplot as plt import statsmodels.api as sm # - from abc import ABC, abstractmethod # + ## Declares entities # - class TimeSerie(ABC): def __init__(self, history, freq): assert isinstance(fr...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import types from ..core import Fittable1DModel from ..parameters import Parameter from .. import models from .. import fitting import numpy as ...
# coding: utf-8 """ Defines views for EDD's REST API. Assuming Django REST Framework (DRF) will be adopted in EDD, new and existing views should be ported to this class over time. Several potential REST resources are currently defined in main/views.py, but are not accessible using the same URL scheme. """ import logg...
import sys from os.path import dirname from OpenGL.GLUT import * from OpenGL.GL import * import math from pyoptix.matrix4x4 import Matrix4x4 sys.path.append(dirname(dirname(dirname(__file__)))) import numpy as np from pyoptix import Context, Compiler, Buffer, Program, Geometry, Material, GeometryInstance, EntryPoint...
''' Created on 2020-06-20 @author: wf ''' import yaml import io import json import jsons import os import re from collections import OrderedDict from pyparsing import Keyword,Group,Word,OneOrMore,Optional,ParseResults,Regex,ZeroOrMore,alphas, nums, oneOf # wait for version 3 #from pyparsing.diagram import to_railroad,...
# Copyright 2020 SURF. # 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, ...
from __future__ import annotations import atexit import os import re import time import weakref from datetime import datetime from pathlib import Path from textwrap import dedent from typing import ( TYPE_CHECKING, Any, Dict, List, Optional, Pattern, Tuple, TypeVar, ...
### ============================================================================= ### NOTATIONAL CONVENTIONS: ### Comments starting with single hash - '#' - are "normal" comments ### Comments starting with double hash - '##' - represent name corresponding ### named component in hand-developed GroMEt represent...
""" Based on https://github.com/dsadigh/driving-preferences and https://github.com/Stanford-ILIAD/easy-active-learning/ """ import os from typing import Any, Callable, Dict, List, Optional, Tuple, Union import gym import matplotlib.pyplot as plt import numpy as np import scipy.optimize as opt from gym import spaces fr...
# Copyright 2014 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
'''Choose GitHub or CILogon authentication with the OAUTH_PROVIDER environment variable, which must be one of "github", "cilogon" or "jwt", and defaults to "github". ''' import asyncio import json import os import oauthenticator import random from jupyterhub.handlers import LogoutHandler from jupyterhub.utils import u...
# -*- coding: utf-8 -*- import argparse import errno import itertools import math import matplotlib.pyplot as plt import mlflow import mlflow.sklearn import numpy as np import os import pydot import random import scipy.stats as stats import shutil import sklearn.metrics as metrics import sys from dask.diagnostics impo...
'''Convenience functions for use in package hooks.''' # Copyright (C) 2008 - 2011 Canonical Ltd. # Authors: # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # 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 th...
""" Tests the accuracy of the opt_einsum paths in addition to unit tests for the various path helper functions. """ import itertools import sys import numpy as np import pytest import opt_einsum as oe explicit_path_tests = { 'GEMM1': ([set('abd'), set('ac'), set('bdc')], set(''), { 'a': 1, 'b': ...
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2021 <NAME> (The Compiler) <<EMAIL>> # # This file is part of qutebrowser. # # qutebrowser 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, e...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os import tempfile import yaml import sys from django.core.management.utils import get_random_secret_key from date...
import csv import datetime import io import json import logging import os import sys import time from pathlib import Path import pandas as pd import requests from zoltpy.cdc_io import json_io_dict_from_cdc_csv_file, YYYY_MM_DD_DATE_FORMAT from zoltpy.connection import ZoltarConnection, Project from zoltpy.csv_io impo...
import numpy as np import pandas as pd import tensorflow as tf import matplotlib.pyplot as plt from sklearn.metrics import accuracy_score # from tensorflow.keras.optimizers import Adam from sklearn.preprocessing import MinMaxScaler from tensorflow.keras import Sequential from tensorflow.keras.layers import Dense, Dropo...
## functions for manipulating empirical/simulated CMS output ## last updated 07.13.2017 <EMAIL> import matplotlib as mp mp.use('agg') import matplotlib.pyplot as plt import numpy as np import subprocess import os ################### ## COLLATE FILES ## ################### def write_pair_sourcefile(writefilename, ih...
# -*- coding: UTF-8 -*- import gzip, shutil, os import xml.etree.ElementTree as ET class Sequence: def __init__(self): self.id = id self.name = '' self.height = '' self.width = '' self.vidframerate = 0 self.audframerate = 0 self.timelime = [] #TrackID, file path, clip name, tape, timeli...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import numpy as np import cv2 import pyglet from pyglet.gl import * from ctypes import POINTER from .graphics import MultiSampleFrameBuffer, FrameBuffer from .objmesh import...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ A script to manage development tasks """ import json import sys from collections.abc import Iterator from functools import partial from glob import glob from itertools import chain from os import environ, path as p from pathlib import Path f...
# -*- coding: utf-8 -*- from operator import itemgetter import os import datetime import xlwt import copy from dateutil.relativedelta import relativedelta from collections import defaultdict from functools import partial from pyramid.view import view_config from pyramid.response import Response from pyramid.renderers ...
# Reference: https://infocenter.nordicsemi.com/pdf/nRF24L01P_PS_v1.0.pdf # Accession: G00044 import math import asyncio import logging import argparse from nmigen.compat import * from ....support.logging import * from ....arch.nrf24l.rf import * from ...interface.spi_master import SPIMasterSubtarget, SPIMasterInterfa...
# -*- coding: utf-8 -*- # # Test basic functionality of ComputationalRoutine class # # Builtin/3rd party package imports import os import tempfile import time import pytest import numpy as np from glob import glob from scipy import signal # Local imports from syncopy import __acme__ if __acme__: import dask.distr...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from colle...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import itertools import os, shutil """Used for process original data.""" class Seq: def __init__(self, name, seq, no): self.name = name self.seq = seq.upper() self.no = no self.length = len(seq) def __str__(self): ...
# for running unit tests on 6.00/6.0001/6.0002 student code import os import string import sys import unittest from contextlib import redirect_stdout import ps4b as student # A class that inherits from unittest.TestCase, where each function # is a test you want to run on the student's code. For a full description #...
""" Copyright (c) 2020, salesforce.com, inc. All rights reserved. SPDX-License-Identifier: BSD-3-Clause For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause Collection of tokenizers (readable sequence to token list) and de_tokenizers (token list to readable ...
# 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...
#!/usr/bin/env python import re import numpy as np import nltk from nltk.corpus import wordnet as wn from nltk.corpus.reader.wordnet import WordNetError def download_nltk_packages(): """Downloads the NLTK packages necessary for this project.""" nltk.download('wordnet', quiet=True) def read_drs_data(file):...
# coding: utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import tensorflow as tf from utils import util def linear(x, dim, bias=True, ln=False, weight_initializer=None, bias_initializer=tf.zeros_initializer(), ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """A bunch of tests for the functions defined in generaltools.py. Note : they should be run from the root folder of the library with the command python -m unittest discover """ import gzip import os import random import shutil import string import sys import tim...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function ''' wrappers to salt shell commands ================================= This is not included in a salt module and isolated to be picklable and used thorough python m...
import numpy as np import pandas as pd import xarray as xr import sys try: from metpy.units import units from metpy.calc import potential_temperature, density from metpy.calc import mixing_ratio_from_relative_humidity, specific_humidity_from_mixing_ratio except ImportError: print('ImportError: No modul...
import numpy as np import matplotlib.pyplot as plt; plt.ioff() import copy from .class_utils import * from .utils import * from astropy.cosmology import Planck15 import astropy.constants as co c = co.c.value # speed of light, in m/s G = co.G.value # gravitational constant in SI units Msun = co.M_sun.value # solar mass...
# 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, software # distributed under th...
from rest_framework import viewsets, views from rest_framework.response import Response from .fields_serializers import BoxAbbreviationsSerializer from .fields_serializers import (DocumentNameSerializer, UnitySerializer, RackSerializer, PublicWorkerSerializer, LocationSerializer) from ....
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Nov 29 19:48:05 2018 @author: andrew """ import numpy as np import matplotlib.pyplot as plt from scipy.optimize import curve_fit from scipy.ndimage.filters import gaussian_filter from scipy.special import iv from astropy.io import fits import glob impo...
# ________ # / # \ / # \ / # \/ # emd class to handle all Hilbert transform related methods import numpy as np import scipy as sp import seaborn as sns from scipy import signal as sig import matplotlib.pyplot as plt from scipy.ndimage import gaussian_filter sns.set(style='darkgr...
# Copyright 2017 University of Maryland. # # This file is part of Sesame. It is subject to the license terms in the file # LICENSE.rst found in the top-level directory of this distribution. from scipy.interpolate import InterpolatedUnivariateSpline as spline import numpy as np import scipy.constants as cts from collec...
# FIXME fixme = ''' Remove all this. If colors are important, use the xml output of --helpfull. [2020-10-07 22:16] Done. Still due though: This has a lot of legacy in trying to colorize functions and nested class trees help output in sync wiht absl cli flags. (do_action of old devapps) Remove the bloat sooner or later...
import torch.nn.functional as F import numpy as np import torch import json import os import cv2 PIRAHA_WEIGHTS = { 3: torch.FloatTensor([.55, .45]), 4: torch.FloatTensor([.4, .6]), 5: torch.FloatTensor([.4, .6]), 6: torch.FloatTensor([.4, .6]), 7: torch.FloatTensor([....
# -*- coding: utf-8 -*- # GUI Application automation and testing library # Copyright (C) 2006-2018 <NAME> and Contributors # https://github.com/pywinauto/pywinauto/graphs/contributors # http://pywinauto.readthedocs.io/en/latest/credits.html # All rights reserved. # # Redistribution and use in source and binary forms, w...
import time import copy import json import pickle import logging import collections from typing import Any, Dict, NamedTuple import numpy as np import pandas as pd from .estimator import Estimator, OPS from .utils import run_test from ..workload.workload import query_2_triple from ..dataset.dataset import load_table fr...
from typing import Any, Dict, List, Tuple, Union import networkx as nx import pandas as pd import partridge as ptg from fiona import crs from .settings import WGS84 from .summarizer import (generate_edge_and_wait_values, generate_summary_edge_costs, generate_summary_w...
# The MIT License (MIT) # # Copyright (c) 2017-2018 <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, modif...
import datetime import os import stat import subprocess from subprocess import check_output import tarfile import traceback import shutil from colorama import Fore, Style from pathlib import Path from utils import _print import utils class Container: def __init__(self, name, password, app_container, db_container...
import os from abc import ABC, abstractmethod import base64 import logging from enum import auto from enum import Enum as PythonNativeEnum from io import BytesIO import operator from typing import List, Type, TypeVar, Union from PIL import Image from strictyaml import Map, Optional, Seq, Int, Enum, Str, YAML import nu...
# # This file is part of Brazil Data Cube Collection Builder. # Copyright (C) 2019-2020 INPE. # # Brazil Data Cube Collection Builder is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. # """Define Brazil Data Cube utils.""" # Python Nat...
"""Helper class to implement include/exclude of entities and domains.""" import fnmatch import re from typing import Callable, Dict, List, Pattern import voluptuous as vol from homeassistant.const import CONF_DOMAINS, CONF_ENTITIES, CONF_EXCLUDE, CONF_INCLUDE from homeassistant.core import split_entity_id from homeas...
# Copyright 2018 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 applicab...
# The MIT License (MIT) # # Copyright (c) 2015 <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 without restriction, including without limitation the rights # to use, copy, ...
# modified by <NAME> on Jan 2020 import numpy as np from numpy import linalg as la import math import logging import json import torch from torch import nn from torch.nn import init import torch.nn.functional as F from torch.autograd import Variable import nn as mynn from core.config import cfg import utils.net as n...
import math import numpy as np from cheshire.Grid import * class InfiniteWell1DSampler(Grid1D): """ Class that generates parameters for the 1D infinite well. """ def sample_params(self, min_l=5, max_l=23, min_c=-8, max_c=8): """ Random parameter method that generates parameters for i...
"""Query photon cross section data from NIST XCOM database. Provides the fetch_xcom_data function to query the NIST XCOM database, as well as a few mixtures for common materials. References: https://www.nist.gov/pml/xcom-photon-cross-sections-database http://physics.nist.gov/PhysRefData/Xcom/html/xcom1.html """ ...
""" This module contains miscellaneous helper functions and tools. The functions you may want to be aware of: Attributes: endian_reverse : Reverses the endianness of the specified unitary. Necessary for working with unitaries from Qiskit. matrix_distance_squared : The default error_func. Returns the Hilbert...
from __future__ import print_function """ ============================= compare_boms.py ============================= :Author: <NAME> :Date: 2013 :Description: Tool for checking comparing two BOMs and reporting differences... :Example: >>> import compare_boms.py >>> fileA = open("bomA.csv", 'rb') >>...
# -*- coding: utf-8 -*- ''' Optimize the distirbution of material under given displacement boundary conditions so that the stored (hyper/linear) elastic energy is minimized. This script is prepared in a way that enables many different cases to be run one after another thanks to the parametrization of different problem...
from django.db import models from django.db.models.signals import pre_save from django.shortcuts import reverse from django.contrib.auth.models import User, Group from django.contrib.postgres.fields import JSONField from autoslug import AutoSlugField import re import os from io import BytesIO from django.db import mode...
import os import joblib import logging import numpy as np import pandas as pd import h5py import click from sklearn.base import is_classifier import tables from fact.io import read_h5py, write_data from .feature_generation import feature_generation from .preprocessing import convert_units from . import __version__ _...
""" (C) Crown Copyright 2017, the Met Office. Module to replicate data access API of the previous version of AutoAssess: - from loaddata import load_run_ss For information on the PP-Header attributes, see: Unified Model Documentation Paper F03: "Input and Output File Formats" available here: https://code.metoff...
# Copyright 2017 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 ...
# -*- coding: utf-8 -*- import numpy as np import os.path import librosa import librosa.feature import matplotlib.pyplot as plt from .classifiers_utils import rng from sklearn.preprocessing import StandardScaler from sklearn.svm import SVC from scipy.fftpack.realtransforms import dct from scipy.fftpack import fft from...
""" arabic transliterate: Roman <-> Arabic unicode To validate this implementation,I rely largely on these resources: 1. http://languagelog.ldc.upenn.edu/myl/ldc/morph/buckwalter.html. 2. https://github.com/Alfanous-team/alfanous/blob/master/src/alfanous/Romanization.py 3. http...
# -*- coding: utf-8 -*- """ Created on Tue Feb 5 23:56:16 2019 @author: kirichoi """ import os, sys import tellurium as te import roadrunner import numpy as np import antimony import scipy.optimize import networkGenerator as ng import time import copy def f1(k_list, *args): global counts global countf ...
import os import logging import numpy as np import copy import compas import compas_slicer.utilities as utils from compas_slicer.pre_processing.preprocessing_utils import restore_mesh_attributes, save_vertex_attributes from compas.datastructures import Mesh from compas_slicer.pre_processing.preprocessing_utils import a...
from __future__ import print_function import argparse import torch import torch.utils.data from torch import nn, optim from torch.autograd import Variable from torch.nn import functional as F from torchvision import datasets, transforms from torchvision.utils import save_image from torch.utils import model_zoo from to...
import torch import torch.optim as optim import torch.nn as nn import torch.nn.functional as F import numpy as np import random import copy np.random.seed(1) class DDPGActor(nn.Module): def __init__(self, obs_size, act_size): super(DDPGActor, self).__init__() self.net = nn.Sequential( n...
from .os_functions import enter_exit from sqlalchemy import create_engine from sqlalchemy.pool import NullPool from sqlalchemy.sql import text from pathlib import Path from configparser import ConfigParser from shutil import copyfile import pandas as pd import traceback import logging import os import cx...
import numpy as np import matplotlib.pyplot as plt import tensorflow as tf from abc import * import os import sys class Sample(ABC): @abstractmethod def sample(self, num): raise NotImplementedError('define sample()') class Gaussian1D(Sample): def __init__(self, mu, sigma): self...