Saravanan666/pypi-org huggingface dataset:
Package: signal-design
signal-designSimple way to create signals.The project is intended for designing signals.The package is intended to create and develop signals of
varying complexity.The project can be used both for educational and work purposes.It is convenient to useJupyter LaborJupyter Notebookto speed up the development
of signals, to compare their parameters with other signals,
and to visualize them.The project is designed so that you can easily change the creation of
signals.In addition, documentation consist tutorial how to work with library
and examples of ready-made signals. You can write own signal creation.InstallationTo install use:$pipinstallsignal-designor usingpoetry$poetryaddsignal-designAlso you can clone or load project fromGitHub,
and install requirement packages using the$pipinstall-rrequirements/build.txtor if you want develop, use$pipinstall-rrequirements/dev.txtor$poetryinstallor coping pieces of code and create your own.UsageThe project is a library. Working with it is the same as with
other third-part libraries of the python language.An example of how to include the library is describedhere.The library consists sub-modules:signal_design.core- contains basic classesMathOperationandRelationProtocol.signal_design.exc- contains exceptions.signal_design.axis- contains classAxissignal_design.relation- contains classRelationsignal_design.signal- contains classSignalsignal_design.spectrum- contains classSpectrumsignal_design.default_methods- contains default methods for class above.For convenient base classes:Axis,Relation,Signal,Spectrum- can be imported from
thesignal_designmodule.For example:fromsignal_designimportSignalQuick start. Simple work flow.Below is a simple example of creating a signal and visualizing it.
A more extended description of the work of the library in the documentation.
Other examples are contained in the documentation contains inTutorialsection.For the following codeMatplotlibneed be used
to visualize a result of work. ButMatplotlibcan be replaced with another
library that you use.importnumpyasnpimportmatplotlib.pyplotaspltfromsignal_designimportAxis,Signaltime=Axis.get_using_end(start=0.,end=10.,sample=0.01)amplitude=np.sin(2*np.pi*time.array)signal=Signal(time,amplitude)plt.plot(*signal.get_data())plt.xlabel('Time, s')plt.ylabel('Amplitude')plt.title('Sin 1Hz')Result:Creditssignal-designwas created withnumpyscipy
Package: signal-envelope
EnvelopePython module to extract the envelope of signals.More information atGithub;Interactive visualizationhere.FunctionsThis module implements 3 functions:read_wav("path/to/mono/signal.wav"),Returns a tuple(W, fps), where W is a numpy array andfpsis an integer with the value of the frame rate of the file.save_wav(signal, path = "test.wav", fps = 44100),Saves a NumPy array as a .wav file.get_frontiers(W, mode=0),When mode=0:Returns a tuple(pos_ids, neg_ids)of NumPy arrays, with the indices of the positive and negative frontiers of a NumPy array representing a discrete waveW.When mode=1:Returns the NumPy arrayX_envelopewith the indices of the envelope of the waveW. Note that, to obtain the values of the envelope at those points,np.abs(W[X_envelope])is recommended.If this function is called from a compatible setup (currently, Windows 64bit), it computes the envelope and the frontiers faster via specialized native code. A fall-back version in pure Python is also provided, in which case a warning is printed indicating that a slower mode is being used. In both cases, the usage is the same, as are the results.Usageinstall the module:pip install signal-envelopeA minimal example would then be:import signal_envelope as se

W, _ = se.read_wav("path/to/signal.wav")
X_pos_frontier, X_neg_frontier = se.get_frontiers(W, 0)
print(X_pos_frontier, W[X_pos_frontier])

X_envelope = se.get_frontiers(W, 1)
print(X_envelope, np.abs(W[X_envelope]))A number of test wav files can be found at theGithubrepository for the project.SourceThe code for this repository is available atGithub.Used LibrariesLibsndfileBoostIntel Math Kernel Library
Package: signalfd
docstestspackageCFFI bindings for signalfd. Interface is mostly the same ashttps://pypi.python.org/pypi/python-signalfdFree software: BSD licenseInstallationpip install signalfdUsageimportsignalfdfd=signalfd.signalfd(-1,[signal.SIGUSR1],signalfd.SFD_CLOEXEC)try:signalfd.sigprocmask(signalfd.SIG_BLOCK,[signal.SIGUSR1])whileTrue:si=signalfd.read_siginfo(fd)print(si.ssi_signo)finally:os.close(fd)Documentationhttps://python-signalfd.readthedocs.org/DevelopmentTo run the all tests run:toxChangelog0.4.0 (2015-08-25)Corrected return value for sigprocmask.0.3.0 (2015-08-24)Corrected error handling in signalfd and sigprocmask wrappers.0.2.0 (2015-08-24)Changedread_siginfoso it raises IOError in case is used with a file object and.readinto()would returnNone(not enough data available).0.1.0 (2015-08-23)First release on PyPI.
Package: signalflow-grammar
SignalFlow language grammar===========================This repository contains the SignalFx SignalFlow language grammar and thestructure and tools required to generate the public code artifacts that makethis grammar available in various languages.The language is in ANTLR4 format and we use the `antlr` tool to generate thecorresponding source code for the target languages. From there, we can buildartifacts that can be included as dependencies in various projects that need toparse SignalFlow programs.**Note:** if you're looking to use the grammar, you should use one of thegenerated artifacts instead of this repository.Available languages-------------------Java~~~~The ``com.signalfx.public:signalflow-grammar`` artifact Jar is available onMaven Central:.. code:: xml<dependency><groupId>com.signalfx.public</groupId><artifactId>signalflow-grammar</artifactId><version>2.12.0</version></dependency>Javascript~~~~~~~~~~The library is available for npm.js, and as a standalone browserified Javascript bundle.Node.js^^^^^^^.. code::npm install -g signalflow-grammar.jsIn browser^^^^^^^^^^.. code:: html<script type="text/javascript" src="https://s3.amazonaws.com/public-sites--signalfx-com/cdn/signalflow-grammar-2.7.0.js"></script>Python~~~~~~The library is available on PyPI and depends on the Python2 ANTLR runtime:.. code::$ pip install signalflow-grammar==2.7.0Then, from your code, you can do:.. code:: pythonimport antlr4from signalflow.grammar.SignalFlowV2Lexer import SignalFlowV2Lexerfrom signalflow.grammar.SignalFlowV2Parser import SignalFlowV2Parserdef parse(program):lexer = SignalFlowV2Lexer(program)stream = antlr4.CommonTokenStream(lexer)parser = SignalFlowV2Parser(stream)...Generating or updating the artifacts------------------------------------Due to the Python like nature of SignalFlow some native code isrequired to keep track of indent/dedent levels. This native codeis stored in <language>/grammar/*.g4. These native code files arestitched into SignalFlowLexer.g4 by the generate_grammar.py script.Update the generated source code with the ``generate.sh`` script:.. code::$ ./generate.sh <version>$ git commit -a -m "Bump to version <version>"$ git push origin masterThen for each language, perform a release of the corresponding package.Java~~~~.. code::$ cd java/$ mvn clean deploy -P release-sign-artifacts -DperformRelease=true -DrepositoryId=ossrh -Dgpg.useagent=falseJavascript~~~~~~~~~~.. code::$ cd javascript/$ npm publish$ aws s3 cp signalflow-grammar-<version>.js s3://public-sites--signalfx-com/cdn/Python~~~~~~.. code::$ cd python/$ python setup.py bdist_wheel$ twine upload dist/signalflow_grammar-<version>-py2-none-any.whl
Package: signalfx-detector-syncer
sfx-sync-detectorsis a command-line tool that helps keep SignalFx detectors
in version control and sync them with SignalFx. It operates over a directory
tree of detector files, each representing a detector, and makes sure that what
is in SignalFx is up-to-date.Installation$ pip install signalfx-detector-syncerUsage$ sfx-sync-detectors --token=$SFX_AUTH_TOKEN /path/to/detectors/For full usage information, run with-hor--help.How it worksThe syncer works by file path under the given base directory. Each detector is
written in its own file, either in JSON or YAML format and named as an easily
identifiabledash-separated-slug(.jsonor.yaml). The relative
file path from the given base directory identifies the detector: updates to the
same file will update the existing detector. Creating a new file creates a new
detector; removing a file removes the corresponding detector from SignalFx.Detectors managed by the syncer are identified within SignalFx by multiple tags:asignalfx-detector-syncertag, present on all detectors created and
managed by the detector syncer;afrom:<filepath>tag, specific to a particular detector, which ties the
detector to the file path it came from in the synced directory tree;optionally, an additionalscope:<scope>identifier tag that further
scopes the detector (see belowScoping).JSONWhen the file contains JSON, it is expected to contain the direct JSON
detector model that would be pushed to SignalFx’s detector API.YAML layoutFor YAML (more human readable!), each file contains two YAML documents
separated by the expected---line. The first document, thefront
matter, defines the configuration of the detector and its rules and
notifications. The second document is the SignalFlow 2.0 program text of
the detector.---name:The detector namedescription:The detector descriptiontags:[latency,demo]rules:my label:severity:Criticaldescription:Something's wrong!notifications:-type:Emailemail:test@test.com---detect(when(data('demo.trans.latency') > 220, lasting='5s')).publish('my label')SpecificationThe specification of thefront matterthat configures the detector is
pretty much what thedetector APIexpects. The only expection is that rules
may directly keyed by the detect label they map to if you want to.You will also want to look at thedetector Modelfor additional details
around notifications, rules and visualization options.ScopingIf you want, you can limit the scope of detectors that the syncer will consider
by specifying the--scopeoption with an identifier. This will be used as an
additional piece of information that the syncer looks for when considering
which detectors should be updated or removed.This allows for multiple distinct sets of detectors to be synced from different
base locations into the same SignalFx organization, even if one of them uses no
scope.
Package: signalfx-instrumentation-celery
Celery OpenTracingThis package enables tracing task execution in aCelery 3.1+application viaThe OpenTracing Project. Once a production system contends with real concurrency or splits into many services, crucial (and formerly easy) tasks become difficult: user-facing latency optimization, root-cause analysis of backend errors, communication about distinct pieces of a now-distributed system, etc. Distributed tracing follows a request on its journey from inception to completion from mobile/browser all the way to the microservices.As core services and libraries adopt OpenTracing, the application builder is no longer burdened with the task of adding basic tracing instrumentation to their own code. In this way, developers can build their applications with the tools they prefer and benefit from built-in tracing instrumentation. OpenTracing implementations exist for major distributed tracing systems and can be bound or swapped with a one-line configuration change.If you want to learn more about the underlying Python API, visit the Pythonsource code.InstallationRun the following command:$ pip install signalfx-instrumentationn-celeryUsageThe providedcelery.app.base.Celerysubclass allows the tracing of task scheduling and execution using the OpenTracing API. All that it requires is for aCeleryTracinginstance to be initialized using an instance of an OpenTracing tracer and treated as a standardCeleryapplication.InitializeCeleryTracingtakes theTracerinstance that is supported by OpenTracing and an optional dictionary of desired tags for each created span. You can also specify whether you'd like the initial task publish events to be represented by a span whose trace context is propagated via request headers to the worker executing the task (enabled by default).  To create aCeleryTracingobject, you can either pass in a tracer object directly or default to theopentracing.tracerglobal tracer that's set elsewhere in your application:fromcelery_opentracingimportCeleryTracingopentracing_tracer=# some OpenTracing tracer implementationtraced_app=CeleryTracing(tracer=opentracing_tracer,propagate=True,# propagation allows distributed tracing fromspan_tags=dict(my_helpful='tag'))# publisher over broker to workers.@traced_app.task(bind=True)defmy_task(self):returnTrueorfromcelery_opentracingimportCeleryTracingimportopentracingopentracing.tracer=# some OpenTracing tracer implementationtraced_app=CeleryTracing(propagate=False)# Tracer defaults to opentracing.tracer.  No publish span creation or propagation to worker execution context will configured as well.@traced_app.task(bind=True)defmy_task(self):returnTrueFurther InformationIf you're interested in learning more about the OpenTracing standard, please visitopentracing.io.  If you would like to implement OpenTracing in your project and need help, feel free to send us a note atcommunity@opentracing.io.
Package: signalfx-instrumentation-elasticsearch
This package enables distributed tracing for the Python elasticsearch-py and elasticsearch-dsl libraries.InstalationRun the following command:$ pip install signalfx-instrumentation-elasticsearchGetting startedPlease see the examples directory. Overall, usage requires that a tracer gets set, and initialize the Elasticsearch client specifyingTracingTransportas tracing class, and optionally set an active span (to be used as parent span when tracing the actual Elasticsearch statements):importelasticsearch_opentracingelasticsearch_opentracing.init_tracing(tracer)# An OpenTracing compatible tracer.es=Elasticsearch(transport_class=elasticsearch_opentracing.TracingTransport)elasticsearch_opentracing.set_active_span(main_span)# Optional.es.index(index='test-index',doc_type='tweet',id=99,body={'author':'linus','text':'Hello there','timestamp':datetime.now(),})res=es.get(index='test-index',doc_type='tweet',id=99)elasticsearch_opentracing.clear_active_span()By default, all Elasticsearch requests are traced. It’s possible to have it set to false when initializing the library, and callenable_tracinganddisable_tracingto explicitly trace statements happening within that section:elasticsearch_opentracing.init_tracing(tracer,trace_all_requests=False)elasticsearch_opentracing.enable_tracing()res1=es.get(index='test-index',doc_type='tweet',id=99)res2=es.get(index='test-index',doc_type='user',id=666)elasticsearch_opentracing.disable_tracing()When usingtrace_all_requests, any calls made toenable_tracinganddisable_tracingare ignored.In case of an exception happening under this block, an implicit call todisable_tracingwill take place, with the request causing the error including error information with it.DSLWhen using theelasticsearch-dsllibrary (which runs on top ofelasticsearch-py), the same semantics and calls are used. When creating a default connection, the transport can be specified as well:# elasticsearch_dsl.connections.connectionsconnections.create_connection(hosts=['127.0.0.1'],transport_class=elasticsearch_opentracing.TracingTransport)MultithreadingTracing and parent span data is kept as thread local data, which means that applications using many threads (Django, Flask, Pyramid, etc) will work just fine.Further informationIf you’re interested in learning more about the OpenTracing standard, please visitopentracing.ioorjoin the mailing list. If you would like to implement OpenTracing in your project and need help, feel free to send us a note atcommunity@opentracing.io.
Package: signalfx-instrumentation-pymongo
This package enables tracingMongocommands in aPyMongoMongoClientviaThe OpenTracing Project.
Once a production system contends with real concurrency or splits into many services, crucial (and
formerly easy) tasks become difficult: user-facing latency optimization, root-cause analysis of backend
errors, communication about distinct pieces of a now-distributed system, etc. Distributed tracing
follows a request on its journey from inception to completion from mobile/browser all the way to the
microservices.As core services and libraries adopt OpenTracing, the application builder is no longer burdened with
the task of adding basic tracing instrumentation to their own code. In this way, developers can build
their applications with the tools they prefer and benefit from built-in tracing instrumentation.
OpenTracing implementations exist for major distributed tracing systems and can be bound or swapped
with a one-line configuration change.If you want to learn more about the underlying Python API, visit the Pythonsource code.InstallationRun the following command:$ pip install signalfx-instrumentation-pymongoUsageThis PyMongo monitor allows the tracing of database queries and commands using the OpenTracing API.
All that it requires is for aCommandTracinglistener instance to be initialized using an instance
of an OpenTracing tracer and registered via thepymongo.monitoringmodule.InitializeCommandTracingtakes theTracerinstance that is supported by OpenTracing and an optional
dictionary of desired tags for each created span. To create aCommandTracingobject, you can
either pass in a tracer object directly or default to theopentracing.tracerglobal tracer that’s
set elsewhere in your application:frompymongo_opentracingimportCommandTracingfrompymongoimportmonitoringopentracing_tracer=## some OpenTracing tracer implementation# All future clients will have CommandTracing registered for their eventsmonitoring.register(CommandTracing(opentracing_tracer,span_tags={'MyCustomTag':'HelpfulVal'}))orfrompymongo_opentracingimportCommandTracingimportopentracingimportpymongoopentracing.tracer=## some OpenTracing tracer implementation# Only this client will have CommandTracing trace their eventsclient=pymongo.MongoClient(event_listeners=[CommandTracing()])Further InformationIf you’re interested in learning more about the OpenTracing standard, please visitopentracing.ioorjoin the mailing list. If you would like to implement OpenTracing
in your project and need help, feel free to send us a note atcommunity@opentracing.io.
Package: signalfx-instrumentation-redis
This package enables distributed tracing for the Python redis library.Note: If you need to use the old OpenTracing 1.0 API, use the 0.x releases.InstallationRun the following command:$ pip install signalfx-instrumentation-redisGetting startedTracing a Redis client requires callinginit_tracing()and optionally specify an OpenTracing-compatible tracer. See the examples directory for several different approaches.importredisimportredis_opentracing# If not provided, opentracing.tracer will be used.redis_opentracing.init_tracing(tracer)client=redis.StrictRedis()client.set('last_access',datetime.datetime.now())It’s possible to trace only specific Redis clients:redis_opentracing.init_tracing(tracer,trace_all_classes=False)redis_opentracing.trace_client(client)# Only commands and pipelines executed through this client will# be traced.res=client.get('last_access')It’s also possible to trace only specific pipelines:redis_opentracing.init_tracing(tracer,trace_all_classes=False)pipe=client.pipeline()redis_opentracing.trace_pipeline(pipe)# This pipeline will be executed as a single MULTI command.pipe.lpush('fruits','lemon','watermelon')pipe.rpush('fruits','pineapple','apple')pipe.execute()When pipeline commands are executed as a transaction, these commands will be grouped under a singleMULTIoperation. They’ll also appear as a single operation in the trace. Outside of a transaction, each command will generate a span.And it’s also possible to trace only specific pubsub objects:redis_opentracing.init_tracing(tracer,trace_all_classes=False)pubsub=client.pubsub()redis_opentracing.trace_pubsub(pubsub)pubsub.subscribe('incoming-fruits')msg=pubsub.get_message()# This message will appear as a 'SUB' operation.Incoming messages throughget_message(),listen()andrun_in_thread()will be traced, and any command executed through the pubsub’sexecute_command()method will be traced too.Further informationIf you’re interested in learning more about the OpenTracing standard, please visitopentracing.ioorjoin the mailing list. If you would like to implement OpenTracing in your project and need help, feel free to send us a note atcommunity@opentracing.io.LicenseApache 2.0 License
Package: signalfx-instrumentation-requests
This package enables tracing http requests in aRequestsSessionviaThe OpenTracing Project.
Once a production system contends with real concurrency or splits into many services, crucial (and
formerly easy) tasks become difficult: user-facing latency optimization, root-cause analysis of backend
errors, communication about distinct pieces of a now-distributed system, etc. Distributed tracing
follows a request on its journey from inception to completion from mobile/browser all the way to the
microservices.As core services and libraries adopt OpenTracing, the application builder is no longer burdened with
the task of adding basic tracing instrumentation to their own code. In this way, developers can build
their applications with the tools they prefer and benefit from built-in tracing instrumentation.
OpenTracing implementations exist for major distributed tracing systems and can be bound or swapped
with a one-line configuration change.If you want to learn more about the underlying Python API, visit the Pythonsource code.InstallationRun the following command:$ pip install signalfx-instrumentation-requestsUsageThe providedrequests.Sessionsubclass allows the tracing of http methods using the OpenTracing API.
All that it requires is for aSessionTracinginstance to be initialized using an instance
of an OpenTracing tracer and treated as a standard Requests session.InitializeSessionTracingtakes theTracerinstance that is supported by OpenTracing and an optional
dictionary of desired tags for each created span. You can also specify whether you’d like your
current trace context to be propagated via http headers with your client request.  To create aSessionTracingobject, you can either pass in a tracer object directly or default to theopentracing.tracerglobal tracer that’s set elsewhere in your application:fromrequests_opentracingimportSessionTracingopentracing_tracer=# some OpenTracing tracer implementationtraced_session=SessionTracing(opentracing_tracer,propagate=False,# propagation allows distributed tracing inspan_tags=dict(my_helpful='tag'))# upstream services you control (True by default).resp=traced_session.get(my_url)orfromrequests_opentracingimportSessionTracingimportopentracingimportrequestsopentracing.tracer=# some OpenTracing tracer implementationtraced_session=SessionTracing()# default to opentracing.tracerYou can now monkeypatch therequests.Sessionandrequests.sessions.Sessionobjects to point to theSessionTracingsubclass for easier initialization:fromrequests_opentracingimportmonkeypatch_requestsmonkeypatch_requests()fromrequestsimportSessionopentracing_tracer=# some OpenTracing tracer implementationtraced_session=Session(opentracing_tracer,propagate=False,# Same arguments as provided to SessionTracingspan_tags=dict(my_helpful='tag'))resp=traced_session.get(my_url)Further InformationIf you’re interested in learning more about the OpenTracing standard, please visitopentracing.ioorjoin the mailing list. If you would like to implement OpenTracing
in your project and need help, feel free to send us a note atcommunity@opentracing.io.