Saravanan666/pypi-org huggingface dataset:
Package: pydsdl
PyDSDLPyDSDL is aCyphalDSDL compiler front-end implemented in Python.
It accepts a DSDL namespace at the input and produces a well-annotated abstract syntax tree (AST) at the output,
evaluating all constant expressions in the process.
All DSDL features defined in the Cyphal Specification are supported.
The library should, in theory, work on any platform and with any Python implementation.Read the docs atpydsdl.readthedocs.io.importpydsdltry:types=pydsdl.read_namespace(target_directory,lookup_directories)exceptpydsdl.InvalidDefinitionErrorasex:print(f'{ex.path}:{ex.line}: Invalid DSDL:{ex.text}',file=sys.stderr)exit(1)else:fortintypes:print(t)# Process the type -- generate code, analyze, etc.
Package: pyds-ext
pyds_extpython bindings for nvidia deepstreampybind11bindings to access NvidiaDeepStreammetadata from Python - uses patcheddeepstream_python_apps. This package offers the same
functionality as thedefault nvidia bindings,
as well as some additional funcitonality:Allow to install with pip: wheels for x86-64 (GPU) and aarch64 (jetson) are availablePatch pybind bindings to allow maskrcnn masks extractionPrevious version:The following patches were included in the previous version (<2), and are no longer
required because they are included in the vanilla bindings:Tracker meta info (NvDsPastFrame...classes)Detector and tracker bbox info (NvDsObjectMeta.[tracker/detector]_bbox_info...attrs) from Python.Analytics Metadata (NvDsAnalyticsFrameMetaandNvDsAnalyticsObjInfo) from Python.InstallationPrerequisitespython3.8Jetson (Xavier only tested) or Nvidia GPUDeepstream>=6 (6.1 only tested)[Option A]pep-517compatible pip:pip install "pip>=10"[Option B] Only necessary for oldpip<10:pybind11:[Option B.1] You might try simplypip install pybind11.[Option B.2] The recommended way is tobuild it from sourceInstall packagepip install --upgrade pip>=10pip install pyds_extUsageThis meta-package provides a single package:Standard pydspyds: Patched pyds from/opt/nvidia/deepstream/deepstream/libSee oficial documentationhereMaskrcnn extractionUse the following as a reference to extract thenp.ndarrayof the mask:importpydsdefosd_sink_pad_buffer_probe(pad,info,u_data):# ... code to acquire frame_metal_obj=frame_meta.obj_meta_listwhilel_objisnotNone:try:obj_meta=pyds_bbox_meta.NvDsObjectMeta.cast(l_obj.data)exceptStopIteration:breakmask_array=obj_meta.mask_params.dataprint(f"mask_array:{mask_array}")try:l_obj=l_obj.nextexceptStopIteration:break...To convert the mask to anuint8bidimensional matrix, seethis code.For this and other utilities, consider using thepythiapackage, which builds on
this and adds pythonic iteration and common deepstream boilerplate.Referencesmask patch
Package: pydsge
A package for solving, filtering and estimatinglinearDSGE models with the ZLB (or other occasionally binding constraints).Check out myEconpizzapackage if you are interested in simulatingnonlinearDSGE models with (or without)heterogeneous agents.A collection of models that can be (and were) used with this package can be found inanother repo.InstallationInstalling the stable version is as simple as typingpipinstallpydsgein your terminal (Linux/MacOS) or Anaconda Prompt (Win).DocumentationDocumentation can be found onReadTheDocs:Installation GuideGetting StartedModule DocumentationCitationpydsgeis developed by Gregor Boehl to simulate, filter, and estimate DSGE models with the zero lower bound on nominal interest rates in various applications (seemy websitefor research papers using the package). Please cite it with@TechReport{boehl2022meth,
  title ={{Estimation of DSGE Models with the Effective Lower Bound}},
  author ={Boehl, Gregor and Strobel, Felix},
  year = 2022,
  type ={CRC 224 Discussion Papers},
  institution ={University of Bonn and University of Mannheim, Germany}}@techreport{boehl2022obc,
  title = Efficient solution and computation of models with occasionally binding constraints},
  author = Boehl, Gregor},
  journal = Journal of Economic Dynamics and Control},
  volume = 143},
  pages = 104523},
  year = 2022},
  publisher = Elsevier}}We appreciate citations forpydsgebecause it helps us to find out how people have
been using the package and it motivates further work.ParserThe parser originally was a fork of Ed Herbst’s fork from Pablo Winant’s (excellent) packagedolo.Seehttps://github.com/EconForge/doloandhttps://github.com/eph.ReferencesBoehl, Gregor (2022).Efficient Solution and Computation of Models with Occasionally Binding Constraints.Journal of Economic Dynamics and Control
Package: pydsl
DESCRIPTION===========pydsl is a language library written in python. It provides some verbs for Grammars.from pydsl.file.BNF import load_bnf_filegrammardefinition = loand_bnf_file('myfile.bnf')grammardefinition.alphabet # Returns the alphabet used by this grammargrammardefinition.minsizegrammardefinition.maxsizegrammardefinition.enumerate # Returns a generator that generates every accepted wordfrom pydsl.check import checkcheck(grammardefinition,'mystring') # returns True or Falsefrom pydsl.parser import parseparse(grammardefinition,'mystring') # returns a ParseTreefrom pydsl.extract import extractextract(grammardefinition,'abcmystringabc') # returns ('mystring',3,11)FORMATS=======Functions---------| Format  |Check|Match|Search|Split|Extract|Translate|Validate|Diff|| ------- |:---:|-----|------|-----|:-----:|:-------:|:------:|----|| BNF     | V   |     |      |     |V      | Parse   | V      |    || regexp  | V   |     |      |     |V      | X       |        |    || ply     | V   |     |      |     |V      | V       |        |    || parsley | V   |     |      |     |V      | V       |        |    ||pyparsing| V   |     |      |     |V      |         |        |    |Properties----------| Format  |First|Min|Max|Enumerate|| ------- |:---:|---|---|---------|| BNF     | V   |   |   |         || regexp  |     |   |   |         || ply     |     |   |   |         || parsley |     |   |   |         ||pyparsing|     |   |   |         |INSTALLATION============* disttools:* python3 setup.py install* pip:* pip install pydslCONTRIBUTIONS=============* check existing issues: https://github.com/nesaro/pydsl* read the project's blog: http://pydsl.blogspot.co.uk* pull requests :)REQUIREMENTS============* python >= 2.7* optional: ply library ( http://www.dabeaz.com/ply/ )ABOUT=====Copyright (C) 2008-2015 Nestor Arocha (nesaro@gmail.com)
Package: pydsltool
pydsltoolThis is a library to aid developers in creating neat little embedded DSLs when
using python, without having to do any complex parsing or anything like that.
The resulting DSLs look a bit more like english than python does.The idea for this was inspired by some ruby stuff that I’ve been using lately.
I’ve been using ruby quite a bit lately, and while I am still not a huge fan
of the language, I do like the idea of easy to code up DSLs. Since I wanted
a DSL for a python project I was working on, I played with a few ideas and
ended up with this.UsageFirst, create some very basic python objects, and call the parse_dsl function
or parse_dsl_file function with the file to process, and an object that the
DSL is executed with. Here’s a sample recipe DSL for baking:author = 'Mom'
level = 'Easy'

with Instructions('Yummy cookies'):

    preheat_oven = '375F'

    with Ingredients:
        add += '2 1/4 cups', 'flour'
        add += '1 tsp', 'baking soda'
        add += '1 tsp', 'salt'
        add += '1 cup', 'butter'
        add += '3/4 cup', 'sugar'
        add += '3/4 cup', 'brown sugar'
        add += '1 tsp', 'vanilla extract'
        add += '2', 'eggs'
        add += '2 cups', 'chocolate chips'
        add += '1 cup', 'nuts'And the implementation to parse that dsl is super simple:import dsltool

class Ingredients(object):

    def __init__(self):
        self.add = dsltool.ItemList()


class Instructions(object):
    preheat_oven = None

    ingredients = Ingredients
    steps = Steps

    def __init__(self, name):
        self.name = name


class Recipe(object):

    author = None
    level = None

    def __init__(self):
        self.instructions = Instructions

if __name__ == '__main__':
    obj = dsltool.parse_dsl_file('cookies.pydsl', Recipe)There is a working example in the ‘examples’ directory. Check it out.PerformanceNo idea. I’m sure it’s not that bad. I imagine typical usage of a DSL
isn’t going to be in a performance-dependent part of your application
anyways.GotchasIf the user writes the DSL incorrectly, there are lots of possible gotchas.
If enough people use this thing and file bug reports, together we can
remove many of them. I’ll try to list them as I find them.Do not expect 0.1.x releases to have a stable API. I’m still exploring the
possibilities of this, so as better ways to do things emerge newer releases
will have those instead.TestingUses py.test for testing. Still need better tests, but it catches a lot
of common mistakes I’ve made so far. ;)ContributingIt’s all on github, so file your bug reports there. If you have a patch,
the best way to do it is just create a fork and send me a pull request.
If you don’t include a test case for your patch (these are really easy to
create!), then it probably won’t be accepted.https://github.com/virtuald/pydsltoolAuthorAuthor:: Dustin Spicuzza (dustin@virtualroadside.com)
Package: pydsol-core
PYDSOL - Python Distributed Simulation Object LibraryWhat is pydsol?pydsol is an open source suite for discrete-event simulation and
multi-formalism simulation.Originally it was programmed fully in Java, and it was introduced at
the Winter Simulation Conference in 2002.The starting points for DSOL were that it should be possible to create
simulation models that are inherently distributed, and simulation models
that are built on the premises of object oriented principles.DSOL is based on Zeigler’s (2000) framework for modeling and simulation,
which means that the basic entities in a simulation study are a model
and a simulator, governed for experimentation by an experiment.All these elements are present in the pydsol-core simulation framework:
the DSOLModel class that is extended by the user, the Simulator with
several implementations such as the DEVSSimulator, and the Experiment
class for defining the simulation experiment.Implemented formalismsAt the moment, only the event scheduling formalism has been implemented in
pydsol-core. The process interaction, differential equations, flow modeling,
classical DEVS, Port-based DEVS, hierarchical DEVS, and agent-based modeling
are all possible as extensions and will be added shortly. In the Java version
of DSOL, differential equations, process modeling, and various DEVS variants
were implemented, which will be ported to Python.DSOL licenseDSOL has an open source BSD 3-clause license.Third party components used in DSOL can not have a license that is
more restrictive than permissive licenses such as BSD, Apache, MIT,
LGPL, Eclipse.pydsol can be incorporated in part or in full in other products for
any use (educational, commercial, whatever).pydsol may be extended or adapted by anyone into anything else
for any purpose.
Package: pydsol-model
pydsol-model : Python Distributed Simulation Object Library with Predefined Model Objectspydsol-modelis a package that includes standard model objects suitable for developing a discrete event simulation model. Standard model objects are source, server using resources, sink, node, link, entity and vehicle. This makes it easy and fast to design discrete event simulation models using queueing theory, useful for teaching, academic research, and commercial use. You can use the standard model objects as is, or use it to make your own objects for more complex simulation models.pydsol-modelis an additional layer on top ofpydsol-core, a Python distribution discrete event simulation library. pydsol-core uses a heap queue (priority queue) as eventlist and plans events using a relative delay instead of yield, making it much faster than most discrete event simulation packages implemented in Python. Note that you need pydsol-core (https://github.com/averbraeck/pydsol-core) to usepydsol-model.This repository is currently under development at Delft University of Technology. If you would like to collaborate, please open an issue/discussion or contactIsabelle van SchiltorAlexander Verbraeck.DocumentationDocumentation for pydsol-model is available atRead the Docs. This includes the description of the theory behind each model object, and a step-by-step explanation of a basic and more advanced example.Installation and set-uppydsol-modelis available using pip install.:pip install pydsol-modelFor the latest version, please use the URL:pip install git+https://github.com/imvs95/pydsol-model.gitFor setting up pydsol-model and ensuring that the example models can run,pydsol-corealso needs to be installed. This is part of therequirements.txt.
If you want to install it manually, use:pip install pydsol-coreThe source code of that library can be found athttps://github.com/averbraeck/pydsol-core.LicenseThis repository is licensed under BSD 3-Clause License. SeeLICENSE.
Package: pydspace
WIPPython interface for interoperability with dSpace running in Matlab.
pyDspace has been designed to used inside Jupyter Notebooks.Dependenciespython >= 3.6numpymatlabengineforpythonInstallationpipinstallpydspaceAPIImport the module as usualimportpydspaceWhen importing the module a Matlab engine is created and you can use:pydspace.get_matlab_engine()pydspace.reset_matlab_engine()pydspace.kill_matlab_engine()In order to open dspace from the jupyter notebook, first you must specify where the Matlab Dspace is located
with:pydspace.set_dspace_path(dspace_path)now you can call dspace as usual with numpy arrays, pandas dataframes and queries made with datajoint.df=pd.read_csv(CSV_PATH)N=len(df)M1=np.random.rand(N,100)M2=np.random.rand(N,100)M_no_name=np.random.rand(N,100)# Datajointdata=query.fetch()dspace=pydspace.dspace(df,"matrix1",M1,"matrix2",M2,M_no_name,data)the returned object is a DspaceWrapper object that implements the following methods:dspace.dsource_info()# Prints info about the dsource objectdspace.add_data("new_matrix",M3,M2_no_name)# Adds additional sources.you can find more detailed info about the methods in their corresponding docstring.
Package: pydspam
This is a python extension module to enable python scripts to
use libdspam functionality.  A higher level wrapper handles a
signature database and quarantine mbox in a user directory.This release updates pydspam for dspam-3.10.2. Because the libdspam API changed
drastically since dspam-2.6, this is considered a Beta release. I do have it
running on several production systems.
Package: pyd-sqa
pyd-sqaPydantic-SQLAlchemyTools to generate Pydantic models from SQLAlchemy models, forked from pydantic-sqlalchemyStill experimental.How to useQuick example:fromtypingimportListfrompyd_sqaimportpyd_sqafromsqlalchemyimportColumn,ForeignKey,Integer,String,create_enginefromsqlalchemy.ext.declarativeimportdeclarative_basefromsqlalchemy.ormimportSession,relationship,sessionmakerBase=declarative_base()engine=create_engine("sqlite://",echo=True)classUser(Base):__tablename__="users"id=Column(Integer,primary_key=True)name=Column(String)fullname=Column(String)nickname=Column(String)addresses=relationship("Address",back_populates="user",cascade="all, delete, delete-orphan")classAddress(Base):__tablename__="addresses"id=Column(Integer,primary_key=True)email_address=Column(String,nullable=False)user_id=Column(Integer,ForeignKey("users.id"))user=relationship("User",back_populates="addresses")PydanticUser=pyd_sqa(User)PydanticAddress=pyd_sqa(Address)classPydanticUserWithAddresses(PydanticUser):addresses:List[PydanticAddress]=[]Base.metadata.create_all(engine)LocalSession=sessionmaker(bind=engine)db:Session=LocalSession()ed_user=User(name="ed",fullname="Ed Jones",nickname="edsnickname")address=Address(email_address="ed@example.com")address2=Address(email_address="eddy@example.com")ed_user.addresses=[address,address2]db.add(ed_user)db.commit()deftest_pyd_sqa():user=db.query(User).first()pydantic_user=PydanticUser.from_orm(user)data=pydantic_user.dict()assertdata=={"fullname":"Ed Jones","id":1,"name":"ed","nickname":"edsnickname",}pydantic_user_with_addresses=PydanticUserWithAddresses.from_orm(user)data=pydantic_user_with_addresses.dict()assertdata=={"fullname":"Ed Jones","id":1,"name":"ed","nickname":"edsnickname","addresses":[{"email_address":"ed@example.com","id":1,"user_id":1},{"email_address":"eddy@example.com","id":2,"user_id":1},],}
Package: py-ds-serial
ALBA Python Serial DeviceServerALBA Python Serial with tango DeviceServerApart from the core library, an optionaltangodevice server is also provided.InstallationFrom within your favorite python environment type:$ pip install tango_serialLibraryThe core of the tango_serial library consists of Serial object.
To create a Serial object you need to pass a communication object.The communication object can be any object that supports a simple API
consisting of two methods (either the sync or async version is supported):write_readline(buff: bytes) -> bytesorasync write_readline(buff: bytes) -> byteswrite(buff: bytes) -> Noneorasync write(buff: bytes) -> NoneA library that supports this API issockio(ALBA Python Serial DeviceServer comes pre-installed so you don't have to worry
about installing it).This library includes both async and sync versions of the TCP object. It also
supports a set of features like re-connection and timeout handling.Here is how to connect to a Serial controller:importasynciofromsockio.aioimportTCPfromtango_serialimportSerialasyncdefmain():tcp=TCP("192.168.1.123",5000)# use host name or IPtango_serial_dev=Serial(tcp)idn=awaittango_serial_dev.idn()print("Connected to{}({})".format(idn))asyncio.run(main())Tango serverAtangodevice server is also provided.Make sure everything is installed with:$ pip install tango_serial[tango]Register a Serial tango server in the tango database:$ tangoctl server add -s Serial/test -d Serial test/tango_serial/1
$ tangoctl device property write -d test/tango_serial/1 -p address -v "tcp://192.168.123:5000"(the above example usestangoctl. You would need
to install it withpip install tangoctlbefore using it. You are free to use any other
tango tool likefandangoor Jive)Launch the server with:$ Serial testCreditsDevelopment LeadAlberto López Sánchezalopez@cells.esCTBeamlines (ctbeamlines@cells.es)ContributorsNone yet. Why not be the first?History0.1.0 (2020-12-15)First release on PyPI.
Package: pydstat
A Pythonic wrapper forpidstat.Collects and returns process stats in syslog format.UsageCreate crontab to run periodically:*/5 * * * * /usr/local/bin/pydstatUseSplunkto collect logs.Sourcehttps://github.com/ampledata/pydstatAuthorGreg Albrecht <gba@splunk.com>CopyrightCopyright 2011 Splunk, Inc.LicenseApache License 2.0
Package: pydtc
This pacakge provides various tools to perform task on data, in easy and efficient manner; more
modules could be added into the tools collection with development.universal way to connect most database softwares via JDBC (include kerberos auth for Hive), using Fast/Batch load
technology to speed up the temporary table creation and query; as well as functions to convert clob
into string or save the blob into specified file.add multiprocessing capablity to pandas dataframe when dealing with cpu intensive
operation on large volume data.form based authentication module for requests package.restapi client using aiohttp package with retry function.sample usage:## connect to mysql
    import pydtc

    conn = pydtc.connect('mysql', '127.0.0.1', 'user', 'pass')
    pydtc.read_sql('select * from demo.sample', conn)
    conn.close()

### or use with clause for auto close
    with pydtc.connect('mysql', '127.0.0.1', 'user', 'pass') as conn:
        conn.read_sql('select * from demo.sample')
        # pydtc.read_sql('select * from demo.sample', conn)

    ## DBAPI 2.0    
    with pydtc.connect_dbapi('mysql', '127.0.0.1', 'user', 'pass') as conn:
        pd.read_sql('select * from demo.sample', conn)

## pandas multiprocessing groupby then apply
    def func(df, key, value):
        dd = {key : value}
        dd['some_key'] = [len(df.other_key)]

        return pd.DataFrame(dd)

    new_df = pydtc.p_groupby_apply(func, df, 'group_key')

## access web page in website with form based authenticaion
    from pydtc import HttpFormAuth
    import requests

    r = requests.get('http://www.example.com/private_webpage.html', auth=HttpFormAuth('user', 'password'))

## restapi get and update
# Fake Online REST API for Testing and Prototyping
# https://jsonplaceholder.typicode.com/
    from pydtc import api_get, api_update

    api_get('https://jsonplaceholder.typicode.com/todos/1')
    # or
    api_update('https://jsonplaceholder.typicode.com/todos/1', data={'title': 'foo'}, method='patch')
Package: pydtk
Python Dataware ToolkitA Python toolkit for managing, retrieving, and processing data.InstallationYou can install the toolkit with:$pip3installpydtkIf you want to install the toolkit with extra feature (e.g. support for PointCloud and ROS),
you can install it with extra dependencies as follows:$pip3installpydtk[pointcloud,ros]Some PyDTK models require additional packages.Please refer the following table and install them manually with commandpip install ....PyDTK modelRequired packagesrosbag.*ros_numpy (https://github.com/eric-wieser/ros_numpy.git)pointcloud.PCDModelpypcd (https://github.com/klintan/pypcd.git)UsageBy using Pydtk, you can load a variety of types of data with a unified interface as shown below.Load DBHandler for retrieving metadatafrompydtk.dbimportDBHandler# Initialize handler (This will read all the metadata from DB on initialization)handler=DBHandler(db_class='meta',db_host='./examples/example_db',base_dir_path='./test')Read metadata from db with data selection.# Select by timestamphandler.read(pql='start_timestamp > 1420000000 and end_timestamp < 1500000000')print(handler.data)# Select by record-idhandler.read(pql='record_id == regex("test.*")')print(handler.data)Load data from files based on metadata.frompydtk.ioimportBaseFileReader,NoModelMatchedErrorreader=BaseFileReader()try:forsampleinhandler:print('loading content "{0}" from file "{1}"'.format(sample['contents'],sample['path']))try:timestamps,data,columns=reader.read(sample)assertprint(data)exceptNoModelMatchedErrorase:print(str(e))continueexceptEOFError:passDocumentationFor more information about this toolkit, please refer thedocument.Setup for contributionTo improve this toolkit, firstly clone this repository and then
run the following command to prepare the environment.$gitclonegit@github.com:dataware-tools/pydtk.git--recurse-submodules
$poetryinstallMake sure thatpoetryis installed before executing the command.If you want to install the toolkit with extra feature (e.g. support for ROS),
please specify it with-Eoption.Example (installation withpointcloudandrosextras):$poetryinstall-Epointcloud-Eros
Package: pydtl-relativepath
pydtl-relativepathpydtl-relativepath tool from pydtl community can be used to solve many issues that occurs with relative paths and imports from various modules in your complex framework.InstallationRunpip install pydtl-relativepathUsageRelative to Absolute Path ConversionsWhenever specifying a relative path userel2abs()See an Example belowfrom pydtl_relativepath import rel2abs as r2a
readmepath = r2a("README.txt")
print(open(readmepath, mode="r", encoding="utf-8").read())This will convert relative path specified to an absolute path relative to current file's directoryHere, readmepath contains the absolute path for README.txt file
and it is compatible with os.PathLike objects.Note: More Documentation (TBA)Note: Incomplete version | Development is in progress
Package: pydtn
pyDTNAttention:This is an empty package. Don't install it.An implementation of Delay- and Disruption-tolerant networking protocols is provided via thepyD3TNpackage.If you are searching for thepyDTNPoC implementation mentioned in theBundle Protocol specification, please seehere.If you have any questions or want to claim this package name for a DTN protocol implementation, please send a mail to:contact@d3tn.com