Saravanan666/pypi-org huggingface dataset:
Package: modconfig
modconfig– Simple hierarchic configuration manager for appsMotivationApplications (especially web services) often require certain configuration
options to depend on the environment an application runs in (development,
testing, production, etc.). For instance, a database address config option may
default to a local database server during development, a mock database server
during testing, and yet another database server during production. It may also
need to be customizable via an environment variable.modconfigapproaches
scenarios like this and, allows to specify default configuration options for
various environments and optionally override them by custom environment
variables.modconfiguses python modules for keep the configuration options. You are
not locked by format (json, yaml, ini) restrictions and able to use any python
statements/modules to tune your configuration as a pro. It keeps the
flexability and make your configuration very declarative without any magic.ContentsMotivationRequirementsInstallationUsageFallbacksEnviromentsCustom Environment VariablesBug trackerContributingLicenseRequirementspython >= 3.6Installationmodconfigshould be installed using pip:pip install modconfigUsageFor example you have the structure in your app:|- myapp/
|  |- __init__.py
|  |- config/
|  |  |- __init__.py
|  |  |- defaults.py
|  |  |- production.py
|  |  |- stage.py
|  |  |- tests.py
|  | ...Seehttps://github.com/klen/modconfig/tree/develop/exampleas a simple reference.Initialize the config in your app and use it anywhere:frommodconfigimportConfigcfg=Config(# instead an import path it could be the module itself'myapp.config.production',# Override any optionsANY_OPTION1="VALUE",ANY_OPTION2="VALUE")assertcfg.DATABASEassertcfg.ANY_OPTION1FallbacksIf you provide a several modules,modconfigwill be using the first available:frommodconfigimportConfigcfg=Config('myapp.config.local','myapp.config.production',ANY_OPTION1="VALUE")assertcfg.DATABASEassertcfg.ANY_OPTION1EnviromentsThe module path may be set as ENV variable:importosfrommodconfigimportConfig# Let's define an env varos.environ['MODCONFIG']='myapp.config.production'cfg=Config('env:MODCONFIG','myapp.config.local')assertcfg.DATABASECustom Environment VariablesAny option may be redifened with ENV variables. By default themodconfigtries to parse value as a JSON which allows us to set complex values (dict,
list, etc). If value is not JSON it would be parsed as str.Any ENV variables which names are not contained in source module would be
ignored.Seehttps://github.com/klen/modconfig/tree/develop/tests.pyfor more examples.Bug trackerIf you have any suggestions, bug reports or
annoyances please report them to the issue tracker
athttps://github.com/klen/modconfig/issuesContributingDevelopment of the project happens at:https://github.com/klen/modconfigLicenseLicensed under aMIT license.
Package: moddb
ModDB ReaderLibrary is now stableThe goal of the library is to be able to navigate ModDB purely programmatically through scraping and parsing of the various models present on the website. This is based off a command of my bot which can parse either a game or a mod, this command gave birth to the original library which was extremely limited in its abilities and only able to parse a few pages with inconsistencies. This library is a much more mature and professional attempt at the whole idea, adding on a much deeper understanding of OOP.Basic UsageThe simplest way to use this library is to simply pass a ModDB url to the parse function and let the magic happen.importmoddbmod=moddb.parse_page("http://www.moddb.com/mods/edain-mod")print(mod.name)#Edain ModAdvanced UsageCheck out thedocumentationfor more informationSupportInstallingYou can get it from pypi:https://pypi.org/project/moddbpip install moddbModelsModGameEngineFileMediaAddonArticleBlogUserTeamGroupJobSearch PageFront PagePlatformsSoftwareHardwAreUpdatesFriend RequestsWatchersTagsMaybeMessagesThreadsGlossaryPartial[Model]: A version of the model which does not contain all the attributes of the full model. Mainly because that model is being displayed as a preview in another page. Not to confuse with Thumbnails, Thumbnails are only guaranteed to contain a name and url of the page.Boxes: Containers present on pages, adivtag which contains information around a certain theme and as such have been grouped into Box Models of such.Pages: Another name for Models.Thumbnails: A very widely used model meant to represent models which are references but not expanded onto. Usually the model in question will only include a url and the name of the page. This is transformed into a thumbnail and the user can then parse it with the built-in method.DevelopmentThe necessary dependencies are stored in requirements.txt and requirements-dev.txt and can be installed with the following commandpython -m pip install -r requirements.txt -r requirements-dev.txtTestingThe testing is handled in two ways. There is a standard set of tests which are more lightweight, they test different entities of the library using one URL per entity. The second way is through the extended test suite. This extended test suite runs the standard test suite with multiple urls for each entity. This provides a better coverage but is also a lot more expensive to run and sometimes errors out because of ratelimits.In general, if you're just trying to do a sanity check on the library it is recommended to use the standard test set using the cassettes. This minimizes requests dones to the ModDB server and your chance of being ratelimited.Standard Set:pytest -k "not main" --record-mode=new_episodesFull Set:pytest -k "main" --record-mode=allBecause tests in the suite grab the latest items from pages it is essentially not possible to have a zero request test. It is recommended to always run tests with at least thenew_episodesrecord mode if you're planning to use the cassettes.grep -r -l Service Unavailable * | xargs rm
Package: modde
Modular DEThis work-in-progress repository contains the code used to create a modular version of differential evolution.Basic use-case: L-SHADETo instantiate L-SHADE using modDE and optimize a function (using iohexperimenter), the following code can be used:frommodulardeimportModularDEimportiohimportnumpyasnpf=ioh.get_problem(23,1,5)lshade=ModularDE(f,base_sampler='uniform',mutation_base='target',mutation_reference='pbest',bound_correction='expc_center',crossover='bin',lpsr=True,lambda_=18*5,memory_size=6,use_archive=True,init_stats=True,adaptation_method_F='shade',adaptation_method_CR='shade')lshade.run()To perform a larger benchmark experiment which includes tracking of internal parameters, the following can be used (note that running the full experiment with detailed tracking will use a significant amount of storage):classLSHADE_interface():def__init__(self,bound_corr):self.bound_corr=bound_corrself.lshade=Nonedef__call__(self,f):self.lshade=ModularDE(f,base_sampler='uniform',mutation_base='target',mutation_reference='pbest',bound_correction=self.bound_corr,crossover='bin',lpsr=True,lambda_=18*f.meta_data.n_variables,memory_size=6,use_archive=True,init_stats=True,adaptation_method_F='shade',adaptation_method_CR='shade')self.lshade.run()@propertydefF(self):ifself.lshadeisNone:return0returnself.lshade.parameters.stats.curr_F@propertydefCR(self):ifself.lshadeisNone:return0returnself.lshade.parameters.stats.curr_CR@propertydefCS(self):ifself.lshadeisNone:return0returnself.lshade.parameters.stats.CS@propertydefED(self):ifself.lshadeisNone:return0returnself.lshade.parameters.stats.ED@propertydefcumulative_corrected(self):ifself.lshadeisNone:return0returnself.lshade.parameters.stats.corr_so_far@propertydefcorrected(self):ifself.lshadeisNone:return0returnself.lshade.parameters.stats.correctedobj=LSHADE_interface('saturate')exp=ioh.Experiment(algorithm=obj,#Set the optimization algorithmfids=range(1,25),iids=[1,2,3,4,5],dims=[5,30],reps=5,problem_type='Real',#Problem definitionsnjobs=12,logger_triggers=[ioh.logger.trigger.ALWAYS],#Enable paralellizationlogged=True,folder_name=f'L-SHADE_sat',algorithm_name=f'L-SHADE',store_positions=True,#Logging specificationsexperiment_attributes={'SDIS':'Saturate'},logged_attributes=['corrected','cumulative_corrected','F','CR','CS','ED'],#Attribute trackingmerge_output=True,zip_output=True,remove_data=True#Only keep data as a single zip-file)exp()The design of this package is heavily based on the Modular CMA-ES package:https://github.com/IOHprofiler/ModularCMAES
Package: mod-docx
mod_docxThe purpose of this library is to serve as a reliable and simple library to reassemble docx documents after they have been treated using AI/machine learning text treatment.Example of library usageimport osimport syssys.path.insert(1, '/usr/lib/python3.11/site-packages')import mod_docx[Step 0] Open the docx file as an XML objectObtain the orignal docx filefpath = ".../mod_docx/tests"fichier = "test_document.docx"docx_filename = os.path.join(fpath, fichier)Create a class object for the name_of_file.class_name. Use the class object, to call the functions in the class.md = mod_docx.mod_docx(docx_filename)Convert the orignal docx file to XMLdocument_org = md.opendocx(docx_filename)[Step 1] Modify the document[To be completed for next version] Modify the document as desired (ie: replace text, change style, change font)doc_finale = document_org[Step 2] Save the changed XML document as a docx fileroot_dir = f'{fpath}/'desired_output_docx_name = 'test_document_out.docx'md.savedocx_ver_fichier(docx_filename, root_dir, desired_output_docx_name, doc_finale)
Package: moddy
Moddy is a discrete event simulator for concept analysis written in python.System models are written in python. The model behaviour can be event based, sequentially or a combination of both.Moddy generates sequence diagram with timing information, model structure graphs,
finite state machine graphs and trace tables from the simulation.Typical applications are:Modelling communication protocolsModelling highly distributed computer systemsPlease read theModdy Online Documentation.Moddy comes with an interactive viewer for sequence diagrams where you can dynamically adjust the time scale.
Here is a screenshot of Moddy Interactive Viewer,
better seeOnline Viewer Demo.InstallationModdy requires: Python >=3.5, and Graphviz.$pipinstall-UmoddyGetting StartedRunthe basic demo
Package: modeanalytics
Django Mode AnalyticsThis project was only tested on PostgreSQLHow it worksInstallationRequirementsDjango and pyscopg2pipinstallmodeanalyticsConfigurationYou must set the follow vars in your djangosettingsMODE_ORG: str = ""
    MODE_ACCESS_KEY: str = ""
    MODE_ACCESS_SECRET: str = ""To generate these signature tokens, please look atMode SupportAddmodeanalyticsin yourINSTALLED_APPStupleINSTALLED_APPS = [
        "django.contrib.admin",
        "django.contrib.auth",
        "django.contrib.contenttypes",
        "django.contrib.sessions",
        "django.contrib.messages",
        "django.contrib.staticfiles",
        "modeanalytics",
    ]Package buildBumping version, options aremajor, minor and patch.bumpversionpatchsetup.pymodeanalytics/__init__.pyPreparing the packagepythonsetup.pysdistbdist_wheelChecking if the package is good enough to PyPitwinecheckdist/*Uploading the package to PyPitwineuploaddist/*
Package: mode-analyzer
Mode AnalyzerA GUI program written in Python to analyze optical waveguide mode analysis. It opens popular image file formats i.e. *.JPG, *.TIFF, etc. and analyzes the intensity profiles along a line or averaged in a cross-section box. It's intended to be easy to use to do basic image corrections and analysis on optical mode profiles and MMI pattern analysis both for facet images and fluorescent images.PrerequisitesPython (>= 3.6, might work with 2.7 not tried!)Numpy (>= 1.13.3)Scipy (>= 1.0.0)Matplotlib (>= 2.1.1)Pillow (>= 5.0.0)You can install all requirements usingpip installcommand. Once installed, just simply cd to the main master folder and callmain.pyfile via python (python main.py).GUIThe main window consists of three main panels:Directory: list of readable image files with datapoint copy and save buttons at the bottomImage: Image view and profile plot graph at the bottomSettings: Tabs of different analysis parametersThere's a table to show statistics about detected peaks and fitted parameters. Here are the availble metrics for the latest version:Number of spots: number of detected peaks based on the parameters set in peak find setting section. For optical profiles and MMI patterns, this number indicates number of bright spots.Full-Width-Half-Maxima (FWHM): FWHM based on extracted σ value from Gaussian fit:FWHM = 2σ√(2 ln(2))Peak to Valley: the gap between average of peaks and valleys for detected peaksΔx: the separation between detected peaksAverage and standard deviation of the mentioned metrics are listed in the table.A pop up window with plot of actual values taken from raw data as well as Gaussian fits to the detected peaks in intensity plot. There are highlighted parts to showpeaksandvalleysand dashed lines showing averages of these parameters.ReferenceThis program was used to do MMI pattern analysis published in this paper:
(will be great if you cite it if you find this program helpful in your study)Stott, Matthew A.,Vahid Ganjalizadeh, Maclain H. Olsen, Marcos Orfila, Johnny McMurray, Holger Schmidt, and Aaron R. Hawkins. "Optimized ARROW-based MMI waveguides for high fidelity excitation patterns for optofluidic multiplexing." IEEE journal of quantum electronics 54, no. 3 (2018): 1-7.
Package: model2api
model2apiTurns your Python functions into microservices REST API in an instant.Getting StartedInstantly turn your Python functions into production-ready microservices. Deploy and access your services via REST API.model2apibuilds on open standards - OpenAPI,  JSON Schema, and Python type hints - and is powered by FastAPI, and Pydantic. It cuts out all the pain for productizing and sharing your Python code - or anything you can wrap into a single Python function.This package is based onopyratorand was fork as the package was relying on older version of FastAPI and Starlette.HighlightsTurn functions into production-ready services within seconds.Auto-generated HTTP API based on FastAPI.Save and share as self-contained executable file or Docker image.Instantly deploy and scale for production usage.Track and monitor API's call with correlation_idGetting StartedInstallationRequirements: Python 3.7+.pipinstallmodel2apiUsageA simple compatible function could look like this:frompydanticimportBaseModelclassInput(BaseModel):message:strclassOutput(BaseModel):message:strdefhello_world(input:Input)->Output:"""Returns the `message` of the input data."""returnOutput(message=input.message)A compatible function is required to have aninputparameter and return value based onPydantic modelsor anUploadFile. The input and output models are specified viatype hints.Copy this code to a file, e.g.model.pyRun the HTTP API server from command-line:model2apimodel:hello_worldIn the output, there's a line that shows where your web service is being served, on your local machine.
Package: model2c
model2cAbout the ProjectPython API and Command Line tool to convert ML models into low-level inference for embedded platformsGetting StartedPrerequisitesMake sure you havetensorflow tf2onnxortorchinstalled.Furthermore, make sure you haveonnx2cinstalled and added toPATH.Lastly you need ProtocolBuffers libraries installed, e.g.:Ubuntu:apt install libprotobuf-dev protobuf-compilerMacOS:brew install protobufGet the sources:gitclonehttps://github.com/kraiskil/onnx2c.gitcdonnx2c
gitsubmoduleupdate--initThen run a standard CMake buildmkdirbuildcdbuild
cmake..
makeonnx2cAnd finally add to pathexportPATH=$PATH:/path/to/onnx2c/folderInstallationYou can can install the package throughpypi:pipinstallmodel2cOr you can clone the repo and build directly from source:gitclonegit@github.com:h3x4g0ns/model2c.gitcdmodel2c
makeinstallUsageTrain a model with correponding data until sufficient metrics are obtained.importtorchimportmodel2c.pytorchimportconvert# run convertorconvert(model=torch_model,input_shape=(batch_size,1,224,224),quantization="fp32",output_file="model.c")print(f"size of output model:{os.path.getsize('model.c')/1024}kilobytes")Supportmodel2ccurrently supports the following ML frameworkstorchtf/kerasTo Dotorchconverttfconvertmake command line utilityinclude dynamic axis for batch size
Package: modela
What is Modela?Modela is a Kubernetes-based automatic machine learning platform that enables you with an expansive API for machine
learning. The system implements Kubernetes custom resources for declaratively managing data, training, inference, and
infrastructure objects. The Modela control plane manages these resources to provide fully distributed and automated machine learning.For a complete documentation of the API, check out thedocumentation.Install ModelaModela can be installed through the Modela CLI, or through Helm Charts. For a complete installation procedure, please
refer to the installation procedure on thedocumentation.Using the SDKThe Modela API is implemented byModela, which can be installed on
any Kubernetes cluster for free. You can access the API by connecting to the API gateway service hosted by your installation.
Package: model-archiver
Model Archiver is a tool used for creating archives of trained neural
net models that can be consumed by MXNet-Model-Server inference.Use the Model Archiver CLI to start create a.marfile.Model Archiver is part ofMMS.
However,you ca install Model Archiver stand alone.Detailed documentation and examples are provided in theREADME.PrerequisitesONNX support is optional inmodel-archivertool. It’s not installed
by default withmodel-archiver.If you wish to package a ONNX model, you will need to first install aprotobufcompiler,onnxandmxnetmanually.Instructions for installing Model Archiver with
ONNX.Installationpip install model-archiverDevelopmentWe welcome new contributors of all experience levels. For information on
how to install MMS for development, refer to theMMS
docs.Important linksOfficial source code
repoDownload
releasesIssue
trackerSource codeYou can check the latest source code as follows:git clone https://github.com/awslabs/mxnet-model-server.gitTestingAfter installation, try out the MMS Quickstart forCreate a
model archiveandServing a
Model.Help and SupportDocumentationForumCitationIf you use MMS in a publication or project, please cite MMS:https://github.com/awslabs/mxnet-model-server
Package: model-arena
Models Package1- Ridge Regression: Extends SKLearns Ridge regression by adding p-values, featureSelection and alpha optimisation.Example Usage:Importfrom model_arena.Regression import RidgeRegressionCreate a RidgeRegression objectrm = RidgeRegression()Run the feature selection method as above to limit to the most important variables.Stores the order of variables to the objectrm.featureSelection(X,y)Find the value of alpha minimising MSE for these featuresrm.findBestAlpha(X[rm.bestMeanCVModel],y)Print the alphaprint('Alpha = {}'.format(rm.alpha))Fit the model with the best features and the alpharm.fit(X[rm.bestMeanCVModel],y)Display a summary including p-valuesrm.summary(X[rm.bestMeanCVModel],y)To Update PYPI1- Clone from github2- Make Changes3- Update version number in setup.py4- CD into the setup.py directory5- Run the following in the CMD:
python3 -m pip install --user --upgrade setuptools wheel
python3 setup.py sdist bdist_wheel
or
python -m pip install --user --upgrade setuptools wheel
python setup.py sdist bdist_wheel6- Then the following in the CMD:
python3 -m pip install --user --upgrade twine
python3 -m twine upload dist/*
or
python -m pip install --user --upgrade twine
python -m twine upload dist/*7- Test by pip install and importing
Package: modelator
Modelator⚠️ We are working on a new and entirely reworked Modelator architecture for improved performance and interoperability. Therefore, the current version is not maintained. The reworked version will be released in Q3 2022. ⚠️This repository contains the source code formodelator- a framework and tools for model-based testing.We deprecatedmodelatorsupport for Rust and Go.modelatoris used as a python package.InstructionTo installmodelatorviapip, execute the following# over httpspipinstallgit+https://github.com/informalsystems/modelator# or, over sshpipinstallgit+ssh://git@github.com/informalsystems/modelator
python
...
>>>importmodelatorIf you are using a Poetry project, execute the following to addmodelatoras a dependency,# over httpspoetryaddgit+ssh://git@github.com/informalsystems/modelator#dev# `poetry` assumes `master` as default branch# or, over sshpoetryaddgit+https://github.com/informalsystems/modelator#devContributingIf you wish to contribute tomodelator, set up the repository as follows,git clone git@github.com/informalsystems/modelator
cd modelator
poetry install
poetry shellLicenseCopyright © 2021-2022 Informal Systems Inc. and modelator authors.Licensed under the Apache License, Version 2.0 (the "License"); you may not use the files in this repository except in compliance with the License. You may obtain a copy of the License athttps://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package: modelator-py
modelator-py⚠️ The tools in this repo are unstable and may be subject to major changes ⚠️Lightweight utilities to assist model writing and model-based testing activities using the TLA+ ecosystem.What is this project?A collection of cli utilities and library functions to reduce leg-work when developing TLA+ models, running model checkers, and doing model-based testing. The utilities are also intended to act as building blocks for tool development in the TLA+ ecosystem.What can it do right now?Currently there is a cli and library functions implementing utilities:RunTLCmodel checker without side effects (runs in temporary directory and is cleaned up)RunTLCmodel checker programmatically (reads and returns json data)RunApalachemodel checker without side effects (runs in temporary directory and is cleaned up)RunApalachemodel checker programmatically (reads and returns json data)Extract traces from TLC output inInformal Trace Formatformat (concise and machine readable counterexample representation)Allowing clean programmatic access to model checkers and other utility.What will it do in the future?The model-based testing capabilities developed at Informal are currently in themodelatortool and are being migrated to a multi language architecture. Please expect more utilities and more tooling soon.UsagePlease seeusage.Running the code in this repositoryPlease seecontributing.ContributingPlease seecontributing.LicenseCopyright © 2021 Informal Systems Inc. and modelator authors.Licensed under the Apache License, Version 2.0 (the "License"); you may not use the files in this repository except in compliance with the License. You may obtain a copy of the License athttps://www.apache.org/licenses/LICENSE-2.0
Package: modelaverage
modelaverage`modelaverage` is a pip package which make the average weight of model weight in `same models`, inspired by [Average weights in keras models](https://stackoverflow.com/questions/48212110/average-weights-in-keras-models). I created this pip package to use distributed computing environment like `kubernetes`.Usagepip install modelaverageorgit clone https://github.com/graykode/modelaverage && python setup.py installusing functionaverage(modellist)modellist : list of model file names.return : averaged weight modelExamplePlease see exampleimporttensorflowastffrommodelaverageimportaveragemodellist=['models/mnist1.h5','models/mnist2.h5','models/mnist3.h5','models/mnist4.h5','models/mnist5.h5','models/mnist6.h5','models/mnist7.h5','models/mnist8.h5','models/mnist9.h5']averaged_model=average(modellist)forwinaveraged_model.get_weights():print(w.shape)AuthorName : Tae Hwan Jung(@graykode)Email :nlkey2022@gmail.com