Saravanan666/pypi-org huggingface dataset:
Package: opencensus-ext-requests
OpenCensus can trace HTTP requests made with therequests package. The request URL,
method, and status will be collected.You can enable requests integration by specifying'requests'totrace_integrations.It’s possible to configure a list of URL you don’t want traced. By default the request to exporter
won’t be traced. It’s configurable by giving an array of hostname/port to the attributeexcludelist_hostnamesin OpenCensus context’s attributes:Only the hostname must be specified if only the hostname is specified in the URL request.Installationpip install opencensus-ext-requestsUsageimportrequestsfromopencensus.traceimportconfig_integrationfromopencensus.trace.tracerimportTracerif__name__=='__main__':config_integration.trace_integrations(['requests'])tracer=Tracer()withtracer.span(name='parent'):response=requests.get(url='https://www.wikipedia.org/wiki/Rabbit')ReferencesOpenCensus Project
Package: opencensus-ext-soha-otel
Installationpip install -i https://test.pypi.org/simple/ opencensus-ext-soha-otelUsageTheOpenCensus Soha Otel Exporterallows you to exportOpenCensustraces toCyberTrace.fromsohaotel.ext.otel.trace_exporterimportSohaOtelHttpExporterfromopencensus.traceimporttracerastracer_moduletracer=tracer_module.Tracer(exporter=SohaOtelHttpExporter(service_name='my service',retry_able:True,))withtracer.span(name='hello'):print('Hello, World!')ReferencesOpenCensus ProjectCyberTrace
Package: opencensus-ext-sqlalchemy
You can trace usage of thesqlalchemy package, regardless of the underlying
database, by specifying'sqlalchemy'totrace_integrations.NoteIf you enable tracing of SQLAlchemy as well as the underlying database
driver, you will get duplicate spans. Instead, just trace SQLAlchemy.Installationpip install opencensus-ext-sqlalchemyUsagefromopencensus.traceimportconfig_integrationconfig_integration.trace_integrations(['sqlalchemy'])ReferencesOpenCensus Project
Package: opencensus-ext-stackdriver
Installationpip install opencensus-ext-stackdriverUsageTraceThis example shows how to report the traces to Stackdriver Trace:fromopencensus.ext.stackdriverimporttrace_exporterasstackdriver_exporterfromopencensus.traceimporttracerastracer_moduleexporter=stackdriver_exporter.StackdriverExporter(project_id='your_cloud_project')tracer=tracer_module.Tracer(exporter=exporter)pip install google-cloud-trace<1.0.0
pipenv install google-cloud-trace<1.0.0By default, traces are exported asynchronously, to reduce latency during
your code’s execution. If you would like to export data on the main thread
use the synchronous transporter:fromopencensus.common.transports.syncimportSyncTransportfromopencensus.ext.stackdriverimporttrace_exporterasstackdriver_exporterfromopencensus.traceimporttracerastracer_moduleexporter=stackdriver_exporter.StackdriverExporter(project_id='your_cloud_project',transport=SyncTransport)tracer=tracer_module.Tracer(exporter=exporter)StatsThe OpenCensus Stackdriver Stats Exporter allows users
to export metrics to Stackdriver Monitoring.
The API of this project is still evolving.
The use of vendoring or a dependency management tool is recommended.Stackdriver Exporter UsageStackdriver Importfromopencensus.ext.stackdriverimportstats_exporterasstackdriverfromopencensus.statsimportstatsasstats_moduleStackdriver PrerequisitesOpenCensus Python libraries require Python 2.7 or later.Google Cloud Platform account and project.Google Stackdriver Monitoring enabled on your project (Need help?Click here).Register the Stackdriver exporterstats=stats_module.statsview_manager=stats.view_managerexporter=stackdriver.new_stats_exporter(stackdriver.Options(project_id="<id_value>"))view_manager.register_exporter(exporter)...Stackdriver Code ReferenceIn theexamplesfolder, you can find all the necessary steps to get the exporter, register a view, put tags on the measure, and see the values against the Stackdriver monitoring tool once you have defined theproject_id.For further details for the Stackdriver implementation, see the folderstackdriver/stats_exporter/.Path & FileShort Descriptioncontrib/opencensus-ext-stackdriver/examples/End to end examplecontrib/opencensus-ext-stackdriver/opencensus/ext/stackdriver/stats_exporter/Stats implementation for StackdriverReferencesOpenCensus Project
Package: opencensus-ext-zipkin
Installationpip install opencensus-ext-zipkinUsageTheOpenCensus Zipkin Exporterallows you to exportOpenCensustraces toZipkin.fromopencensus.ext.zipkin.trace_exporterimportZipkinExporterfromopencensus.traceimporttracerastracer_moduletracer=tracer_module.Tracer(exporter=ZipkinExporter(service_name='my service',host_name='localhost',port=9411,))withtracer.span(name='hello'):print('Hello, World!')ReferencesOpenCensus ProjectZipkin
Package: openc.excludesearch
Introductionopenc.excludesearch is designed to make it possible for an administrator to easily mark content as being hidden to searches.NB:  Requires dm’s AdvancedQuery fromhttp://www.dieter.handshake.de/pyprojects/zope/#AdvancedQueryFirst off, install myself:>>> self.addProduct("openc.excludesearch")We set up an object that will show in searches for “foo”:>>> self.folder.invokeFactory('Document', 'foo', 'Foo Page')
'foo'
>>> self.folder['foo']
<ATDocument at .../foo>
>>> self.folder['foo'].setText("I am a foo object from foosville.")We name it foo for convenience:>>> foo = self.folder['foo']We can see its text fine:>>> foo.getText()
'<p>I am a foo object from foosville.</p>'
>>> foo.reindexObject()If we search for it, we find it:>>> app.plone.restrictedTraverse("queryCatalog")({"SearchableText":"foo"})
[<Products.ZCatalog.Catalog.mybrains object at ...>]Once we activate the hiding functionality we don’t:>>> foo.getField('hidesearch').get(foo)
False
>>> foo.getField('hidesearch').set(foo, value=True)
>>> foo.reindexObject()
>>> foo.getField('hidesearch').get(foo)
True
>>> app.plone.restrictedTraverse("queryCatalog")({"SearchableText":"foo"})
[]This is because it has a new marker interface:>>> from openc.excludesearch.interfaces import IExcludeFromSearch
>>> IExcludeFromSearch(foo)
<ATDocument at .../foo>If we remove this marker, we find it again:>>> foo.getField('hidesearch').get(foo)
True
>>> foo.getField('hidesearch').set(foo, value=False)
>>> foo.reindexObject()
>>> foo.getField('hidesearch').get(foo)
False
>>> app.plone.restrictedTraverse("queryCatalog")({"SearchableText":"foo"})
[<Products.ZCatalog.Catalog.mybrains object at ...>]As we no longer provide that interface:>>> IExcludeFromSearch(foo)
Traceback (most recent call last):
...
TypeError: ('Could not adapt', <ATDocument at .../foo>, <InterfaceClass openc.excludesearch.interfaces.IExcludeFromSearch>)TodoSubclass/monkeypatch collections so they know to ignore things with the
IExcludeFromSearch marker interfaceChangelog0.1 - UnreleasedDoctest
[MatthewWilkes]Added an adapter for archetypes.schemaextended to add a boolean field to the
settings schema of any AT content type that adds/removes the marker
interface when used.
[MatthewWilkes]Customised the queryCatalog script in a skin layer to drop all results
providing IExludeFromSearch using AdvancedQuery
[MatthewWilkes]Added a marker interface called IExcludeFromSearch
[MatthewWilkes]
Package: openchain
AboutLibrary for creating blockchain networks.Author: Alexander Chaika <manti.by@gmail.com>Source link:https://bitbucket.org/manti_by/openchainRequirements:Base - Python 3.6+, ECSDA, LevelDB/PlyvelDevelopment - Flake8, CoverageExamples - Docker, TornadoInstallationInstall system libraries:$ sudo apt install python3-dev libleveldb-devInstall package fromPyPi:$ pip install openchainAlternatively you can clone fromBitbucket:$ git clone git@bitbucket.org:manti_by/openchain.git
$ cd openchain/
$ python setup.py installEnvironment variablesDATABASE_PATH - path to store LevelDB filesRun unit tests with coverage$ mkdir -p /var/lib/openchain/test/
$ export DATABASE_PATH='/var/lib/openchain/test/'
$ coverage run -m unittest discover -s openchain/tests/ -p ``'*_tests.py'``
$ coverage xml && coverage report -mFor more information about how to run examples, please refer toREADMEin the examples directory
Package: openchaver-client
OpenChaver# Run the services
python openchaver.py

OR

# Build an Executable
python -m nuitka .\openchaver.py --standalone --output-dir=build --enable-plugin=numpyTODO:scheduler- Sends events to thescreenshotservice.screenshot- Takes screenshots of the active window. Sends the screenshot to thestorageservice.storage- Stores the screenshots in thesqlitedatabase.Add aidleservice that will pause thescreenshotservice if the user is idle.Add akeystrokeservice that will send events to thescreenshotservice if NSFW text is detected.(Window Defender treats this as a virus. Any workarounds will be unstable.)Create the uninstallation script that will uninstall the application.Create the configuration script that will configure the application.(Done by Website)Add auploadservice to upload the screenshots to the remote server.Create the remote backend server that will send reports and alerts to the chaver. ->openchaver-serverCreate the installation script that will install the application.Create the update script that will update the application.Create the documentation for the application.Create the tests for the application.Create the watchdog for the application.As you can see, there is a lot to do. If you want to help, please contact me.Checkout releases for the latest binaries.
Package: openchord
OpenChordOpenChord is a Python library I am developing to plot beautiful chord diagrams for visualising networks and graphs. OpenChord uses thedrawsvglibrary and can display figures in a Jupyter notebook or Jupyter lab. Other libraries for drawing chord diagram includesPlotAPI(paid),Bokeh(visible moire artifact), andPlotly(tedious).InstallationOpenChord is now on PyPI.org! Install using the commandpip install openchordUsageCurrently, the function only support symmetric adjacency matricies (i.e. weighted graph, non-directed)importopenchordasocdadjacency_matrix=[[3,18,9,0,23],[18,0,12,5,29],[9,12,0,27,10],[0,5,27,0,0],[23,29,10,0,0]]labels=['Emma','Isabella','Ava','Olivia','Sophia']fig=ocd.Chord(adjacency_matrix,labels)fig.show()Color can be changed like sofig.colormap=['#636EFA','#EF553B','#00CC96','#AB63FA','#FFA15A','#19D3F3','#FF6692','#B6E880','#FF97FF','#FECB52']fig.show()You can export the figure as an .svg file and open it in a vector graphics software such asInkscapefig.save_svg("figure.svg")More tutorials and examplesI wrote a few more tutorials available via the link below and in the/examplesdirectory. Feel free to download them and run it yourself.Quick StartFirst chord diagramRadiusPaddingFont size and font familyColormapGap sizeBackground color and transparancyThe Logo(The text is not centered vertically when viewed on GitHub)RotationCustom plot areaGradient styleArc thicknessText positionRibbon gapRibbon stiffnessSave as SVG
Package: opencitingpy
opencitingpyA python implementation to obtain data fromOpenCitationsAPI.Easily access the OpenCitations API from python, without having to bother about remembering the urls to call
or formatting the data received from the API.Access all the API endpoints available in OpenCitations to date:/references/{doi}/citations/{doi}/citation/{oci}/metadata/{dois}/citation-count/{doi}/reference-count/{doi}InstallationEasilly install theopencitingpypackage via pip.pipinstallopencitingpyUsageYou may use the OpenCitations easily as follows:importopencitingpyclient=opencitingpy.client.Client()dois=['10.3390/s19020353','10.3390/s19143113']# get metadata of a list of articles, including title, publication year, number of citing and cited documents, etc.metadata=client.get_metadata(dois)IssuesIf you run into any trouble or have questions, feel free toopen an issue.LicenseMIT
Package: opencl4py
opencl4py=========Python cffi OpenCL bindings and helper classes.Tested with Python 2.7, Python 3.3, Python 3.4 and PyPy on Linux and Windows.Covered OpenCL API:```clBuildProgramclCreateBufferclCreateCommandQueueclCreateCommandQueueWithPropertiesclCreateContextclCreateKernelclCreatePipeclCreateProgramWithSourceclCreateProgramWithBinaryclCreateSubBufferclEnqueueCopyBufferclEnqueueCopyBufferRectclEnqueueFillBufferclEnqueueMapBufferclEnqueueNDRangeKernelclEnqueueReadBufferclEnqueueSVMMapclEnqueueSVMMemcpyclEnqueueSVMMemFillclEnqueueSVMUnmapclEnqueueUnmapMemObjectclEnqueueWriteBufferclFinishclFlushclGetDeviceIDsclGetDeviceInfoclGetEventProfilingInfoclGetKernelInfoclGetKernelWorkGroupInfoclGetPlatformIDsclGetPlatformInfoclGetProgramInfoclGetProgramBuildInfoclReleaseCommandQueueclReleaseContextclReleaseEventclReleaseKernelclReleaseMemObjectclReleaseProgramclSetKernelArgclSetKernelArgSVMPointerclSVMAllocclSVMFreeclWaitForEvents```To install the module run:```bashpip install .```or just copy src/opencl4py to any place where pythoninterpreter will be able to find it.To run the tests, execute:for Python 2.7:```bashPYTHONPATH=src nosetests -w tests```for Python 3.3, 3.4:```bashPYTHONPATH=src nosetests3 -w tests```for PyPy:```bashPYTHONPATH=src pypy tests/test_api.py```Currently, PyPy numpy support may be incomplete,so tests which use numpy arrays may fail.Example usage:```pythonimport opencl4py as climport loggingimport numpyif __name__ == "__main__":logging.basicConfig(level=logging.DEBUG)platforms = cl.Platforms()logging.info("OpenCL devices available:\n\n%s\n",platforms.dump_devices())ctx = platforms.create_some_context()queue = ctx.create_queue(ctx.devices[0])prg = ctx.create_program("""__kernel void test(__global const float *a, __global const float *b,__global float *c, const float k) {size_t i = get_global_id(0);c[i] = (a[i] + b[i]) * k;}""")krn = prg.get_kernel("test")a = numpy.arange(1000000, dtype=numpy.float32)b = numpy.arange(1000000, dtype=numpy.float32)c = numpy.empty(1000000, dtype=numpy.float32)k = numpy.array([0.5], dtype=numpy.float32)a_buf = ctx.create_buffer(cl.CL_MEM_READ_ONLY | cl.CL_MEM_COPY_HOST_PTR,a)b_buf = ctx.create_buffer(cl.CL_MEM_READ_ONLY | cl.CL_MEM_COPY_HOST_PTR,b)c_buf = ctx.create_buffer(cl.CL_MEM_WRITE_ONLY | cl.CL_MEM_ALLOC_HOST_PTR,size=c.nbytes)krn.set_arg(0, a_buf)krn.set_arg(1, b_buf)krn.set_arg(2, c_buf)krn.set_arg(3, k[0:1])queue.execute_kernel(krn, [a.size], None)queue.read_buffer(c_buf, c)max_diff = numpy.fabs(c - (a + b) * k[0]).max()logging.info("max_diff = %.6f", max_diff)```Released under Simplified BSD License.Copyright (c) 2014, Samsung Electronics Co.,Ltd.
Package: openclean-metanome
AboutThis package is an extension for theopenclean-core package. It provides access to data profiling algorithms from theMetanome projectinopenclean. The algorithms themselves are executable via theMetanome Wrapperthat enables to run Metanome algorithms via the command line.Installation & ConfigurationThe package can be installed usingpip.pipinstallopenclean-metanomeTheopenclean-metanomepackage usesflowServto run Metanome algorithms as serial workflows inopenclean.flowServsupports two modes of execution: (1) using the Python sub-process package, and (2) using Docker.Python Sub-ProcessWhen running Metanome algorithms as Python sub-processes you need to have an installation of theJave Runtime Environment (Version 8 or higher)on your local machine. You also need a local copy of theMetanome.jarwrapper. The file can bedownloaded from Zenodo <https://zenodo.org/record/4604964#.YE9tif4pBH4>`_. The package also provides the option to download the file from within your Python scripts.fromopenclean_metanome.downloadimportdownload_jardownload_jar(verbose=True)The example will download the jar file into the default directory (defined via theMETANOME_JARPATHenvironment variable). If the variable is not set, the users default cache folder is used. Note that theMetanome.jaris currently about 75 MB in size. Make sure that the environment variableMETANOME_JARPATHcontains a reference to the downloaded jar-file if you did not download the file into the default location.DockerIf you haveDocker installed on your machineyou can run Metanome using the provided Docker container image. To do so, make sure that the environment variableMETANOME_WORKERreferences the configuration filedocker_worker.yamlthat isincluded in the config folder of this repository.AlgorithmsThe package currently supports two data profiling algorithms.HyFDThe HyFD algorithm (A Hybrid Approach to Functional Dependency Discovery) is a functional dependency discovery algorithm. Details about the algorithm can be found in:Thorsten Papenbrock, Felix Naumann
A Hybrid Approach to Functional Dependency Discovery
ACM International Conference on Management of Data (SIGMOD '16)For an example of how to use the algorithm inopencleanhave a look at the example notebookRun HyFD Algorithm - Example.HyUCCThe HyUCC algorithm (A Hybrid Approach for Efficient Unique Column Combination Discovery) is a unique column combination discovery. Details about the algorithmcan be found here.For an example of how to use the algorithm inopencleanhave a look at the example notebookRun HyUCC Algorithm - Example.
Package: openclean-notebook
AboutThis package provides a graphical user interface foropencleanthat can be used to visualize and manipulate datasets in notebook environments like Jupyter Notebooks.InstallationThe package can be installed usingpip.pipinstallopenclean-notebookYou can use the additional[jupyter]option to install the Python Jupyter package if you want to use the UI within a Jupyter Notebook.pipinstallopenclean-notebook[jupyter]The notebook UI is a JavaScript bundle that is included in the installed package.UsageTo use the notebook UI, an instance of theopenclean_notebook.engine.OpencleanAPIis required. The API engine provides a namespace that manages a set of datasets that are identified by unique names. The engine is associated with an object repository that provides additional functionality to register objects like functions, lookup tables, etc.. The engine is also responsible for coordinating the communication with the JavaScript UI.A helper function to create an instance of the openclean API is included in theopenclean_notebookpackage. For example:fromopenclean_notebookimportDBdb=DB(basedir='.openclean',create=True)In this example a new instance of the API engine is created that stores all dataset files in a local folder.openclean. Thecreate=Trueflag ensures that a fresh instance is created every time the code (cell) is run.The next step is to create a new dataset in the API, e.g., from a given data frame or data file. Each dataset has to have a unique name.db.load_dataset(source=source='./data/bre9-aqqr.tsv.gz',name='covid-cases')You can then either view and edit the full dataset using the notebook UI or (e.g., for performance reasons) a sample of the dataset. The recipe that is created from the interactions in the notebook UI can later be applied on the full dataset. In the example below we use a sample of 100 rows for display in the notebook UI.db.edit('covid-cases',n=100)For a full example please have a look at theexample notebookthat also shows how to register and run commands on the dataset.
Package: opencl-fdfd
opencl_fdfdopencl_fdfdis a 3D Finite Difference Frequency Domain (FDFD)
electromagnetic solver implemented in Python and OpenCL.Capabilities:Arbitrary distributions of the following:Dielectric constant (epsilon)Magnetic permeabilty (mu)Perfect electric conductor (PEC)Perfect magnetic conductor (PMC)Variable-sized rectangular gridsStretched-coordinate PMLs (complex cell sizes allowed)Currently, only periodic boundary conditions are included.
PEC/PMC boundaries can be implemented by drawing PEC/PMC cells near the edges.
Bloch boundary conditions are not included but wouldn't be very hard to add.The default solveropencl_fdfd.cg_solver(...)located in main.py
implements the E-field wave operator directly (ie, as a list of OpenCL
instructions rather than a matrix). Additionally, there is a slower
(and slightly more versatile) solver incsr.pywhich attempts to solve
an arbitrary sparse matrix in compressed sparse row (CSR) format using
the same conjugate gradient method as the default solver. The CSR solver
is significantly slower, but can be very useful for testing alternative
formulations of the FDFD electromagnetic wave equation.Currently, this solver only uses a single GPU or other OpenCL accelerator;
generalization to multiple GPUs should be pretty straightforward
(ie, just copy over edge values during the matrix multiplication step).InstallationDependencies:python 3 (written and tested with 3.7)numpypyopencljinja2meanas(>=0.5)Install with pip, via git:pipinstallgit+https://mpxd.net/code/jan/opencl_fdfd.git@releaseUseSee the documentation foropencl_fdfd.cg_solver(...)(located inmain.py) for details about how to call the solver.
The FDFD arguments are identical to those inmeanas.solvers.generic(...), and a few solver-specific
arguments are available.An alternate (slower) FDFD solver and a general gpu-based sparse matrix
solver is available incsr.py. These aren't particularly
well-optimized, and something likeMAGMAwould probably be a
better choice if you absolutely need to solve arbitrary sparse matrices
and can tolerate writing and compiling C/C++ code. Still, they're
usually quite a bit faster than the scipy.linalg solvers.
Package: opencl-for-python
This is yet another set of Python bindings for OpenCL.WarningThis project currently is in a beta release state.Features:Python 2 and Python 3 compatibility.Supports OpenCL 1.1Discoverable properties and methods:No morectx.get_info(pyopencl.context_info.DEVICES)just doctx.devicesTight integration withctypes:import opencl as cl
from ctypes import c_float
ctx =  cl.Context()
a = cl.empty(ctx, [2, 3], ctype=c_float)Call kernels like a python function with defaults and keyword arguments:import opencl as cl
from ctypes import c_float, c_int

source = '__kernel void foo(__global float*a, int b, float c) ...'
...
# Create a program and context

foo = program.foo
foo.argnames = 'a', 'b', 'c'
foo.argtypes = cl.global_memory(c_float, ndim=2), c_int, c_float
# Equivalent to def foo(a, b=1, c=2.0):
foo.__defaults__ = 1, 2.0

event = foo(queue, a)Memory objects support indexing and slicing:mem2 = memobj[:, 1, :-1]Links:HomepageIssue TrackerDevelopment documentationPyPiGithubOpenCL 1.1 specAlso please check outCLyther
Package: opencli
# OpenCLIA CLI for every service which exposes a OpenAPI (Swagger) specification endpoint.From the OpenAPI Specification project:> The goal of The OpenAPI Specification is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection.## Demo![Alt Text](https://github.com/sharbov/open-cli/blob/master/demo.gif)## DockerTo start a CLI session run:docker run -it sharbov/open-cli <swagger-spec-url>e.g:docker run -it sharbov/open-clihttp://petstore.swagger.io/v2/swagger.json## Python### InstallationTo install OpenCLI, simply:pip install opencli### UsageTo start a CLI session run:open-cli <swagger-spec-url>e.g:open-clihttp://petstore.swagger.io/v2/swagger.jsonFor more options run:open-cli -hCreditsThis project relies on Yelps [bravado](https://github.com/Yelp/bravado) project & on Jonathan Slenders [python-prompt-toolkit](https://github.com/jonathanslenders/python-prompt-toolkit).