Saravanan666/pypi-org huggingface dataset:
Package: auto-pytest-mg
auto_pytest_mg (Automatic pytest Mock Generator)auto_pytest_mg generates a test skeleton for a given python file. This skeleton includes:fixtures that mock all non-standard library imported namesa boilerplate test for every class method and propertya boilerplate test for every functionmockerandmgfixtures for all testsmocker:pytest-mockmg:pytest-mocker-generatorIf you're unfamiliar with pytest-mock-generator, you can read up on usage information in theirREADME.It is not auto_pytest_mg's goal to produce the entirety of the test. The creation of test mocks and
asserts is delegated to pytest-mocker-generator via themgfixture and themg.generate_uut_mocks_with_asserts(...)call.This package is a static analysis tool and will not execute any of your code.Usage# install the packagepipinstallauto_pytest_mg# go to project's source rootcdmy_project# pass the file to generate tests forauto_pytest_mgmy_project/my_file.pyExampleSource file located atmy_project/my_file.py# my_project/my_file.pyimportrequestsclassMyClass:def__init__(self,a:int):self.a=adefmethod(self)->int:returnself.adefget(url:str)->requests.Response:returnrequests.get(url)Runningauto_pytest_mg my_project/my_file.pywill then output to stdout the generated test file:importpytestfrommy_project.my_fileimportget,MyClassMODULE_PATH="my_project.my_file"@pytest.fixturedefmock_requests(mocker):returnmocker.patch(f"{MODULE_PATH}.requests")@pytest.fixturedefmy_class(mocker):a=mocker.MagicMock()returnMyClass(a=a)classTestMyClass:deftest__init__(self,mocker):a=mocker.MagicMock()my_class_=MyClass(a=a)deftest_method(self,mocker,mg,my_class):mg.generate_uut_mocks_with_asserts(my_class.method)result=my_class.method()deftest_get(mocker,mg):url=mocker.MagicMock()mg.generate_uut_mocks_with_asserts(get)result=get(url=url)Similar packagespyguinExecutes given source code and uses a genetic algorithm to produce test casesCan output to unittest/pytest test stylespythoscopeLast updated in 2016Performs static analysis, does not run your code.Outputs unittest test style onlyDevelopmentSeeDEVELOPMENT.mdLicenseThis project is licensed under the terms of theMITlicense. SeeLICENSEfor more details.CreditsThis project was generated withpython-package-template
Package: auto-py-to-app
Auto-Py-To-AppAuto-Py-To-App is a GUI for cx_Freeze, which is a library to change .py excutables into .exe (on windows) or binary files (on Mac OS).The famous library to package python script, maybe you heard about it once, named as pyinstaller. cx_Freeze, however, is trying to catch up with it in recent years.For pyinstaller, after you run its command, it will give you an excutable .exe file one way or another, regardless of its robustness. And for many starters, they could find it hard to tune the packaged .exe file.cx_Freeze, to some extend, performs better in this field. The adjustment after you package your program can be easier and faster.If you want to use pyinstaller, it's suggested that you start with another GUI calledauto-py-to-exe. Auto-Py-To-App is based on auto-py-to-exe, the only difference is auto-py-to-app is powered by cx_Freeze, while auto-py-to-exe is powered by pyinstaller.
Package: autoqt
autoqtA simple single file module that makes setting up basic Qt properties a little
bit nicer without restricting you.This is very useful if you have QObjects with many readonly properties and a
few special setters or state modifying slots.Example:from PyQt5.QtCore import pyqtSignal, pyqtSlot
from autoqt import AutoObject, AutoProp


class SomeObject(AutoObject):
    valuesChanged = pyqtSignal()

    aNumber = AutoProp(int, 'valuesChanged', '_aNumber')
    otherNumber = AutoProp(float, 'valuesChanged', '_otherNumber')
    aString = AutoProp(str, 'valuesChanged', '_aString', write=True)

    def __init__(self, parent=None):
        super().__init__(parent=parent)
        self._aNumber = 10
        self._otherNumber = 20
        self._aString = 'spam'

    @pyqtSlot()
    def incrementNumber(self):
        self._aNumber += 1
        self.valuesChanged.emit()

    @otherNumber.setter
    def otherNumber(self, value):
        self._otherNumber = value + 2
        self.valuesChanged.emit()


x = SomeObject()

print(x.aNumber)  # 10
x.aNumber = 10  # throws AttributeError, readonly property
x.incrementNumber()  # valuesChanged is emitted
print(x.aNumber)  # 11

print(x.otherNumber)  # 20
x.otherNumber = 40  #  otherNumber.setter called, valuesChanged is emitted
print(x.otherNumber)  # 42

print(x.aString)  # 'spam'
x.aString = 'ham'  # valuesChanged is emitted, writable property
print(x.aString)  # 'ham'
Package: autoqubo
AUTOmated QUBO GeneratorAUTOmated QUBO Generator is an automatic tool for converting a high-level description
of an optimization problem, written in Python, into an equivalent QUBO representation.
It is doing this by using a noveldata driventranslation method that
can completely decouple the input and output representation.This repository acts as a companion to our publications:Alberto Moraglio, Serban Georgescu, and Przemysław Sadowski. 2022. AutoQubo: Data-driven automatic QUBO generation. In Genetic and Evolutionary Computation Conference Companion (GECCO ’22 Companion), July 9–13, 2022, Boston, MA, USA. ACM, New York, NY, USA, 8 pages.https://doi.org/10.1145/3520304.3533965Justin Pauckert, Mayowa Ayodele, Marcos Diez García, Serban Georgescu, and Matthieu Parizy. 2023. AutoQUBO v2: Towards Efficient and Effective QUBO Formulations for Ising Machines. In Genetic and Evolutionary Computation Conference Companion (GECCO ’23 Companion), July 15–19, 2023, Lisbon, Portugal. ACM, New York, NY, USA, 4 pages.https://doi.org/10.1145/3583133.3590662Installationcreate conda environment with all dependenciesconda env create -f environment.ymlactivate itconda activate autoquboinstall autoqubo as packagepip install autoquboHow to citeIf you find our work useful, please cite the paper below:@inproceedings{10.1145/3520304.3533965,
    author = {Moraglio, Alberto and Georgescu, Serban and Sadowski, Przemys{\l}aw},
    title = {AutoQubo: Data-driven Automatic QUBO Generation},
    year = {2022},
    isbn = {978-1-4503-9268-6/22/07},
    publisher = {Association for Computing Machinery},
    doi = {10.1145/3520304.3533965},
    booktitle = {Proceedings of the Genetic and Evolutionary Computation Conference Companion},
    series = {GECCO '22} 
}
Package: autoquiz
AutoQuizA simple tool for you as student to create quizzes based on your own study notes.🧐 FeaturesHere're some of the project's best features:Select note format🛠️ Installation Steps:1. Get you into PyPI🍰 Contribution Guidelines:Please use Conventional Commits standard. This's using CI hence all no-working code will be rejected automatically.💻 Built withTechnologies used in the project:PoetryPythonBehave🛡️ License:This project is licensed under the DWYW-BDSM: Do whatever you want but don't sue me.
Package: autora-core
AutoRA Coreautora-coreis the core python module forautora(AutomatedResearchAssistant), an open-source framework for
automating multiple stages of the empirical research process, including model discovery, experimental design, data
collection, and documentation for open science.The primary purpose of this module is to provide utilities for:describing experiments,running experimentalist pipelines,running cyclical experimentsSee the tutorials and user guide atautorato get started.
Package: autorad
Framework for simple experimentation with radiomics featuresStreamlit ShareDockerPythonDemodocker run -p 8501:8501 -v <your_data_dir>:/data -it pwoznicki/autorad:latestpip install -U autoradDownload desktop app (experimental)Windows 10MacOS 11 (x64)Ubuntu 20.04Installation from sourcegitclonehttps://github.com/pwoznicki/AutoRadiomics.gitcdAutoRadiomics
pipinstall-e.Getting startedTutorials can be found in theexamplesdirectory:Binary classificationDocumentation is available atautoradiomics.readthedocs.io.Web applicationTo use the application, make sure you have its dependencies installed:pipinstall-e".[app]"The application can be started from the root directory with:streamlitrunautorad/webapp/app.pyBy default it willl run athttp://localhost:8501/.For more information about AutoRadiomics, please readour paper:AutoRadiomics: A Framework for Reproducible Radiomics Research;
  P Woznicki, F Laqua, T Bley, B Baeßler;
  Frontiers in Radiology, 22Please cite it if you're using the framework for your research.
Package: autora-doc
AutoDocThis project was automatically generated using the LINCC-Frameworkspython-project-template. For more information about the project template see thedocumentation.Dev Guide - Getting StartedBefore installing any dependencies or writing code, it's a great idea to create a
virtual environment. We recommend usingcondato manage virtual
environments. If you have conda installed locally, you can run the following to
create and activate a new environment.>> conda create env -n <env_name> python=3.8
>> conda activate <env_name>Once you have created a new environment, you can install this project for local
development using the following commands:>> pip install -e .'[dev,pipelines]'
>> pre-commit install
>> conda install pandocNotes:The single quotes around'[dev]'may not be required for your operating system.Look atpyproject.tomlfor other optional dependencies, e.g. you can dopip install -e ."[dev,pipelines,cuda]"if you want to use CUDA.pre-commit installwill initialize pre-commit for this local repository, so
that a set of tests will be run prior to completing a local commit. For more
information, see the Python Project Template documentation onpre-commitInstallpandocallows you to verify that automatic rendering of Jupyter notebooks
into documentation for ReadTheDocs works as expected. For more information, see
the Python Project Template documentation onSphinx and Python NotebooksRunning AzureML pipelinesThis repo contains the evaluation and training pipelines for AutoDoc.PrerequisitesInstall Azure CLIAdd the ML extension:az extension add --name mlConfigure the CLI:az login
az account set --subscription "<your subscription name>"
az configure --defaults workspace=<aml workspace> group=<resource group> location=<location, e.g. westus3>Running jobsPredictionazmljobcreate-fazureml/eval.yml--setdisplay_name="Test prediction job"--setenvironment_variables.HF_TOKEN=<yourhuggingfacetoken>--webNotes:--namewill set the mlflow run id--display_namebecomes the name in the experiment dashboard--webargument will pop-up a browser window for tracking the job.TheHF_TOKENis required for gated repos, which need authenticationUploading dataExample:azstorageblobupload--account-name<account>--container<container>>--filedata/data.jsonl-ndata/sweetpea/data.jsonl
Package: autora-experimentalist-falsification
AutoRA Falsification ExperimentalistThe falsification pooler and sampler identify novel experimental conditions $X'$ under
which the loss $\hat{\mathcal{L}}(M,X,Y,X')$ of the best
candidate model is predicted to be the highest. This loss is
approximated with a multi-layer perceptron, which is trained to
predict the loss of a candidate model, $M$, given experiment
conditions $X$  and dependent measures $Y$ that have already been probed:$$
\underset{X'}{argmax}~\hat{\mathcal{L}}(M,X,Y,X').
$$Quickstart GuideYou will need:python3.8 or greater:https://www.python.org/downloads/Falsification Experimentalistis a part of theautorapackage:pipinstall-Uautora["experimentalist-falsification"]Check your installation by running:python-c"from autora.experimentalist.falsification import falsification_pool"
Package: autora-experimentalist-inequality
AutoRA Inequality Experimentalistautora-experimentalist-inequalityis a Python module for sampling data built on AutoRA.Website:https://autoresearch.github.io/autora/User GuideYou will need:python3.8 or greater:https://www.python.org/downloads/graphviz(optional, required for computation graph visualizations):https://graphviz.org/download/Install the inequality experimentalist as part of theautorapackage:pipinstall-U"autora[experimentalist-inequality]"It is recommended to use apythonenvironment manager likevirtualenv.Check your installation by running:python-c"from autora.experimentalist.inequality import summed_inequality_sample"
Package: autora-experimentalist-leverage
The Leverage ExperimentalistThis experimentalist uses the statistical concept of leverage by refitting the provided models iteratively with the leave-one-out method.WARNING:
This experimentalist needs to fit each model you provide it n times, where n corresponds to the number of datapoints you have.
As such, the computational time and power needed to run this experimentalist increases exponentially with increasing number of models and datapoints.In each iteration, it computes the degree to which the currently removed datapoint has influence on the model.
If the model remains stable, the datapoint is deemed to have little influence on the model, and as such will have a low likelihood of being selected for further investigation.
In contrast, if the model changes, the datapoint is influential on the model, and has a higher likelihood of being selected for further investigation.Specifically, you provide the experimentalist with a model that has been trained on all of the data. On each iteration, the experimentalist fits a new model with all data aside from one datapoint.
Both models ($m$) then predict Y scores ($Y'$) from the original X variable and compute a mean squared error (MSE) for each X score ($i$):$$MSE_{m,i} = \sum(Y'{m,i} - Y{i})^{2}$$The experimentalist then computes a ratio of the MSE scores between the experimentalist model and the original model that you provided:$${MSE_{Ratio}}{m,i} = {MSE{experimentalist}}{m,i}/{MSE{original}}_{m}$$
As such, values above one indicates that the original model fit the data better than the experimentalist model when removing that datapoint ($i$).
In contrast, values below one indicates that the experimentalist model fit the data better than the original model when removing that datapoint ($i$).
And a value of one indicates that both models fit the data equally. If you provide multiple models, it will then average across these models to result in an aggregate MSE score for each X score. In the future, it might be a good idea to incorporate multiple models in a more sophisticated way.Finally, the experimentalist then uses these aggregated ratios to select the next set of datapoints to explore in one of three ways, declared with the 'fit' parameter.
-'increase' will choose samples focused on X scores where the fits got better (i.e., the smallest MSE ratios)
-'decrease' will choose samples focused on X scores where the fits got worse (i.e., the largest MSE ratios)
-'both' will do both of the above, or in other words focus on X scores with the most extreme scores.Example Codefrom autora.experimentalist.leverage import leverage_sample
from autora.theorist.darts import DARTSRegressor; DARTSRegressor()
from sklearn.linear_model import LogisticRegression

#Meta-Setup
X = np.linspace(start=-3, stop=6, num=10).reshape(-1, 1)
y = (X**2).reshape(-1, 1)
n = 5

#Theorists
darts_theorist = DARTSRegressor()
lr_theorist = LogisticRegression()
darts_theorist.fit(X,y)
lr_theorist.fit(X,y)

#Experimentalist
X_new = leverage_sample(X, y, [darts_theorist, lr_theorist], fit = 'both', num_samples = n)
Package: autora-experimentalist-model-disagreement
AutoRA Model Disagreement ExperimentlistThe model disagreement experimentlist identifies experimental conditions $\vec{x}' \in X'$ with respect to
a pairwise distance metric between theorist models, $P_{M_{i}}(\hat{y}, \vec{x}')$:$$
\underset{\vec{x}'}{\arg\max}~(P_{M_{1}}(\hat{y}, \vec{x}') - P_{M_{2}}(\hat{y}, \vec{x}'))^2
$$Example Codefrom autora.experimentalist.model_disagreement import model_disagreement_sample
from autora.theorist.bms import BMSRegressor; BMSRegressor()
from autora.theorist.darts import DARTSRegressor; DARTSRegressor()
import numpy as np

#Meta-Setup
X = np.linspace(start=-3, stop=6, num=10).reshape(-1, 1)
y = (X**2).reshape(-1, 1)
n = 5

#Theorists
bms_theorist = BMSRegressor()
darts_theorist = DARTSRegressor()
bms_theorist.fit(X,y)
darts_theorist.fit(X,y)

#experimentlist
X_new = model_disagreement_sample(X, [bms_theorist, darts_theorist], n)
Package: autora-experimentalist-nearest-value
AutoRA Nearest Value ExperimentalistA experimentalist which returns the nearest values between the input samples and the allowed values, without replacement.Example Codefrom autora.experimentalist.nearest_value import nearest_values_sampler
import numpy as np

#Meta-Setup
X_allowed = np.linspace(-3, 6, 10)
X = np.random.choice(X_allowed,10)
n = 5

#Sampler
X_new = nearest_values_sampler(X, X_allowed, n)
Package: autora-experimentalist-novelty
AutoRA Novelty ExperimentalistThe novelty experimentalist identifies experimental conditions $\vec{x}' \in X'$ with respect to
a pairwise distance metric applied to existing experimental conditions $\vec{x} \in X$:$$
\underset{\vec{x}'}{\arg\max}~f(d(\vec{x}, \vec{x}'))
$$where $f$ is an integration function applied to all pairwise  distances.ExampleFor instance,
the integration function $f(x)=\min(x)$ and distance function $d(x, x')=|x-x'|$ identifies
condition $\vec{x}'$ with the greatest minimal Euclidean distance to all
existing conditions in $\vec{x} \in X$.$$
\underset{\vec{x}}{\arg\max}~\min_i(\sum_{j=1}^n(x_{i,j} - x_{i,j}')^2)
$$To illustrate this sampling strategy, consider the following four experimental conditions that
were already probed:$x_{i,0}$$x_{i,1}$$x_{i,2}$000100010001Fruthermore, let's consider the following three candidate conditions $X'$:$x_{i,0}'$$x_{i,1}'$$x_{i,2}'$111222333If the novelty experimentalist is tasked to identify two novel conditions, it will select
the last two candidate conditions $x'{1,j}$ and $x'{2,j}$ because they have the greatest
minimal distance to all existing conditions $x_{i,j}$:Example Codeimportnumpyasnpfromautora.experimentalist.noveltyimportnovelty_sampler,novelty_score_sampler# Specify X and X'X=np.array([[1,2,3],[4,5,6],[7,8,9],[10,11,12]])X_prime=np.array([[1,1,1],[2,2,2],[3,3,3]])# Here, we choose to identify two novel conditionsn=2X_sampled=novelty_sampler(conditions=X_prime,reference_conditions=X,num_samples=n)# We may also obtain samples along with their z-scored novelty scores(X_sampled,scores)=novelty_score_sampler(conditions=X_prime,reference_conditions=X,num_samples=n)
Package: autora-experimentalist-sampler-inequality
AutoRA Inequality Samplerautora-experimentalist-inequailtysampleris a Python module for sampling data built on AutoRA.Website:https://autoresearch.github.io/autora/User GuideYou will need:python3.8 or greater:https://www.python.org/downloads/graphviz(optional, required for computation graph visualizations):https://graphviz.org/download/Install the inequality sampler as part of theautorapackage:pipinstall-U"autora[experimentalist-inequality-sampler]"It is recommended to use apythonenvironment manager likevirtualenv.Check your installation by running:python-c"from autora.experimentalist.sampler.inequality import summed_inequality_sampler"
Package: autora-experimentalist-sampler-leverage
The Leverage SamplerThis sampler uses the statistical concept of leverage by refitting the provided models iteratively with the leave-one-out method.WARNING:
This sampler needs to fit each model you provide it n times, where n corresponds to the number of datapoints you have.
As such, the computational time and power needed to run this sampler increases exponentially with increasing number of models and datapoints.In each iteration, it computes the degree to which the currently removed datapoint has influence on the model.
If the model remains stable, the datapoint is deemed to have little influence on the model, and as such will have a low likelyhood of being selected for further investigation.
In contrast, if the model changes, the datapoint is influential on the model, and has a higher likelihood of being selected for further investigation.Specifically, you provide the sampler with a model that has been trained on all of the data. On each iteration, the sampler fits a new model with all data aside from one datapoint.
Both models ($m$) then predict Y scores ($Y'$) from the original X variable and compute a mean squared error (MSE) for each X score ($i$):$$MSE_{m,i} = \sum(Y'{m,i} - Y{i})^{2}$$The sampler then computes a ratio of the MSE scores between the sampler model and the original model that you provided:$${MSE_{Ratio}}{m,i} = {MSE{sampler}}{m,i}/{MSE{original}}_{m}$$
As such, values above one indicates that the original model fit the data better than the sampler model when removing that datapoint ($i$).
In contrast, values below one dindicates that the sampler model fit the data better than the original model when removing that datapoint ($i$).
And a value of one indicates that both models fit the data equally. If you provide multiple models, it will then average across these models to result in an aggregate MSE score for each X score. In the future, it might be a good idea to incorporate multiple models in a more sophisticated way.Finally, the sampler then uses these aggregated ratios to select the next set of datapoints to explore in one of three ways, declared with the 'fit' parameter.
-'increase' will choose samples focused on X scores where the fits got better (i.e., the smallest MSE ratios)
-'decrease' will choose samples focused on X scores where the fits got worse (i.e., the largest MSE ratios)
-'both' will do both of the above, or in other words focus on X scores with the most extreme scores.Example Codefrom autora.experimentalist.sampler.leverage import leverage_sample
from autora.theorist.darts import DARTSRegressor; DARTSRegressor()
from sklearn.linear_model import LogisticRegression

#Meta-Setup
X = np.linspace(start=-3, stop=6, num=10).reshape(-1, 1)
y = (X**2).reshape(-1, 1)
n = 5

#Theorists
darts_theorist = DARTSRegressor()
lr_theorist = LogisticRegression()
darts_theorist.fit(X,y)
lr_theorist.fit(X,y)

#Sampler
X_new = leverage_sample(X, y, [darts_theorist, lr_theorist], fit = 'both', n_samples = n)
Package: autora-experimentalist-sampler-model-disagreement
AutoRA Model Disagreement SamplerThe model disagreement sampler identifies experimental conditions $\vec{x}' \in X'$ with respect to
a pairwise distance metric between theorist models, $P_{M_{i}}(\hat{y}, \vec{x}')$:$$
\underset{\vec{x}'}{\arg\max}~(P_{M_{1}}(\hat{y}, \vec{x}') - P_{M_{2}}(\hat{y}, \vec{x}'))^2
$$Example Codefrom autora.experimentalist.sampler.model_disagreement import model_disagreement_sample
from autora.theorist.bms import BMSRegressor; BMSRegressor()
from autora.theorist.darts import DARTSRegressor; DARTSRegressor()
import numpy as np

#Meta-Setup
X = np.linspace(start=-3, stop=6, num=10).reshape(-1, 1)
y = (X**2).reshape(-1, 1)
n = 5

#Theorists
bms_theorist = BMSRegressor()
darts_theorist = DARTSRegressor()
bms_theorist.fit(X,y)
darts_theorist.fit(X,y)

#Sampler
X_new = model_disagreement_sample(X, [bms_theorist, darts_theorist], n)
Package: autora-experimentalist-sampler-nearest-value
AutoRA Nearest Value SamplerA sampler which returns the nearest values between the input samples and the allowed values, without replacement.Example Codefrom autora.experimentalist.sampler.nearest_value import nearest_values_sampler
import numpy as np

#Meta-Setup
X_allowed = np.linspace(-3, 6, 10)
X = np.random.choice(X_allowed,10)
n = 5

#Sampler
X_new = nearest_values_sampler(X, X_allowed, n)