Saravanan666/pypi-org huggingface dataset:
Package: optic-sdk
Optic Python SdkThe code library standardizing data capture forOpticin Python applications. We have alist of middleware available for some frameworks, if we are missing the frameworkjoin our communityand suggest the next framework or develop it with us.RequirementsThe library requires@useoptic/clito be installed, instructions on installing it are availablehttps://www.useoptic.com/docs/.Installpipinstalloptic-sdkUsageThe library provides apis to interact with optic cli. This library does not provide ecs converters and should be used
along with framework specific optic librariesConfigurationEnvironment variables can also be used to set the values.ENABLE:boolean(defaults toTrue) Programmatically control if capturing data and sending it to OpticUPLOAD_URL:string(defaults toos.environ['OPTIC_LOGGING_URL']) The URL to Optics capture URL, if left blank it
will expectOPTIC_LOGGING_URLenvironment variable set by the Optic CLICONSOLE:boolean(defaults toFalse) Send to stdout/console for debuggingframework:stringAdditional information to inform Optic of where it is capturing informationLOG:boolean(defaults toFalse) Send to log fileLOG_PATH:boolean(defaults to./optic.log) Log file pathLOCAL:boolean(defaults toTrue) Send to optic cliExamplefrom optic import OpticConfig, Optic
    def send_to_optic_cli(ecs_object):
        """
        ecs_object: Json serializble ecs object
        """
        config = OpticConfig(framework="<insert name>", CONSOLE=True)
        optic = Optic(config)
        optic.send_to_local_cli(ecs_object) //send to optic cli
        optic.send_to_file(ecs_object) //save to file
        optic.send_to_console(ecs_object) //send to stdoutLicenseThis software is licensed under theMIT license.
Package: opticspy
Opticspy is a python module concentrated on optical application. It has several optics simulation and analysis class and functions:
1. Real ray tracing
2. Zernike polynomials
3. Twyman-green, lateral shear and phase shift interferometer simulation
4. Surface rebuild with interferogram.
5. Aberration calculation
6. Wave propagation method for different shape of aperture(fresnel, fraunhofer and OTF)
7. Jones matrix
Package: opticut
opticut1D cutting stock problem solverIt can be called as a python package, through CLI and a web based GUI.
This Package Needs a MIP(Mixed Integer Programming) solver as a dependency.you can check the full documentationhereInstallationWindows:Install one of the following solvers and add the executable file path to the environmental variables.editautoexec.batUsage exampleA few motivating and useful examples of how your product can be used. Spice this up with code blocks and potentially more screenshots.For more examples and usage, please refer to theWiki.Development setupDescribe how to install all development dependencies and how to run an automated test-suite of some kind. Potentially do this for multiple platforms.makeinstall
npmtestRelease History0.2.1CHANGE: Update docs (module code remains unchanged)MetaSina Hajikazemi –sina.hkazemi@gmail.comDistributed under the MIT license. SeeLICENSEfor more information.https://github.com/sinahkazemi/ContributingFork it (https://github.com/yourname/yourproject/fork)Create your feature branch (git checkout -b feature/fooBar)Commit your changes (git commit -am 'Add some fooBar')Push to the branch (git push origin feature/fooBar)Create a new Pull Request
Package: optifolio
OptiFoliois a package for portfolio optimization. For optimization, a SciPy optimizer is used, while results can be visualized with Bokeh plots.The package can also be seamlessly integrated with Yahoo Finance API,  using Pandas Data Reader.InstallOptiFolio can be installed fromPyPI:pip install optifolioFeaturesPortfolioOptimizer [object]:Optimize your portfolio based on Sharpe Ratio.fit [method]:Fits daily stock data into the optimizer. Generates annual measures.plot_efficient_frontier [method]:Generates a plot for efficient frontier, optimal portfolio, and individual stocks.plot_weights [method]:Creates a pie chart that displays portfolio weights for each ticker.plot_cumulative_return [method]:Generates a time series plot that displays portfolio performance over time.The figures are generated with Bokeh, enabling easy implementation to modern web browsers.Quick Start1. Optimize PortfoliofromoptifolioimportPortfolioOptimizer# Data from Yahoo Finance with Pandas Data Readerimportpandas_datareader.dataaswebdata=web.DataReader(['AMZN','AAPL','MSFT','NFLX','TSLA','BABA','JD'],'yahoo',start='2015/01/01',end='2019/12/31')['Adj Close']# Initiate the optimizermodel=PortfolioOptimizer()# Optimize (w. max Sharpe Ratio)model.fit(data,obj='sharpe')2. Visualize Frontiermodel.plot_efficient_frontier()3. Visualize Portfolio Weightsmodel.plot_weights()4. Visualize Cumulative Return# Adding a benchmark to compare againstbenchmark=web.DataReader(['^GSPC'],'yahoo',start='2015/01/01',end='2019/12/31')['Adj Close']model.plot_cumulative_return(benchmark_data=benchmark)AuthorKristian BonniciProfileEmailWebsite🤝 SupportContributions, issues, and feature requests are welcome!Give a ⭐️ if you like this project!
Package: optiframe
OptiframeOptiframe is anoptimizationframework for writing mixed integer programs (MIPs).It allows you to structure your MIPs in a way that allows clear separation of concerns,
high modularity and testability.Core ConceptsThe optimization process is divided into multiplestepswhich are clearly separated:Validationallows you to validate the input data.Pre-processingallows you to optimize the provided data to reduce the size of the final model.MIP buildingallows you to modify the MIP to define the optimization problem.Solvingis a pre-defined step that obtains an optimal solution for the problem.Solution extractionallows you to process the variable values of the solution into something more meaningful.Tasksare the core components that allow you to implement functionality for each step.The constructor of a task allows you to definedependenciesfor that task,
which are automatically injected by the optimizer based on their type annotation.Theexecutemethod allows you to implement the functionality.
It may return data which can then be used by other tasks as a dependency.Modulescombine tasks that belong together.
Each module must contain a task for building the MIP and can additionally contain tasks
for validation, pre-processing and solution extraction.
The modules are what makes Optiframe so extendable:
You can define extensions of a problem in a separate module and only include it if needed.Theoptimizerallows you to configure the packages that you need.
Afterwards, you can initialize it with the instance data and then solve the optimization problem.Installation & Usagepip install optiframeTake a look at theexamplesfolder for examples on how to use Optiframe!LicenseThis project is available under the terms of theMIT license.
Package: optigatrust
optigatrust Python libraryA ctypes based Python wrapper to work with the OPTIGA™ Trust security solutions.Featuresoptigatrustis a library which helps to manage the OPTIGA Trust family of security solutions
Find more about these products here:OPTIGA™ Trust MOPTIGA™ Trust ChargeOPTIGA™ Trust XDocumentationRequired HardwareAny of the followingOPTIGA™ TrustM/ChargeEvaluation KitOPTIGA™ Trust Personalisation Board (SP005405452), or any FTDI USB-HID/I2C Converter boardRaspberry Pi +Shield2Go RPi AdapterOPTIGA™ Trust X/M/Charge sample or a Security Shield2GoInstallation$pipinstalloptigatrustExamplesimportoptigatrustasoptigafromoptigatrustimportobjects,cryptoimportjsonchip=optiga.Chip()chip.current_limit=15ecc_key_0=objects.ECCKey(0xe0f0)print('Pretty metadata:{0}'.format(json.dumps(ecc_key_0.meta,indent=4)))public_key,private_key=crypto.generate_pair(ecc_key_0,curve='secp256r1',export=True)print('Pulic Key ={0}, Privat key ={1}'.format(public_key,private_key))Licenseoptigatrustis licensed under the terms of the MIT license. See theLICENSEfile for the exact license text.
Package: optika
optikaA Python library for simulating optical systems, similar to Zemax.InstallationOptika can be installed using pip:pipinstalloptikaFeaturesSequential raytrace modelingSpherical, conical and toroidal surface sag profilesRuled surfaces, constant and variable line spacingCircular, rectangular, and polygonal aperturesmultilayer reflectivity and transmissivityn-dimensional configurations of the optical system usingnamed-arraysuncertainity propagation usingnamed-arraysExample GalleryAnexampleof how to raytrace a Newtonian telescope using Optika:Compute thereflectivity of a multilayer mirrorby specifying the materials and thicknesses of the layers.Model thequantum efficiency of a backilluminated CCD
Package: optilibre
OptilibreOptilibre is a simple python program to automatically optimize video and images files using ffmpeg
and other image optimizers.
SeeSupported formatsto have a list of supported file format you can convert to/from.Official repo :https://gitlab.com/daufinsyd/optilibreInstallationInstall using pip :pip install optilibreAnd run usingpython -m optilibre -hYou can find a systemd service and timer in systemd folder, which you can copy to /etc/systemd/system/ .RequirementsSeeSupported formats.ConfigurationCopy and edit optilibre.example.conf to optilibre.conf . For each path registered in optilibre.conf, create
optilibre.toml configuration file inside the dest folder (optilibre.example.toml is here a reference).VideoThe directive [optivideo] configure the video encoder.
The directive [optivideo.meta] defines which meta args should ffmpeg use.
The directive [optivideo.audio] defines which codec should ffmpeg use to audio.
The directive [optivideo.video] defines which codec should ffmpeg use to video.
The directive [optivideo.CODEC] defines a list of options for ffmpeg to be passed through. See man ffmpeg.ImageThe directive [optiimage] configure the image encoder.
The directive [optiimage.CODEC] defines a list of options for the image encoder to be passed through. See man <image_encoder>.Supported formatsVideoany -> h264 (requires ffmpeg with libx264 encoder)any -> h265 (requires ffmpeg with libx265 encoder)Imagesjpeg -> jpeg (requires jpegoptim)any jpeg -> jpeg-xl (requires cjxl)
Package: optimage
Optimage========.. image:: https://badge.fury.io/py/optimage.svg:target: http://badge.fury.io/py/optimage.. image:: https://travis-ci.org/sk-/optimage.svg?branch=master:target: https://travis-ci.org/sk-/optimage.. image:: https://coveralls.io/repos/sk-/optimage/badge.svg?branch=master:target: https://coveralls.io/r/sk-/optimage?branch=masterOptimage optimizes JPEGs and PNGs by losslessly recompressing them and removingunnecessary metadata (EXIF, comments, etc), making the web faster and your reposmaller.Optimizers----------- JPEG* `jpegtran <http://manpages.ubuntu.com/manpages/trusty/man1/jpegtran.1.html>`_* `jpegoptim <http://manpages.ubuntu.com/manpages/trusty/man1/jpegoptim.1.html>`_- PNG* `pngcrush <http://manpages.ubuntu.com/manpages/trusty/man1/pngcrush.1.html>`_* `optipng <http://manpages.ubuntu.com/manpages/trusty/man1/optipng.1.html>`_Example usage-------------$ optimage test_data/valid1.pngFile can be losslessly compressed to 67 bytes (savings: 52 bytes = 43.70%)Replace it by running either:optimage --replace test_data/valid1.pngoptimage --output <FILENAME> test_data/valid1.png$ optimage --replace test_data/valid1.pngFile was losslessly compressed to 67 bytes (savings: 52 bytes = 43.70%)$ optimage --output /tmp/valid1.png test_data/valid1.pngFile was losslessly compressed to 67 bytes (savings: 52 bytes = 43.70%)Installation------------You can install, upgrade or uninstall ``optimage`` with these commands::$ pip install optimage$ pip install --upgrade optimage$ pip uninstall optimagePython Versions---------------Python 2.7, 3.3, 3.4 and 3.5 are supported.Development-----------Help for this project is more than welcomed, so feel free to create an issue orto send a pull request via http://github.com/sk-/optimage.Tests are run using pytest, either with::$ python setup.py test$ pytestChangelog=========v0.3.0 (2017-03-19)----------* Fixed #19: remove --lossy_8bit from zopflipng call* Fixed #13: temporary files are removed after usev0.2.0 (2016-02-08)-------------------* Added support for Python 2.7* Added support for zopflipng* Fixed #4: Images are now considered equal when alpha is 0 regardless of RGB.* Fixed #6: Add --debug option to gather performance statsv0.0.1 (2015-12-24)-------------------* Initial release with support for (jpegtran, jpegoptim, optipng, pngcrush)
Package: optimal
Optimal (beta)A python metaheuristic optimization library. Built for easy extension
and usage.Warning: Optimal is in beta. API may change. I will do my best to note
any breaking changes in this readme, but no guarantee is given.Supported metaheuristics:Genetic algorithms (GA)Gravitational search algorithm (GSA)Cross entropy (CE)Installationpip install optimalUsageimport math

from optimal import GenAlg
from optimal import Problem
from optimal import helpers

# The genetic algorithm uses binary solutions.
# A decode function is useful for converting the binary solution to real numbers
def decode_ackley(binary):
    # Helpful functions from helpers are used to convert binary to float
    # x1 and x2 range from -5.0 to 5.0
    x1 = helpers.binary_to_float(binary[0:16], -5.0, 5.0)
    x2 = helpers.binary_to_float(binary[16:32], -5.0, 5.0)
    return x1, x2

# ackley is our fitness function
# This is how a user defines the goal of their problem
def ackley_fitness(solution):
    x1, x2 = solution

    # Ackley's function
    # A common mathematical optimization problem
    output = -20 * math.exp(-0.2 * math.sqrt(0.5 * (x1**2 + x2**2))) - math.exp(
        0.5 * (math.cos(2 * math.pi * x1) + math.cos(2 * math.pi * x2))) + 20 + math.e

    # You can prematurely stop the metaheuristic by returning True
    # as the second return value
    # Here, we consider the problem solved if the output is <= 0.01
    finished = output <= 0.01

    # Because this function is trying to minimize the output,
    # a smaller output has a greater fitness
    fitness = 1 / output

    # First return argument must be a real number
    # The higher the number, the better the solution
    # Second return argument is a boolean, and optional
    return fitness, finished

# Define a problem instance to optimize
# We can optionally include a decode function
# The optimizer will pass the decoded solution into your fitness function
# Additional fitness function and decode function parameters can also be added
ackley = Problem(ackley_fitness, decode_function=decode_ackley)

# Create a genetic algorithm with a chromosome size of 32,
# and use it to solve our problem
my_genalg = GenAlg(32)
best_solution = my_genalg.optimize(ackley)

print best_solutionImportant notes:Fitness function must take solution as its first argumentFitness function must return a real number as its first return valueFor further usage details, see comprehensive doc strings.Major Changes08/27/2017Moved a number of options from Optimizer to Optimizer.optimize07/26/2017Renamed common.random_solution_binary to
common.random_binary_solution, and common.random_solution_real to
common.random_real_solution11/10/2016problem now an argument of Optimizer.optimize, instead of
Optimizer.__init__.11/10/2016max_iterations now an argument of Optimizer.optimize, instead of
Optimizer.__init__.11/8/2016Optimizer now takes a problem instance, instead of a fitness function
and kwargs.11/5/2016Library reorganized with greater reliance on __init__.py.Optimizers can now be imported with:from optimal import GenAlg, GSA, CrossEntropyEtc.
Package: optimal1dclustering
optimal1dclusteringAddk-medians and add a minimum cluster size parameter tohttps://github.com/dstein64/kmeans1d.A Python library with an implementation ofk-means andk-medians clustering on 1D data, based on the algorithm
from Xiaolin (1991), as presented by Gronlund et al. (2017, Section 2.2).The algorithm implemented in this library can also find the optimal clustering when clusters are required to have a
minimum cluster size. It still finds the optimal clustering as the cost function is still monge concave.Globally optimal clustering is NP-hard for multi-dimensional data. Lloyd's algorithm is a
popular approach for finding a locally optimal solution. For 1-dimensional data, there are polynomial
time algorithms. The algorithm implemented here is anO(kn + n log n)dynamic programming algorithm
for finding the globally optimalkclusters forn1D data points.The code is written in C++, and wrapped with Python.Requirementsoptimal1dclusteringsupports Python 3.x.Installationoptimal1dclusteringis available on PyPI, the Python Package Index.$pip3installoptimal1dclusteringExample Usageimportoptimal1dclusteringx=[4.0,4.1,4.2,-50,200.2,200.4,200.9,80,100,102]k=4# Number of clustersmin_cluster_size=2# The minimum number of elements in each clustermode=2# 2 for k-means; 1 for k-mediansclusters,centroids=optimal1dclustering.cluster(x,k,min_cluster_size=min_cluster_size,mode=mode)print(clusters)# [0, 1, 1, 0, 3, 3, 3, 2, 2, 2]print(centroids)# [-23.0, 4.15, 94.0, 200.5]TestsTests are intests/.# Run tests$python3-munittestdiscovertests-vDevelopmentThe underlying C++ code can be built in-place, outside the context ofpip. This requires Python
development tools for building Python modules (e.g., thepython3-devpackage on Ubuntu).gcc,clang, andMSVChave been tested.$ python3 setup.py build_ext --inplaceThepackagesGitHub action can be manually triggered (Actions>packages>Run workflow) to build wheels
and a source distribution.LicenseThe code in this repository has anMIT License.SeeLICENSE.References[1] Wu, Xiaolin. "Optimal Quantization by Matrix Searching." Journal of Algorithms 12, no. 4
(December 1, 1991): 663[2] Gronlund, Allan, Kasper Green Larsen, Alexander Mathiasen, Jesper Sindahl Nielsen, Stefan Schneider,
and Mingzhou Song. "Fast Exact K-Means, k-Medians and Bregman Divergence Clustering in 1D."
ArXiv:1701.07204 [Cs], January 25, 2017.http://arxiv.org/abs/1701.07204.
Package: optimaladj
optimaladj: A library for computing optimal adjustment sets in causal graphical modelsThis package implements the algorithms introduced inSmucler, Sapienza and Rotnitzky (2021)andSmucler and Rotnitzky (2022)to compute optimal adjustment sets in causal graphical models.
The package provides a class, called CasualGraph, that inherits fromnetworkx'sDiGraph class and has methods
to compute: the optimal, optimal minimal, optimal minimum cardinality and optimal minimum cost adjustment sets for individualized
treatment rules (point exposure dynamic treatment regimes) in non-parametric causal graphical
models with latent variables.Suppose we are given a causal graph G specifying:a treatment variable A,an outcome variable Y,a set of observable (that is, non-latent) variables N,a set of observable variables that will be used to allocate treatment L, and possiblypositive costs associated with each observable variable.Suppose moreover that there exists at least one adjustment set with respect to A and Y in G that is comprised of observable variables.An optimal adjustment set is an observable adjustment set that yields the non-parametric estimator of the interventional mean with the smallest asymptotic variance among those that are based on observable adjustment sets.An optimal minimal adjustment set is an observable adjustment set that yields the non-parametric estimator of the interventional mean with the smallest asymptotic variance among those that are based on observable minimal adjustment sets. An observable minimal adjustment set is a valid adjustment set such that all its variables are observable and the removal of any variable from it destroys validity.An optimal minimum cardinality adjustment set is an observable adjustment set that has minimum possible cardinality and yields the non-parametric estimator of the interventional mean with the smallest asymptotic variance among those that are based on observable minimum cardinality adjustment sets.An optimal minimum cost adjustment set is defined similarly, being optimal in the class of observable adjustment sets that have minimum possible cost.Under these assumptions,Smucler, Sapienza and Rotnitzky (2020)andSmucler and Rotnitzky (2022)show that
optimal minimal, optimal minimum cardinality and optimal minimum cost adjustment sets always exist, and can be computed in polynomial time. They also provide a sufficient criterion for the existance of an optimal adjustment set and a polynomial time algorithm to compute it when it exists.Check out our notebook withexamples.InstallationYou can install the stable version of the package fromPyPIby runningpipinstalloptimaladjYou can install the development version of the package from Github by runningpipinstallgit+https://github.com/facusapienza21/optimaladj.git#egg=optimaladj
Package: optimal-data-selector
A package to increase the accuracy of ML models, gives you the best data for model training, works on text data also, short word treatment for NLP problems, can be used for Image Scraping also, use it to split the timeseries data into training and testing, deal with emojis and emoticons,word tokenizer,tokenize words,can be use to remove stop words too,Punctuations and get English Pronouns list too, use to read text files
Package: optimaldesign
Optimal DesignThis project is heavy under construction and is waiting for the v1.0 release.This project implements efficiently the method "Adaptive grid Semidefinite Programming for finding optimal designs" (see literature) built onJAX. Therefore you can find optimal designs of arbitrary linear models on GPU, TPU or CPU.ExampleColab Notebook:https://colab.research.google.com/drive/1YlYfdYuHFLkWJ61IzP__R6N8koh_5Tzm?usp=sharingLiteraturehttps://www.ruhr-uni-bochum.de/imperia/md/content/mathematik3/publications/sdp_adaptive_v12.pdf