Saravanan666/pypi-org huggingface dataset:
Package: pyndows
Accessing Windows from LinuxRetrieve a file (from Windows to Linux)importpyndowspath_to_retrieved_file=""withpyndows.connect(...)asmachine:pyndows.get(machine,"shared_folder_name","/folder/requested_file_name",path_to_retrieved_file)Retrieve a file description (from Windows to Linux)importpyndowswithpyndows.connect(...)asmachine:description=pyndows.get_file_desc(machine,"shared_folder_name","/folder/requested_file_name")Move a file (from Linux to Windows)importpyndowsfile_to_move_path=""withpyndows.connect(...)asmachine:pyndows.move(machine,"shared_folder_name","/folder/destination_file_name",file_to_move_path)Note that folders will be created if not existing.You can also provide a custom suffix for the temporary file (.tmp is used by default) via the temp_file_suffix parameter.Rename a fileimportpyndowswithpyndows.connect(...)asmachine:pyndows.rename(machine,"shared_folder_name","/folder/previous_file_name","/folder/new_file_name")Ensure connectivityimportpyndowswithpyndows.connect(...)asmachine:details=pyndows.check("connection identifier",machine)TestingYou can mock remote connections by usingsamba_mockpytestfixture.2 convenience methods are available:samba_mock.path(share_folder_name, file_or_folder_path)returns apathlib.Pathinstance that you can use as a replacement for the file on the remote connection.Usewrite_*()to set the content of a file.Useread_*()to check the content of a file.samba_mock.add_callback(method_name, callback)provides the ability to override the mock default behavior and can be used to send custom exceptions.Below are a few example of what can be done:Simulate a file that can be retrievedfrompyndows.testingimportsamba_mock,SMBConnectionMockdeftest_file_retrieval(samba_mock:SMBConnectionMock):samba_mock.path("shared_folder_name","/folder/file_to_retrieve").write_text("File content of path to a file")# TODO Execute code relying on this fileEnsure the content of a file that was moved or renamedfrompyndows.testingimportsamba_mock,SMBConnectionMockdeftest_file_retrieval(samba_mock:SMBConnectionMock):# TODO Execute code writing this filefile_content=samba_mock.path("shared_folder_name","/folder/file_that_was_stored").read_text()Simulate echo failurefromsmb.smb_structsimportOperationFailurefrompyndows.testingimportsamba_mock,SMBConnectionMockdeftest_file_retrieval(samba_mock:SMBConnectionMock):defraise_exception(*args):raiseOperationFailure("Mock for echo failure.",[])samba_mock.add_callback("echo",raise_exception)# TODO Execute code calling echoHow to installpython 3.6+must be installedUse pip to install module:python-mpipinstallpyndows
Package: pyndustry
Hey, this is lib can like this:frompyndustry.pyndustryimport*storage=CommandsStorage()Mprint('Hello world!','message1')storage.convert()Output:printflush message1
print "Hello world!"and like this:frompyndustry.pyndustryimport*frompyndustry.memoryimport*storage=CommandsStorage()mem=MemoryStorage('cell1')Mif(mem[0]>10,Function(lambda:Mprint('Wow','message1')))\.apply()End()storage.convert()Output:read memoryStorageResult__cell1 cell1 0
jump 3 greaterThan memoryStorageResult__cell1 10
jump 5 always x false
printflush message1
print "Wow"
endandfrompyndustry.pyndustryimport*frompyndustry.graphicsimport*storage=CommandsStorage()display=Display('display1')display.bind()display.drawGameSprite(0.5,0.5,sprites.blocks.router,16,byCoefficient=True)storage.convert()Output:drawflush display1
draw image 40.0 40.0 @router 16 0 0
Package: py-near
py-nearpy-nearis a pretty simple and fully asynchronous framework for working with NEAR blockchain.Examples📚 Click to see some basic examplesFew steps before getting started...Install the latest stable version of py-near, simply runningpip install py-nearCreate NEAR account and get your private keywalletSimple money transferfrompy_near.accountimportAccountimportasynciofrompy_near.dapps.coreimportNEARACCOUNT_ID="bob.near"PRIVATE_KEY="ed25519:..."asyncdefmain():acc=Account(ACCOUNT_ID,PRIVATE_KEY)awaitacc.startup()print(awaitacc.get_balance()/NEAR)print(awaitacc.get_balance("bob.near")/NEAR)tr=awaitacc.send_money("bob.near",NEAR*2)print(tr.transaction.hash)print(tr.logs)asyncio.run(main())Transfer money by phone numberfrompy_near.accountimportAccountimportasynciofrompy_near.dapps.coreimportNEARACCOUNT_ID="bob.near"PRIVATE_KEY="ed25519:..."asyncdefmain():acc=Account(ACCOUNT_ID,PRIVATE_KEY)awaitacc.startup()tr=awaitacc.phone.send_near_to_phone("+15626200911",NEAR//10)print(tr.transaction.hash)asyncio.run(main())Parallel requestsOnly one parallel request can be made from one private key.
All transaction calls execute sequentially.
To make several parallel calls you need to use several private keysacc=Account("bob.near",private_key1)foriinrange(2):signer=InMemorySigner.from_random(AccountId("bob.near"),KeyType.ED25519)awaitacc.add_full_access_public_key(str(signer.public_key))print(signer.secret_key)Now we can call transactions in parallelacc=Account("bob.near",[private_key1,private_key2,private_key3])# request time = count transactions / count public keystasks=[asyncio.create_task(acc.send_money("alisa.near",1)),asyncio.create_task(acc.send_money("alisa.near",1)),asyncio.create_task(acc.send_money("alisa.near",1)),]fortintask:awaittOfficial py-near resources:News:@herewalletSocial media:🇺🇸Telegram🇺🇸TwitterPyPI:py-nearDocumentation:py-near.readthedocs.ioSource:Github repoIssues/Bug tracker:Github issues trackerContributorsCode ContributorsThis project exists thanks to all the people who contribute. [Code of conduct].
Package: py-near-primitives
near primitivesA wrapper overpy-near-primitivesrust lib for python. Using forpy-near.Latest supported version:py-near-primitives = "0.17.0"use with pythonUse thepy-nearfor the high-level api overpy-near-primitivesDocumentation:https://py-near.readthedocs.io/en/latestInstallationpip install py-near-primitives
Package: pyneato
pyneatoPython package to control a Neato vacuum robot
managed via MyNeato app (starting from D8).This package was mostly developed in order to control
a vacuum robot throughHome Assistant.This package is currently far from being finished. Contributions are welcome.UsageUse the sample script for a short introduction on
how to use this package.Create a.passwdfile containing your MyNeato password and
execute this command on the cli:MYNEATO_USER=<YOUR_USERNAME>MYNEATO_PASSWORD=`cat.passwd`pythonpyneato/sample/sample.pyThanksThanks to @stianaske for his work onpybotvac. This
package is highly inspired by pybotvac because I don't really know much about python but wanted
to give it a shot.
Package: pynecone-debounce-input
pynecone-debounce-inputA wrapper around the genericreact-debounce-inputcomponent for the
python-based full stackpyneconeframework.Since all events in pynecone are processed on the server-side, a client-side input debounce makes the app feel much less
sluggish when working will fully controlled text inputs.Exampleimportpyneconeaspcfrompynecone_debounce_inputimportdebounce_inputclassState(pc.State):query:str=""app=pc.App(state=State)@app.add_pagedefindex():returnpc.center(pc.hstack(debounce_input(pc.input(placeholder="Query",value=State.query,on_change=State.set_query,),),pc.text(State.query),))app.compile()pc initpc runAlso work with textarea, simply passpc.text_areaas the child. Seelarger examplein the repo.UsageIncludepynecone-debounce-inputin your projectrequirements.txt.Include a specific version ofreact-debounce-inputinpcconfig.py.config=pc.Config(...,frontend_packages=["react-debounce-input@3.3.0",],)Wrappynecone_debounce_input.debounce_inputaround the component
to debounce (typically apc.inputorpc.text_area).PropsSee documentation forreact-debounce-input.min_length: int = 0Minimal length of text to start notify, if value becomes shorter then minLength (after removing some characters), there will be a notification with empty value ''.debounce_timeout: int = 100Notification debounce timeout in ms. If set to -1, disables automatic notification completely. Notification will only happen by pressing Enter then.force_notify_by_enter: bool = TrueNotification of current value will be sent immediately by hitting Enter key. Enabled by-default. Notification value follows the same rule as with debounced notification, so if Length is less, then minLength - empty value '' will be sent back.NOTE: if onKeyDown callback prop was present, it will be still invoked transparently.force_notify_on_blur: bool = TrueSame asforce_notify_by_enter, but notification will be sent when focus leaves the input field.Changelogv0.3 - 2023-05-19Support pynecone >= 0.1.30 (pynecone.varchanged topynecone.vars)v0.2 - 2023-04-24import pynecone_debounce_inputautomatically addsreact-debounce-inputtoConfig.frontend_packagesfix example in README, missing commaimprove test assertions when exporting example projectv0.1 - 2023-04-21Initial Release
Package: pyneg
PyNeg is a Python library for experimenting and benchmarking automated negotiatons. Using both Numpy and ProbLog as a background it can take advantage of probabalistic models and complex knowledge bases.Some simple negotiation strategies have already been implemented and provide a template for how to implement new negotiation strategies and how to combine the various parts into an agent. This library favours composition over inheretance and thus is very modular.for a more detailed explanation please refer to thedocumentation.Minimal Working Example>>>frompyneg.agent.agent_factoryimportmake_linear_concession_agent>>>neg_space={"first":[0,1,2,3,4],"second":[5,6,7,8,9]}>>>utilities_a={"second_5":10,"second_9":-10,"first_0":-5,"first_3":5}>>>utilities_b={"second_5":-5,"second_7":5,"first_0":10,"first_4":-10}>>>res_a=0.1>>>res_b=0.1>>>non_agreement_cost=-10**100>>>agent_a=make_linear_concession_agent("A",neg_space,utilities_a,res_a,non_agreement_cost)>>>agent_b=make_linear_concession_agent("B",neg_space,utilities_b,res_b,non_agreement_cost)>>>agent_a.negotiate(agent_b)True>>>agent_a._transcript[(A=>B;OFFER;[first->3,second->5]),(B=>A;OFFER;[first->0,second->7]),(A=>B;OFFER;[first->1,second->5]),(B=>A;OFFER;[first->0,second->6]),(A=>B;OFFER;[first->2,second->5]),(B=>A;OFFER;[first->0,second->8]),(A=>B;OFFER;[first->4,second->5]),(B=>A;OFFER;[first->0,second->9]),(A=>B;OFFER;[first->3,second->6]),(B=>A;OFFER;[first->1,second->7]),(A=>B;OFFER;[first->0,second->5]),(B=>A;ACCEPT;[first->0,second->5])]
Package: pynegex
PyNegExPyNegEx is a PyPI modular package based on Chapman's NegEx implementation. NegEx is a rule-based algorithm to detect assertion in clinical texts.Motivation behind PyNegEx is to provide the community with a modern python packaing for the algorithm to guarantee easy usage and a space for better maintainability, e.g. add support for other languages.RequirementsTested so far on:Python 3.8+InstallpipinstallpynegexUsageimportpynegexpynegex.run(text="patient hat kein Fieber",ent_tag="Fieber",triggerset_name="cotik-de",)# ['negated', 'patient [PREN]hat kein[PREN] [NEGATED]Fieber[NEGATED]']Supported languages are specificed withtriggerset_name:'en'or'chapman-en'for English'de'or'cotik-de'for GermanSpeculation is enabled by default, but you can change it by passingspeculation=False.ModificationsPyNegex uses the original implementation by Chapman with support for German (triggerset by Cotik etal 2016). PyNegEx includes hotfixes for known issues with the original implementation (for more details seeCHANGELOG)Credits & LicensePyNegEx contains code parts that are released in compliance with their original license which is Python 2.5.4.
These code parts are essentially negex algorithm.Furthermore, credits for the other languages support:German: Cotik et al 2016.CONTRIBUTIONSFeel free to support this package by adding support for other languages.
Package: pyneid
NEID Table Access Protocol (TAP) ClientThis repository is currently in alpha release. Features may be broken or missing. Please report any bugs toneid-help@ipac.caltech.eduDocumentation is available onReadTheDocsThis package provides API access to the NEID Archive: neid.ipac.caltech.eduThe package can be installed via pip:pip install pyneidWith pyNEID you can:log in using your NEID Archive credentials, or use without login for access to public data onlyquery the archive for tables of L0, L1, and L2 metadatadownload FITS files of any levelmore features to come...Contributions are welcome! If you wish to contribute code please create a fork and submit a pull request with a good description of the proposed changes.The NEID Table Access Protocol service is a general tool for making
SQL queries against NEID database tables (which reside in an Oracle
DBMS). TAP is a standard defined by the International Virtual
Astronomy Alliance (IVOA).There are multiple TAP client packages in existence (notably TAPPlus
from the AstroQuery Python package.  This client does not try to
reproduce that functionality but rather provide simple-to-use custom
query support for a few common use cases (e.g. query by proposal ID).
In addition, it supports proprietary access using standard session
cookies and a separate login service.This software is written in Python 3.
Package: pyneis
# pyneispython http client for Neis service(http://neis.go.kr/)[![Build Status](https://travis-ci.org/hallazzang/pyneis.svg?branch=master)](https://travis-ci.org/hallazzang/pyneis)Installation------------```bash$ pip install pyneis```Example-------```python>>> import neis>>> client = neis.NeisClient('서울')>>> schools = client.search_school('휘문')>>> print(schools)[<School: 휘문중학교>, <School: 휘문고등학교>]>>> meals = schools[1].get_weekly_meals(2015, 10, 10, 2)>>> print(meals)[<Meal: Empty>, <Meal: 6 Menus>, <Meal: 6 Menus>,<Meal: 6 Menus>, <Meal: 6 Menus>, <Meal: Empty>, <Meal: Empty>]>>> print(meals[1].menus)[<Menu: 혼합잡곡밥>, <Menu: 돈육김치찌개>, <Menu: 안동찜닭>,<Menu: 콩나물무침>, <Menu: 삼치살양념구이>, <Menu: 석박지>]````School.get_weekly_meals()` takes `year`, `month`, `day` and `type` for parameters.`type` can be 1(breakfast), 2(lunch), 3(dinner).Note----pyneis is developed in Python 2.7.13
Package: pyNeko
=====Neko=====Introduction------------pyNeko is a pure Python library designed to making magic to code for Neko.You can use pyNeko to making magic beautiful.In `/scripts <https://github.com/sudaning/PytLab-Neko/tree/master/scripts>`_ , there are some scripts written by me for daily use.Installation------------1. Via pip(recommend)::pip install pyNeko2. Via easy_install::easy_install pyNeko3. From source::python setup.py install
Package: pyNekobin
pyNekobin - A Wrapper for Nekobin APIThis is a Python package that provides a simple wrapper around theNekobinAPI, allowing you to easily paste and retrieve text snippets from the popular pastebin service.InstallationYou can install the package frompypyusing pip:pip install -U pynekobinDocumentationDocumentation of this package can be found atnusab19.github.io/pyNekobinThe content of the docs website is the same as this README file. :3UsageThis package is asynchronous and uses httpx under the hood to make HTTP requests. So, you need to use theawaitkeyword with each method call.
First, import theNekobinclass and theasynciolibrary:fromnekobinimportNekobinimportasyncioThen, create an instance of theNekobinclass:nb=Nekobin()To paste text to Nekobin, you can use thepaste()method:asyncdefmain():result=awaitnb.paste("Hello, world!")ifresult.ok:print("Pasted text at:",result.url)# -> Pasted text at: https://nekobin.com/abxajsyaselse:print("Error:",result.message)# Error: Nekobin did not fulfil the requestasyncio.run(main())Similarly, you can use theread()method to retrieve text from Nekobin:asyncdefmain():result=awaitnb.read("https://nekobin.com/abxajsyas")ifresult.ok:print("Retrieved text:",result.content)# -> Retrieved text: Hello, world!else:print("Error:",result.message)# -> Error: Document not foundasyncio.run(main())Advanced UsageAs this package useshttpxunder the hood, you can pass additional keyword arguments in each method call. You can pass any keyword argument thathttpx.AsyncClientmay take:fromnekobinimportNekobinimportasyncionb=Nekobin(timeout=10,headers={},follow_redirects=True)If you want to pass these arguments in each method call, you have that too:fromnekobinimportNekobinimportasyncionb=Nekobin()asyncdefmain():result=awaitnb.paste("Hello, world!",timeout=10)url=result.urlprint("Pasted at:",url)content=(awaitnb.read(url,timeout=7)).contentprint("Content:",content)asyncio.run(main())ContributingIf you encounter any bugs or issues, please feel free to open an issue on theGitHub repository. If you would like to contribute to the development of the package, you can fork the repository and submit a pull request with your changes.To use this package locally:gitclonehttps://github.com/Nusab19/pyNekobincdpyNekobin
pipinstall-Uhttpx
pipinstall-e.LicenseThis package is licensed under the MIT License. See theLICENSEfile for more information.Made with ❤ byNusab Tahafrom the Universe!
Package: pynello
pynelloPublic APIThis is new prefered way of interacting with Nello devices.Get startedShoot an email tohello@nello.ioand ask them to generate aclient_idfor you.Code samplefrompynello.publicimportNellon=Nello(client_id='you-need-to-ask-nello-for-this',username='me@example.com',password='somethingLong')# Get available locationsn.locations# Open the door ("main" ie. first available location)n.main_location.open_door()# Setup a webhook for new eventsn.main_location.set_webook('https://example.com/nello/event')Upstream documentationAuthenticationNello APIPrivate APIThis API is deprecatedA huge thanks to Oskar Neumann for hisoriginal workon theFHEM integration.Code samplefrompynello.privateimportNellon=Nello(username='me@example.com',password='somethingLong')# Get available locationsn.locations# Open the door ("main" ie. first available location)n.main_location.open_door()# Get the recent activityn.main_location.activity
Package: pyneng-quiz
pyneng-quizВопросы по темам курса/книги Python для сетевых инженеров.Вопросы можно использовать:как мини-задания сразу после изучения темыдля проверки знаний, как тестОчень полезно ответить на вопросы после прочтения соответствующей темы. Они
позволят вспомнить материал темы, а также попробовать на практике разные
аспекты работы с Python.Установить модульpip install pyneng-quizПосле этого запуск вопросов выполняется из cli командойpquiz
Package: pynenguk-quiz
pynenguk-quizЗапитання за темами курсу/книги Python для мережевих інженерів.Запитання можна використовувати:як міні-завдання відразу після вивчення темидля перевірки знань, як тестДуже корисно відповісти на запитання після прочитання відповідної теми. Вони
дозволять згадати матеріал теми, а також спробувати різні аспекти роботи з
Python.Встановити модульpip install pynenguk-quizПісля цього запуск питань виконується із cli командоюpquiz
Package: pynentry
PynEntryA pythonic wrapper for pinentryWritten mostly to practice metaprogrammingcredit tomijikaifor a working exampleRequires pinentry to be installedconvienience methods:to quickly and simply get a password/pin from a user:get_pin(description=None, prompt=None, timeout=0, display=None, global_grab=True)to show and get a confirmation from a user:get_confirm(description=None, timeout=0, display=None, global_grab=True)to show a message to a user:show_message(description=None, timeout=0, display=None, global_grab=True)PynEntry classThe above methods instance and configure a PynEntry instance wich can be called and configured manually
via attributesthe PynEntry class supports the following attributes:description: Sets the descriptive text to displayprompt: Sets the text just before the passphrase entry (ex: "PASS:")title: Sets the window titleok_text: Sets the text shown in the "OK" buttoncancel_text: Sets the text shown in the "Cancel" buttonerror_text: Sets the text in case of error before reprompt (Cleared after everyget_pin()call)tty_name: Chose the tty to use (set automatically)tty_type: Change the tty type to use.locale: Sets the locale to use (set automatically to current os locale)NOTE: The PynEntry class uses the $PATH variable to find the pinentry executable, you can specify the location of the
executable manually when you initialize like so:PynEntry(executable='/path/to/pinentry')PynEntry is best used as a context manager to automatically kill the pinentry process when you are done.Example:importpynentrypynentry.show_message('Hello there!')withpynentry.PynEntry()asp:p.description='Enter a password.\nChoose Wisely!'p.prompt='PASS>'try:passwd=p.get_pin()exceptpynentry.PinEntryCancelled:print('Cancelled?! Goodbye.')exit()p.ok_text='yep!'p.cancel_text='nope!'p.description=f'CAN YOU CONFIRM YOUR SUPER SECRET PASSWORD IS{passwd}?'ifp.get_confirm():print(f'password{passwd}saved!')else:print(f'Too bad, so sad')
Package: pyneo4j
# PyNeo4jIntegrating Python with Neo4j.[![Build Status](https://travis-ci.org/RenanPalmeira/pyneo4j.svg?branch=master)](https://travis-ci.org/RenanPalmeira/pyneo4j) [![PyPI](https://img.shields.io/pypi/v/pyneo4j.svg)](https://pypi.python.org/pypi/pyneo4j)### Demo/Examplehttps://github.com/RenanPalmeira/neopyramid### Downloaded and run Neo4jhttp://neo4j.com/download/### Development$ git clonehttps://github.com/renanpalmeira/pyneo4j$ cd pyneo4j # or other name with virtualenv (recommended)
$ pip install -e .
$ pip install -r requirements.txt # or tests/requirements-dev.txt
$ $NEO4J_FOLDER/bin/neo4j-shell -c < tests/starwars.cypher  # Import sample graph’s
$ nosetests –verbose tests/ # If your Neo4j needs authentication set on tests/tests.py, but not in ‘git add’ with your credentials, than just run the tests### Installation (waiting for approval)Available in Python Package Index:$ pip install pyneo4jOr:$ easy_install pyneo4j
Package: py-neonUtilities
Py-NEONutilitiesThis project is a heavy work in progress to write a native python wrapper for theNEON data platform.
It aims to provide the functionality of theNEONutilities R packagewithout the overhead of having to managerpy.InstallationYou can install this package from pypi withpip install py-neonUtilsPlease see the pypi branch for downloads.Usage:Observational DatafromneonUtilities.NeonObservationalimportNeonObservationalimportpandasaspdneonobj=NeonObservational(dpID="DP1.10003.001",site=["WOOD"],dates=["2015-07",["2017-07","2017-12"]],package="basic")#Download data from 2015-07 and the range of 2017-07 to 2017-12.neonobj.download()neonobj.stackByTable()df=neonobj.to_pandas()Instrumental DatafromneonUtilities.NeonObservationalimportNeonObservationalimportpandasaspdneonobj=NeonInstrumental(dpID="DP1.10003.001",site=["WOOD"],dates=["2015-07",["2017-07","2017-12"]],avg=30,package="basic")neonobj.download()neonobj.stackByTable()df=neonobj.to_pandas()This module offers a lot of flexibility with month-chunk downloads. You can provide:A single string to download that chunk for all sitesA list of strings to download those chunks for all sitesEither a nested list or a nested tuple of dates to download that range inclusive,inclusiveAny combination of 2 and 3A dictionary with sites as keys and number any date definition above to download different month chunks for different sites.ProgressObservational dataDownload data zipsTable stackingSupport for READMEs, EML and variables filesInstrumental dataDownload specific average intervalsAOP dataEC dataTaxon data manipAPI tokenpackage for pypi (check the pypi branch)