Saravanan666/pypi-org huggingface dataset:
Package: signal-groups
signal-groupsExperimental Python bindings to Signal's v2 groups implementationzkgroup.
This project provides a Rust extension usingPyO3to define asignal_groupsPython module.
Seeherefor a fundamental limitation storing secrets in Python-allocated memory.⚠️USE AT YOUR OWN RISK!⚠️Developer Getting StartedYou will need bothRustand Python 3.7+ installed on your system.
To install the project in your virtualenv:pipinstall-rrequirements.txt
pythonsetup.pydevelopThen run the tests viapytest -v tests/to confirm all is working.
Tests are (mostly) ported to Python from the upstream crate.
You can use the tests as a reference for how to use the library (start with the integration tests).When developing, simply runpython setup.py developas you make changes to rebuild the library.
This script will handle compilation on the Rust side.Building wheelsSee instructionshere. In brief:docker pull quay.io/pypa/manylinux2014_x86_64
docker run --rm -v `pwd`:/io quay.io/pypa/manylinux2014_x86_64 /io/build-wheels.sh
Package: signal-handler
signal_handlerHandling system signals and taking actions on application terminationExample:#!/usr/bin/python3fromsignal_handlerimportSignalHandlerif__name__=='__main__':terminator=SignalHandler(handler=lambda:print('\nOn terminate actions here!\n'))whileTrue:ifnotterminator.terminated:print('Cycle')else:print(f"Message:{terminator.message}\n"f"Traceback:{terminator.traceback}\n"f"Signal name:{terminator.signal_name}")break
Package: signaling
What is this?signalingis a simple implementation of thesignal/slot patternas
known from theQt framework.
It has no external requirements and 100% test-coverage.InstallationThe usualpipinstallsignalingHow to use it?Consider that you have a function that should be called whenever a connected signal
is emitted, as illustrated by the following code block:defslot(arg):print("Slot called with{}".format(arg))signal=Signal(args=['arg'])signal.connect(slot)signal.emit(arg=1)# Slot called with 1In fact you can connect multiple slots to the same signal, as long as they share the
same function signature.Notice that thesignalinglibrary performs some sanity checks when connecting
slots and emitting signals.All slots connected to a signal have to provide the same argument specifiction as
denoted by theargsparameter of theSignalconstructor.Anemit-call has to be made with the exact same arguments as specified with theSignalconstructor.So all of the below examples would raise an exception:defslot_with_arg(arg):passdefslot_without_arg():pass# InvalidSlot: Slot 'slot_with_arg' has to callable without argumentsSignal().connect(slot_with_arg)# InvalidSlot: Slot 'slot_without_args' has to accept args ['arg'] or **kwargs.Signal(args['arg']).connect(slot_without_arg)s=Signal()s.connect(slot_without_args)# InvalidEmit: Emit has to be called without arguments.s.emit(foo=1)
Package: signalkgen
Generate Test Data for NavactorA test data generator forSignal Kjson forming time-series graphs of
marine reporters reporting their own info as well as that of their nearest
neighbors'.see:https://signalk.org/specification/1.7.0/doc/data_model.htmlTest output is validated against the Signal K scheme with theSignal K project's validation tool.also, long live PEP 621StatusGenerates arrays of boats moving in different directions at different speeds.Currently boats reporting other boats is random and the nearest neighbor
feature is not implemented yet.Installingvirtualenvpython -m venv venv
source ./venv/bin/activate
python -m pip install --upgrade pipviaPypipython -m pip install signalkgenOr install with "editing" mode from cloned repo for development of the code.python -m pip install -e .Usagesignalkgen --num-boats 300 --nautical-miles 5ValidationSeetox.inior.github/workflows/check.ymlfor automated tests that invoke the Signal K validation tools.git clone https://github.com/SignalK/specification
cd specification
npm install
signalkgen --num-boats 300 --nautical-miles 5 | ./bin/validate.js
Package: signalled-timeout
Timeout library for generic interruption of main thread by an exception
after a configurable duration.Use caseSet a timeout (seconds) upon expiration of which an exception is raised:from timeout import timeout…as a context manager:with timeout(0.5):
    ... work ...…or decorating a function:@timeout(0.5)
def work():
    ...The exception may be configured, either by passing an exception
instance, or by specifying an overriding exception class and/or
value(s):with timeout(0.5, RuntimeError("Work took too long")):
    ... work ...

with timeout(0.5, RuntimeError, "Work took too long"):
    ... work ...

with timeout(0.5, exc=RuntimeError):
    ... work ...

with timeout(0.5, value="Work took too long"):
    ... work ...

with timeout(0.5, value=(2, "Took too long", 'work.py')):
    ... work ...The timeout exception defaults toTimeoutError("Operationtimed out").Note:timeoutis implemented viasignal, and as such may not be
applied outside of a process’s main thread.Installationsignalled-timeoutis a Python distribution, which may be installed
viaeasy_installorpip,e.g.:pip install signalled-timeout…or, from source:python setup.py installTestingTo test the distribution on your system, execute itstestcommand:python setup.py test
Package: signalman
signalmanA small application to poll a remote endpoint for response code or text.How to use signalmansignalman --timeout 60 --endpoint google.com --port 80 --rc 200will run a test for 60 minutes until google.com returns a HTTP 200 on port 80Parameter ListSyntaxDescription--timeoutTimeout for Signalman in minutes--endpointURL to test against--port (optional)Port to test against--r-typeReturn type you are expecting, choose from text, json or code--r-valueReturn value of type selected as --r-type, if usingjsonthen use the format key:value, currently only a single key pair is supported--ssl (optional)Use SSL/TLS--headers (optional)Any headers which need to be included - for example to request Content-Type: application/json useContent-Type:application/json--debug (optional)Print request and response headers and response body
Package: signal-ocean
The Signal Ocean SDK combines the power of Python andSignal Ocean's APIsto give you access to a variety of shipping data available inThe Signal Ocean Platform.InstallationInstall the SDK with pip:pip install signal-oceanThe Signal Ocean SDK depends on thepandaslibrary for some of its data analysis features. Optional pandas dependencies are also optional in this SDK. If you plan to use data frame features like plotting or exporting to Excel, you need to install additional dependencies, for example:pip install matplotlib openpyxlFor more information refer topandas documentation.Getting StartedTo use the SDK, you need to create an account in ourAPI Portaland subscribe to an API.Now you're ready to fetch some data. See ourexampleson how you can use our APIs.Building and contributingCheckContributing.mdon how you can build and contribute this library.
Package: signal-pipes
Signal pipes (akasigpipes) are Python library for processing of digital
representation of signals.The library is focused on processing physiological signal (e.g. EKG or EMG) but
is basic design supports processing of any multichannel signals.The library is based on two mechanism:flexiblecontainersfor signals and their metadata in the form of hierarchical
dictionary with a set of "well known" keys forming solid skeleton of data
representation.pipelinesthat are formed by operators for processing, storing and visualization
og signals. The pipelines are not limited to simple linear chains. The more complex
forms are supported (branching, alternatives, parallel processing).Current version support these tools in form of pipeline operators.readers of physionet.org databasesreaders of matlab files fromMegawinapplicationexporter topandasdataframesconfigurable plotting usingmatplotlibselection of channels or subsamplesextraction of signal featuressignal adjustment (any unary ufunc, convolution, cross correlation, polyphase resampling)
based on scipy.signals and numpyserialization to HDF5
Package: signal-processing
# IntroductionThis library is for data that is arranged as follows (in the form of lists - this is just for visual understanding):|id| Timestamp|values|| ------ | ------ | ------- || 1 | 2018:06:05 03:02:00| 2.3|| 2 | 2018:06:05 03:04:33| 2.4|| 3 | 2018:06:05 03:07:01|3.3| 4 | 2018:08:03 03:07:55 | 2.9| 5 | 2018:08:03 03:08:44 | 3.3| 6 | 2018:08:03 03:12:12  | 2.4As you can see, the above signal is *a non uniformly sampled signal* as observed by the irregularly spaced timestamps.You can apply several functions of this libary to the above data suach as:import signal_processing as spupsampled_signal = upsampling(input_signal,5) # Does upsampling by a factor of 5downsampled_signal = downsampling(upsampled_signal,3) # Does downsampling by a factor of 3sampled_signal = sampling_non_uniformly_sampled_signals(input_signal,freq_in_minutes) # samples the signal on a frequency of given minutes
Package: signalr-async
SignalR-AsyncSignalR-Async is a python client for ASP.NET & ASP.NET Core SignalR, ready for building bidirectional communication.Installationpipinstallsignalr-asyncExampleCreate itCreate a filemain.pywith:importasynciofromsignalr_async.netcoreimportHub,Clientfromsignalr_async.netcore.protocolsimportMessagePackProtocolclassMyHub(Hub):asyncdefon_connect(self,connection_id:str)->None:"""Will be awaited after connection established"""asyncdefon_disconnect(self)->None:"""Will be awaited after client disconnection"""defon_event_one(self,x:bool,y:str)->None:"""Invoked by server synchronously on (event_one)"""asyncdefon_event_two(self,x:bool,y:str)->None:"""Invoked by server asynchronously on (event_two)"""asyncdefget_something(self)->bool:"""Invoke (method) on server"""returnawaitself.invoke("method","arg1",2)hub=MyHub("my-hub")@hub.on("event_three")asyncdefthree(z:int)->None:pass@hub.onasyncdefevent_four(z:int)->None:passasyncdefmulti_event(z:int)->None:passforiinrange(10):hub.on(f"event_{i}",multi_event)asyncdefmain():token="mytoken"headers={"Authorization":f"Bearer{token}"}asyncwithClient("https://localhost:9000",hub,connection_options={"http_client_options":{"headers":headers},"ws_client_options":{"headers":headers,"timeout":1.0},"protocol":MessagePackProtocol(),},)asclient:returnawaithub.get_something()asyncio.run(main())ResourcesSee theSignalR Documentationat docs.microsoft.com for documentation on the latest release.
Package: signalr-client
Python client proxy forSignalR.RequirementsInstall requirements by running:pip install -r requirementsSignalr client is based ongeventwhich in turn requires Python headers.
In Debian based distributions (such as Ubuntu and Raspbian) they are calledpython-dev.CompatibilityCompatible with Python 2 and 3.UsageHere is sample usage:from requests import Session
from signalr import Connection

with Session() as session:
    #create a connection
    connection = Connection("http://localhost:5000/signalr", session)

    #get chat hub
    chat = connection.register_hub('chat')

    #start a connection
    connection.start()

    #create new chat message handler
    def print_received_message(data):
        print('received: ', data)

    #create new chat topic handler
    def print_topic(topic, user):
        print('topic: ', topic, user)

    #create error handler
    def print_error(error):
        print('error: ', error)

    #receive new chat messages from the hub
    chat.client.on('newMessageReceived', print_received_message)

    #change chat topic
    chat.client.on('topicChanged', print_topic)

    #process errors
    connection.error += print_error

    #start connection, optionally can be connection.start()
    with connection:

        #post new message
        chat.server.invoke('send', 'Python is here')

        #change chat topic
        chat.server.invoke('setTopic', 'Welcome python!')

        #invoke server method that throws error
        chat.server.invoke('requestError')

        #post another message
        chat.server.invoke('send', 'Bye-bye!')

        #wait a second before exit
        connection.wait(1)
Package: signalr-client-threads
Python client proxy forSignalR.Note: This is currently not compatible with ASP.NET Core SignalR (.NET Core 2.1), due to some changes in SignalR protocol there.RequirementsInstall requirements by running:pip install -r requirementsFork of SignalR client for Python based on threads instead of gevent.CompatibilityCompatible with Python 2 and 3.UsageHere is sample usage:from requests import Session
from signalr import Connection

with Session() as session:
    #create a connection
    connection = Connection("http://localhost:5000/signalr", session)

    #get chat hub
    chat = connection.register_hub('chat')

    #start a connection
    connection.start()

    #create new chat message handler
    def print_received_message(data):
        print('received: ', data)

    #create new chat topic handler
    def print_topic(topic, user):
        print('topic: ', topic, user)

    #create error handler
    def print_error(error):
        print('error: ', error)

    #receive new chat messages from the hub
    chat.client.on('newMessageReceived', print_received_message)

    #change chat topic
    chat.client.on('topicChanged', print_topic)

    #process errors
    connection.error += print_error

    #start connection, optionally can be connection.start()
    with connection:

        #post new message
        chat.server.invoke('send', 'Python is here')

        #change chat topic
        chat.server.invoke('setTopic', 'Welcome python!')

        #invoke server method that throws error
        chat.server.invoke('requestError')

        #post another message
        chat.server.invoke('send', 'Bye-bye!')

        #wait a second before exit
        connection.wait(1)
Package: signalrcore-async
SignalR core clientThis signalr core client is forked from mandrewcito. The main difference is the replacement of the synchronouswebsocket-clientlibrary by the asynchronouswebsocketslibrary. Additionally, all methods have been made asynchronous.Seehttps://github.com/mandrewcito/signalrcorefor a general introduction.See the following samples to get an idea of the changes:importasynciofromsignalrcore_async.hub_connection_builderimportHubConnectionBuilderfromsignalrcore_async.protocol.msgpackimportMessagePackHubProtocolasyncdefmain():protocol="ws"host="localhost"port="8080"hub="hub"hub_url=f"{protocol}://{host}:{port}/{hub}"connection=HubConnectionBuilder()\.with_url(hub_url)\# optional: use MessagePack instead of json protocol.with_hub_protocol(MessagePackHubProtocol())\.build()try:# start connectionawaitconnection.start()# send (fire and forget)connection.send("SendName","R2D2")# invoke (wait for return value)sum_value=awaitconnection.invoke("Sum",[1,2])print(sum_value)# register callbackconnection.on("OnProgressChanged",_on_progress_changed)# streamawaitconnection.stream("StreamData",[1,2],_on_next)finally:# close connectionawaitconnection.stop()def_on_next(data):pass# do something with the streamed datadef_on_progress_changed(self,args):progress=args[0]print(f"Progress:{progress*100:.0f}%")# run main taskasyncio.run(main())
Package: signalsdb
SignalsDB is an MIT-licensed library written in Python providing
a simple way to query a curated database of Unix signals.Usage:To explain a Unix signal based on the integer id:>>> from signalsdb.api import explain
>>> explain(13)
{'action': 'kill',
 'description': 'write on a pipe with no reader',
 'id': 13,
 'signal': 'SIGPIPE'}Then to query the signals DB based on the signal name or action
in a case insensitive way using regexes:>>> from signalsdb.api import search
>>> search(signal='sigp\w', action='kill')
[{'action': 'kill',
  'description': 'write on a pipe with no reader',
  'id': 13,
  'signal': 'SIGPIPE'},
 {'action': 'kill',
  'description': 'profiling timer alarm',
  'id': 27,
  'signal': 'SIGPROF'}]Installation:From PyPI:$ pip install signalsdbFor hacking on SignalsDB it is recommended that you install
from the git repository:$ git clone git@github.com:eugene-eeo/signalsdb.git
$ cd signalsdb
$ pip install .
Package: signalslite
pip install signalsliteWhy:I wanted a pipeline that can generate features quickly so I can add, remove, build more features whenever needed. So it should be able to do everything from scratch in couple of hours. A relational DB would increase workload of setting things up. So I decided to use  parquet files split into daily structure. This is fast without any additional setup.Least friction to get started. It should effortlessly run on consumer grade laptops. Consequently, automate the whole pipeline on cloud, so makes sense to make it "lite", useparallelizationwhen possible, allow for free data sources. It can utilizecudaif available, but is able to run oncpuas well.It should be able to run in Colab default runtime. One way to setup a pipeline is to save all data to mounted drive with more storage.Under 1000 LoC possible? Goal is not to build the best pipeline, but instead, a wrapper on top of flexible code that new users can easily understand and modify as needed.Stages:Daily Data Collection/updation:Yahoo/EODHD (Thanks tohttps://github.com/degerhan/dsignals)Save in daily parquet filesUpdate daily parquet filesColab seem to be slow in loading data from yahoo. Will update.Generate primary features:Technicla indicators (RSI, MACD, SMA, EMA, etc on various timeframes)flexible enough to accomodate fundamental data and news vectors data since things are independent of each otherSecondary features:Generate features from primary featureslike crossovers, ratios between technical features, etcScaling:bringing the cross sectional features to same scale [0, 1]Now data looks similar to Numerai classic dataTargets:Generate your own targets for trading strategiesor use Numerai Signals targetsModelling:your best models in Numerai classic should work hereScheduling:Run the pipeline dailyshould be able to run on cloudNotes:This is a work in progress. I will keep adding more features and examples.more tests,more documentation,more examples,more flexibility,more speed,more parallelization,more cloud support,more data sources,more targets,more models,more everythingHope you like it and find it useful. Please let me know if you have any suggestions or feedback. Thanks!
Package: signalslot
signalslot: simple Signal/Slot implementation for PythonThis package provides a simple and stupid implementation of theSignal/Slot
patternfor Python.
Wikipedia has a nice introduction:Signals and slots is a language construct introduced in Qt for
communication between objects[1] which makes it easy to implement the
Observer pattern while avoiding boilerplate code.Rationale against Signal/Slot is detailed in the “Pattern”
section of the documentation.InstallInstall latest stable version:pip install signalslotInstall development version:pip install -e git+https://github.com/Numergy/signalslotUpgradeUpgrade to the last stable version:pip install -U signalslotUninstallpip uninstall signalslot
Package: signal-spam
Report to signal-spam.frInstallTo install signal-spam CLI, use:python -m pip install signal-spamUsagesignal-spam BuyMyDogFood.emlReleasingTo push a new version ofsignal-spamon PyPI:Bump the__version__insignalspam.py.commit, tag, push commit, push tag.python -m pip install --upgrade build twinepython -m buildpython -m twine upload dist/*
Package: signalstickers-client
Python client for Signal stickersA client to interact with theSignalstickers API.Fetch sticker packsGet images filesUpload sticker packsetc.Note: despite its name, this client does not interacts withsignalstickers.com, so information defined there (tags, etc.) willnotbe fetched.This client connects to the Signal sticker API. Pleasedo not flood it(you'll be blocked anyway).Installationpip3install--usersignalstickers-clientThis module requirescryptography,protobuf,anyio, andhttpx(but they
should be installed with the previous command).UsageIf you are not familiar with Signal stickers, readSTICKERS_INTERNALS.mdfirst.Downloading a packTheStickerPackobject returned byawait StickersClient().get_pack(<pack_id>, <pack_key>)exposes the following
attributes:id: strthe pack id. Equals topack_id;key: strthe pack key. Equals topack_key;title: strthe title of the pack;author: strthe author of the pack;nb_stickers: intthe number of stickers in the pack;cover: Stickerthe cover sticker;stickers: list[Sticker]the list of stickers in the packAStickerobject exposes the following attributes:id: intthe id of the sticker in the pack;emoji: strthe emoji mapped to this sticker;image_data: bytesthe webp image of the sticker.Uploading a packSame thing, but useLocalStickerPack(that does not containsidandkey)
instead ofStickerPack.You will need your Signal credentials!To obtain them, run the Signal Desktop app with the flag--enable-dev-tools,
open the Developer Tools,change the JavaScript context fromtoptoElectron Isolated Context(cf. video below), and typewindow.reduxStore.getState().items.uuid_idto get your USER, andwindow.reduxStore.getState().items.passwordto get your PASSWORD.Video: how to set JavaScript contexthttps://github.com/signalstickers/signalstickers-client/assets/7778898/ca3f1fec-e908-49d9-88a8-e33d0ee9a453Example usageSeeexamples/DevelopmentCreate apipenvwithpipenv install --dev;Edit the code you want;Don't forget to launch tests withpipenv run py.test.LicenseSeeLICENSELegalThis is not an official Signal project. This is an independant project.Signal is a registered trademark in the United States and other countries.AuthorRomain Ricardcontact+stickerclient@romainricard.fr
Package: signal-subspace
Signal Subspace1-D and ensemble signal subspace analysis with methods such as Esprit
and RootMusic in Fortran, C, and Pythonbased in part upon theSpectral Analysis Lib public domain codeThe core subspace code is written in Fortran 2008 and is called from other languages (Python, C).
Since the programs are Fortran / Python based, they should compile and run in virtually any platform from embedded to supercomputer.In particular, this program (Fortran, called by C or C++ optionally) works from compilers including:Gfortran (GCC)Intel oneAPI (ifort, icc, icpc)BuildPrereqs:Linux:apt install liblapack-dev g++ gcc gfortran cmakeMac:brew install lapack gcc cmakeWindows: useMSYS2or Windows Subsystem for Linuxctest-Ssetup.cmake-VVThen you can test Python calling the Fortran libraries by:pipinstall-e.

pytest-vIn the examples below, observe the frequency estimates printed along with their corresponding eigenvalues.
A larger eigenvalue is increased confidence in that particular frequency estimate.FortranESPRIT example with noisy sinusoidThere are two versions of this program, one a full accuracy usingdouble complexnumbers, and the other usingsingle realnumbers as input.
The single real (4 bytes/number) runs about 4 times faster than the double complex (16 bytes/number) program../f_esprit_cmpl

./f_esprit_realC ESPRIT example with noisy sinusoidHere is an example of calling Fortran Esprit from C, which uses real
single precision float:./c_espritC++ ESPRIT example with noisy sinusoidExample of calling Fortran Esprit from C++, which uses real single precision float:./cpp_espritPythonCompile Fortran ESPRIT to use from Python via f2pypipinstall-e.Selftest Fortran/C/C++/Python Esprit from Python:pytestNotes/liblapack.so: undefined reference to `ATL_zgeru'Try removing Atlas:aptremovelibatlas-base-devFlang / Clang / Clang++You may needaptinstalllibc++abi-devPlots comparing Fortran to PythonpythonBasicEspritExample.py