code
stringlengths
114
1.05M
path
stringlengths
3
312
quality_prob
float64
0.5
0.99
learning_prob
float64
0.2
1
filename
stringlengths
3
168
kind
stringclasses
1 value
class AmphibianData: """AmphibianData. Class Representing the data scraped from the data source with additional helper methods Args: amp_info: list passed to init """ def __init__(self, amp_info: list) -> None: """Init method for Amphibian Data. Instantiates Amphibia...
/qub_amphibian_report_generator-0.0.34-py3-none-any.whl/report_generator/report_generator_cli/amphibian.py
0.867485
0.515498
amphibian.py
pypi
def get_tables_sql() -> list: """Generate sql string. Calls tables functions in order and joins them to create one large sql query string list Returns: sql_create_tables_str (list): list of strings to create all tables """ tables_list = [ order_table(), family_table(), ...
/qub_amphibian_report_generator-0.0.34-py3-none-any.whl/report_generator/excel_extraction/tables.py
0.731346
0.332202
tables.py
pypi
# pip package imports import pandas from loguru import logger # other imports def structure_data(data_frame: pandas.DataFrame) -> dict: """Structures data_frame. Args: data_frame(pandas.DataFrame): Pandas DataFrame object Returns: tables_object(dict): Dict containing structured Pandas D...
/qub_amphibian_report_generator-0.0.34-py3-none-any.whl/report_generator/excel_extraction/data_structure.py
0.818954
0.60133
data_structure.py
pypi
import datetime import sqlite3 import sys from sqlite3 import Error import pandas from loguru import logger import report_generator.excel_extraction.tables as tables from report_generator.excel_extraction.clean_data import clean_data from report_generator.excel_extraction.data_structure import structure_data from rep...
/qub_amphibian_report_generator-0.0.34-py3-none-any.whl/report_generator/excel_extraction/excel_to_sql.py
0.450843
0.28769
excel_to_sql.py
pypi
import os import re import sys import pandas from loguru import logger import report_generator.config def create_data_frame(path_to_dataset: str) -> pandas.DataFrame: """## Create data frame. Loads excel file and returns Pandas DataFrame obj Args: path_to_data_set (str): file path string ...
/qub_amphibian_report_generator-0.0.34-py3-none-any.whl/report_generator/excel_extraction/clean_data.py
0.496094
0.608449
clean_data.py
pypi
import os import sqlite3 import time from sqlite3 import Error import pandas import tqdm from loguru import logger def locations_database_setup(location_path: str) -> None: """Location database setup. Sets up database for locations data. Creates database, loads data from csv. Creates tables in database....
/qub_amphibian_report_generator-0.0.34-py3-none-any.whl/report_generator/project_setup/locations_db_setup.py
0.619011
0.314445
locations_db_setup.py
pypi
import json import os import sqlite3 from sqlite3 import Error import pandas import tqdm from loguru import logger def locations_json_setup(location_path: str) -> None: """Location json setup.""" logger.info("Locations Json Setup") # Read Csvs continents = [ "africa", "asia", ...
/qub_amphibian_report_generator-0.0.34-py3-none-any.whl/report_generator/project_setup/locations_json_setup.py
0.477798
0.295408
locations_json_setup.py
pypi
import os import shutil import zipfile import requests import tqdm from loguru import logger def insert_default_data(dir_path: str) -> None: """Insert default data. Inserts default data files into the data folder by copying files from the packages data file. Args: dir_path (str): String pat...
/qub_amphibian_report_generator-0.0.34-py3-none-any.whl/report_generator/project_setup/locations_data_setup.py
0.50952
0.283044
locations_data_setup.py
pypi
import os import sqlite3 import pandas from loguru import logger from report_generator.config import load_config from report_generator.excel_extraction.excel_to_sql import create_connection def read_from_db(options: dict) -> pandas.DataFrame: """Queries Database. Queries database based on options dict para...
/qub_amphibian_report_generator-0.0.34-py3-none-any.whl/report_generator/read_from_db/query_db.py
0.639511
0.264801
query_db.py
pypi
from __future__ import division from builtins import zip from builtins import object from past.utils import old_div import sys import os import math os.environ['TERM'] = 'vt100' from fundamentals import tools from sherlock.catalogue_conesearch import catalogue_conesearch from astrocalc.distances import converter from a...
/qub-sherlock-2.2.4.tar.gz/qub-sherlock-2.2.4/sherlock/transient_catalogue_crossmatch.py
0.538012
0.487551
transient_catalogue_crossmatch.py
pypi
from __future__ import print_function from builtins import object import sys import os os.environ['TERM'] = 'vt100' import readline import glob import pickle from fundamentals import tools, times from docopt import docopt from fundamentals.mysql import readquery, writequery class database_cleaner(object): """*Clea...
/qub-sherlock-2.2.4.tar.gz/qub-sherlock-2.2.4/sherlock/database_cleaner.py
0.460532
0.354992
database_cleaner.py
pypi
from builtins import zip from builtins import object import sys import os os.environ['TERM'] = 'vt100' from fundamentals import tools from astrocalc.coords import unit_conversion from HMpTy.mysql import conesearch as hmptyConesearch import copy class catalogue_conesearch(object): """ *The worker class for the...
/qub-sherlock-2.2.4.tar.gz/qub-sherlock-2.2.4/sherlock/catalogue_conesearch.py
0.602296
0.740016
catalogue_conesearch.py
pypi
from __future__ import print_function from builtins import str from builtins import object import sys import os os.environ['TERM'] = 'vt100' import readline import glob import collections import codecs from datetime import datetime, date, time import pickle from docopt import docopt from fundamentals.mysql import readq...
/qub-sherlock-2.2.4.tar.gz/qub-sherlock-2.2.4/sherlock/commonutils/update_wiki_pages.py
0.544317
0.262972
update_wiki_pages.py
pypi
import sys import os os.environ['TERM'] = 'vt100' from fundamentals import tools from fundamentals.mysql import readquery def get_crossmatch_catalogues_column_map( dbConn, log): """*Query the sherlock-catalogues helper tables to generate a map of the important columns of each catalogue* Within...
/qub-sherlock-2.2.4.tar.gz/qub-sherlock-2.2.4/sherlock/commonutils/get_crossmatch_catalogues_column_map.py
0.525369
0.5835
get_crossmatch_catalogues_column_map.py
pypi
from __future__ import print_function from builtins import str from builtins import object import sys import os os.environ['TERM'] = 'vt100' import readline import glob import pickle import codecs import re import string from sherlock.database_cleaner import database_cleaner from datetime import datetime, date, time fr...
/qub-sherlock-2.2.4.tar.gz/qub-sherlock-2.2.4/sherlock/imports/_base_importer.py
0.511961
0.306213
_base_importer.py
pypi
from __future__ import print_function from builtins import zip import sys import os os.environ['TERM'] = 'vt100' import readline import glob import pickle import codecs import string import re from docopt import docopt from ._base_importer import _base_importer class veron(_base_importer): """ *importer object...
/qub-sherlock-2.2.4.tar.gz/qub-sherlock-2.2.4/sherlock/imports/veron.py
0.487307
0.346818
veron.py
pypi
from __future__ import print_function from __future__ import division from builtins import zip from past.utils import old_div import sys import os os.environ['TERM'] = 'vt100' import readline import csv import time import glob import pickle import codecs import string import re from fundamentals.mysql import writequery...
/qub-sherlock-2.2.4.tar.gz/qub-sherlock-2.2.4/sherlock/imports/ned_d.py
0.507812
0.29733
ned_d.py
pypi
from __future__ import print_function from ._base_importer import _base_importer from fundamentals.download import multiobject_download from astrocalc.coords import unit_conversion from docopt import docopt import re import requests import string import codecs import pickle import glob import readline import sys import...
/qub-sherlock-2.2.4.tar.gz/qub-sherlock-2.2.4/sherlock/imports/ifs.py
0.461988
0.275733
ifs.py
pypi
from __future__ import print_function, division from ._base_importer import _base_importer from fundamentals.mysql import directory_script_runner, readquery, writequery from fundamentals.renderer import list_of_dictionaries from astrocalc.coords import unit_conversion from fundamentals.mysql import insert_list_of_dicti...
/qub-sherlock-2.2.4.tar.gz/qub-sherlock-2.2.4/sherlock/imports/ned.py
0.670177
0.720887
ned.py
pypi
from abc import ABC, abstractmethod from typing import Dict, List, Any import numpy as np from qcodes import load_by_id from qcodes.dataset.data_set import DataSetProtocol from qube.postprocess.datafile import Datafile from qube.postprocess.dataset import Dataset, Axis, Static def qcodes_to_datafile(ds: DataSetProt...
/qube-qcodes-0.1.5.tar.gz/qube-qcodes-0.1.5/qube/measurement/content.py
0.76145
0.514888
content.py
pypi
from functools import partial import numpy as np from qcodes import VisaInstrument from qcodes.instrument.parameter import ArrayParameter from qcodes.utils.validators import Numbers, Ints, Enum, Strings from qcodes.instrument.group_parameter import GroupParameter, Group from typing import Tuple from time import slee...
/qube-qcodes-0.1.5.tar.gz/qube-qcodes-0.1.5/qube/drivers/SR7265.py
0.630457
0.366788
SR7265.py
pypi
from qcodes.instrument.base import InstrumentBase class measurement_info(InstrumentBase): """ This is meta instrument holding meta information of measurement. """ def __init__(self, name = '', sweeps = ('',), return2initial = True, ...
/qube-qcodes-0.1.5.tar.gz/qube-qcodes-0.1.5/qube/drivers/Measurement_info.py
0.800575
0.15633
Measurement_info.py
pypi
import numpy as np from qcodes import Instrument from qcodes.instrument.visa import VisaInstrument from qcodes.instrument.channel import InstrumentChannel from qcodes.instrument.parameter import ArrayParameter from qcodes import validators as vals from typing import Union, List def parse_frequency(freq): # if fre...
/qube-qcodes-0.1.5.tar.gz/qube-qcodes-0.1.5/qube/drivers/Keysight_ENA.py
0.671255
0.25241
Keysight_ENA.py
pypi
from qcodes import VisaInstrument, validators as vals class RS_SMB100A(VisaInstrument): """ This is a qcodes driver for Rohde Schwarz SMB100A signal generator (Only few basic functionalities) """ def __init__(self, name, address, **kwargs): super().__init__(name, address, **kwargs) ...
/qube-qcodes-0.1.5.tar.gz/qube-qcodes-0.1.5/qube/drivers/RS_SMB100A.py
0.701713
0.178848
RS_SMB100A.py
pypi
import numpy as np from qcodes import Instrument from qcodes.instrument.visa import VisaInstrument from qcodes.instrument.channel import InstrumentChannel from qcodes.instrument.parameter import ArrayParameter from qcodes import validators as vals def parse_frequency(freq): # if freq[-1]=='\n': # freq = fre...
/qube-qcodes-0.1.5.tar.gz/qube-qcodes-0.1.5/qube/drivers/Keysight_PNA.py
0.541651
0.239688
Keysight_PNA.py
pypi
import numpy as np from qcodes import Instrument from qcodes.instrument.visa import VisaInstrument from qcodes.instrument.channel import InstrumentChannel from qcodes.instrument.parameter import ArrayParameter from qcodes import validators as vals class sTrace(ArrayParameter): def __init__(self, name: str, i...
/qube-qcodes-0.1.5.tar.gz/qube-qcodes-0.1.5/qube/drivers/Keysight_FieldFox.py
0.647687
0.22564
Keysight_FieldFox.py
pypi
from qcodes import Instrument, validators as vals from qcodes.instrument.channel import InstrumentChannel, ChannelList from qcodes.utils.validators import Validator from qcodes.instrument.parameter import ArrayParameter from typing import List, Dict, Callable, Union from nifpga import Session from nifpga import nifpg...
/qube-qcodes-0.1.5.tar.gz/qube-qcodes-0.1.5/qube/drivers/NEEL_DAC_ST.py
0.835618
0.365202
NEEL_DAC_ST.py
pypi
from numpy import rad2deg, deg2rad from qcodes import VisaInstrument, validators as vals def parse_on_off(stat): if stat.startswith('0'): stat = 'Off' elif stat.startswith('1'): stat = 'On' return stat def rad2deg_mod(rad): deg = rad2deg(float(rad)) return deg class Keysight_E825...
/qube-qcodes-0.1.5.tar.gz/qube-qcodes-0.1.5/qube/drivers/Keysight_E8257D.py
0.466116
0.244648
Keysight_E8257D.py
pypi
from qcodes import VisaInstrument from qcodes import Instrument from qcodes import validators as vals from qcodes.instrument.channel import InstrumentChannel def ms2nplc(ms:float): """ Convert ms to nplc for 50 Hz. """ nplc = ms/20.0 return nplc def nplc2ms(nplc:str): """ Convert npl...
/qube-qcodes-0.1.5.tar.gz/qube-qcodes-0.1.5/qube/drivers/Keysight_B2901A.py
0.739893
0.336004
Keysight_B2901A.py
pypi
import functools from copy import deepcopy import numpy as np def join_list(slist, separator=''): slist = list(slist) result = separator.join(['{}'.format(element) for element in slist]) return result def b2str(item): if hasattr(item, 'items'): new = bytes_to_string_dict(item) else: ...
/qube-qcodes-0.1.5.tar.gz/qube-qcodes-0.1.5/qube/utils/misc.py
0.587233
0.325521
misc.py
pypi
import numpy as np from copy import copy, deepcopy default_unit = 'a.u.' class Data(object): """ This class stores any kind of information from experimental data ... Parameters ---------- name : str name of the dataset value : not defined stored value unit : str, opt...
/qube-qcodes-0.1.5.tar.gz/qube-qcodes-0.1.5/qube/postprocess/dataset.py
0.833765
0.485722
dataset.py
pypi
import json import os from typing import List import numpy as np from qube.postprocess.dataset import Dataset, Axis, Static from qube.utils.path import is_file, get_filename, get_folder, remove_extension, mkdir_if_not_exist, \ find_unused_in_folder class Datafile(object): def __init__(self, fullpath=None): ...
/qube-qcodes-0.1.5.tar.gz/qube-qcodes-0.1.5/qube/postprocess/datafile.py
0.49048
0.242105
datafile.py
pypi
.. _adding_templates: ============================ Adding new templates ============================ Adding new templates is one of the major improvements to qube, which is why we are dedicating a whole section to it. Please note that creating new templates is a time consuming task. So be prepared to invest a few hou...
/qube-2.6.1.tar.gz/qube-2.6.1/docs/adding_new_templates.rst
0.684897
0.729417
adding_new_templates.rst
pypi
.. _github_support: ================ Github Support ================ Overview ------------- qube uses `GitPython <https://gitpython.readthedocs.io/en/stable/>`_ and `PyGithub <https://pygithub.readthedocs.io/en/latest/introduction.html>`_ to automatically create a repository, add, commit and push all files. Moreover...
/qube-2.6.1.tar.gz/qube-2.6.1/docs/github_support.rst
0.625781
0.709787
github_support.rst
pypi
# QUBEKit - *Qu*antum Mechanical *Be*spoke force field tool*kit* #### **Newcastle University UK - Cole Group** | **Status** | [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/qubekit/QUBEKit.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/qubekit/QUBEKit/context:python) [![Build Status]...
/qubekit-2.6.3.tar.gz/qubekit-2.6.3/README.md
0.754192
0.855972
README.md
pypi
# QUBEKit Style Guide for Development ## Introduction The aim of QUBEKit is to produce easily accessible, current software for computational chemists. QUBEKit pulls together the best methods in molecular dynamics, allowing in-depth analysis of important parameters. QUBEKit is written collaboratively and as a result n...
/qubekit-2.6.3.tar.gz/qubekit-2.6.3/style.md
0.818773
0.853608
style.md
pypi
from QUBEKit.utils import constants from QUBEKit.utils.decorators import for_all_methods, timer_logger from operator import itemgetter import numpy as np class ModSemMaths: """Static methods for various mathematical functions relevant to the modified Seminario method.""" def __repr__(self): return ...
/qubekit-2.6.3.tar.gz/qubekit-2.6.3/QUBEKit/mod_seminario.py
0.894686
0.468243
mod_seminario.py
pypi
import numpy as np import simtk.openmm as mm def apply_opls_combo(system, switching_distance=None): """Apply the opls combination rules to a OpenMM system and return the new system.""" # Get the system information from the openmm system forces = {system.getForce(index).__class__.__name__: system.getFor...
/qubekit-2.6.3.tar.gz/qubekit-2.6.3/QUBEKit/protein_tools.py
0.813127
0.422505
protein_tools.py
pypi
from QUBEKit.engines.base_engine import Engines from QUBEKit.utils import constants from QUBEKit.utils.decorators import for_all_methods, timer_logger from QUBEKit.utils.helpers import check_symmetry import qcelemental as qcel import qcengine as qcng import numpy as np @for_all_methods(timer_logger) class QCEngine...
/qubekit-2.6.3.tar.gz/qubekit-2.6.3/QUBEKit/engines/qcengine.py
0.806586
0.418994
qcengine.py
pypi
from QUBEKit.engines.base_engine import Engines from QUBEKit.utils.decorators import for_all_methods, timer_logger from QUBEKit.utils.helpers import append_to_log from QUBEKit.utils.exceptions import ChargemolError import os import subprocess as sp @for_all_methods(timer_logger) class Chargemol(Engines): def _...
/qubekit-2.6.3.tar.gz/qubekit-2.6.3/QUBEKit/engines/chargemol.py
0.591133
0.18797
chargemol.py
pypi
from QUBEKit.utils.decorators import for_all_methods, timer_logger import numpy as np from rdkit import Chem from rdkit.Geometry.rdGeometry import Point3D from rdkit.Chem import AllChem, Descriptors from rdkit.Chem.rdchem import GetPeriodicTable from rdkit.Chem.rdForceFieldHelpers import MMFFOptimizeMolecule, UFFOpt...
/qubekit-2.6.3.tar.gz/qubekit-2.6.3/QUBEKit/engines/rdkit.py
0.833358
0.489626
rdkit.py
pypi
from QUBEKit.engines.base_engine import Engines from QUBEKit.utils import constants from QUBEKit.utils.decorators import for_all_methods, timer_logger from QUBEKit.utils.helpers import check_symmetry import subprocess as sp import numpy as np @for_all_methods(timer_logger) class Gaussian(Engines): """ Writ...
/qubekit-2.6.3.tar.gz/qubekit-2.6.3/QUBEKit/engines/gaussian.py
0.694303
0.368889
gaussian.py
pypi
from QUBEKit.parametrisation.base_parametrisation import Parametrisation from QUBEKit.utils.decorators import for_all_methods, timer_logger from openforcefield.topology import Molecule from openforcefield.typing.engines.smirnoff import ForceField, BondHandler, AngleHandler, ProperTorsionHandler, vdWHandler from openf...
/qubekit-2.6.3.tar.gz/qubekit-2.6.3/QUBEKit/parametrisation/openff.py
0.824179
0.361672
openff.py
pypi
from typing import Optional import numpy as np from numpy.typing import NDArray def gaussian( x: NDArray, mean: float = 0.0, std: float = 1, coef: Optional[float] = None ) -> NDArray: """Return a gaussian function. Parameters ---------- x : NDArray Grid in which to approximate the funct...
/qubit_approximant-1.0.0-py3-none-any.whl/qubit_approximant/benchmarking/functions/functions.py
0.976163
0.819857
functions.py
pypi
from abc import ABC, abstractmethod from typing import Callable from numpy import zeros_like, sqrt from numpy.typing import NDArray from scipy.optimize import minimize class Optimizer(ABC): """Optimize our quantum circuit.""" __slots__ = "__dict__" @abstractmethod def __call__(self, cost: Callable,...
/qubit_approximant-1.0.0-py3-none-any.whl/qubit_approximant/core/optimizer/optimizer.py
0.972467
0.586227
optimizer.py
pypi
from typing import Callable from abc import ABC, abstractmethod import numpy as np from numpy.typing import NDArray from qubit_approximant.core.optimizer import Optimizer class MultilayerOptimizer(ABC): """ This optimizer uses the parameters of an optimized L layer circuit as input for the optimization ...
/qubit_approximant-1.0.0-py3-none-any.whl/qubit_approximant/core/optimizer/multilayer_optimizer.py
0.967495
0.631182
multilayer_optimizer.py
pypi
from abc import ABC, abstractmethod import numpy as np from numpy.typing import NDArray from ._gates_and_grads import RX, RY, RZ, grad_RX, grad_RY, grad_RZ class ParameterError(Exception): """Exception raised when the number of parameters given does not correspond with the circuit ansatz.""" def __init...
/qubit_approximant-1.0.0-py3-none-any.whl/qubit_approximant/core/circuit/circuit.py
0.955257
0.712301
circuit.py
pypi
import numpy as np from numpy.typing import NDArray def mse(fn: NDArray, fn_approx: NDArray) -> float: """Returns the minimum square error.""" fn_diff = fn_approx - fn return np.mean(np.absolute(fn_diff) ** 2) def grad_mse(fn: NDArray, fn_approx: NDArray, grad_fn_approx: NDArray) -> NDArray: """Ret...
/qubit_approximant-1.0.0-py3-none-any.whl/qubit_approximant/core/cost/_cost_metrics.py
0.922122
0.852137
_cost_metrics.py
pypi
from numpy.typing import NDArray from qubit_approximant.core import Circuit from ._cost_metrics import * # noqa class Cost: """ Create a cost function from the encoding and the metric. Attributes ---------- metric: Callable The metric or loss function to quantify how well our circuit ...
/qubit_approximant-1.0.0-py3-none-any.whl/qubit_approximant/core/cost/cost.py
0.960777
0.634487
cost.py
pypi
import logging import re from opencensus.trace.span_context import SpanContext from opencensus.trace.trace_options import TraceOptions _UBER_HEADER_NAME = 'Uber-Trace-Id' _UBER_HEADER_FORMAT = '([0-9a-f]{0,32})\:([0-9a-f]{0,16})\:([0-9a-f]{0,16})\:([0-9a-f]{1,2})' _UBER_HEADER_RE = re.compile(_UBER_HEADER_FORMAT) ...
/qubit-opencensus-0.1.16.tar.gz/qubit-opencensus-0.1.16/qubit/opencensus/trace/propagation/jaeger_format.py
0.712732
0.175009
jaeger_format.py
pypi
import asyncio import logging from opencensus.trace.span_context import SpanContext from opencensus.trace import span as trace_span from opencensus.trace import span_data as span_data_module from opencensus.trace.exporters import print_exporter from opencensus.trace.tracers import base from qubit.opencensus.trace imp...
/qubit-opencensus-0.1.16.tar.gz/qubit-opencensus-0.1.16/qubit/opencensus/trace/tracers/asyncio_context_tracer.py
0.817064
0.287168
asyncio_context_tracer.py
pypi
import inspect import logging from sanic.exceptions import SanicException from opencensus.trace import attributes_helper from opencensus.trace.exporters import print_exporter from opencensus.trace.exporters.transports import sync from opencensus.trace.ext import utils from opencensus.trace.samplers import always_on,...
/qubit-opencensus-0.1.16.tar.gz/qubit-opencensus-0.1.16/qubit/opencensus/trace/ext/sanic/sanic_middleware.py
0.686475
0.225875
sanic_middleware.py
pypi
import numpy as np from typing import Union class Gates: """ A class that represents the quantum gates. """ # Hadamard (H) gate H: np.ndarray = np.array([[1, 1], [1, -1]]) / np.sqrt(2) # π/8 (T) gate T: np.ndarray = np.array([[1, 0], [0, np.exp(1j * np.pi / 4)]]) # Pauli-X (NOT) gate ...
/qubit-simulator-0.0.7.tar.gz/qubit-simulator-0.0.7/qubit_simulator/gates.py
0.951538
0.770961
gates.py
pypi
import numpy as np from collections import Counter from sys import getsizeof from typing import Optional, List, Tuple, Dict from .gates import Gates class QubitSimulator: """ A class that represents a qubit simulator. """ def __init__(self, num_qubits: int): """ Initialize the simulat...
/qubit-simulator-0.0.7.tar.gz/qubit-simulator-0.0.7/qubit_simulator/simulator.py
0.867696
0.735784
simulator.py
pypi
<p align="center"> <a href="https://dltk.ai/"> <img src="https://github.com/dltk-ai/qubitai-dltk/blob/master/dltk.png?raw=true" alt="DLTK logo"> </a> </p> <p align="center"> <a> <img src="https://img.shields.io/badge/python-3.8-blue.svg" alt="Python 3.8"> </a> </p> ## About Our philosophy is to create a Deep...
/qubitai-dltk-1.0.9.tar.gz/qubitai-dltk-1.0.9/README.md
0.642993
0.979511
README.md
pypi
import json import os from dltk_ai.ml_hyperparameters import hyperparameter_dictionary def get_ml_model_info(info_about, library=None, task=None, algorithm=None): """ This function is to provide list of supported libraries, algorithms & valid hyperparameters Args: info_about: one of the option from...
/qubitai-dltk-1.0.9.tar.gz/qubitai-dltk-1.0.9/dltk_ai/helper.py
0.534612
0.345091
helper.py
pypi
import re import json import numpy as np import os from dltk_ai.ml_hyperparameters import hyperparameter_dictionary supported_algorithm = {'regression': {'scikit': ['LinearRegression', 'DecisionTrees', 'Bagging', 'RandomForest', 'GradientBoostingMachin...
/qubitai-dltk-1.0.9.tar.gz/qubitai-dltk-1.0.9/dltk_ai/assertions.py
0.620737
0.631651
assertions.py
pypi
## QUBO - NN <img alt="qubo heat map" src="https://raw.githubusercontent.com/instance01/qubo-nn/master/qubo_nn/plots/qubo_map_singles.png"> <p align="center"> 9 problems and their respective QUBO matrices. </p> QUBO matrices are used to describe an optimization problem as a matrix such that a Quantum Annealer (such...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/README.md
0.766031
0.954137
README.md
pypi
import io import json import pickle import numpy as np import matplotlib import matplotlib.pyplot as plt import matplotlib.colors as colors import matplotlib as mpl import PIL.Image from torchvision.transforms import ToTensor from torch.utils.tensorboard import SummaryWriter mpl.font_manager._rebuild() plt.rc('font...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/logger.py
0.747432
0.378574
logger.py
pypi
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt # From: qa4_diffnorm_v2 (printed to terminal) mpl.font_manager._rebuild() plt.rc('font', family='Raleway') plt.rcParams["axes.prop_cycle"] = plt.cycler("color", plt.cm.Set2.colors) x = [1.97, 7.48, 0.8, 8.42, 0.58, 0.79, 1.63, 3.94, 4.02,...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_qa_best_99_example.py
0.452536
0.64498
plot_qa_best_99_example.py
pypi
import pickle import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt np.seterr(divide='ignore', invalid='ignore') mpl.font_manager._rebuild() plt.rc('font', family='Raleway') # Source: https://stackoverflow.com/questions/30079590/ # For continuous: # n = 10 # colo...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_qa_ones.py
0.62498
0.459561
plot_qa_ones.py
pypi
import pickle import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt mpl.font_manager._rebuild() plt.rc('font', family='Raleway') # n = 6 # color = plt.cm.Greens(np.linspace(.3, 1, n))[::-1] # mpl.rcParams['axes.prop_cycle'] = plt.cycler('color', color) plt.rcParams...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_qa_zeros.py
0.40204
0.374562
plot_qa_zeros.py
pypi
import pickle import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt mpl.font_manager._rebuild() plt.rc('font', family='Raleway') n = 10 color = plt.cm.Greens(np.linspace(.3, 1, n))[::-1] mpl.rcParams['axes.prop_cycle'] = plt.cycler('color', color) def gen_table(k...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_m2sat_comp.py
0.441191
0.375563
plot_m2sat_comp.py
pypi
import os import glob import pickle import numpy as np from tensorflow.core.util import event_pb2 from tensorflow.python.lib.io import tf_record def my_summary_iterator(path): for r in tf_record.tf_record_iterator(path): yield event_pb2.Event.FromString(r) def smooth(y, box_pts): box = np.ones(box_...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/gen_reverse_loss_pickle.py
0.477554
0.240479
gen_reverse_loss_pickle.py
pypi
import pickle import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt mpl.font_manager._rebuild() plt.rc('font', family='Raleway') n = 10 color = plt.cm.Greens(np.linspace(.3, 1, n))[::-1] mpl.rcParams['axes.prop_cycle'] = plt.cycler('color', color) TAGS = { 'm...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_m2sat_comp_8x8_1M.py
0.504394
0.409457
plot_m2sat_comp_8x8_1M.py
pypi
import pickle import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt np.seterr(divide='ignore', invalid='ignore') mpl.font_manager._rebuild() plt.rc('font', family='Raleway') # Source: https://stackoverflow.com/questions/30079590/ # For continuous: # n = 10 # colo...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_m2sat_three_case.py
0.648132
0.500183
plot_m2sat_three_case.py
pypi
import pickle import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt np.seterr(divide='ignore', invalid='ignore') mpl.font_manager._rebuild() plt.rc('font', family='Raleway') # Source: https://stackoverflow.com/questions/30079590/ # For continuous: # n = 10 # colo...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_mc_comp_edges.py
0.648466
0.518363
plot_mc_comp_edges.py
pypi
import pickle import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt mpl.font_manager._rebuild() plt.rc('font', family='Raleway') n = 8 color = plt.cm.Greens(np.linspace(.3, 1, n))[::-1] mpl.rcParams['axes.prop_cycle'] = plt.cycler('color', color) TAGS = { 'm2...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_m2sat_comp_16x16_1M.py
0.404625
0.450299
plot_m2sat_comp_16x16_1M.py
pypi
import pickle import collections import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt mpl.font_manager._rebuild() plt.rc('font', family='Raleway') # n = 6 # color = plt.cm.Greens(np.linspace(.3, 1, n))[::-1] # mpl.rcParams['axes.prop_cycle'] = plt.cycler('color', ...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_qk.py
0.491456
0.446495
plot_qk.py
pypi
import pickle import collections import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt mpl.font_manager._rebuild() plt.rc('font', family='Raleway') # n = 6 # color = plt.cm.Greens(np.linspace(.3, 1, n))[::-1] # mpl.rcParams['axes.prop_cycle'] = plt.cycler('color', ...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_np_comp.py
0.432303
0.503418
plot_np_comp.py
pypi
import pickle import collections import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt mpl.font_manager._rebuild() plt.rc('font', family='Raleway') # n = 6 # color = plt.cm.Greens(np.linspace(.3, 1, n))[::-1] # mpl.rcParams['axes.prop_cycle'] = plt.cycler('color', ...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_qa_comp.py
0.561696
0.383815
plot_qa_comp.py
pypi
import pickle import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt import matplotlib.colors as colors mpl.font_manager._rebuild() plt.rc('font', family='Raleway') def truncate_colormap(cmapIn='jet', minval=0.0, maxval=1.0, n=100): cmapIn = plt.get_cmap(cmapI...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_tot_mc_gen4.py
0.488283
0.369201
plot_tot_mc_gen4.py
pypi
import pickle import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt import matplotlib.colors as colors mpl.font_manager._rebuild() plt.rc('font', family='Raleway') def truncate_colormap(cmapIn='jet', minval=0.0, maxval=1.0, n=100): cmapIn = plt.get_cmap(cmapI...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_tot_mc.py
0.486332
0.365825
plot_tot_mc.py
pypi
import pickle import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt np.seterr(divide='ignore', invalid='ignore') mpl.font_manager._rebuild() plt.rc('font', family='Raleway') # Source: https://stackoverflow.com/questions/30079590/ # For continuous: # n = 10 # colo...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_sp_vars.py
0.658747
0.53522
plot_sp_vars.py
pypi
import pickle import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt import matplotlib.colors as colors mpl.font_manager._rebuild() plt.rc('font', family='Raleway') def truncate_colormap(cmapIn='jet', minval=0.0, maxval=1.0, n=100): cmapIn = plt.get_cmap(cmapI...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_tot_mc_30_gen4.py
0.4917
0.366108
plot_tot_mc_30_gen4.py
pypi
import os import pickle import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt NAME = os.path.splitext(os.path.basename(__file__))[0][5:] mpl.font_manager._rebuild() plt.rc('font', family='Raleway') # n = 6 # color = plt.cm.Greens(np.linspace(.3, 1, n))[::-1] # mpl...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_gi_sgi_same.py
0.41253
0.381738
plot_gi_sgi_same.py
pypi
import os import glob import numpy as np import seaborn as sns import matplotlib.colors as colors from tensorflow.core.util import event_pb2 from tensorflow.python.lib.io import tf_record def my_summary_iterator(path): for r in tf_record.tf_record_iterator(path): yield event_pb2.Event.FromString(r) def...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/lib.py
0.404743
0.228737
lib.py
pypi
import pickle import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt np.seterr(divide='ignore', invalid='ignore') mpl.font_manager._rebuild() plt.rc('font', family='Raleway') # Source: https://stackoverflow.com/questions/30079590/ # For continuous: # n = 10 # colo...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_reverse_losses.py
0.634883
0.52683
plot_reverse_losses.py
pypi
import numpy as np import scipy.stats as st import matplotlib as mpl import matplotlib.pyplot as plt # From: qa_N_16_norm2, just printing the predictions mpl.font_manager._rebuild() plt.rc('font', family='Raleway') plt.rcParams["axes.prop_cycle"] = plt.cycler("color", plt.cm.Set2.colors) x = [-0.00044394324397659...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_qa_res.py
0.414188
0.488771
plot_qa_res.py
pypi
import pickle import numpy as np import scipy.stats as st import matplotlib as mpl from matplotlib import pyplot as plt import matplotlib.colors as colors mpl.font_manager._rebuild() plt.rc('font', family='Raleway') def truncate_colormap(cmapIn='jet', minval=0.0, maxval=1.0, n=100): cmapIn = plt.get_cmap(cmapI...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/plots/plot_tot_mc_100_genX.py
0.489992
0.377369
plot_tot_mc_100_genX.py
pypi
import numpy as np from qubo_nn.problems.problem import Problem class QuadraticAssignment(Problem): def __init__(self, cfg, flow_matrix, distance_matrix, P=200): self.flow_matrix = flow_matrix self.distance_matrix = distance_matrix self.P = P if cfg["problems"]["QA"].get("debug", ...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/problems/quadratic_assignment.py
0.708011
0.411377
quadratic_assignment.py
pypi
import random import itertools import numpy as np from qubo_nn.problems.problem import Problem class Max3SAT(Problem): def __init__(self, cfg, clauses, n_vars): self.clauses = clauses self.n_vars = n_vars def gen_qubo_matrix(self): n = self.n_vars + len(self.clauses) Q = np.z...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/problems/max3sat.py
0.408395
0.22378
max3sat.py
pypi
import itertools import numpy as np from qubo_nn.problems.problem import Problem from qubo_nn.problems.util import gen_graph class SubGraphIsomorphism(Problem): """Generalization of Graph Isomorphism.""" def __init__(self, cfg, graph1, graph2, a=1, b=2): self.graph1 = graph1 self.graph2 = grap...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/problems/subgraph_isomorphism.py
0.68658
0.239861
subgraph_isomorphism.py
pypi
import random import itertools import numpy as np from qubo_nn.problems.problem import Problem class SetPacking(Problem): def __init__(self, cfg, subset_matrix, P=6): self.subset_matrix = subset_matrix self.P = P def gen_qubo_matrix(self): n = self.subset_matrix.shape[1] Q = n...
/qubo-nn-0.2.5.tar.gz/qubo-nn-0.2.5/qubo_nn/problems/set_packing.py
0.553988
0.285129
set_packing.py
pypi
import os import yaml import numpy as np import pandas as pd from mlflow import pyfunc from mlflow.models import Model import mlflow.tracking from mlflow.exceptions import MlflowException from mlflow.models.signature import ModelSignature from mlflow.models.utils import ModelInputExample, _save_example from mlflow.pr...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/onnx.py
0.854688
0.343796
onnx.py
pypi
import click import json import mlflow.tracking from mlflow.entities import ViewType from mlflow.tracking import _get_store from tabulate import tabulate from mlflow.utils.mlflow_tags import MLFLOW_RUN_NAME from mlflow.utils.time_utils import conv_longdate_to_str RUN_ID = click.option("--run-id", type=click.STRING, re...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/runs.py
0.504394
0.170025
runs.py
pypi
import os import click from tabulate import tabulate from mlflow.data import is_uri from mlflow.entities import ViewType from mlflow.tracking import _get_store, fluent EXPERIMENT_ID = click.option("--experiment-id", "-x", type=click.STRING, required=True) @click.group("experiments") def commands(): """ Man...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/experiments.py
0.61682
0.218878
experiments.py
pypi
import logging import os import sys import traceback from six import reraise import mlflow from mlflow.models import Model from mlflow.exceptions import MlflowException from mlflow.models.signature import ModelSignature from mlflow.models.utils import ModelInputExample, _save_example from mlflow.utils import keyword_o...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/mleap.py
0.67854
0.489809
mleap.py
pypi
import os import shutil import tempfile import zipfile from pyspark.files import SparkFiles class SparkModelCache(object): """Caches models in memory on Spark Executors, to avoid continually reloading from disk. This class has to be part of a different module than the one that _uses_ it. This is because...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/pyfunc/spark_model_cache.py
0.4856
0.411318
spark_model_cache.py
pypi
import os import posixpath import shutil import yaml from abc import ABCMeta, abstractmethod import cloudpickle import mlflow.pyfunc import mlflow.utils from mlflow.exceptions import MlflowException from mlflow.models import Model from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE from mlflow.tracking.a...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/pyfunc/model.py
0.826991
0.227834
model.py
pypi
from collections import OrderedDict import flask import json from json import JSONEncoder import logging import numpy as np import pandas as pd from six import reraise import sys import traceback # NB: We need to be careful what we import form mlflow here. Scoring server is used from within # model's conda environment...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/pyfunc/scoring_server/__init__.py
0.630002
0.251228
__init__.py
pypi
import os import json import click import mlflow import mlflow.sagemaker from mlflow.sagemaker import DEFAULT_IMAGE_NAME as IMAGE from mlflow.utils import cli_args import mlflow.models.docker_utils @click.group("sagemaker") def commands(): """ Serve models on SageMaker. To serve a model associated with...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/sagemaker/cli.py
0.689619
0.197309
cli.py
pypi
import json import click import mlflow.azureml from mlflow.utils import cli_args, experimental @click.group("azureml") def commands(): """ Serve models on Azure ML. **These commands require that MLflow be installed with Python 3.** To serve a model associated with a run on a tracking server, set the ML...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/azureml/cli.py
0.760206
0.38856
cli.py
pypi
import json import os from typing import Union import numpy as np import pandas as pd from mlflow.exceptions import MlflowException from mlflow.models import Model from mlflow.types.utils import TensorsNotSupportedException from mlflow.utils.proto_json_utils import NumpyEncoder, _dataframe_from_json ModelInputExampl...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/models/utils.py
0.843766
0.566918
utils.py
pypi
from datetime import datetime import json import logging import yaml import os from typing import Any, Dict, Optional import mlflow from mlflow.exceptions import MlflowException from mlflow.models.signature import ModelSignature from mlflow.utils.file_utils import TempDir from mlflow.utils.qubole_metrics_events impo...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/models/model.py
0.849628
0.202167
model.py
pypi
from typing import Dict, Any, Union import pandas as pd import numpy as np from mlflow.types.schema import Schema from mlflow.types.utils import _infer_schema try: import pyspark.sql.dataframe MlflowInferableDataset = Union[pd.DataFrame, np.ndarray, Dict[str, np.ndarray], p...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/models/signature.py
0.929288
0.534309
signature.py
pypi
from abc import ABCMeta, abstractmethod class FlavorBackend(object): """ Abstract class for Flavor Backend. This class defines the API interface for local model deployment of MLflow model flavors. """ __metaclass__ = ABCMeta def __init__(self, config, **kwargs): # pylint: disable=un...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/models/flavor_backend.py
0.916797
0.480418
flavor_backend.py
pypi
import logging import click import os from mlflow.models import Model from mlflow.models.flavor_backend_registry import get_flavor_backend from mlflow.store.artifact.models_artifact_repo import ModelsArtifactRepository from mlflow.tracking.artifact_utils import _download_artifact_from_uri from mlflow.utils import cli_...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/models/cli.py
0.682468
0.282447
cli.py
pypi
from alembic import op from mlflow.entities import RunStatus, ViewType from mlflow.entities.lifecycle_stage import LifecycleStage from mlflow.store.tracking.dbmodels.models import SqlRun, SourceTypes from sqlalchemy import CheckConstraint, Enum # revision identifiers, used by Alembic. revision = 'cfd24bdc0731' down_re...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/store/db_migrations/versions/cfd24bdc0731_update_run_status_constraint_with_killed.py
0.727782
0.195844
cfd24bdc0731_update_run_status_constraint_with_killed.py
pypi
from six.moves import urllib from mlflow.exceptions import MlflowException from mlflow.store.artifact.artifact_repo import ArtifactRepository class RunsArtifactRepository(ArtifactRepository): """ Handles artifacts associated with a Run via URIs of the form `runs:/<run_id>/run-relative/path/to/artifact`...
/qubole_ml-1.9.1-py3-none-any.whl/mlflow/store/artifact/runs_artifact_repo.py
0.743168
0.250764
runs_artifact_repo.py
pypi