Saravanan666/pypi-org huggingface dataset:
Package: opthub-scorer
OptHub ScorerOptHub Scorer is a worker program that scores a solution submitted to OptHub.RequirementsPython >=3.6Docker >=1.12See alsorequirements.txtfor dependent python packages.Installation$ pip install opthub-scorerUsageHow to start a scorer runnerLogin the docker registry where the problem image is stored.$ docker login <registry>Start a scorer.$ opthub-scorerOptionsParameterTypeDefaultDescriptionurlpathhttps://opthub-api.herokuapp.com/v1/graphqlURL to OptHubapikeystrApiKeyintervalint2Polling intervalverify/no-verifyboolTrueVerify SSL certificateretriesint3Retries to establish HTTPS connectiontimeoutint600Timeout to process a queryrmRemove containers after exitquietBe quieterverboseBe more verboseconfigpathopthub-scorer.ymlConfiguration fileHow to make a scorerWrite an indicator program in your favorite language.Dockerize it.Push the docker image to DockerHub or somewhere else accessible from OptHub.
For this purpose, OptHub hosts its own docker private registry.Register the image tag to OptHub.See alsoexample.AuthorNaoki Hamada (hmkz@s101.xrea.com)LicenseMIT
Package: opti
Opti(A module for easy python)How to use:
Importing:
"from opti import *"
Commands:delay(sec): delays time
    delayms(msec): delays time (milliseconds)
    randnum(min, max): returns random number between [min] and [max]
    randeven(min, max): returns even number randomly between [min] and [max]
    typeKey(txt): automatically types the text
    pr(txt): prints out the text
    q(txt): same as input(txt)

    Other commands: Please check github and website [Preparing]
Package: optibess-algorithm
Optibess Algorithm - optimizing PV system combined with storageOptibess Algorithmis a python 3.10+ library for simulating and optimizing a photovoltaic system with power storage.
It uses data frompvgisand algorithms from thepvlibandNevergradpython libraries, and is the backend part of
theOptibesssite.Quick startOptibess Algorithmcan be installed with:pipinstallOptibess_algorithmYou can run an optimization on an example system with:importloggingimporttimefromOptibess_algorithm.power_system_optimizerimportNevergradOptimizer# make info logging showlogging.getLogger().setLevel(logging.INFO)# start optimizationstart_time=time.time()optimizer=NevergradOptimizer(budget=100)opt_output,res=optimizer.run()# print resultsprint(optimizer.get_candid(opt_output),res)print(f"Optimization took{time.time()-start_time}seconds")documentationCheck out ourdocumentation. There are example of how to use the different modules for simulation and
optimizationLicenseOptibess Algorithm is licensed under theMIT license
Package: optibot
OptibotCreate splinters like this{{ optiid("splinter1") }}

{{ optitask("model") }}
{{ optitask("train") }}
{{ optitask("classification") }}

{{ optiimport("from sklearn.ensemble import RandomForestClassifier")}}

{{ optivar("model")}}
{{ optivar("X")}}
{{ optivar("y")}}

{{ optiparam("n_estimators", "int", min=0, max=100) }}
{{ optiparam("random_state", "int", min=0, max=40000) }}

---

# Train a Lasso model with alpha=0.1
{{model}} = RandomForestClassifier(n_estimators={{n_estimators}}, random_state={{random_state}})
{{model}}.fit({{X}}, {{y}})Use them in scripts templates like thisimport numpy as np
{{ imports() }}

# Load data from CSV file using NumPy
data = np.loadtxt("data.csv", delimiter=",")

# Split the data into features (X) and labels (y)
features = data[:, :-1]
labels = data[:, -1]

# Train a classifier
{{ splinter("train", "model.train.classification", X="features", y="labels", model="clf") }}

# Test the trained classifier
score = clf.score(features, labels)
print("Accuracy: {:.2f}%".format(score * 100))Generate random scripts with themfrom src.optibot.core.optibot import OptiBot

bot = OptiBot()
bot.preload_splinters_from_path("./templates/splinters/*")
bot.preload_templates_from_path("./templates/scripts/*")
bot.compile()

for x in range(10):
    subject = list(bot.generate_script())

    with open(f"subject_{x + 1}.py", "w") as fp:
        fp.write(bot.render("simple.jinja", subject))
Package: optical-dispersion-relations
Optical Dispersion RelationsFeaturesA collection of exact and approximate optical dispersion relations.Academic Sources eg textbooks and journal articles.Fully tested (seetest/) so users can calculate with confidence.ExamplesSilver permittivity can be calculated with a Single Pole Drude-Lorentz model:silver_dispersion=drude_lorentz.DrudeLorentz().with_angular_frequency(angular_frequency).with_plasma_frequency(1.35e16).add_pole(damping_constant=0.0023*1.35e16)silver_permittivity=silver_dispersion.permittivity()Gold permittivity can be calculated with a Double Pole Drude-Lorentz model:gold_dispersion=drude_lorentz.DrudeLorentz().with_dielectric_constant(6).with_angular_frequency(angular_frequency).add_pole(peak_strength=6*5.37e15**2,damping_constant=6.216e13,).add_pole(peak_strength=6*2.263e15**2,damping_constant=1.332e15,peak_position=4.572e15)gold_permittivity=gold_dispersion.permittivity()More examples can be found under/examples/.InstallInstall with pipeg:pip3installoptical_dispersion_relationsDownload the latest releasehere, or previous releaseshere.ContributeContributions and conversations warmly welcome.
Package: opticalflow3d
opticalflow3dGPU/CUDA optimized implementation of 3D optical flow algorithms such as Farneback two frame
motion estimation and Lucas Kanade dense optical flow algorithms.Please see therelated projectssection for the other components of this pipelineOverviewBeing able to efficiently calculate the displacements between two imaging volumes will allow us to query the
dynamics captured in the images. This would include 3D biological samples and 3D force micrsocopy. However, a CPU
based implementation would be too time consuming. Thus, this repository was created to address this problem by
providing GPU accelerated implementation of various optical flow algorithms. Speed is key here, and tricks such as
separable convolutions are used.Currently, two optical flow methods are implemented:Pyramidal Lucas Kanade dense optical flow algorithmFarneback two frame motion estimation algorithmThe following methods are also provided to help in the assessment of the vectors.forward mapping of the first image using the calculated vectorsValidation of the 3D Farneback algorithmAccuracy of the algorithm on synthetic 3D fluorescent bead imagesThe Farneback two frame motion estimation algorithm was validated against the L5 SEM Challenge Sample 14 dataset [1].
The RMSE for the x component of the displacement field was 0.0112. The figure below shows the accuracy of the x component.
The solid blue line represents the mean magnitude of the x component for each x position while the shaded
region/thin blue shows the standard deviation of the x component magnitudes.Execution timeThe time taken to compute the displacements for a 2048Ã—192Ã—192 voxel image was2.41s Â± 21.4ms. The computation was
done on a server running a Quadro RTX 6000 GPU and dual Intel(R) Xeon(R) Gold 5217 CPUs.For comparison, the FFT-based DVC algorithm took 1980.04s while ALDVC took 9335.2s [1]. A few caveats
have to be mentioned as both of these algorithms were running on the CPU only and ALDVC does calculate other
parameters as well.UsageRequired packagesThe following packages are required. Please ensure that they are installed using either pip or conda.numpynumbascikit-imagescipycupytqdmInstallationThis package is available via pip and can be installed using:pip install opticalflow3dExamplesExamples can be found in the examples folderHow to citeHuang, C. K., Yong, X., She, D. T., & Lim, C. T. (2022). Surface curvature and basal hydraulic stress induce spatial bias in cell extrusion. bioRxiv.Related projects3D Traction Force MicroscopyReferences[1] Yang, J., Hazlett, L., Landauer, A. K., & Franck, C. (2020). Augmented Lagrangian Digital Volume Correlation (ALDVC). Experimental Mechanics, 60(9), 1205-1223.
Package: optical-flow-frame-utils
This repo contains code for reading and writing .flo, .pfm, .png, .bin, .raw, .ppm and .jpgAll the credits for the code goes tohttps://github.com/princeton-vl/RAFT/blob/master/core/utils/frame_utils.pyThank you so much.I am simply uploading as a python package for easier use for visualizing for my IPython.
Package: opticalglass
opticalglassTools for reading commercial optical glass catalogsThis package is a set of python scripts for reading the excel spreadsheets published by optical glass manufacturers.The package currently supports the following manufacturers:CDGMHikariHoyaOharaSchottSumitaNoteAll rights and ownership of the data is retained by the original owners, i.e the respective manufacturers.Interface to RefractiveIndex.INFO databaseAn interface to the RefractiveIndex.INFO database, using both the InterpolatedMedium and RIIMedium classes, is available.DocumentationThe documentation foropticalglassis hosted atRead the DocsNoteThis project has been set up using PyScaffold 4.3. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.
Package: opticalmapping
optimapoptimap: An open-source library for the processing of fluorescence video dataoptimapis an open-source Python toolbox for exploring, visualizing, and analyzing high-speed fluorescence imaging data with a focus on cardiac optical mapping data. It includes modules for loading, processing and exporting videos, extracting and measuring optical traces, visualizing action potential or calcium waves, tracking motion and compensating motion artifacts, computing activation maps, measuring contractility and further analyzing and visualizing the results. Refer to theTutorialsand theDocumentationfor more detailed information about optimap's usage and features.⚠️ optimap is currently in early development, expect breaking changes and bugs.Installationoptimapis available for Mac OSX, Windows and Linux, seeInstalling optimapfor more detailed information.Installing pre-built binaries (Mac OSX, Windows, Linux)Pre-built binaries can be installed using pip:pipinstallopticalmapping[all]The above command will install optimap and all recommended dependencies including OpenCV and PySide2. If you wish to install your own version of OpenCV (e.g. for CUDA support) or Qt implementation use:pipinstallopticalmappingGetting StartedSeeTutorialsand theGetting Startedguide for an introduction to optimap and installation instructions.About optimapoptimapis a script-based software, which means that you run Python-based analysis scripts rather than using a graphical user interface. We provide several example scripts which explain the usage ofoptimap, seeTutorials. The example scripts can also be downloaded directly by clicking on the right link in the green box at the top of each tutorial page.optimapis developed by members of theCardiac Vision Laboratoryat theUniversity of California, San Franicsco.optimapwas created for cardiovascular scientists in particular, but might also be useful for scientists in other fields, for instance, when performing calcium imaging or physiological research with moving cells or tissues.optimapis open-source, freely available, and relies on open-source packages such as NumPy, SciPy, matplotlib and OpenCV.LinksDocumentationIssue trackerSource codeContributingWe welcome bug reports, questions, ideas for new features and pull-requests to fix issues or add new features to optimap. SeeContributingfor more information.Licenseoptimap is licensed under theMIT License.
Package: opticalmarkmedi
# optical_markInstallation and Usageopticalmarkmedi is available for python3To install package, run:pip install opticalmarkmediPackage requires some other library as:imutilsnumpyopencv-pythonscipyInstall all of them before import packageImport the package:import opticalmarkmediUsage the package:data_json = opticalmarkmedi.auto_mark(“path/to/image”)This function return a json as the result of survey for each question
Package: optical-multilayer
optical_multilayerTable of ContentsInstallationLicenseAboutFunctionalitiesTo DoInstallationpip install optical-multilayerLicenseoptical-multilayeris distributed under the terms of theMITlicense.AboutCreated by David C. Heson, Jack Liu, and Dr. William M. Robertson over the 2022 MTSU Computational Sciences REU (NSF REU Award #1757493).Codebase created to explore the optical properties of multilayers and optimize their design to achieve maximum sensibilities, using minimas of reflected light and RIU (Refractive Index Unit) as qualitative measurements. A new measurement called SWT (Shift With Thickness) was also introdued, which is defined as the degree or nanometer shift in the location of a Bloch Surface Wave when the bottom layer increases by 10 nanometers in thickness.Currently, the entirety of the code is written in Python Anaconda 3-5.3.1.For the scripted version, go to:https://github.com/davidcheson/optical_multilayer.FunctionalitiesThe current functionalities of the program are:Input any custom multilayer arrangement into the existing functions, including ones to dynamic indexes of refraction values.Graph reflection and transmission coefficients across multilayers with changing angle or wavelength, for specific polarisation mode.Graph the electric field profile accross a multilayer for a specific angle, wavelength, polarisation, and multilayer.Calculate RIU and SWT values for specified multilayer arrangements.Explore by force bruting a set of parameters for the multilayers, finding the best setups in terms of RIU/SWT and reflectivity dips.Simulate the properties of a multilayer using a dynamic index of refraction, which is wavelength dependent and corresponds to a user-defined function.More to come!To DoRewrite matrix calculations using Rust.Explore how to do a gradient descent on parameter regions of interest.Improve help and context messaging.Condense and improve the electric field calculation.Please refer any questions, comments, or suggestions todch376@msstate.edu.
Package: optical-tracer
https://pypi.org/project/optical-tracer/0.1.9/optical_tracerIt extracts feature points from the video and traces their movements in the video.After the video is stopped, a 3D graph of those movements is generated with the X axis as the X coordinate, the Y axis as the Y coordinate, and the Z axis as the time.PIP$ pip3 install optical-tracer
$ pip3 install opencv-python
$ pip3 install matplotlibimportfrom optical_trace import optical_traceUsageexampleoptical_trace.opt_trace("test_opt.mp4",4,0.6,25,[123,456],[789,1011])There are six arguments available for this function.optical_trace.opt_trace("movie_path",max_feature_points,threshold_value,minimum_distance,x_range,y_range)movie_pathpath of the video you want to use.max_feature_pointsmaximum number of feature points that can be detected.threshold_valueThreshold for careful selection of feature points. Higher the value, more selective the feature points.threshold_valueMinimum distance between feature points. If they are closer than this value, the feature points are not detected.x_rangeUsed to specify the range to detect feature points.If the range of X coordinate is not specified, it is set tonone.The range is specified by a list.[123,456]y_rangeUsed to specify the range to detect feature points.If the range of Y coordinate is not specified, it is set tonone.The range is specified by a list.[123,456]
Package: optic-django-middleware
Optic Django MiddlewareThis module is anDjangomiddleware usingoptic-sdkto capture and format HTTP data to send toOptic. 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 module requires@useoptic/clito be installed, instructions on installing it are availablehttps://www.useoptic.com/docs/.Installpipinstalloptic-django-middlewareeUsageThe middleware takes a configuration object and captures traffic in the background as long as@useoptic/cliis installed.ConfigurationEnvironment variables can also be used to set the valuesENABLE:boolean(defaults toFALSE) 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:string(defaults to '') Additional 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 cliINTERACTION_MANAGER:string(defaults tooptic_django_middleware.manager.BasicOpticManager) Manager module to control the behaviour of capturing and sending interactionExample# settings.pyimportosfromtempfileimportmkdtemptempdir=mkdtemp('optic_django')OPTIC={'ENABLE':True,'LOG_PATH':os.path.join(tempdir,'optic.log'),'LOG':True,'CONSOLE':False,'LOCAL':False}INSTALLED_APPS+=['optic_django_middleware',]To start capturing data from the SDK, run your application withapiexec"python manage.py runserver"LicenseThis software is licensed under theMIT license.
Package: optic-django-unittest-plugin
Optic Django MiddlewareThis module is a plugin forDjangousingoptic-sdkto capture and format HTTP data to send toOptic. 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 module requires@useoptic/clito be installed, instructions on installing it are availablehttps://www.useoptic.com/docs/.Installpipinstalloptic-django-unittestUsageThe plugin is used along with Optic Django Middleware to customise optic logging behaviour based on unittest test result hooks to add features like1. Send successful test http inteaction only
2. Send interactions in bulkConfigurationEnvironment variables can also be used to set the valuesENABLE:boolean(defaults toFALSE) 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:string(defaults to '') Additional 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 cliExample# settings.pyimportosfromtempfileimportmkdtemptempdir=mkdtemp('optic_django')OPTIC={# ...optic-django-middleware settings'INTERACTION_MANAGER':"optic_django_unittest.manager.HttpInteractionManager"}INSTALLED_APPS+=['optic_django_middleware',]To start capturing data from the SDK, run your application withapiexec"python manage.py runserver"LicenseThis software is licensed under theMIT license.
Package: optic-document-django
Optic for DjangoOptic Proxy SetupPython APIs built in Django are easy to connect to Optic using our custom middleware. In this tutorial we'll show you how to connect the Optic Documenting Middleware to your Django app so that your integration tests document your code as they execute.Add the Middleware to your ProjectInstall the Optic Documenting Middleware using pippip3installoptic-document-djangoMaking the Middleware Run During TestingNow add the middleware to thesettings.pyfile that configures the Django API. You should put the middleware at the very bottom of the stack.MIDDLEWARE=['django.middleware.common.CommonMiddleware','optic.DocumentDjango']Using the Middleware in your testsThe Documenting middleware will document all the requests/responses that your tests run. Since it is integrated at the middleware level there's no need to update any of your tests files or fixtures.
Package: optic-document-flask
Optic for FlaskOptic Proxy SetupPython APIs built on top of Flask are easy to connect to Optic using our custom middleware. In this tutorial we'll show you how to connect the Optic Documenting Middleware to your Flask app so that your integration tests document your code as they execute.Add the Middleware to your ProjectInstall the Optic Documenting Middleware using pippip3installoptic-document-flaskMaking the Middleware Run During TestingNow add the middleware to your Flask App. Since we only want the middleware to run while Optic executes your tests, make sure you wrap it in a check for theOPTIC_SERVER_LISTENINGenvironment variable.We like performing this check within the block where we setup our test config, but you can do it anywhere that makes sense for your app.fromopticimportOpticDocumentingMiddlewaredefcreate_app(test_config=None):# Setup Code...iftest_configisNone:# load the instance config, if it exists, when not testingapp.config.from_pyfile('config.py',silent=True)else:if'OPTIC_SERVER_LISTENING'inos.environ:OpticDocumentingMiddleware(app)app.config.update(test_config)returnappUsing the Proxy FixtureThe Documenting middleware will document all the requests/responses that your tests run. Since it is integrated at the middleware level there's no need to update any of your tests files or fixtures.
Package: optic-object-wavefronts
A python-library to create triangle-meshes with vertex-normals of optics such as lenses and mirrors.
Use common computer-aided-design for all easy, non optical components where surface-normals do not matter.
But when surface-normals matter, use this library to creatre meshes with accurate vertex-normals.PrimitivesDiscCylinderSphericalCapRegularSphericalCapHexagonalSphericalCapPixelsSphericalLensSphericalLensHexagonalSphericalPlanarLensHexagonal
Package: opticomlib
opticomlibDescriptionopticomlib is a Python package that provides a set of utilities for optical communication systems.FeaturesFeature 1: Description of feature 1.Feature 2: Description of feature 2.Feature 3: Description of feature 3.InstallationYou can install opticomlib using pip:pipinstallopticomlibUsageHere is an example of how to use this package.importopticomlib.devicesasdev# Example usageContributingContributions are welcome. Please, check theContribution Guidelines.LicenseThis project is licensed under the terms of theMIT license.ContactIf you want to contact me you can reach me atarmandopr3009@gmail.com.
Package: opticr
opticrPython library to expose a single interface and API to few OCR tools (google vision, Tesseract)InstallRequired binaries available in the $PATHpoppler-utils (pdf2image)https://github.com/Belval/pdf2image#how-to-installtesseracthttps://tesseract-ocr.github.ioInstall OpticRWith pippipinstallopticrWith poetrypoetryaddopticror to get the latest 'dangerous' versionpoetry add  git+https://github.com/lzayep/opticr@mainUsagefromopticrimportOpticRocr=OpticR("tesseract")pathtofile="test/contract.pdfpages:list[str]=ocr.get_pages(pathtofile)With google-vision:fromopticrimportOpticRocr=OpticR("google-vision",options={"google-vision":{"auth":{"token":""}}})# file could come from an URLpathtofile="https://example.com/contract.pdfpages:list[str]=ocr.get_pages(pathtofile)Cache the result, if the file as already been OCR return immediatly the previous result.
Result are stored temporarly in the local storage or shared storage such as Redis.fromopticrimportOpticRocr=OpticR("tesseract",options={"cache":{"backend":"redis",redis:"redis://"}}# file could come from an URLpathtofile="https://example.com/contract.pdfpages:list[str]=ocr.get_pages(pathtofile,cache=True)