Saravanan666/pypi-org huggingface dataset:
Package: pyrcca
pyrccaRegularized kernel canonical correlation analysis in Python.InstallYou can install the latest release ofpyrccafrom PyPI, with:pipinstallpyrccaYou can install the development version ofpyrccafrom GitHub, with:pipinstallgit+git://github.com/gallantlab/pyrcca.gitUsageA static Jupyter notebook with the analysis of the example below can be foundhere.A static Jupyter notebook with Pyrcca analysis of fMRI data can be foundhere.Both notebooks can be explored interactively by cloning this repository.ReferenceFor more information, consult the following e-print publication:
Bilenko, N.Y. and Gallant, J.L. (2015). Pyrcca: regularized kernel canonical correlation analysis in Python and its applications to neuroimaging. Frontiers in Neuroinformaticsdoi: 10.3389/fninf.2016.00049ExampleIn this startup example, two artificially constructed datasets are created. The datasets depend on two latent variables. Pyrcca is used to find linear relationships between the datasets.# Importsimportnumpyasnpimportrcca# Initialize number of samplesnSamples=1000# Define two latent variables (number of samples x 1)latvar1=np.random.randn(nSamples,)latvar2=np.random.randn(nSamples,)# Define independent components for each dataset (number of observations x dataset dimensions)indep1=np.random.randn(nSamples,4)indep2=np.random.randn(nSamples,5)# Create two datasets, with each dimension composed as a sum of 75% one of the latent variables and 25% independent componentdata1=0.25*indep1+0.75*np.vstack((latvar1,latvar2,latvar1,latvar2)).Tdata2=0.25*indep2+0.75*np.vstack((latvar1,latvar2,latvar1,latvar2,latvar1)).T# Split each dataset into two halves: training set and test settrain1=data1[:nSamples/2]train2=data2[:nSamples/2]test1=data1[nSamples/2:]test2=data2[nSamples/2:]# Create a cca object as an instantiation of the CCA object class.cca=rcca.CCA(kernelcca=False,reg=0.,numCC=2)# Use the train() method to find a CCA mapping between the two training sets.cca.train([train1,train2])# Use the validate() method to test how well the CCA mapping generalizes to the test data.# For each dimension in the test data, correlations between predicted and actual data are computed.testcorrs=cca.validate([test1,test2])
Package: pyrcel
pyrcel: cloud parcel modelThis is an implementation of a simple, adiabatic cloud parcel model for use in
aerosol-cloud interaction studies.Rothenberg and Wang (2016)discuss the model in detail and its improvements
and changes overNenes et al (2001):Implementation of κ-Köhler theory for condensation physics (Petters and
Kreidenweis, 2007)Extension of model to handle arbitrary sectional representations of aerosol
populations, based on user-controlled empirical or parameterized size distributionsImproved, modular numerical framework for integrating the model, including bindings
to several different stiff integrators:lsoda-scipy ODEINT wrappervode, lsode*, lsoda*- ODEPACK viaodespycvode- SUNDIALS viaAssimuloamong other details. It also includes a library of droplet activation routines and scripts/notebooks for evaluating those schemes against equivalent calculations done with the parcel model.Updated code can be found the projectgithub repository. If you'd like to use this code or have any questions about it, pleasecontact the author. In particular, if you use this code for research purposes, be sure to carefully read through the model and ensure that you have tweaked/configured it for your purposes (i.e., modifying the accomodation coefficient); other derived quantities).Detailed documentation is available, including ascientific description,installation details, and abasic examplewhich produces a figure like the plot at the top of this page.RequirementsRequiredPython >= 3.7numbaNumPySciPypandas- v0.25+xarray- v2023+PyYAMLOptionalThe following packages are used for better numerics (ODE solving)AssimuloThe easiest way to satisfy the basic requirements for building and running the
model is to use theAnacondascientific Python
distribution. Alternatively, aminiconda environmentis
provided to quickly set-up and get running the model. Assimulo's dependency on
the SUNDIALS library makes it a little bit tougher to install in an automated
fashion, so it has not been included in the automatic setup provided here; you
should refer toAssimulo's documentationfor more information on its installation process. Note that many components of
the model and package can be used without Assimulo.Developmenthttp://github.com/darothen/pyrcelPlease fork this repository if you intend to develop the model further so that the
code's provenance can be maintained.LicenseAll scientific code should be licensed. This code is released under the New BSD (3-clause)license.
Package: pyrchain
pyrchainInterface to RChain RNode RPC.InstallPyrchain is Python 3 library for interfacing with RChain RNode gRPC API. The
library is distributed via PyPI (https://pypi.org/project/pyrchain/). You can
install it for current user by running:pip3 install -U pyrchainSeesetup.pyfor information about 3rd party library dependencies.ExamplesThe features below are provided in pyrchain.generate private key and public keysign a deploy with the private keyuse grpc api to interact with rnodeVault Api of rchain to do transfer and check balanceDevelopmentTo install the development package:pip install -e .[dev]To update protocol buffers from upstream run:./update-protobufs
./update-generatedThis first command will fetch latest RChain*.protofiles fromdevbranch
into./protobufdirectory. The second command will generate gRPC Python code
corresponding to the protcol buffers intorchain.pbpackage (./rchain/pb).To run integration tests run:python -m pytest rchain/tests
python -m mypy rchain
isort --recursive --check-only rchain
Package: pyrchidekt
PyrchidektPyrchidekt is a Python library for interfacing with decks from the websiteArchidekt.InstallationpipinstallpyrchidektExampleThe following example shows how to usepyrchidektto query a deck and iterate through all cards in each category.frompyrchidekt.apiimportgetDeckByIddeck=getDeckById(1)forcategoryindeck.categories:print(f"{category.name}")forcardincategory.cards:print(f"\t{card.quantity}{card.card.oracle_card.name}")print("")DevelopingIt is encouraged to use virtual environments to developpyrchidekt. To start developing, install the requirements:pipinstall-rrequirements/dev.txtTestingTesting will be run on PRs and before deploys for new releases. For local testing, see below.SetupYou must additionally install the testing dependencies:pipinstall-rrequirements/test.txtAll tests can be run as follows:coveragerun-mpytesttestsWith reporting then checked using:coveragereportThere are two types of tests: unit and integration.Unit TestsUnit tests ensure that the basic datadictconversion works correctly from how the inferred API works. These are run as follows:coveragerun-mpytesttests/unitThese tests should be run often when changing the dataclassesIntegration TestsIntegration tests ensure thatpyrchidektworks with the current API of Archidekt. They are run as follows:coveragerun-mpytesttests/integrationThese tests can be run less frequently. So long as Archidekt doesn't change their API data structures, these will pass.
Package: pyrchive
pyrchive-isjust a simple python package for archiving and finding websites with archive.isinstallpip install pyrchiveusefrompyrchive.pyrchiveimportArchiveSesharchive_session=ArchiveSesh()url_to_archive="www.oatbread.org"archived_url=archive_session.archive_url(url_to_archive)print(f"Archived URL:{archived_url}")licensemit or summin
Package: pyrclone
pyRcloneA typed rClone interface for python.Written to more easily express awkward logic, that would be a pain or not
(easily) possible on the command line.A short example, to tidy up and half the number of backups is shown below.
The logic can be trivially expanded to instead say, parse the time stamp of
the backup out of the folder name, to allow different logic to be applied
depending on the age of a backup (do nothing if 1 month old, half is 2 months
old, remove every other after a year old etc).importjsonimportloggingimportosimportsysfrompyrcloneimportRclone,RcloneErrordefmain():# Setup rclone runner, and have it run in verbose and dry run mode.rclone:Rclone=Rclone()rclone.verbose_mode=Truerclone.dry_run_mode=True# Attach a logger, for more immediate output, rather than just on command completion.rclone.logger.setLevel(logging.DEBUG)handler:logging.StreamHandler=logging.StreamHandler(sys.stdout)handler.setLevel(logging.DEBUG)formatter:logging.Formatter=logging.Formatter("%(asctime)s-%(name)s-%(levelname)s-%(message)s")handler.setFormatter(formatter)rclone.logger.addHandler(handler)# List all folders in backup directory to iterate over them.remote_path:str="drive:PC/Backups"output=rclone.lsd(remote_path)# If we failed to run, stop.ifoutput.return_codeisnotRcloneError.SUCCESS:print(output.error)return# lsd (and all other ls commands) will default to using lsjson.# Lets decode the JSON, and get a list of all our folders.backup_folders=[]forfolderinjson.loads("".join(files)):backup_folders.append(f"{remote_path}/{folder['Path']}")# With our list of folders, lets delete every other folder, excluding these# useful ones.## This could also be more indepth logic, such as using the modified timestamp# or the timestamp in the folder name to do logic to different backups of# varying age. This is allows the ease of scripting in Python to help, versus# confusing/verbose command line options and shell scripts.ignore_list=["drive:PC/Backups/2017-09-18_WindowsUpdate","drive:PC/Backups/2019-07-30_FlatMove","drive:PC/Backups/2019-08-12_HDD-Swap",]# Iterate over every other folder and delete if not in the ignore.## Of course, right now we are in dry_run mode, so this won't do anything# except list what it would have done.forfolderinbackup_folders[1::2]:iffolderinignore_list:continuerclone.delete(folder)if__name__=="__main__":main()
Package: pyrclonetest
PyRCLONEA Python wrapper for rclone.No need to install rclone separately as it is already included in this package. The binary file for version v1.62.2 is available for different operating systems including Windows, Mac, and Linux, as well as arch with amd64 and x86_64.InstallpipinstallpyrclonetestUsagefrompyrclone.rclone_wrapperimportRCloneWrapperconfig={"remote_name":{'type':'google cloud storage','project_number':"project_number",'service_account_file':"path/to/service_account_file.json",'object_acl':'private','bucket_acl':'private','location':'us','storage_class':'STANDARD'}}rclone=RCloneWrapper(config)result=rclone.listremotes()print(result.get('out'))# b'remote_name:\n'print(result.get('code'))# 0print(result.get('error'))# b''Implemented commands:copyCopy files from source to dest, skipping already copiedsyncMake source and dest identical, modifying destination only.listremotesList all the remotes in the config file.lsList the objects in the path with size and path.lsjsonList directories and objects in the path in JSON format.deleteRemove the contents of path.Even if not allrclonecommands have been exposed, it's possible to invoke any command usingrun_cmdmethod directly, as shown in the example bellow:frompyrclone.rclone_wrapperimportRCloneWrapperconfig={"local":{'type':'local','nounc':True,}}result=RCloneWrapper(config).run_cmd(command="lsd",extra_args=["local:/tmp","-v","--dry-run"])Logging and DebuggingTo see more info about which commands are executed, or what other messages they print, you can enable logging as the example bellow shows:importlogginglogging.basicConfig(level=logging.DEBUG,format="%(asctime)s%(name)s[%(levelname)s]:%(message)s")frompyrclone.rclone_wrapperimportRCloneWrapperconfig={"local":{'type':'local','nounc':True,}}rclone=RCloneWrapper(config)result=rclone.listremotes()LimitationOnly support windows, mac and, linux operating system and arch with amd64 and x86_64.windwos: amd64linux: amd64, x86_64darwin(mac): amd64, x86_64Developer guide$pipinstallwheeltwinepytest
$maketestReferencehttps://github.com/ddragosd/python-rclone(base on this project and improve it)
Package: pyrclone-wrapper
PyRCLONEA Python wrapper for rclone.This package, available on PyPI, conveniently includes the rclone binary (version v1.62.2)eliminating the need for pre-installation of rclone. It caters to various operating systems like Windows, Mac, and Linux, and supports both amd64 and x86_64 architectures. When a user downloads the package, the appropriate rclone binary file is installed based on their system type.Installpipinstallpyrclone-wrapperUsagefrompyrcloneimportRCloneWrapperconfig={"remote_name":{'type':'google cloud storage','project_number':"project_number",'service_account_file':"path/to/service_account_file.json",'object_acl':'private','bucket_acl':'private','location':'us','storage_class':'STANDARD'}}rclone=RCloneWrapper(config)result=rclone.listremotes()print(result.get('out'))# b'remote_name:\n'print(result.get('code'))# 0print(result.get('error'))# b''Implemented commands:copyCopy files from source to dest, skipping already copiedsyncMake source and dest identical, modifying destination only.listremotesList all the remotes in the config file.lsList the objects in the path with size and path.lsjsonList directories and objects in the path in JSON format.deleteRemove the contents of path.Even if not allrclonecommands have been exposed, it's possible to invoke any command usingrun_cmdmethod directly, as shown in the example bellow:frompyrcloneimportRCloneWrapperconfig={"local":{'type':'local','nounc':True,}}result=RCloneWrapper(config).run_cmd(command="lsd",extra_args=["local:/tmp","-v","--dry-run"])Logging and DebuggingTo see more info about which commands are executed, or what other messages they print, you can enable logging as the example bellow shows:importlogginglogging.basicConfig(level=logging.DEBUG,format="%(asctime)s%(name)s[%(levelname)s]:%(message)s")frompyrcloneimportRCloneWrapperconfig={"local":{'type':'local','nounc':True,}}rclone=RCloneWrapper(config)result=rclone.listremotes()LimitationOnly support windows, mac and, linux operating system and arch with amd64 and x86_64.windwos: amd64linux: amd64, x86_64darwin(mac): amd64, x86_64Developer guide$pipinstallwheeltwinepytest
$maketestReferencepython-rclone( base on this project and improve it )rclone
Package: pyrcmd
Python Remote CommandsPyStorage:Python Remote Commands toolkitCopyright:Copyright (c) 2016 Bruno Costa, Kairo Araujo <coder@marreta.org>License:BSDDevelopment:https://github.com/marreta-sources/pyrcmdInstallingUsing PIPFrom localUsingSSH supportContributingInstallingUsing PIPJust run the PIP$sudopipinstallpyrcmdFrom localDownload the pyrcmd from PIP or from Marreta Githubhttp://github.com/marreta-sources/pyrcmd/and uncompress$pythonsetup.pyinstallUsingAt the moment the pyrcmd supports commands over SSH.SSH supportAttributes:Address:IP or Hostname to client serverUser:User used to connect using sshPasswd:Password used to connect to sshtimeout:Timeout to Connect (Hostname is valid and has route to host), default value for timeout is 30Return:returns:Dictionary (Array) with Return Code, Std output and Std ErrorExceptions:AuthFailure:Client to Server Problem with AuthenticationBadHostKey:Host Key does not matchSshProtocol:Problem of SSH2 NegotiationTimeOut:Timeout while trying to connect to a valid addressTimeoutExecuting:Timeout while trying to execute command.Sample:Simple use:>>> import pyrcmd
>>> remote = pyrcmd.SSH('192.168.0.1', 'foobar', 'Password1')
>>> remote_out = remote.execute('ls')
>>> print remote_out
{'return_code': 0, 'stderr': '', 'stdout': 'total 24\ndrwx------   3 kairo  users  512 Jan 30 11:31 .\ndrwx------  10 kairo  users  512 Jan 30 11:30 ..\n-rw-------   1 kairo  users    0 Jan 30 11:30 foobar.txt\ndrwx------   2 kairo  users  512 Jan 30 11:31 marretinha\n'}
>>> print remote_out['return_code']
0
>>> print remote_out['stdout']
total 24
drwx------   3 kairo  users  512 Jan 30 11:31 .
drwx------  10 kairo  users  512 Jan 30 11:30 ..
-rw-------   1 kairo  users    0 Jan 30 11:30 foobar.txt
drwx------   2 kairo  users  512 Jan 30 11:31 marretinhaWorking with exceptions>>> server = pyrcmd.SSH('192.168.0.1', 'foobar', 'i dont remember', timeout=10)
>>> try:
...     server.execute('whoami')
... except ValueError, exception_error:
...     print exception_error
...
AuthFailureContributingMake the for fromhttps://github.com/marreta-sources/pyrcmdChange the codeTest the codeFirst check all the PEP8 recommendations and possible spells.Run tests with toxCreate ahttp://travis-ci.comfor your fork and verify the testsSubmit your code doing a pull request1. try to give us details about the code. We are newbies with Python and it
will be help us.
Package: pyrcmd3
Python3 Remote CommandsPyStorage:Python3 Remote Commands toolkitCopyright:Copyright (c) 2016 Bruno Costa, Kairo Araujo <coder@marreta.org>License:BSDDevelopment:https://github.com/marreta-sources/pyrcmd3InstallingUsing PIPFrom localUsingSSH supportContributingInstallingUsing PIPJust run the PIP$sudopipinstallpyrcmd3From localDownload the pyrcmd3 from PIP or from Marreta Githubhttp://github.com/marreta-sources/pyrcmd3/and uncompress$pythonsetup.pyinstallUsingAt the moment the pyrcmd3 supports commands over SSH.SSH supportAttributes:Address:IP or Hostname to client serverUser:User used to connect using sshPasswd:Password used to connect to sshtimeout:Timeout to Connect (Hostname is valid and has route to host), default value for timeout is 30Return:returns:Dictionary (Array) with Return Code, Std output and Std ErrorExceptions:AuthFailure:Client to Server Problem with AuthenticationBadHostKey:Host Key does not matchSshProtocol:Problem of SSH2 NegotiationTimeOut:Timeout while trying to connect to a valid addressTimeoutExecuting:Timeout while trying to execute command.Sample:Simple use:>>> import pyrcmd3
>>> remote = pyrcmd3.SSH('192.168.0.1', 'foobar', 'Password1')
>>> remote_out = remote.execute('ls')
>>> print remote_out
{'return_code': 0, 'stderr': '', 'stdout': 'total 24\ndrwx------   3 kairo  users  512 Jan 30 11:31 .\ndrwx------  10 kairo  users  512 Jan 30 11:30 ..\n-rw-------   1 kairo  users    0 Jan 30 11:30 foobar.txt\ndrwx------   2 kairo  users  512 Jan 30 11:31 marretinha\n'}
>>> print remote_out['return_code']
0
>>> print remote_out['stdout']
total 24
drwx------   3 kairo  users  512 Jan 30 11:31 .
drwx------  10 kairo  users  512 Jan 30 11:30 ..
-rw-------   1 kairo  users    0 Jan 30 11:30 foobar.txt
drwx------   2 kairo  users  512 Jan 30 11:31 marretinhaWorking with exceptions>>> import pyrcmd3
>>> server=pyrcmd3.SSH('localhost', 'foo', 'i dont remember', timeout=10)
>>> try:
...     server.execute('ls')
... except pyrcmd3.exceptions.TimeoutExecutingException as e:
...     print(e)
...
Timeout while trying to execute command.ContributingMake the for fromhttps://github.com/marreta-sources/pyrcmd3Change the codeTest the codeFirst check all the PEP8 recommendations and possible spells.Run tests with toxCreate ahttp://travis-ci.comfor your fork and verify the testsSubmit your code doing a pull request1. try to give us details about the code. We are newbies with Python and it
will be help us.
Package: pyrcmip
pyrcmip is a tool for validating and uploading results toRCMIP.
The Reduced Complexity Model Intercomparison Project (RCMIP) is a project to evaluate reduced-complexity (also known as simple) climate models and compare them against CMIP coupled models.InstallationThe easiest way to install pyrcmip is withpip.
At this stage pyrcmip only supports Python 3.6+.# if you're using a virtual environment, make sure you're in it
pip install pyrcmipDocumentationDocumentation can be found at ourdocumentation pages(we are thankful toRead the Docsfor hosting us).ContributingIf you’d like to contribute, please make a pull request!
The pull request templates should ensure that you provide all the necessary information.Licensepyrcmip is free software under a BSD 3-Clause License, seeLICENSE.If you make use of pyrcmip or any of the RCMIP project, please cite the articles provided incitations.bib.
Package: pyrcrack
CI/CDPackageMetaPython aircrack-ng bindingsPyrCrack is a Python API exposing a common aircrack-ng API. As AircrackNg will
run in background processes, and produce parseable output both in files and
stdout, the most pythonical approach are context managers, cleaning up afterThis library exports a basic aircrack-ng API aiming to keep always a small
readable codebase.This has led to a simple library that executes each of the aircrack-ng's suite commands
and auto-detects its usage instructions. Based on that, it dinamically builds
classes inheriting that usage as docstring and a run() method that accepts
keyword parameters and arguments, and checks them BEFORE trying to run them.Some classes expose themselves as async iterators, as airodump-ng's wich
returns access points with its associated clients.DocumentationThedocumentationis made withMaterial
for MkDocsand is hosted byGitHub Pages.ExamplesBe sure to check the pythonnotebook exampleYou can have also have a look at the examples/ folder for some usage examples,
such as the basic "scan for targets", that will list available interfaces, let
you choose one, put it in monitor mode, and scan for targets updating results
each 2 seconds.importasyncioimportpyrcrackfromrich.consoleimportConsolefromrich.promptimportPromptasyncdefscan_for_targets():"""Scan for targets, return json."""console=Console()console.clear()console.show_cursor(False)airmon=pyrcrack.AirmonNg()interface=Prompt.ask('Select an interface',choices=[a['interface']forainawaitairmon.interfaces])asyncwithairmon(interface)asmon:asyncwithpyrcrack.AirodumpNg()aspdump:asyncforresultinpdump(mon.monitor_interface):console.clear()console.print(result.table)awaitasyncio.sleep(2)asyncio.run(scan_for_targets())This snippet of code will produce the following results:ContributorsLicensePyrcrack is distributed under the terms of theGPL2+license.v1.2.6 (2022-12-20)FixFixed small typing issuev1.2.5 (2022-12-03)FixFixed CI badge on readmev1.2.4 (2022-12-03)FixReorganized workflowsv1.2.3 (2022-12-03)FixI was re-checking out the repov1.2.2 (2022-12-03)FixChanged action for softprops/action-gh-releasev1.2.1 (2022-12-03)FixAdded missing commitizen depv1.2.0 (2022-12-03)d12f20d9790c04622957a14d2304e149b78d49dfFeatAdded CI autoreleaseUpgrading workflowsMigrating to hatch:sparkles: Check correct aircrack version and root (#41):sparkles: #29 Improved airmon-ng interface:sparkles: #37 Improved aireplay-ng usability (#38)Added debug mode. Don't delete tempfilescloses: #11 Added pypi to github flowFix:bug: #29 Don't break on exit in most casesAdded run-as-root messageFixed airmon test[#10] Using codecov badge[#10] Migrating to codecov