Saravanan666/pypi-org huggingface dataset:
Package: dspc-bot-ctrl
Project Descriptiondspc_bot_ctrldspc_bot_ctrl is a utility controller for a Telegram bot that can control your desktop actions.It provides a set of commands that, when triggered can act on those commands accordingly. These commands are sent by the user through the telegram bot they will create (through@BotFather) for remotely controlling the desktop.Why should I use this?Want to remote control your desktop for achieving tasks and monitoring processes but don't want to incur higher processing overhead by using general software applications for remote control and desktop sharing? This utility can help you with that. Since this runs on cmd and uses the win32 dlls through win32 utilities for python, the processing overhead with respect to other scripts and actions you want to overlook remotely is low.FeaturesRemote controlsCan shut down workstation.Can take a screenshot of the system or start a stream of screenshots.Can run CMD commands.Can switch active windows.Can type keys or hotkeys or shortcut combinations.Can display all running processes.Can display all active window titles.GeneralEasily controlled by commands.Only a workstation and a mobile device containing the Telegram android app needed.No processing, streaming and bandwidth overhead.RequirementsRequires Python -v > 3.6.0Installation$pipinstalldspc_bot_ctrlInitial PreparationsSince the controller relies on Telegram and its messaging ecosystem to communicate and get commands from user, the Telegram Android app must be installed in your android device.In order to create a bot for yourself that responds to your message, create your bot using @BotFather. Contact BotFather throught the Telegram Android App and type in /newbot. Follow the instructions and note the HTTP API token it provides and it is used to initialize the bot in first run.Using dspc_bot_ctrlImporting Bot Classfromdspc_bot_ctrl.dspc_botimportDSPCBOTInitializing and Deploying The BotDSPCBOT().init()If you are running the controller for the first time, it would ask for the HTTP API token that you have noted down when you created the bot. Once you feed in the token, it would be saved and subsequent runs would not need the token. If you want to revoke the saved token for a new bot, type in 'revoke' in the password field.For every run, the controller would ask you for a password. Once the password is inputed, the controller would look out for a identification message from you. Find the bot by the name you have provided for the bot through BotFather and send message  'identify_me <password>' to the bot through the Telegram Client. Once the controller receives the identification message with the correct password, It will start polling for messages and you can use the bot as you please.In order to acheive your tasks and activities quicker, you can search for keyboard shortcuts for the particular task or sub-task you want acheived and use the necessary commands to send the keys to your keyboard.
Package: dspf
Data Science PortfolioFeaturesTODORequirementsTODOInstallationYou can installData Science PortfolioviapipfromPyPI:pip install dspfUsagePlease see theCommand-line Referencefor details.LicenseDistributed under the terms of theMIT license,Data Science Portfoliois free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.
Package: dspftw
DSPFTWStarting points and helper functions for learning digital signal processing.SetupIf you haven't already, install Python 3.5 or greater, and thedspftwpackage.python3-mpipinstalldspftw--userIntroDecompositionSuperposition: The foundation of DSPSinusoidsPrefer to use the complex exponential form instead of real, as it's a more natural fit for fourier analysis and synthesis.The following functions represent a complex sinusoid.  They are equivalent, and take the same parameters:A = Amplitude (y axis is amplitude).f = Frequency (cycles per second) in Hertz.  It is multiplied by 2π to get radians per second.t = Time in seconds.  These functions work in the time domain (x axis is time).ϕ = Phase offset at t=0, in radians.z(t) = A*exp(j*(2π*f*t+ϕ))

z(t) = A*cos(2π*f*t+ϕ)+j*A*sin(2π*f*t+ϕ)We can define this in Python with the following.importnumpyasnp# Here we use the name "complex_sinusoid" instead of just "z".defcomplex_sinusoid(A,f,t,phi):returnA*np.exp(1j*(2*np.pi*f*t+phi))In fact, this is defined in thedspftwpackage, so let's import that.importdspftwWe can create our own sinusoid by defining everything exceptt.defmy_sinusoid(t):returndspftw.complex_sinusoid(A=5,f=5,t=t,phi=0)We can get the signal at a bunch of times thanks to numpy arrays.  We usenumpy.linspaceto generate the evenly spaced times.importnumpyasnptimes=np.linspace(0,1,num=25)# 25 evenly spaced values between 0 and 1my_signal=my_sinusoid(times)# returns an array of complex values representing the signalNow plot it out withdspftw.plot_complex(), which uses matplotlib.importmatplotlib.pyplotaspltdspftw.plot_complex(my_signal)plt.show()Complex Exponential SignalsRoots of UnityWolfram MathworldDelta FunctionConjugateComplex ConjugateConvolutionConvolutionCorrelationnumpy.correlateKronecker Productnumpy.kronSample SignalsSigIDWiki sample signalsLoading SignalsComplex 8 bitimportnumpyasnpsignal=np.fromfile('filename',dtype='b')# load the whole filesignal=np.fromfile('filename',dtype='b',count=1024)# only load the first 1024 bytes of the filesignal=np.fromfile('filename',dtype='b',offset=1024)# skip the first 1024 bytes of the filesignal=np.fromfile('filename',dtype='b',offset=1024,count=1024)# skip 1024, then load 1024This just loads the values as an array of real numbers, but we want it as complex.  We have to interpret every other value as the imaginary component.signal=signal[0::2]+signal[1::2]*1jComplex 32 bit float, little-endian (x86)signal=np.fromfile('filename',dtype='<f')countandoffsetwork as above, but note thatoffsetis in bytes, so you must multiple by 4 since there are 4 bytes in 32 bits.Complex 32 bit float, big-endiansignal=np.fromfile('filename',dtype='>f')countandoffsetwork as above, but note thatoffsetis in bytes, so you must multiple by 4 since there are 4 bytes in 32 bits.
Package: dsplab
In a different subject areas, data analysis tasks exist in which a
certain general structure is distinguished, while the number of
possible methods for implementing subtasks increases. The question
arises: which combination of methods is better? Dsplab allows you to
describe the overall scheme of the task (plan) and assign the
so-called “workers” to perform the subtasks. So the main field of
application of dsplab is the investigation of variety of methods
solving the same signal processing task.
Package: dsplot
Data Structure Plot (DSPlot)DSPlot is a tool to simply visualize tree and graph data structures by serving as a Pythonic interface to theGraphvizlayout.
DSPlot allows you to easily draw trees, graphs (both directed and undirected), and matrices by passing data in primitive form and directly output an image.⬇ Installation0. PrerequisitesPython 3.7 or laterpipvirtualenv1. Install GraphvizMacOS:brew install graphvizLinux:apt-get install graphviz libgraphviz-devOther OS(s):https://graphviz.org/download/2. Install package$ pip install dsplot🤟 UsageBinary Tree:fromdsplot.treeimportBinaryTreetree=BinaryTree(nodes=[5,4,8,11,None,13,4,7,2,None,None,5,1])tree.plot()Graph:fromdsplot.graphimportGraphgraph=Graph({0:[1,4,5],1:[3,4],2:[1],3:[2,4],4:[],5:[]},directed=True)graph.plot()fromdsplot.graphimportGraphgraph=Graph({1:[2,4],2:[1,3],3:[2,4,5],4:[1,3],5:[3,6,7],6:[5],7:[5]},directed=False)graph.plot()Matrix:fromdsplot.matriximportMatrixmatrix=Matrix([[1,2,3],[4,5,6],[1,2,6]])matrix.plot()Customization:You can customize the border color, shape, style, and fill color of the nodes, and the orientation (left to right - LR, top to bottom - TB) of the graph.fromdsplot.graphimportGraphgraph=Graph({0:[1,4,5],1:[3,4],2:[1],3:[2,4],4:[],5:[]},directed=True)graph.plot(fill_color='#aec6cf')fromdsplot.treeimportBinaryTreetree=BinaryTree(nodes=[5,4,8,11,None,13,4,7,2,None,None,5,1])tree.plot(orientation='LR',border_color='#FFCE30',fill_color='#aec6cf')Edge values for Graphs:For edge values,strandintdata types are supported at the moment.fromdsplot.graphimportGraphgraph=Graph({0:[1,4,5],1:[3,4],2:[1],3:[2,4],4:[],5:[]},directed=True,edges={'01':1,'04':4,'05':5,'13':3,'14':4,'21':2,'32':3,'34':4},)graph.plot()🎁 Additional features1. Tree traversals:fromdsplot.treeimportBinaryTreetree=BinaryTree(nodes=[5,4,8,11,None,13,4,7,2,None,None,5,1])print(tree.preorder())# [5, 4, 11, 7, 2, 8, 13, 4, 5, 1]print(tree.inorder())# [7, 11, 2, 4, 5, 13, 8, 5, 4, 1]print(tree.postorder())# [7, 2, 11, 4, 13, 5, 1, 4, 8, 5]2. Graph traversals:fromdsplot.graphimportGraphgraph=Graph({0:[1,4,5],1:[3,4],2:[1],3:[2,4],4:[],5:[]},directed=True)print(graph.bfs())# [0, 1, 4, 5, 3, 2]print(graph.dfs())# [0, 1, 3, 2, 4, 5]📄 LicenseMIT
Package: dsp-metadata-conversion
dsp-metadata-conversionPython CLI for converting project metadata from JSON to RDFInstallationInstall the converter using pip.pipinstalldsp-metadata-conversionUsageCLIAfter installing using pip, a command line entrypoint is installed in your local python environment.If using a virtual environment, the entry point will only be available when the environment is activated.The entry point can be called with the commandconvert-metadata. This takes a required positional argument for the path of the file/directory to be converted. An optional flag-dmarks the path as a directory which will be used for bulk conversion.The script will read one or many JSON files, as specified in the path passed as the first argument, and convert it to three files: JSON-LD, Turtle and RDF-XML. These will be saved in the same directory as the JSON file is located. If the files already exist, they will be overwritten.HelpCallingconvert-metadata -hwill show the program's help menu.ExampleTo convert a single file, callconvert-metadatadata/rosetta.jsonTo bulk convert all JSON files in a directory, callconvert-metadatadata/-dIn python scriptsAfter installing via pip, the package can be imported asconverter.Example usage:# import the converterfromconverterimportconverter# read a JSON filewithopen('data/rosetta.json',mode='r',encoding='utf-8')asf:json_data=f.read()# convert JSON to a rdflib.Graphgraph=converter.convert_string(json_data,'nope')# print all subjects, predicates and objects in the graphprint("Graph:")fors,p,oingraph:print(s,p,o)
Package: dspobjects
FeaturesTODORequirementsTODOInstallationYou can installdspobjectsviapipfromPyPI:$pipinstalldspobjectsUsagePlease see theCommand-line Referencefor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,dspobjectsis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz’sHypermodern Python Cookiecuttertemplate.
Package: ds-pricing-framework
ds-pricing-frameworkThis package contains the following class(es):TriageVariableTo use the TriageVariable module, you will need to start with a pandas dataframe that has the following variables:epilpolicy_numberclaim_indicatorpolicy_genageprice_per_mileYou will also need:a target variable for the model (claim_indicator is the preferred variable)a proposed variable that you are testing, summarized at the policy levelany variables that you would like to control forThe inputs for TriageVariable are:pandas dataframetarget variableproposed variablelist of control variablesCall the function run_triage which will output tables to help make a decision about the variable.Example:pip install ds-pricing-framework
import pricing_framework_triage as pf
triage = pf.TriageVariable(df, "claim_indicator", "prior_claim", ["package", "seasoning", "age_bucket"])
triage.run_triage()
Package: dsps
dspsDifferentiable Stellar Population SynthesisInstallationThe latest release of DSPS is now available for installation with pip:$ pip install dspsAlternatively, the latest release is also available on conda-forge:$ conda install -c conda-forge dspsTo install dsps from source, first clone the GitHub repository, and then:$ pip install .DocumentationOnline documentation for DSPS is available atdsps.readthedocs.io.Citing DSPSThe DSPS paperhas been published inMonthly Notices of the Royal Astronomical Society. Citation information for the paper can be found atthis ADS link, copied below for convenience:@ARTICLE{2023MNRAS.521.1741H,
       author = {{Hearin}, Andrew P. and {Chaves-Montero}, Jon{\'a}s and {Alarcon}, Alex and {Becker}, Matthew R. and {Benson}, Andrew},
        title = "{DSPS: Differentiable stellar population synthesis}",
      journal = {MNRAS},
     keywords = {software: data analysis, galaxies: stellar content, cosmology: large-scale structure of Universe, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics},
         year = 2023,
        month = may,
       volume = {521},
       number = {2},
        pages = {1741-1756},
          doi = {10.1093/mnras/stad456},
archivePrefix = {arXiv},
       eprint = {2112.06830},
 primaryClass = {astro-ph.GA},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2023MNRAS.521.1741H},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
Package: dsptoolbox
ReadmeThis is a toolbox in form of a python package that contains algorithms to be used in dsp (digital signal processing) projects.This project is under active development and it will take some time until it reaches a certain level of maturity.
Beware that backwards compatibility is not an actual concern and important changes to the API might come in the future.
If you find some implementations interesting or useful, please feel free to use it for your projects and expand or change functionalities.Getting StartedCheck out theexamplesfor some basic examples of the dsptoolbox package
and refer to thedocumentationfor the complete description of classes and functions.InstallationUse pip to install dsptoolbox$pipinstalldsptoolbox(Requires Python 3.10 or higher)In order to install the package successfully using Linux, you need to install
PortAudio manually, since installingsounddevicewill not do it automatically. To do this,
run the following commands on your console:$sudoapt-getinstalllibasound-devlibportaudio2libsndfile1If this does not work properly for some reason, refer to the documentation forsounddeviceorPortAudio.
Package: dsp-toolkit
Digital Signal Processing ToolkitThis code started as a C++ program to perform trapezoidal filtering to a digitized signal fromXIA LLC's Pixie-16 hardware. The original sample code came
from a VB program usingIGORas its base. It fairly well
approximates the filter calculations that happen on a Pixie-16 module. These algorithms are mostly
focused around XIA's hardware and function, but can be applied toanydigitized signal.Installationpip install dsp_toolkitVerify installationYou can verify the installation by opening up a python console and executing the followingfromdsp_toolkit.sample_dataimportsample_tracesasstimportdsp_toolkit.filtering.filtersasftfilter=ft.calculate_trapezoidal_filter(st.plastic_scintillator,10,5)print(filter)Your results should be identical toresults=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.6,0.4,0.5,0.2,0.6,0.7,0.3,0.0,0.0,0.0,-0.1,-0.3,-0.1,-0.1,-0.1,0.1,0.0,-0.1,0.3,0.3,0.2,0.0,-0.3,-0.1,0.0,0.0,0.1,-0.1,-0.2,0.2,0.2,0.0,-0.2,-0.2,0.0,0.1,0.0,0.0,-0.2,0.4,0.9,0.8,0.7,0.6,0.5,0.7,0.8,0.6,6.5,74.8,267.0,574.5,912.4,1215.2,1463.4,1657.5,1805.4,1909.0,1921.7,1789.9,1526.5,1220.0,940.1,703.5,456.4,129.2,-278.9,-695.9,-1063.5,-1359.4,-1583.3,-1749.9,-1866.3,-1888.6,-1764.0,-1505.7,-1198.9,-912.5,-676.4,-497.0,-363.7,-266.1,-191.3,-130.7,-85.5,-56.4,-38.8,-28.2,-21.0,-15.7,-10.8,-10.3,-16.8,-23.2,-24.7,-23.0,-18.6,-12.4,-7.0]For more detailed usage checkout
theDemo notebook.Module DescriptionsfilteringImplements a simple trapezoidal filter without any bells and whistles. We also include a simple RC
low-pass filter used for conditioning signals.XIA LLC usestrapezoidal filteringto calculate
trigger positions and energies. The functions in this script approximate the Pixie-16 on-board
calculations. We have functions to calculatetrigger positions,signal baseline,signal energy,energy sums,and trigger and energy responses.We've made no attempt to convert bins to time. Users can do this trivially if they know the sampling
frequency of their signal.sample_dataThe sample data include both energy spectra, and digitized signals. The signals can be used with the
various filtering and fitting functions. The energy spectra can be used with pileup calculations.signal_pileupTakes a user provided energy distribution (either binned or raw) and calculates signal pileups based
on trapezoidal filter parameters and count rates. We've also provided some macros that can be used
with the CERN ROOT program. Those scripts served as the basis for the python functions.timingProvides both fitting and constant fraction discrimination (CFD) functions. We implement both a
traditional CFD, and a CFD described in XIA's Pixie-16 Manual. We implement a couple of different
fitting functions. Thevandlefunction is the most tested and used function.
Package: dsp-tools
DSP-TOOLS DocumentationDSP-TOOLS is a Python package with a command line interface
that helps you interact with a DSP server.
A DSP server is a remote server or a local machine
where theDSP-APIis running on.To install the latest version, run:pip3installdsp-toolsTo update to the latest version run:pip3install--upgradedsp-toolsThe two main tasks that DSP-TOOLS serves for are:Create a project with its data model(s), described in a JSON file, on a DSP serverIn order to archive your data on the DaSCH Service Platform,
you need a data model that describes your data.
The data model is defined in a JSON project definition file
which has to be transmitted to the DSP server.
If the DSP server is aware of the data model for your project,
conforming data can be uploaded into the DSP repository.Upload data, described in an XML file, to a DSP server that has a project with a matching data modelSometimes, data is added in large quantities.
Therefore, DSP-TOOLS allows you to perform bulk imports of your data.
In order to do so, the data has to be described in an XML file.
DSP-TOOLS is able to read the XML file
and upload all data to the DSP server.All functionalities of DSP-TOOLS revolve around these two basic tasks.DSP-TOOLS provides the following functionalities:dsp-tools createcreates the project with its data model(s) on a DSP server from a JSON file.dsp-tools getreads a project with its data model(s) from
a DSP server and writes it into a JSON file.dsp-tools xmluploaduploads data from an XML file (bulk data import)
and writes the mapping from internal IDs to IRIs into a local file.dsp-tools excel2jsoncreates an entire JSON project file from a folder with Excel files in it.dsp-tools excel2listscreates the "lists" section of a JSON project file from one or several Excel files.
The resulting section can be integrated into a JSON project file
and then be uploaded to a DSP server withdsp-tools create.dsp-tools excel2resourcescreates the "resources" section of a JSON project file from an Excel file.
The resulting section can be integrated into a JSON project file
and then be uploaded to a DSP server withdsp-tools create.dsp-tools excel2propertiescreates the "properties" section of a JSON project file from an Excel file.
The resulting section can be integrated into a JSON project file
and then be uploaded to a DSP server withdsp-tools create.dsp-tools excel2xmltransforms a data source to XML
if it is already structured according to the DSP specifications.The moduleexcel2xmlprovides helper methods that can be used in a Python script
to convert data from a tabular format into XML.dsp-tools id2iritakes an XML file for bulk data import and replaces referenced internal IDs with IRIs.
The mapping has to be provided with a JSON file.dsp-tools start-stack / stop-stackassist you in running a DSP stack on your local machine.dsp-tools templatecreates a template repository with a minimal JSON and XML file.dsp-tools rosettaclones the most up to date rosetta repository,
creates the data model and uploads the data.
Package: ds-pycontain
ds_pycontainis a small python package to help with docker containers and images and provide Python REPL running in a docker container.Example use case you might consider is to isolate python code execution generated by untrusted LLM by running it in a docker container.This package makes it a bit easier to:Build docker images from Dockerfiles or in-memory string.Pull docker images from dockerhub (or similar).Run docker container to execute a one-off command.Run docker container to execute a long-running process and communicate with it.Run python commands in a container and get the result.
Package: dspy-inspector
dspy-inspector 🔍DSPy program/pipeline inspector widget for Jupyter/VSCode Notebooks.🔭Note: DSPy is going through a big refactor at this moment. Updates in the parsing logic are going to be halted in the meantime.Dark theme is coming soon™.Install👉pip install dspy-inspectorUsagefromdspy_inspectorimportinspectclassMultiHopRAG(dspy.Module):def__init__(self,passages_per_hop=3,max_hops=2):...defforward(self,question):...inspect(MultiHopRAG)# Or 👇program=MultiHopRAG()inspect(program)# Automatically updatesprogram("How many storeys are in the castle that David Gregory inherited?")Check an example in themulti_hop_rag.ipynbnotebook.All example notebooks are cached, no calls to LLMs are needed to run them.RoadmapThis is a personal project I made to better understand what were my DSPy programs actually doing underneath. This extension is currently inBETA, so, expect bugs. For a roadmap on what things must be fixed or done check all theTODOsinside the source code.DevelopingTo setup the virtual developing environment, follow these steps:Install dependencies:poetry installInstall tools:poetry run inv tool.install --include "dev*"Create kernel:poetry run python -m ipykernel install --user --name dspy-inspector --display-name "DSPy Inspector"Selectdspy-inspectorkernel in all notebooksRunpoetry run inv helpfor further commands andpoetry run inv <command> --helpfor their usage.ContributeFeel free to contribute to this project : ) .LicenseThis project is licensed under theGPL-3.0 License- read theLICENSEfile for details.
Package: dsq
Dead simple task queue using redis.# tasks.pyimportdsqmanager=dsq.create_manager()@manager.task(queue='normal')defadd(a,b):printa+bif__name__=='__main__':add.push(1,2)$pythontasks.py$dsqworker-bttasksnormalSee fullDSQ documentation.FeaturesLow latency.Expiring tasks (TTL).Delayed tasks (ETA).Retries (forever or particular amount).Periodic tasks.Crontab.Dead letters.Queue priorities.Worker lifetime.Task execution timeout.Task forwarder from one redis instance to another.HTTP interface.Inspect tools.Supports 2.7, >3.4 and PyPy.100% test coverage.The goal is a simple design. There is no worker manager, one can use
supervisord/circus/whatever to spawn N workers.
Simple storage model. Queue is a list and scheduled tasks are a sorted set.
There are no task keys. Tasks are items of list and sorted set. There is no
any registry to manage workers, basic requirements
(die after some lifetime and do not hang) can be handled by workers themselves.
Worker do not store result by default.Queue overhead benchmarksDSQ has a little overhead in compare with RQ and Celery
(https://gist.github.com/baverman/5303506cd89200cf246af7bafd569b2e)Pushing and processing 10k trivial add tasks:=== DSQ ===
Push
real        0m0.906s
user        0m0.790s
sys         0m0.107s

Process
real        0m1.949s
user        0m0.763s
sys         0m0.103s


=== RQ ===
Push
real        0m3.617s
user        0m3.177s
sys         0m0.293s

Process
real        0m57.706s
user        0m29.807s
sys         0m20.070s


=== Celery ===
Push
real        0m5.753s
user        0m5.237s
sys         0m0.327s