Saravanan666/pypi-org huggingface dataset:
Package: pythonnet
Python.NET is a package that gives Python programmers nearly
seamless integration with the .NET Common Language Runtime (CLR) and
provides a powerful application scripting tool for .NET developers. It
allows Python code to interact with the CLR, and may also be used to
embed Python into a .NET application.Calling .NET code from PythonPython.NET allows CLR namespaces to be treated essentially as Python packages.importclrfromSystemimportStringfromSystem.Collectionsimport*To load an assembly, use theAddReferencefunction in theclrmodule:importclrclr.AddReference("System.Windows.Forms")fromSystem.Windows.FormsimportFormBy default, Mono will be used on Linux and macOS, .NET Framework on Windows. For
details on the loading of different runtimes, please refer to the documentation..NET CoreIf .NET Core is installed in a default location or thedotnetCLI tool is on
thePATH, loading it instead of the default (Mono/.NET Framework) runtime
just requires setting either the environment variablePYTHONNET_RUNTIME=coreclror callingpythonnet.loadexplicitly:frompythonnetimportloadload("coreclr")importclrEmbedding Python in .NETYou must setRuntime.PythonDLLproperty orPYTHONNET_PYDLLenvironment variable
starting with version 3.0, otherwise you will receiveBadPythonDllException(internal, derived fromMissingMethodException) upon callingInitialize.
Typical values arepython38.dll(Windows),libpython3.8.dylib(Mac),libpython3.8.so(most other Unix-like operating systems).Then callPythonEngine.Initialize(). If you plan to use Python objects from
multiple threads, also callPythonEngine.BeginAllowThreads().All calls to python should be inside ausing(Py.GIL()){/* Your code here */}block.Import python modules usingdynamic mod =Py.Import("mod"), then
you can call functions as normal, egmod.func(args).Usemod.func(args,Py.kw("keywordargname",keywordargvalue))ormod.func(args, keywordargname: keywordargvalue)to apply keyword
arguments.All python objects should be declared asdynamictype.Mathematical operations involving python and literal/managed types
must have the python object first, eg.np.pi * 2works,2 * np.pidoesn’t.ExamplestaticvoidMain(string[]args){PythonEngine.Initialize();using(Py.GIL()){dynamicnp=Py.Import("numpy");Console.WriteLine(np.cos(np.pi*2));dynamicsin=np.sin;Console.WriteLine(sin(5));doublec=(double)(np.cos(5)+sin(5));Console.WriteLine(c);dynamica=np.array(newList<float>{1,2,3});Console.WriteLine(a.dtype);dynamicb=np.array(newList<float>{6,5,4},dtype:np.int32);Console.WriteLine(b.dtype);Console.WriteLine(a*b);Console.ReadKey();}}Output:1.0-0.958924274663-0.6752620892float64int32[  6.  10.  12.]ResourcesInformation on installation, FAQ, troubleshooting, debugging, and
projects using pythonnet can be found in the Wiki:https://github.com/pythonnet/pythonnet/wikiMailing listhttps://mail.python.org/mailman/listinfo/pythondotnetChathttps://gitter.im/pythonnet/pythonnet.NET FoundationThis project is supported by the.NET Foundation.
Package: python-netbox
python-netbox is a client for the Netbox (https://github.com/digitalocean/netbox) API.
It’s based on the APIv2 which is released since version 2.0.0. It requires python 3.The full documentation can be foundhere.InstallationTo get the latest version from Github:$ pip3 install python-netboxUsageTo start with the module:>>> from netbox import NetBox
>>> netbox = NetBox(host='127.0.0.1', port=32768, use_ssl=False, auth_token='token')ExamplesGet all devices:>>> netbox.dcim.get_devices()Get devices per rack:>>> netbox.dcim.get_devices(rack_id=1)Get device by name>>> netbox.dcim.get_devices(name='device_name')Create a site:>>> netbox.dcim.create_site('site1', 'site1')Delete a site:>>> netbox.dcim.delete_site('site1')Get IP address object:>>> netbox.ipam.get_ip_addresses(address='10.0.0.1/16')SupportIf you have questions or comments please send an email tothomas@tjrb.nl
Package: python-netcash
Sage Pay libNote:This library still refers to netcash. I'll update all references to NetCash in the futureA simple library for interacting with Sage Pay SOAP servicesInstallationpip install python-netcashUsageThe preferred way to interact with the repo is using docker.Quick commands:Run the testsWarning: These are integration tests and will hit the netcash endpointsdocker-composeupSee:tests.pyfor example codeYou must provide the following environment variables inenv.dev(you can copyenv.exampleand put your values in):NETCASH_MERCHANT_ACCOUNT=...
NETCASH_SOFTWARE_VENDOR_KEY=...You customer will provide:NETCASH_SERVICE_ID=...
NETCASH_SERVICE_KEY=...Integration requirementsIn order to integrate with Netcash, you will be required to implement the following functionality:Tip:You can get an interactive shell with:docker-compose run --rm netcash ipythonSetup the client# get environment variables into constants:fromnetcash.clientimportNetcashimportosNETCASH_MERCHANT_ACCOUNT=os.environ.get("NETCASH_MERCHANT_ACCOUNT")NETCASH_SOFTWARE_VENDOR_KEY=os.environ.get("NETCASH_SOFTWARE_VENDOR_KEY")service_id=...service_key=...netcash=Netcash(NETCASH_MERCHANT_ACCOUNT,NETCASH_SOFTWARE_VENDOR_KEY)Validate service key# returns a boolean True if valid account. Otherwise Falsenetcash.validate_service_key(service_id,service_key)Request and retrieve merchant statement# request a statement:# this is just for readability:fromdatetimeimportdate,timedeltafrom_date=date.today()-timedelta(days=7)# get the last week's worth of transactionspolling_id=netcash.request_merchant_statement(from_date=from_date,service_key=service_key,)res=netcash.retrieve_merchant_statement(polling_id,service_key=service_key,as_csv_reader=True)forrowinres.rows:print(row)>>['2020-04-14','OBL','0','Opening Balance','0.0000','+','0','','','']>>['2020-04-14','CBL','0','Closing Balance','0.0000','+','0']PaynowCreating a form to initiate a PayNow request:<formmethod="POST"action="https://paynow.netcash.co.za/site/paynow.aspx"target="_top"><inputtype="hidden"name="M1"value=".."><!--- YOUR PAY NOW SERVICE KEY GOES IN HERE ---><inputtype="hidden"name="M2"value=".."><!--- SOFTWARE VENDOR KEY GOES IN HERE ---><inputtype="hidden"name="P2"value=""><!--- TRANSACTION_ID ---><inputtype="hidden"name="P3"value=""><!--- TRANSACTION DESCRIPTION ---><inputtype="hidden"name="P4"value=""><!--- TRANSACTION AMOUNT ---><!--- ARBITARY FIELDS FOR STORING ANY INFORMATION YOU MIGHT NEED (E.G.: REFERENCES ETC) ---><inputtype="hidden"name="M4"value=""><inputtype="hidden"name="M5"value=""><inputtype="hidden"name="M6"value=""><inputtype="hidden"name="M9"value=""><!--- CARDHOLDER EMAIL ---><inputtype="hidden"name="M11"value=""><!--- CARDHOLDER MOBILE NUMBER ---><inputtype="hidden"name="Budget"value="Y"><!--- REQUIRED, MUST BE Y ---></form>Documentation on all the fields can be foundhereLogos and press kitContributingThis library is pretty simple. To add support for a new web method do:Add a payload tosagepay/payloads.pyAdd a method to wrap request insagepay/client.py
Package: python-netdiscover
The  python-netdiscover is a simple wrapper for thenetdiscover reconnaissance tool.This library offers a simple way to create scans from a python script and analyse the results.Documentation:https://python-netdiscover.readthedocs.ioGitHub:https://github.com/MrSuicideParrot/python-netdiscoverPyPI:https://pypi.org/project/python-netdiscover/InstallationFirst, you will need to install thenetdiscover binaryon your system, this may depend on your operating system. Many distributions have this tool available intheir main repository.From the shell, uncompress python-netdiscover.tar.gz and then run make :$tarxvzfpython-netdiscover.tar.gz$cdpython-netdiscover$pythonsetup.pyinstallor using Pip$pipinstallpython-netdiscoverUsageFrom python/ipython:>>>fromnetdiscoverimport*>>>disc=Discover()>>>disc.scan(ip_range="192.168.1.0/24")[{'mac':b'73:8b:10:0e:bd:23','ip':b'192.168.1.1'},{'mac':b'f4:3c:4a:73:47:07','ip':b'192.168.1.2'}]NotesThis tool needs to be run as root. It is necessary to be presented on the system thenetdiscovertool. The library will look for thenetdiscoverybinary in the following paths:netdiscover/usr/bin/netdiscover/usr/sbin/netdiscover/usr/local/bin/netdiscover/sw/bin/netdiscover/opt/local/bin/netdiscoverIfnetdiscoveryis not present in any of the paths above, you can specifie path with the argumentnetdiscover_pathon Discover class.disc=Discover(netdiscover_path="path_of_netdiscover")
Package: python-netonix-api
python_netonix_apiPython class to access Netonix® WISP Switch WebAPINEITHER THIS CODE NOR THE AUTHOR IS ASSOCIATED WITH NETONIX® IN ANY WAY.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.DescriptionThe Netonix® WISP Switches provide a WebAPI as backend for their webinterface. This python script allows to access this API directly.to change configuration, you need to fetch the full configuration first, change it and push it back up:from netonix_api import Netonix

	n=Netonix()
	n.open(ip,user,pw)
	n.getConfig()
	n.config['Switch_Name']="Switch-55"
	n.putConfig()
Package: python-network
Helper Module for Deep Learning.Home-page:https://github.com/neurospin/pynetAuthor:
pynet developersAuthor-email:antoine.grigis@cea.frLicense: CeCILL-B
Description: Helper Module for Deep Learning.Platform: OS Independent
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Environment :: X11 Applications :: Qt
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Utilities
Package: python-networkmanager-legacy
NOTICE⚠️ This project have minor fixes for personal usage. ⚠️If you are looking for an alternative, please tryhttps://github.com/python-sdbus/python-sdbus-networkmanagerOfficial page of python-networkmanager:https://github.com/seveas/python-networkmanagerpython-networkmanager-legacyEasy communication with NetworkManagerpython-networkmanager wraps NetworkManagers D-Bus interface so you can be less
verbose when talking to NetworkManager from python. All interfaces have been
wrapped in classes, properties are exposed as python properties and function
calls are forwarded to the correct interface.See docs/index.rst for the documentation. An HTML version can be found onhttp://packages.python.org/python-networkmanager/RequirementsPython 3.6 or newer and the python D-Bus bindings.Quick install instructionsStable version:$ pip install python-networkmanager-legacyLatest code:$ git clone https://github.com/kt315ua/python-networkmanager-legacy
$ cd python-networkmanager-legacy
$ python setup.py installBuild and install python wheel-packageBuild$ sudo apt install build-essential libpython3-dev libdbus-1-dev libglib2.0-dev`
$ pip wheel .Install$ pip install python_networkmanager_legacy-2.2.1-py3-none-any.whl⚠️ WARNINGS ⚠️Package conflicts with 'python-networkmanager':NetworkManager.py file will be overwritten
Package: python-neuron
Python NeuronCreate your own neurons and send messages between themFree software: MIT licenseDocumentation:https://python-neuron.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-03-10)First release on PyPI.
Package: python-neutronclient
Python bindings to the Neutron APIThis is a client library for Neutron built on the Neutron API. It
provides a Python API (theneutronclientmodule).NoteThis project has been deprecated. The CLI code has been deleted
and is not accessible anymore. The Python bindings are still in use by
other projects but no new features will be added to this project.
Any new feature should be proposed to OpenStack SDK and OpenStack
Client.License: Apache License, Version 2.0PyPi- package installationOnline DocumentationLaunchpad project- release managementBlueprints- feature specificationsBugs- issue trackingSourceDeveloper’s Guide
Package: python-nhi
Python-NHIA function to check strings against the New Zealand Ministry of Health NHI
Validation Routine.
Supports the old and new NHI number formats specified inHISO 10046:2023.Installpip install python-nhiUsagefromnhiimportis_nhiprint(is_nhi("WLD9413"))# Trueprint(is_nhi("zsc21tn"))# Trueprint(is_nhi("zzZ0044"))# Falseprint(is_nhi("ZZZ00AA"))# FalseChecks are case-insensitive.Note:This does not check that the NHI number has beenassignedto
a person, it merely checks the NHI is consistent with the HISO 10046:2023
standard.Excluding TestcasesNHI numbers that begin withZare reserved for testing.
If you wish to exclude these values, you will need to manually check for aZprefix:fromnhiimportis_nhivalue="zvb97xq"print(is_nhi(value))# Trueprint(notvalue.upper().startswith("Z")andis_nhi(value))# FalseNote:This check does not mean that the NHI number has beenassignedto
a person, it just means that the NHI value is not reserved for testing.See Alsohttps://www.tewhatuora.govt.nz/publications/hiso-100462023-consumer-health-identity-standard/https://www.tewhatuora.govt.nz/our-health-system/digital-health/health-identity/national-health-index/information-for-health-it-vendors-and-developers
Package: python-nightscout
Python Nightscout clientA simple python client for accessing data stored inNightscoutExample UsageTo create an instance of the nightscout.Api class, with no authentication:import nightscout
api = nightscout.Api('https://yournightscoutsite.herokuapp.com')To use authentication, instantiate the nightscout.Api class with your
api secret:api = nightscout.Api('https://yournightscoutsite.herokuapp.com', api_secret='your api secret')Glucose ValuesTo fetch recent sensor glucose values (SGVs):entries = api.get_sgvs()
print([entry.sgv for entry in entries])Specify time ranges:api.get_sgvs({'count':0, 'find[dateString][$gte]': '2017-03-07T01:10:26.000Z'})TreatmentsTo fetch recent treatments (boluses, temp basals):treatments = api.get_treatments()
print([treatment.eventType for treatment in treatments])Profilesprofile_definition_set = api.get_profiles()

profile_definition = profile_definition_set.get_profile_definition_active_at(datetime.now())

profile = profile_definition.get_default_profile()

print "Duration of insulin action = %d" % profile.dia

five_thirty_pm = datetime(2017, 3, 24, 17, 30)
five_thirty_pm = profile.timezone.localize(five_thirty_pm)
print "Scheduled basal rate at 5:30pm is = %f" % profile.basal.value_at_date(five_thirty_pm)
Package: python-ninegag
Python library to get stuff from 9gag.comInstallationVia pip:pipinstallpython-ninegagUsagepyninegag.get_sections()Returns dict of 9gag sections, where keys are capitalized sections names, and values are their urls.Example output:{'Fresh':'http://9gag.com/fresh','Cute Animals':'http://9gag.com/cute','Comic':'http://9gag.com/comic','Food':'http://9gag.com/food','GIF':'http://9gag.com/gif','Cosplay':'http://9gag.com/cosplay','Geeky':'http://9gag.com/geeky','Girl':'http://9gag.com/girl','Funny':'http://9gag.com/funny','Design':'http://9gag.com/design','WTF':'http://9gag.com/wtf','NSFW':'http://9gag.com/nsfw','Trending':'http://9gag.com/trending','Timely':'http://9gag.com/timely','Meme':'http://9gag.com/meme','Hot':'http://9gag.com/hot'}NOTE: NSFW section will return zero articles (empty iterable) since watching this section requires user login, which is not supported by this library.These values are not hardcoded and will be generated on first request. Values are cached.pyninegag.get_articles(url,max_pages=1)Return iterable with all articles found on given url.max_pages- how many pages of results to parse. If None - all available. Default 1 - only first page.pyninegag.get_articles(pyninegag.BASE_URL)Will return all articles on main 9gag page.Example output:[{'id':'a1MEzz6','title':'Jumping into the abyss','data':{'type':'gif','url':'http://img-9gag-fun.9cache.com/photo/a1MEzz6_460sa.gif'},'comments':'163','votes':'10709','url':'http://9gag.com/gag/a1MEzz6'},{'id':'agVEP3g','title':'Made of crab','data':{'type':'image','url':'http://img-9gag-fun.9cache.com/photo/agVEP3g_700b_v1.jpg'},'comments':'257','votes':'10053','url':'http://9gag.com/gag/agVEP3g'}]Article type can be one of gif, image or longpost. Longpost is just a very tall image.pyninegag.get_by_section(section_name,max_pages=1)Return iterable with all articles found in given section. Section name must be one of the keys ofpyninegag.get_sections(). If not found,ValueErrorwill be raised.There is also a loggerpyninegagenabled that logs exceptions and warnings of parsing errors. All errors contain article id and url in message for easier debugging of problems.
Package: python-ninethreesix
ninethreesixa password generatorusageFrom python::>>> from ninethreesix import Password
>>> p = Password(num_words=3, min_len=3, max_len=6)
>>> p.as_string()
'whelp-word-out'Or run the module directly::$ python -m ninethreesix.password

show-sine-Troywhat's with the name?See:http://xckd.com/936/licenseThe code here is available under the MIT license.word listThe bundled word list comes from the Moby Word list by Grady Ward, which is
listed in the public domain.The bundled word file is COMMON.TXT, which is:74,550 common dictionary words (common.txt)
A list of words in common with two or more published dictionaries.
This gives the developer of a custom spelling checker a good
beginning pool of relatively common words.For the original sources, see:http://www.gutenberg.org/ebooks/3201.DevelopmentIf you want to work on this library, see the development requirements inrequirements.inand install them withpip install -r requirements.txt.  The latter is managed bypip-toolsand can be updated by runningpip-compile.Bug  fixes and new features can be proposed by opening a Pull Request for this repo.TestsRun the test suite withpytest --cov
Package: python-nmcli
Just a simple wrapper around nmcli.>>> import nmcli
>>> dir(nmcli)
['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', 'con', 'dev', 'nm', 'nmcli', 'shell']
>>> nmcli.nm.status()
[{'WIFI': 'enabled', 'STATE': 'connected', 'WWAN': 'enabled', 'WWAN-HARDWARE': 'enabled', 'RUNNING': 'running', 'WIFI-HARDWARE': 'enabled'}]
>>> nmcli.nm.enable(True)
[]
>>> nmcli.con.list()
[{'TIMESTAMP-REAL': 'never', 'TYPE': 'vpn', 'NAME': 'starbuckswifi', 'UUID': 'a8a95280-f938-46b9-a58a-d71d71c6d37e'}, {'TIMESTAMP-REAL': 'never', 'TYPE': 'vpn', 'NAME': 'marriot', 'UUID': '56e66de7-7902-42b4-bf6d-2a4a36d051d1'....
>>> nmcli.con.list(id="marriot")
[{'dhcp-send-hostname': 'yes....
Package: python-nnmclub
Python library to search torrents on popular russian torrent tracker.InstallationVia pip:pipinstallpython-nnmclubUsageimportpynnmclubnnmclub=pynnmclub.NNMClub()results=nnmclub.search("Iron Man")Return an iterable with dicts of all torrents found.Torrent dict is:{'topic','detail_url','download_url','size',# in bytes'seeders','leechers','added',# type: datetime.datetime'views','messages','rating_number',# how many people rated this,'rating',# rating. float from 0 to 5'thanks',# how many people thanked this torrent}NOTE: With unathorized client you will be able to fetch only first 50 results of search.Create an authorized client:nnmclub=pynnmclub.NNMClub(username,password)Or using previously created nnmclub client:nnmclub.login(username,password)If username or password are invalid, whis will raise anpynnmclub.InvalidCredentialserror
(which is child topynnmclub.NNMClubError)There is also a loggerpynnmclubenabled that logs exceptions and warnings of parsing errors.
It also includes a full HTML of errored context as a DEBUG message.History1.0.0 (2016-05-13)Fixed setup.py requires option (changed to install_requires)Version bump0.1.0 (2016-04-11)Initial PyPI release
Package: python-nomad
python-nomadInstallationpip install python-nomadDocumentationhttps://python-nomad.readthedocs.io/en/latest/Examplesimportnomad# For HTTP Nomad instancesn=nomad.Nomad(host="172.16.100.10",timeout=5)# For HTTPS Nomad instances with non-self-signed SSL certificatesn=nomad.Nomad(host="172.16.100.10",secure=True,timeout=5,verify=True)# For HTTPS Nomad instances with self-signed SSL certificates and no validate the certn=nomad.Nomad(host="172.16.100.10",secure=True,timeout=5,verify=False)# For HTTPS Nomad instances with self-signed SSL certificates that must validate with certn=nomad.Nomad(host="172.16.100.10",secure=True,timeout=5,verify=True,cert="/path/to/certfile")# See http://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verification# For HTTPS Nomad instances with cert file and keyn=nomad.Nomad(host="https://172.16.100.10",secure=True,timeout=5,verify=True,cert=("/path/to/certfile","/path/to/key"))# See http://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verification# For HTTPS Nomad instances with namespace and acl tokenn=nomad.Nomad(host="172.16.100.10",secure=True,timeout=5,verify=False,namespace='Namespace-example',token='3f4a0fcd-7c42-773c-25db-2d31ba0c05fe')"example"inn.jobsj=n.jobs["example"]["ID"]example_allocation=n.job.get_allocations(j)n.job.deregister_job(j)Environment VariablesThis library also supports environment variables:NOMAD_ADDR,NOMAD_NAMESPACE,NOMAD_TOKEN,NOMAD_REGION,NOMAD_CLIENT_CERT, andNOMAD_CLIENT_KEYfor ease of configuration and unifying with nomad cli tools and other libraries.NOMAD_ADDR=http://127.0.0.1:4646NOMAD_NAMESPACE=defaultNOMAD_TOKEN=xxxx-xxxx-xxxx-xxxxNOMAD_REGION=us-east-1aNOMAD_CLIENT_CERT=/path/to/tls/client.crtNOMAD_CLIENT_KEY=/path/to/tls/client.keyClass DundersClasscontainslengetitemiteragentNNNNallocationYNYNallocationsNYNYclientNNNNevaluationYNYNevaluationsYYYYeventNNNNjobYNYNjobsYYYYnodeYNYNnodesYYYYregionsYYYYstatus.leaderYYNNstatus.peersYYYYsystemNNNNvalidateNNNNdeploymentsYYYYdeploymentYNYNnamespaceYNYNnamespacesYYYYaclYNYNsentinelYNYNDevelopmentcreate virtualenv and activateinstall requirements-dev.txtcan either use the Vagrantfile for local integration testing or create environment variablesNOMAD_IPandNOMAD_PORTthat are assigned to a nomad binary that is runningvirtualenv .venv
source .venv/bin/activate
pip install -r requirements-dev.txtTesting with vagrant and virtualboxvagrant up --provider virtualbox
py.test --cov=nomad --cov-report=term-missing --runxfail tests/Testing with nomad binary./nomad agent -dev -node pynomad1 --acl-enabled
NOMAD_IP=127.0.0.1 NOMAD_VERSION=<SEMNATIC_VERSION> py.test --cov=nomad --cov-report=term-missing --runxfail tests/ExamplesAcl:link:Agent:link:Allocation:link:Allocations:link:Deployment:link:Deployments:link:Client:link:Evaluation:link:Evaluations:link:Event:link:Job:link:Jobs:link:Namespace:link:Namespaces:link:Node:link:Nodes:link:Regions:link:Sentinel:link:Search:link:Status:link:System:link:Validate:link:Variable:link:Variables:link: