Saravanan666/pypi-org huggingface dataset:
Package: rcsb.utils.insilico3d
RCSB Python In Silico Model Access UtilitiesIntroductionThis module contains utility methods for accessing in silico 3D models and metadata from external data resources, including AlphaFold, ModBase, SWISS-MODEL, and Model Archive.InstallationDownload the library source software from the project repository:gitclone--recurse-submoduleshttps://github.com/rcsb/py-rcsb_utils_insilico3d.gitImportant:Setup will require an up-to-date version ofcmaketo be installed on the machine and the executable to be in the system's PATH.Optionally, run test suite (Python versions 3.9) usingsetuptoolsortox:pythonsetup.pytestorsimplyrun

toxInstallation is via the programpip.pipinstallrcsb.utils.insilico3d

orforthelocalrepository:

pipinstall.ReferencesAlphaFoldJumper, J et al. Highly accurate protein structure prediction with AlphaFold. Nature (2021)Varadi, M et al. AlphaFold Protein Structure Database: massively expanding the structural coverage of protein-sequence space with high-accuracy models. Nucleic Acids Research (2021).ModBaseMODBASE, a database of annotated comparative protein structure models and associated resources. Ursula Pieper, Benjamin M. Webb, Guang Qiang Dong, Dina Schneidman-Duhovny, Hao Fan, Seung Joong Kim, Natalia Khuri, Yannick G. Spill, Patrick Weinkam, Michal Hammel, John A. Tainer, Michael Nilges, Andrej Sali Nucleic Acids Research 42, D336-46, 2014.SWISS-MODEL RepositoryBienert, S., Waterhouse, A., de Beer, T.A.P., Tauriello, G., Studer, G., Bordoli, L., Schwede, T. The SWISS-MODEL Repository - new features and functionality. Nucleic Acids Res. 45, D313-D319 (2017).Waterhouse, A., Bertoni, M., Bienert, S., Studer, G., Tauriello, G., Gumienny, R., Heer, F.T., de Beer, T.A.P., Rempfer, C., Bordoli, L., Lepore, R., Schwede, T. SWISS-MODEL: homology modelling of protein structures and complexes. Nucleic Acids Res. 46(W1), W296-W303 (2018).
Package: rcsb.utils.io
RCSB Python I/O Utility ClassesIntroductionThis module contains a collection of utility classes for performing I/O operations on common
file formats encountered in the PDB data repository.InstallationDownload the library source software from the project repository:gitclone--recurse-submoduleshttps://github.com/rcsb/py-rcsb_utils_io.gitOptionally, run test suite (Python versions 2.7, and 3.9) usingsetuptoolsortox:pythonsetup.pytestorsimplyrun

toxInstallation is via the programpip.pipinstallrcsb.utils.io

orfromthelocalrepository:

pipinstall.UsageTheMarshalUtiloffers an easy way for reading in and writing out files in various formats, includingCSV,JSON,pickle,mmCIF,bcif(BinaryCIF),fasta, and "list" files (plain text file in which each row is a list item).Reading filesLet's say you have a JSON file,"data.json". You can read this in by:fromrcsb.utils.io.MarshalUtilimportMarshalUtilmU=MarshalUtil(workDir=".")dataD=mU.doImport("data.json",fmt="json")The same method works even if the file is compressed (e.g.,"data.json.gz"):dataD=mU.doImport("data.json.gz",fmt="json")Note that this automatic handling of compressedgzipfiles applies to any type of input format.You can also import remote files directly from the command line, e.g.:dataD=mU.doImport("https://files.rcsb.org/pub/pdb/holdings/current_file_holdings.json.gz",fmt="json")To read in apicklefile,"data.pic":fromrcsb.utils.io.MarshalUtilimportMarshalUtilmU=MarshalUtil()dataD=mU.doImport("data.pic",fmt="pickle")To read in and parse anmmCIFfile,"4hhb.cif.gz":fromrcsb.utils.io.MarshalUtilimportMarshalUtilmU=MarshalUtil()# Read all data containers from the mmCIF file into `dataContainerList`dataContainerList=mU.doImport("https://files.rcsb.org/pub/pdb/data/structures/divided/mmCIF/hh/4hhb.cif.gz",fmt="mmcif")# Get the first dataContainer (in most cases, there will only be one container in the file)dataContainer=dataContainerList[0]# Print the name of the containereName=dataContainer.getName()print(eName)# Get the list of categoriescatNameList=dataContainer.getObjNameList()print(catNameList)# Iterate over all the categories and attributes and store them in a new dictionarycifDataD={}forcatNameincatNameList:ifnotdataContainer.exists(catName):continuedObj=dataContainer.getObj(catName)foriiinrange(dObj.getRowCount()):dD=dObj.getRowAttributeDict(ii)cifDataD.setdefault(eName,{}).setdefault(catName,[]).append(dD)For more examples, seetestMarshallUtil.py.Writing filesYou can use theMarshalUtilto write out the following data structures into the corresponding file formats:Object            |  Output `fmt`
-------------------------------------
 list              |  list
 dict              |  json or pickle
 DataContainerList |  mmcif or bcifFor example, if you have a dictionary,dataD, you can export it via:fromrcsb.utils.io.MarshalUtilimportMarshalUtilmU=MarshalUtil()dataD={"name":"John Doe","age":"33"}mU.doExport("data.json",dataD,fmt="json",indent=2)# Or, to export and compress as gzip:mU.doExport("data.json.gz",dataD,fmt="json",indent=2)
Package: rcsb.utils.multiproc
RCSB Python Multiprocessing Utility ClassesIntroductionThis module contains a collection of utility classes for multiprocessing operations.InstallationDownload the library source software from the project repository:gitclone--recurse-submoduleshttps://github.com/rcsb/py-rcsb_utils_multiproc.gitOptionally, run test suite (Python versions 2.7, 3.6, and 3.7) usingsetuptoolsortox:pythonsetup.pytestorsimplyrun

toxInstallation is via the programpip.pipinstallrcsb.utils.multiproc

orinthelocalrepository:

pipinstall.
Package: rcsb.utils.repository
RCSB Repository UtilitiesA collection of Python Repository Data Management UtilitiesIntroductionThis module contains a collection of utility classes for accessing and scanning data
stored in various RCSB/PDB repositories.InstallationInstall viapip.pipinstallrcsb.utils.repositoryOr, to install from the source, download the library source software from the project repository:gitclone--recurse-submoduleshttps://github.com/rcsb/py-rcsb_utils_repository.gitOptionally, run test suite (Python versions 3.7+) usingsetuptoolsortox:pythonsetup.pytestorsimplyrun

toxInstallation is via the programpip.  To run tests
from the source tree, the package must be installed in editable mode (i.e. -e):pipinstall-e.
Package: rcsb.utils.seq
RCSB Python Reference Sequence Data UtilitiesIntroductionThis module contains utility methods for processing linear polymer reference
sequence data.InstallationDownload the library source software from the project repository:gitclone--recurse-submoduleshttps://github.com/rcsb/py-rcsb_utils_seq.gitOptionally, run test suite (Python versions 2.7, and 3.7) usingsetuptoolsortox:pythonsetup.pytestorsimplyrun

toxInstallation is via the programpip.pipinstallrcsb.utils.seq

orforthelocalrepository:

pipinstall.
Package: rcsb.utils.seqalign
RCSB Python Sequence Alignment UtilitiesIntroductionThis module contains wrapper methods for sequence alignment tasksInstallationDownload the library source software from the project repository:gitclone--recurse-submoduleshttps://github.com/rcsb/py-rcsb_utils_seqalign.gitOptionally, run test suite (Python versions 3.9) usingsetuptoolsortox:pythonsetup.pytestorsimplyrun

toxInstallation is via the programpip.pipinstallrcsb.utils.seqalign

orforthelocalrepository:

pipinstall.
Package: rcsb.utils.struct
RCSB Python Primary Structure Data UtilitiesIntroductionPython utility classes for accessing PDB primary structure data and features
associated with these data.InstallationDownload the library source software from the project repository:gitclone--recurse-submoduleshttps://github.com/rcsb/py-rcsb_utils_struct.gitOptionally, run test suite (Python versions 2.7, and 3.7) usingsetuptoolsortox:pythonsetup.pytestorsimplyrun

toxInstallation is via the programpip.pipinstallrcsb.utils.struct

orforthelocalrepository:

pipinstall.
Package: rcsb.utils.targets
RCSB Python Target Data Management UtilitiesIntroductionThis module contains methods for target data management.InstallationDownload the library source software from the project repository:gitclone--recurse-submoduleshttps://github.com/rcsb/py-rcsb_utils_targets.gitOptionally, run test suite (Python versions 3.9) usingsetuptoolsortox:pythonsetup.pytestorsimplyrun

toxInstallation is via the programpip.pipinstallrcsb.utils.targets

orforthelocalrepository:

pipinstall.
Package: rcsb.utils.taxonomy
RCSB Python Taxonomy Data UtilitiesIntroductionThis module contains utility methods for accessing and processing NCBI taxonomy data sequence data.InstallationDownload the library source software from the project repository:gitclone--recurse-submoduleshttps://github.com/rcsb/py-rcsb_utils_taxonomy.gitOptionally, run test suite (Python versions 2.7, and 3.7) usingsetuptoolsortox:pythonsetup.pytestorsimplyrun

toxInstallation is via the programpip.pipinstallrcsb.utils.seq

orforthelocalrepository:

pipinstall.
Package: rcsb.utils.validation
RCSB Python PDB Validation Data UtilitiesIntroductionPython utility classes for calculating and accessing PDB validation data.InstallationDownload the library source software from the project repository:gitclone--recurse-submoduleshttps://github.com/rcsb/py-rcsb_utils_validation.gitOptionally, run test suite (Python versions 2.7, and 3.7) usingsetuptoolsortox:pythonsetup.pytestorsimplyrun

toxInstallation is via the programpip.pipinstallrcsb.utils.validation

orforthelocalrepository:

pipinstall.
Package: rcsb.workflow
py-rcsb_workflowIntroductionRCSB Python workflow entry points for data processing and ETL/ELT operations.InstallationDownload the library source software from the project repository:gitclone--recurse-submoduleshttps://github.com/rcsb/py-rcsb_workflow.git# or to make sure the submodules are updated --gitsubmoduleupdate--recursive--init
gitsubmoduleupdate--recursive--remoteOptionally, run test suite (Python versions 3.8) usingsetuptoolsortox:pipinstall-rrequirements.txtpythonsetup.pytestorsimplyrun:toxInstallation is via the programpip.  To run tests
from the source tree, the package must be installed in editable mode (i.e. -e):pipinstall-e.
Package: rcsh
rcshNon-interactive command whitelisted shellThis is a work-in-progress little script intended to be used as a shell for Linux user accounts which are allowed to run
a limited set of commands over SSH non-interactively and nothing else. The commands which are allowed are based on a
whitelist of exact command invocation strings and/or a list of regular expressions which they should match.Free software: BSD licenseDocumentation:https://rcsh.readthedocs.io. (not much documentation yet, please stand by…)FeaturesAllow execution of commands based on an exact or regular expression whitelistLog invocation using syslog’s LOG_AUTH facilitiesCreditsThis package was inspired by lshell and bdsh:https://github.com/ghantoos/lshellhttps://raymii.org/s/software/bdsh.htmlhttps://github.com/RaymiiOrg/boa-diminish-restricted-shell/This package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2017-03-01)First release on PyPI.0.2.0 (2017-03-18)An actually functional release on PyPI.Some unittestingSome documentation0.2.1 (2017-03-20)Fixed typo in configuration option0.2.2 (2017-03-20)Removed redundant print statement0.2.3 (2017-03-20)Fixed some python2 timeout logic bug
Package: rcslice
This package provides Python module to slice a list of sliceables (1 indexed, both start and end index are inclusive). Helps to slice file content line by line or column by column or a combination of both.InstallInstall from Pypi:pipinstallrcsliceUsagefromrcsliceimportRowSlicers=RowSlice()list_of_sliceables=rs.slice(list_of_sliceables,'1-2,2.4-4.5,8-2.6')Slicing syntaxBelow, r is the row number, and c is the column number. All indexes are inclusive and 1 indexed.r.c-r.c
r.c-r.c,r.c-r.c,...
.c-.c       [not specifying both r means slice on every row for the columns]
1.c-.c      [not specifying r means the last row when another r is specified]
.c-1        [last row.c to first row, reversion]
r           [only r'th row]
r1-r2       [when both r is not the same, not specifying c means the first c for start index and last c for end index]
r1-r2.c     [first c of r1 to r2.c]
r1.c-r2     [r1.c to last c of r2]
r-r.c       [when both r is the same, not specifying one c will mean the last c]
r-r         [when both r is the same, not specifying both c means the first c for start index and last c for end index]
e.c-e.c     [e means last row]
e-e         [last row]
e-e.c       [last c of e to e.c]
e.c-e       [e.c to last c of e]
e.e-e.e     [same as e-e, e in column is stripped off]The e to specify the last row is exclusively for row only. Do keep in mind that the class name is RowSlice. It gives special priority on row and not just with the special character e. You will see some major difference in how r and c works in above syntax explanation.For multiple slice syntaxr.c-r.c,r.c-r.c,..., a separator will be inserted between each slice. You can set the separator by passing it during class object instantiation:rs=RowSlice(['I am a separator'])This separator is also alistof something.ExamplesAn example of slicing a file content read byreadlines():importosfromrcsliceimportRowSlicedefget_file_lines(filename):content=[]try:withopen(os.path.join(os.path.dirname(__file__),filename),'r')asf:content=f.readlines()exceptOSErrorase:raisereturncontentrs=RowSlice(['',''])# ['',''] will add 2 new lines for multi slice syntax (e.g 1-2,3-4,...)list_of_lines=get_file_lines('test.txt')print("before: ",list_of_lines)list_of_lines=rs.slice(list_of_lines,'1-2,1.2-4.5,3.4-1.3,.4-.9')print("after: ",list_of_lines)
Package: rc-ssl-logtools
RoboCup Small Size League Python Log ToolsThis package supports a minimal interface to parse and analyze log files generated by the RoboCup Small Size League.Installationrc-ssl-logtoolsis on the PyPi package index. It can be installed by simply running the below command.pip3 install rc-ssl-logtoolsUserc-ssl-logtoolscomes with a simple script to verify that the system is working. Download a log fromhttp://wiki.robocup.org/Small_Size_League/Game_Logs, and run the below command. It will print all messages from time 0.0 seconds to 10.0 seconds.ssldump -s 0.0 -d 10.0 <rc_ssl_logfile.gz>rc-ssl-logtoolsallows python scripts to programmatically access these protobuf messages as well. This is how thessldumpscript is implemented.#!/usr/bin/env python3importrc_ssl_logtoolsframes=rc_ssl_logtools.log_frames(args.file,args.start_time,args.duration)forfinframes:print(f)
Package: rcssmin
RCSSmin is a CSS minifier.The minifier is based on the semantics of theYUI compressor, which itself
is based onthe rule list by Isaac Schlueter.This module is a re-implementation aiming for speed instead of maximum
compression, so it can be used at runtime (rather than during a preprocessing
step). RCSSmin does syntactical compression only (removing spaces, comments
and possibly semicolons). It does not provide semantic compression (like
removing empty blocks, collapsing redundant properties etc). It does, however,
support various CSS hacks (by keeping them working as intended).Here’s a feature list:Strings are kept, except that escaped newlines are strippedSpace/Comments before the very end or before various characters are
stripped::{});=>],!(The colon (:) is a special case, a single
space is kept if it’s outside a ruleset.)Space/Comments at the very beginning or after various characters are
stripped:{}(=:>[,!Optional space after unicode escapes is kept, resp. replaced by a simple
spacewhitespaces insideurl()definitions are stripped, except if it’s a
quoted non-base64 data urlComments starting with an exclamation mark (!) can be kept optionally.All other comments and/or whitespace characters are replaced by a single
space.Multiple consecutive semicolons are reduced to oneThe last semicolon within a ruleset is strippedCSS Hacks supported:IE7 hack (>/**/)Mac-IE5 hack (/*\*/.../**/)The boxmodelhack is supported naturally because it relies on valid CSS2
stringsBetween:first-lineand the following comma or curly brace a space is
inserted. (apparently it’s needed for IE6)Same for:first-letterrcssmin.c is a reimplementation of rcssmin.py in C and improves runtime up to
factor 100 or so (depending on the input). docs/BENCHMARKS in the source
distribution contains the details.Supported python versions are 2.7 and 3.6+.Copyright and LicenseCopyright 2011 - 2023
André Malo or his licensors, as applicable.The whole package (except for the files in the bench/ directory) is
distributed under the Apache License Version 2.0. You’ll find a copy in the
root directory of the distribution or online at:
<http://www.apache.org/licenses/LICENSE-2.0>.BugsNo bugs, of course. ;-)
But if you’ve found one or have an idea how to improve rcssmin, feel free
to send a pull request ongithubor send a mail to <rcssmin-bugs@perlig.de>.Author InformationAndré “nd” Malo <nd perlig.de>
GPG: 0x029C942244325167If God intended people to be naked, they would be born that way.
– Oscar Wilde
Package: rctf-golf
AboutrCTF-golf is a Python 3 library for developing CTF golfing challenges.InstallationAutomaticpip3installrctf-golfManualgitclonehttps://github.com/redpwn/rCTF-golf.gitcdrCTF-golf.git
pip3installrequirements.txt
./setup.pyinstallUsagefromrctfimportgolfrctf_host='https://staging.redpwn.net/'# just the base url of your rCTF installationchallenge_id='e0efc6e1-3b04-400a-9d72-a2e2ae02c1f6'# you can also use the challenge namectf_start=int(time.time()-3*3600)# three hours agolimit_function=lambdax:xcurrent_limit=golf.calculate_limit(rctf_host,challenge_id,ctf_start,limit_function)DebuggingWhen testing your challenge, you can set theDEBUGenvironmental variable to the number of hours after the CTF has started, and rCTF-golf will automatically bypass calculation logic.Note:Take care to ensure users do not control theDEBUGenvironmental variable when running your Python script or they may be able to hijack the limit calculations.DocumentationClick here to see the documentation
Package: rctmodelpool
rct-modelpoolInstallationYou can git installrctmodelpoolviapip:pipinstallgit+https://github.com/rct-ai/rct-modelpoolorpipinstallrctmodelpoolUsageYou can import therctmodelpool.modelpoolfrom the package like so:sync_modelfromrctmodelpoolimportmodelpoolpath=modelpool.sync_model("rcthub://CPM.csv")print(path)sync tgzimportosimporttarfilefromrctmodelpoolimportmodelpoolfrompathlibimportPathlocal_path=modelpool.sync_model("rcthub://"+config.bert_model_path)parent_path=Path(local_path).parentprint("rcthub sync:",local_path)modeltar=tarfile.open(local_path)inside_folder=os.path.commonprefix(modeltar.getnames())real_model_path=os.path.join(parent_path,inside_folder)print('model folder:',real_model_path)ifnotos.path.exists(real_model_path):modeltar.extractall(parent_path)print('tar extraction:',parent_path,local_path)
Package: rct-modelpool
rct-modelpoolInstallationYou can git installrct_modelpoolviapip:pipinstallgit+https://github.com/rct-ai/rct-modelpoolUsageYou can import thesync_modelfrom the package like so:sync_modelfromrct_modelpool.modelpoolimportsync_modelpath=sync_model("rcthub://CPM.csv")print(path)
Package: rcurl
rcurlA simple package of generating curl statements from requests.For now the supported methods are limited. Checl the samples inusageInstallationpipinstallrcurlUsageimportjsonimportrequestsfromrcurlimportget_curlreq_one=requests.get("https://google.com")curl_command_one=get_curl(req_one)req_two=requests.post("https://google.com")curl_command_two=get_curl(req_two)data=json.dumps({'a':'b','x':45})headers={'content-type':'application/json','authorization':'Bearer dhsfdJGHGDH'}req_three=requests.post("https://google.com",data=data,headers=headers)curl_command_three=get_curl(req_three)print(curl_command_one)print(curl_command_two)print(curl_command_three)Buildpythonsetup.pybdist_wheelsdist
twineuploaddist/*
Package: rcv
rcv is a Python library for tabulating ballots from ranked-choice elections.
The package is distributed under the BSD 3-Clause License.ExamplesfromrcvimportFractionalSTV,PreferenceScheduleschedule=PreferenceSchedule.from_ballots([("Kamala","Amy","Elizabeth"),("Kamala","Elizabeth","Amy"),("Kamala","Elizabeth","Amy"),])stv=FractionalSTV(schedule,seats=2)winners=stv.elect()assertwinners=={"Kamala","Elizabeth"}
Package: rcvalid
Funciones de validación y formateo de entradasUna serie de funciones para validar entradas de teclado y formateo de números, fechas, etc...  Se irán incorporando más.Funciones disponiblesValidar correo electrónicoValidar dirección IPFormatear número con separador de miles y decimal con precisión variableInstalaciónInstalar usando el comando "pip3"pip3installrcvalidUso básicoValidar correo electrónicofromrcvalidimportvalidamail# validamail(correo) -> True/FalsewhileTrue:correo=input("Introduce un correo electrónico válido: ")ifvalidamail(correo):print(f"\nEl correo electrónico{correo}es válido")breakelse:print(f"\nEl correo electrónico{correo}es un pufo")print("Paso con correo electrónico válido")Validar IPfromrcvalidimportvalidaip# Ussage validaip(dirip) -> True/FalsewhileTrue:dirip=input("Introduce una dirección IP válida: ")ifvalidaip(dirip):print(f"\nLa dirección IP{dirip}es válida")breakelse:print(f"\nLa dirección IP{dirip}es un pufo")print("Paso con IP válida")Formatear número con separador de miles y decimal con la precisión requeridafromrcvalidimportlikenumber# Ussage likenumber(numero, decimales) -> numero_masknumerito=float(input("Introduce un número: "))print(likenumber(numerito,3))
Package: rcvpapi
CloudVision API (rCVP API)This is a custom CVP API wrapper.  This module works using Python2 and Python3.SupportNOTEAlways test on lab deployments before working on a production environment.  Espeically between different releases of CVP and rCVP API.This has been tested on CVP versions:2018.2.X2019.1.X2020.1.XUsageNOTEThe documentation below is incomplete and a work in progress.  This module has more functionality than what is documented.  With the right supplemental data and steps, it can configure CVP from nothing to functioning.Install using the Python Package Indexpip install rcvpapiorpip3 install rcvpapiInitial Setup and Usagefrom rcvpapi.rcvpapi import *

# Create connection to CloudVision
cvp_cnt = CVPCON(cvp_ip,cvp_user,cvp_user_pwd)

# Check current CloudVision sessionId/Cookie
cvp_cnt.SID

# Get the current CVP Version
cvp_cnt.version

# Logout/End session
cvp_cnt.execLogout()

# Save topology
cvp_cnt.saveTopology()Devices/Inventory# Get all provisioned devices
cur_inv = cvp_cnt.getDeviceInventory()

# Adds new devices to inventory/provisioning
cvp_cnt.addDeviceInventory(['10.0.0.1','10.0.0.2'])Tasks# Get a list of any Task type
cur_tasks = cvp_cnt.getAllTasks("Pending")

# Get a list of the last 25 Tasks of any type
recent_tasks = cvp_cnt.getRecentTasks(25)

# Execute all tasks
cvp_cnt.execAllTasks("Pending")

# Get status of a task
tsk_stat = cvp_cnt.getTaskStatus(task_id)Configlets# Import static configlet
cvp_cnt.impConfiglet("static",configlet_name,configlet_data)

# Import configlet builder
cvp_cnt.impCofniglet("builder",configlet_name,configlet_data,configlet_form_data)

# Get all Configlets
exist_configlets = cvp_cnt.getConfiglets()

# Get a Configlet by Name
ex_cfg = cvp_cnt.getConfigletByName("Base_Authentication")Snapshots# Get all configured snapshots
cvp_cnt.snapshots

# Add a new snapshot
# Parameters:
#        snap_name = Name of the snapshot (required)
#        snap_cmds = Array of all commands to be included in snapshot (required)
#        snap_devices = Array of any devices to be included on the snapshot (optional)
cvp_cnt.createSnapshot(snap_name,snap_cmds,snap_devices)Containers# Get all containers
ex_cont = cvp_cnt.getAllContainers()

# Add a new container
cvp_cnt.addContainer(new_cont_name,parent_cont_name)