Saravanan666/pypi-org huggingface dataset:
Package: pysolotools
The open-source tool for loading and analyzing Unity SOLO datasetsIntroductionpysolotools is a python package for managing SOLO datasets.
It helps to perform following tasks:Parse SOLO datasets generated with Unity PerceptionDataset iterablesConvert SOLO toCOCO formatCompute common statisticsYou can read more about SOLO schemahere.Pre-RequisitesInstallAnacondaorMiniconda(recommended). Installpre-commit.Make surepipis installed.Installationpipinstallpysolotools--index-url=https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simpleSOLO DatasetLoad and iterate framesfrompysolotools.consumersimportSolosolo=Solo(data_path="src_data_path")forframeinsolo.frames():# perform operations on frameSOLO2COCO conversionSupports conversion for these labels: 2d bbox, keypoints, instance, semantic.frompysolotools.converters.solo2cocoimportSOLO2COCOConverterfrompysolotools.consumersimportSolosolo=Solo("src_data_path")dataset=SOLO2COCOConverter(solo)dataset.convert(output_path="output_path")Stats computationSupports bbox, keypoints and image analysis on SOLO dataset.frompysolotools.consumersimportSolofrompysolotools.stats.analyzers.bbox_analyzerimportBBoxHeatMapStatsAnalyzer,BBoxSizeStatsAnalyzerfrompysolotools.stats.handlerimportStatsHandlerbbheat=BBoxHeatMapStatsAnalyzer()bbsize=BBoxSizeStatsAnalyzer()solo=Solo("data_path")bbh=StatsHandler(solo=solo)bbh.handle(analyzers=[bbheat,bbsize],cat_ids=[])Community and FeedbackThe Unity Computer Vision demos are open-source and we encourage and welcome contributions.
If you wish to contribute, be sure to review ourcontribution guidelinesandcode of conduct.SupportFor feature requests, bugs, or other issues, please file aGitHub issueusing the provided templates we will investigate as soon as possible.LicenseApache License 2.0
Package: pysolr-tornado
``pysolr-tornado`` is a Python library providing access to [Apache Solr](https://lucene.apache.org/solr/)via Tornado coroutines... image:: https://img.shields.io/travis/CANTUS-Project/pysolr-tornado/master.svg?style=flat-square:target: https://travis-ci.org/CANTUS-Project/pysolr-tornado:alt: Build Status.. image:: https://www.quantifiedcode.com/api/v1/project/e650bacf59a0427fa3388771f34a7df4/badge.svg:target: https://www.quantifiedcode.com/app/project/e650bacf59a0427fa3388771f34a7df4:alt: Code IssuesThis project is a fork of `pysolr`, hosted on GitHub at https://github.com/toastdriven/pysolr. Weoffer a few minor improvements over `pysolr`, but we attempt to keep the APIs identical. However,it is impossible to offer a compatible API because Tornado coroutines are coroutines, and musttherefore be used with Python's `yield` keyword.If you are trying to decide between `pysolr` and `pysolr-tornado`, we recommend `pysolr` unless youare already sure that you want to use Tornado.Versions--------With ``pysolr-tornado`` 4.0, the version numbers no longer correspond meaningfully to upstreamversions. We made the decision to jump to a new major release because of the refactoring of the:class:`Results` class, which we view as backward incompatible. We sympathize with the upstream'sdecision to release this as a point release, because it is such a minor change in most situations,but it broke our client application and it may break yours too.
Package: pysolrwrapper
Installpip install -r requirements.txt
pip install .Testspython -m pytestPEPpep8Usagefrom pysolrwrapper.core import SolrQuery
from pysolrwrapper.filter import (FilterText, FilterColumnEnum)

    result = SolrQuery("localhost:9983", "omop-concept")\
        .set_type_edismax()\
        .select(["concept_id","concept_name"])\
        .add_filter(FilterText(["disease lethal", "patient"]))\
        .add_filter(FilterColumnEnum("standard_concept", ["c","s"]))\
        .add_filter(FilterColumnEnum("standard_concept", ["*"]))\
        .highlight(["concept_name", "synonym_concept_name"])\
        .facet(-1, ["standard_concept", "domain_id"])\
        .sort("score", "asc")\
        .sort("concept_id", "asc")\
        .limit(2)\
	.run()ResultsDepending on what you ask for, the result is a dictionnary with this format:{'num_shown': 2,
 'num_found': 7052,
 'docs': [{'concept_id': '42742376',
           'concept_name': 'Molecular pathology procedure, Level 7'},
          {'concept_id': '2107646',
           'concept_name': 'Direct repair of aneurysm, pseudoaneurysm, or excision(partial or total) and graft insertion, with or without patch graft for ruptured aneurysm, abdominal aorta involving iliac vessels(common, hypogastric, external)'}],
    'facet_fields': {'standard_concept': [{'s': 6263},
                                          {'c': 789}],
                     'domain_id': [{'condition': 2870},
                                   {'measurement': 1621},
                                   {'observation': 1481},
                                   {'drug': 659},
                                   {'procedure': 303},
                                   {'meas': 100},
                                   {'value': 100},
                                   {'provider': 13},
                                   {'specialty': 13},
                                   {'device': 3}]
                     }
 }
Package: pysolscan
PySolscanIt's a minimal wrapper around Solscan.io APIBlock -get_last_block(limit=10)Get last[limit]blocks (Default Limit:10)get_block_transactions(limit=10,offset=0,block=None)Get block transactions.get_block_info(block=None)Detail information of given block.Transaction -get_last_transaction(limit=10)Get last [limit] transactionsget_transaction_signature_info(signature=None)Detail information of given transaction signatureAccount -get_account_token(account=None)Get token balances of the given accountget_account_transaction(account=None,beforeHash=None,limit=10)Get list of transactions of the given account.get_account_stakeAccounts(account=None)Get staking accounts of the given accountget_account_splTransfers(account=None,limit=10,offset=0,fromTime=None,toTime=None)Get list of transactions make tokenBalance changes.get_account_solTransfers(account=None,limit=10,offset=0,fromTime=None,toTime=None)Get list of SOL transfersget_account_exportTransactions(account=None,type='all',fromTime=None,toTime=None)Export transactions to CSV. ReturnsBlobURLget_account_info(account=None)Get overall account information, including program account, NFT metadata informationToken -get_token_holder(tokenaddr=None,limit=10,offset=0)Get token holdersget_token_meta(tokenaddr=None)Get metadata of given tokenget_token_list(sortBy='market_cap',direction='desc',limit=10,offset=0)Get list of tokens.Market -get_market_token_info(tokenaddr=None)Get market information of the given tokenChain Information -get_chaininfo()Get market information of the given tokenInstallationPySolscan package is available via Pipy or Github.pipinstallpysolscanPluginsPySolscan doesn't require many packages except Python RequestsPackagePipyPython Requestshttps://pypi.org/project/requests/LicenseMIT
Package: pysoltcp
pysoltcpWelcome to pysolCopyright (C) 2013/2017 Laurent Labatut / Laurent Champagnacpysoltcp is a set of python asynchronous TCP server and client.It is gevent (co-routines) based.Both are able to sustain 60 000 asynchronous bi-directional sockets within a single python process.The TCP server is able to work in forking mode to scale across several CPUs.It supports:Asynchronous TCP sockets (with underlying async read/write loops, send queues and receive callback, per socket)SSL socketsSOCKS5 proxy (tested via dante)TCP KeepaliveAbsolute and relative socket idle timeouts for reads and writes, per socket, via gevent co-routine schedules (no global control thread)SSL handshake timeoutServer forkingServer context factory for server side protocol handlingClient derivation with _on_receive override for client side protocol handlingInstrumented via Meters (pysolmeters)Please note that, by design, synchronous TCP sockets are not supported.Due to full asynchronous mode, pay attention that you may receive protocol input (via the receive callback) byte per byte (in a worst case scenario).
Your protocol parser must be ready to handle this in a correct manner.UsageA simple client/server ping-pong text protocol (\n delimited) is implemented for unittests.For client side, refer to:pysoltcp_test.TcpApi.PingProtocol.Client.PingSimpleClient.PingSimpleClientFor server side, refer to:pysoltcp_test.TcpApi.PingProtocol.Server.PingServerContextFactory.PingServerContextFactorypysoltcp_test.TcpApi.PingProtocol.Server.PingServerContext.PingServerContextImplementations are pretty verbose due to infrastructure in place for unit testing.Source codeWe are pep8 compliant (as far as we can, with some exemptions)We use a right margin of 360 characters (please don't talk me about 80 chars)All unittest files must begin withtest_orTest, should implement setUp and tearDown methodsAll tests must adapt to any running directoryThe whole project is backed by gevent (http://www.gevent.org/)We use docstring (:return, :rtype, :param, :type etc..), they are mandatoryWe use PyCharm "noinspection", feel free to use themRequirementsDebian 8 Jessie or greater, x64, Python 2.7UnittestsTo run unittests, you will need:SOCKS5 proxy installed and ready (you may use Dante), using port 127.0.0.1:1080, no credentials.TCP Listen port 3201 availableAdvanced unittests (disabled by default) requires tuned OS and TCP stackLicenseThis program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
Package: pysolve3
Solving systems of linear equationsThe purpose of this code is to aid in expressing and solving
sets of equations using Python.This tool will take a textual description of the equations
and then run the solver iteratively until it converges to a solution.The solver provides the following choices for solving:
- Gauss-Seidel
- Newton-Raphson
- BroydenIt also uses parts of sympy to aid in parsing the equations.The initial motivation for this tool was to solve economic
models based on Stock Flow Consistent (SFC) models.Installation::pip3 install pysolveUsagefrom pysolve3.model import Model
from pysolve3.utils import round_solution,is_close

model = Model()

model.set_var_default(0)
model.var('Cd', desc='Consumption goods demand by households')
model.var('Cs', desc='Consumption goods supply')
model.var('Gs', desc='Government goods, supply')
model.var('Hh', desc='Cash money held by households')
model.var('Hs', desc='Cash money supplied by the government')
model.var('Nd', desc='Demand for labor')
model.var('Ns', desc='Supply of labor')
model.var('Td', desc='Taxes, demand')
model.var('Ts', desc='Taxes, supply')
model.var('Y', desc='Income = GDP')
model.var('YD', desc='Disposable income of households')

# This is a shorter way to declare multiple variables
# model.vars('Y', 'YD', 'Ts', 'Td', 'Hs', 'Hh', 'Gs', 'Cs',
#            'Cd', 'Ns', 'Nd')
model.param('Gd', desc='Government goods, demand', initial=20)
model.param('W', desc='Wage rate', initial=1)
model.param('alpha1', desc='Propensity to consume out of income', initial=0.6)
model.param('alpha2', desc='Propensity to consume o of wealth', initial=0.4)
model.param('theta', desc='Tax rate', initial=0.2)

model.add('Cs = Cd')
model.add('Gs = Gd')
model.add('Ts = Td')
model.add('Ns = Nd')
model.add('YD = (W*Ns) - Ts')
model.add('Td = theta * W * Ns')
model.add('Cd = alpha1*YD + alpha2*Hh(-1)')
model.add('Hs - Hs(-1) =  Gd - Td')
model.add('Hh - Hh(-1) = YD - Cd')
model.add('Y = Cs + Gs')
model.add('Nd = Y/W')

# solve until convergence
for _ in xrange(100):
    model.solve(iterations=100, threshold=1e-3)

    prev_soln = model.solutions[-2]
    soln = model.solutions[-1]
    if is_close(prev_soln, soln, rtol=1e-3):
        break

print round_solution(model.solutions[-1], decimals=1)For additional examples, view the iPython notebooks athttp://nbviewer.ipython.org/github/kennt/monetary-economics/tree/master/TutorialA short tutorial with more explanation is available athttp://nbviewer.ipython.org/github/kennt/monetary-economics/blob/master/extra/pysolve%20tutorial.ipynb
Package: pysolvemath
pysolvemathNumeric Solver.UsageReal-valued Equationsfrompysolvemathimportsolve_equationsdefequations(x,y):x+y==102*x==8res=solve_equations(equations)# res == {"x": 4.0, "y": 6.0}By default, result are of typefloat, representing arbitrary real numbers.Caller can use type hint ofintandfractions.Fractionto specify unknown to "corerce" to that type.fromfractionsimportFractionfrompysolvemathimportsolve_equationsdefequations(x:int,y,z:Fraction):x+z==1.5x**2==9y+z==2res=solve_equations(equations)# res == {"x": 3, "y": 3.5, "z": -3/2}As this is a numerical solver, this package only gets one (set of) root depending on starting point.In the example above, we can also derive{"x": -3, "y": -2.5, "z": 9/2}, if we start the root finder from negativex.User can proivdeinit_guess_functo specify the starting point.
Package: pysolver
AboutA simple problem solver written in pure PythonModule provides an easy way to solve various problems that require
calculations. Lets imagine a problem formulated in
a text file using a some template language. Some places
within the problem formulation text correspond to variables
that have default values. What doesto solve a problemmean in this context?
To solve the problem is to 1) define output template (used to render solution), 2) write code
that exploits input variables, 3) set up output variables in the code and, finally, 4)
render the solution template.
With help of solver classes these steps of getting a problem solution
can be made easily.Solver features:arbitrary and independent input and output markups
used in problem formulation and solution templates.ability of asynchronous problem solving (Celery is required).heuristic testing of problem solvability.using all of Python computational power (with third party libraries) to solve your problems.using jinja2 template language to produce dynamic parts of a problem
formulation/solution.RequirementsThe solver works under Python 2.7.x and Python 3.3 and higher.
The only requirements:jinja2sixInstallationInstallpysolver$ pip install python-solverTestingTo run tests enter the command (additionallynumpyis required):$ python -m solver.testsUsage exampleA simple test problem.My name is John. I have 100 $.
I want to buy several papers. Each paper worth is 5 $.
How many papers can I buy?Test problem  (abstraction level)test_problem_template_formulation="""My name is {{username}}. I have {{total}} $.
I want to buy several papers. Each paper worth is {{paper_cost}}$.
How many papers can I buy?
"""test_problem_solution_code="""
    OUTPUTS['result']=INPUTS['total']/INPUTS['paper_cost']
    OUTPUTS['name'] = INPUTS['username']
    """test_problem_output_template="""
    My name is {{name}} and answer is {{result}}.
    """fromsolverimportTask,Solvertask=Task(test_problem_template_formulation,default_vals={'username':'John','total':100,'paper_cost':20},solution_template=test_problem_output_template,code=test_problem_solution_code)psolver=Solver(task)Solve the problem$ psolver.solve()or you can try to solve the problem asynchronously instead.
if error occur in async_solve,
the solve() method will be invoked by default.psolver.async_solve()Before rendering the results check the problem solution is ready
(This step is required, when getting the solution asynchronously)ifpsolver.is_solved:task.render_outputs()print(task.output)And, finally, print rendered template or do something else.
Package: pysomneoctrl
from pysomneoctrl import SomneoDevice

somneo = SomneoDevice(ip="1.1.1.1")

# Play Audio:
somneo.audio(True, device="fmr")
# Light:
somneo.bedlight(True, brightness=20, ctype=3)
somneo.nightlight(True)

# Sensors:
print(somneo._data[WUSRD])
# Other data:
somneo._data[ALARMS] -> Alarm data
somneo._data[WURLX] -> Relax Breathe data
somneo._data[WUDSK] -> Sunset data
somneo._data[WUPLY] -> Audio data
somneo._data[WUFMR] -> FM Radio data
somneo._data[PRESETS] -> FM Radio Presets
Package: pysomq
PySoMQ: Python bindings for serial over ØMQThis package utilizes the Python bindings ofØMQin order to provide a lightweight and fast serial bidirectionalPySerialcommunication interface.Getting startedInstall the package from PypipipinstallpysomqRun as permanent streaming serviceIf you want to run the SerialServer as a permanent streamer, please start the module with our specific parameters bypython-mpysomq--serial-port=YourSerialPort--serial-baudrate=YourBaudrate--timeout=1--streaming-socket=tcp://*:5555--listening-socket=tcp://*:5556Stream from scriptIf you want to utilize the SerialServer within your own scripts, start streaming by using the following snippet with our parametersimportpysomqserial_port='/dev/ttyS0'baudrate=9600stream_socket='tcp://*:5555'listen_socket='tcp://*:5556'timeout=1serial_server=pysomq.SerialServer(port='/dev/ttyS0',baudrate=baudrate,streaming_socket=stream_socket,listening_socket=listen_socket,timeout=timeout)serial_server.start()Receive streaming dataIf you want to utilize the SerialServer within your own scripts, start receiving by using the following snippet with our parametersimportpysomqstream_socket='tcp://localhost:5555'listen_socket='tcp://localhost:5556'timeout=1serial_client=pysomq.SerialClient(streaming_socket=stream_socket,listening_socket=listen_socket,timeout=timeout)serial_client.write(b'my first line')answer=serial_client.readline()Default valuesThe default values for calling the module or instantiating the classes are--serial-port / port: /dev/ttyS0 for Linux and COM1 for Windows--serial-baudrate / baudrate: 9600--timeout / timeout: 1 second--streaming-socket / streaming_socket: tcp://*:5555 respectively tcp://localhost:5555--listening-socket / listening_socket: tcp://*:5556 respectively tcp://localhost:5556ContributingI welcome any contributions, enhancements, and bug-fixes.Open an issueon GitHub andsubmit a pull request.LicensepySoMQ is 100% free and open-source, under theMIT license. Use it however you want.This package isTreeware. If you use it in production, then we ask that youbuy the world a treeto thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.
Package: pyson0
pyson0Use ottypes operations with python objects and find differences between objects following the ottypes defintion and formathttps://github.com/ottypes/docs.On its essence this project is a port of the following projects from javascript to python, with a few modifications.ottypes/json0 (https://github.com/ottypes/json0)kbadk/json0-ot-diff (https://github.com/kbadk/json0-ot-diff)StatusAt the moment some parts of the library are not complete and others need validations in terms of use cases and performance.json0For now the port is only implementing the applywithoutsupport for si/sd.
We will be adding this in the near future.json0-ot-diffIt is fully ported. To support string operations it is using the python diff-match-patch implementation from google.InstallUsing Package ManagerManuallyTestingTo run the tests simply run:python -m unittest discover -s tests/ -p "test_*.py"
Package: pysondb
A Simple, Lightweight, Efficent JSON based DataBase for PythonThe current stable version is v1.6.1pipinstallpysondb==1.6.1Support the project hereHacktoberfestWhile we are accepting pull requests for Hacktoberfest, we will reject any low-quality PR's.We are accepting PRs for:Packages - updating package versions, adding new packages
Documentation updatesMore features and fixes (Refer here)CLI/API improvements - Redoing the CLI to reduce the usage of CLI packages.We are planning to reduce the project dependencies and remove other unwanted API's.Checkout the active issueshereFeaturesLightweightJSON based database.SupportsCRUDcommands.No Database drivers required.Unique IDassigned for each JSON document added.Strict aboutSchemaof data added.Inbuilt CLIto delete,display,create JSON database.>>frompysondbimportdb>>a=db.getDb("path/to/json.json")>>a.addMany([{"name":"pysondb","type":"DB"},{"name":"pysondb-cli","type":"CLI"}])>>a.getAll()>>[{"name":"pysondb","type":"DB"},{"name":"pysondb-cli","type":"CLI"}]See its simple..Quick LinksInstallExample CodeCommand Line OperationsAdding DataGet dataSearch dataUpdate DataDelete DataInstallpipinstallpysondbCreate a databaseYou can create a database using CLI.pysondbcreatedatabase_name.jsonOr in the python file.frompysondbimportdba=db.getDb("db.json")The above piece of code will create a database with{data:[]}in it.Even if the json file exists there is no problem.See more DocumentationhereWhat makes pysonDB differentCLI support to create,delete and display database.Unique Id automatically assigned for each JSON data added.Schema regularity is checked.What pysonDB can't do.Cannot store images,videos etc.TODOCLI to convert CSV to pysonDB required json.Use CSV file in the database.Make the database available to use local servers (Flask,Django)Contributors.Projects using PysonDBmy-first-streamlit-appPythonChallengeTask-Me-Upbagelprox_communityUSVBachelorProjectgardenwateringcf_scraperContributingWhether reporting bugs, discussing improvements and new ideas or writing extensions: Contributions to pysonDB are welcome! Here's how to get started:Join Discord channelHereCheck for issues or open a issue or open a feature requests.Fork the repository on GithubCreate a new branch off the master branch.Write a test which shows that the bug was fixed or that the feature works as expected.Send a pull request to us and wait till it get merged.
Package: pysonic-channel
Sonic ChannelPython client forsonicsearch backend.We recommend you start with thedocumentation.Installationpipinstallpysonic-channelExample usageSearch channelNote: This example requires enabling thesearchfeature, enabled by default.fromsonicimportIngestChannel,SearchChannel,ControlChannelquerycl=SearchChannel("localhost:1491","SecretPassword")print(querycl.ping())print(querycl.query("wiki","articles","for"))print(querycl.query("wiki","articles","love"))print(querycl.suggest("wiki","articles","hell"))Ingest channelNote: This example requires enabling theingestfeature.fromsonicimportIngestChannel,SearchChannel,ControlChannelingestcl=IngestChannel("localhost:1491","SecretPassword")print(ingestcl.ping())ingestcl.push("wiki","articles","article-1","for the love of god hell")ingestcl.push("wiki","articles","article-2","for the love of satan heaven")ingestcl.push("wiki","articles","article-3","for the love of lorde hello")ingestcl.push("wiki","articles","article-4","for the god of loaf helmet")Control channelNote: This example requires enabling thecontrolfeature.fromsonicimportIngestChannel,SearchChannel,ControlChannelcontrolcl=ControlChannel("localhost:1491","SecretPassword")print(controlcl.ping())print(controlcl.consolidate())Available featuresdefault- ["search", "ingest", "control"]search- Add sonic search mode with methodsingest- Add sonic ignite mode with methodscontrol- Add sonic control mode with methods
Package: pySonicEx
pySonicEx is a Python wrapper around the cross platform audio library and
toolset called FMODEx.pySonicEx is Copyright (c) 2006 Gary Bishop.
FMODEx is Copyright (c) 2001-2006 Firelight Technologies Pty Ltd.
pySonicEx is licensed under the MIT Public License. FMODEx is licensed
according to its intended use. Seehttp://www.fmod.orgfor details.