Saravanan666/pypi-org huggingface dataset:
Package: py-cobra
A fast, flexible and simple development environment framework for Ethereum smart contract, testing and
deployment on Ethereum virtual machine(EVM).With cobra you can get built-in smart contract compilation, linking, deployment, binary management,
automated contract testing with Unittest and PyTest frameworks, scriptable deployment & migrations framework
and network management for deploying to many public & private networks likeINFURAorGanache CLI.DependencyThis library requires thesolcexecutable to be present.Only versions>=0.4.2are supported and tested though this library may work
with other versions.solc: Ethereum solidity compiler.ganache-cli: A command-line version of Ethereum blockchain server.pip: To install packages from the Python Package Index and other indexes.python3: version 3.6 or greater.InstallationPIP to install cobra globally. For Linux sudo may be required.$ pip install py-cobraDevelopmentWe welcome pull requests. To get started, just fork this repo, clone it locally, and run:$ pip install -e . -r requirements.txtQuick UsageInitialize project structureA default set of contract and tests, run the following command:$ cobra initGet help:$ cobra --helpFrom there, you can runcobra compile,cobra deploy/migrateandcobra test --unittest/--pytestto compile your contracts, deploy those contracts to the network, and run their associated unit tests.advanced cobra.yamlcompile:solidity_path:"./contracts"# globalartifact_path:"./build/contracts"contracts:[contract:{solidity:"Contract.sol",solidity_path:"./contracts/libs",# detailimport_remappings:["=/path/folder/contracts/"],allow_paths:["/path/folder/contracts/"]}]deploy:artifact_path:"./build/contracts/"contracts:[contract:{artifact:"Contract.json",links:["Contract.json"]}]test:artifact_path:"./build/contracts/"test_paths:["./tests"]contracts:[contract:{artifact:"Contract.json",links:["Contract.json"]}]network:development:{url:"https://ropsten.infura.io/...",host:"localhost",port:8545,hdwallet:{mnemonic:"decideadjustlegendnationtypesametaskaimrigidluckyguiltclose",# orseed:"decideadjustlegendnationtypesametaskaimrigidluckyguiltclose",password:"meherett",private:"5f8935bb3b61b312ba1114cbf6f1ea30102383f2b043a1b213aa482132d25049",gas:3000000,gas_price:1000000},protocol:"HTTP",# HTTP, HTTPS, WS(WebSocket) and ICPaccount:{address:"0x6a373a75c388ac2d160f1d2b6d9ada34f29831cd",gas:3000000,gas_price:1000000}}TestingTests are still under development.You can run the tests with:$ pytest testsOr usetoxto run the complete suite against the full set of build targets, or pytest to run specific
tests against a specific version of Python.MetaMeheret Tesfaye –@meherett–meherett@zoho.comDistributed under the MIT license. SeeLICENSEfor more information.https://github.com/meherettLicenseThis project is licensed under the MIT License - see theLICENSEfile for details
Package: pycocap
pyCOCAPpyCOCAPis the Python interface to the common COCAP database. You can find
the documentationhereInstallationUsing the Package Installer for Python PIP, you can install this interface with
following commandpip install pycocapUsageOnce the package is installed it is as easy as this to get the COCAP data for
example the reported case numbers for Sweden and the stringency index for the
UK.importpycocapaspyccases=pyc.cases('Sweden')npi=pyc.npi('United Kingdom','stringency')If you want to get multiple NPIs into one DataFrame, you can do followingnpis=pyc.npis('Germany',['school closing','dept relief','facial coverings'])Defining the start and end dates of the timeseries can be done with Python's
standarddateobjectsfromdatetimeimportdatedeaths=pyc.death('Canada',start_date=date(2020,5,16),end_date=date(2021,1,15))You can also use this to expand the timeseries and at the same time choose
with which value to fill gapsdeaths=pyc.death('Canada',start_date=date(2019,11,1),fill_value=0)DocumentationYou can find the documentationhereRequirementspandas >= 1.4.0requests >= 2.27.1ContactYou can get in touch with me viae-mailor have a
look at thesource codeand open
issues there.
Package: pycociC
pycociC - A Python library for removing pycache and numba cache filesInstallationpip installpycociCUsagepython-B-m pycociC [-t DIRS [DIRS ...]] [-h]options:
  -h, --help            show this help message and exit
  -t DIRS [DIRS ...], -d DIRS [DIRS ...], --dirs DIRS [DIRS ...]
                        Directories to search for pycache files (default: (everywhere))Coding# pycociC/__init__.py__all__=('FP_RE','bytes_to_pretty_view','eat_cache','dont_write_bytecode')FP_RE=re.compile(r'.*\.py([co]|.*\.nb[ci])',re.I)defeat_cache(at_dirs:Iterable[AnyStr,os.PathLike[AnyStr]]=('.',)):"""Function removes files matching the regular expression (see FP_RE) from all "__pycache__" folders recursively."""...defbytes_to_pretty_view(bytes_size:int=0)->str:"""Converts the number of bytes into a pretty SI prefix.>>> bytes_to_pretty_view(0)'0B'>>> bytes_to_pretty_view(1_000_000_24)'100MB 24B'>>> bytes_to_pretty_view(0xFF_FF_FF_FF)'4GB 294MB 967kB 295B'"""...Example Outputpython -m pycociC -d .WARNING:root:pycociC doesn't remove bytecode files.
        You can use "-B" option of python or PYTHONDONTWRITEBYTECODE=x to do so.


Starting for .


pycociC\__pycache__
        __init__.cpython-310.pyc (4kB 699B)
        __main__.cpython-310.pyc (1kB 153B)
pycociC\__pycache__  # only if the folder has been deleted

venv\Lib\site-packages\_distutils_hack\__pycache__
        __init__.cpython-310.pyc (7kB 593B)
venv\Lib\site-packages\_distutils_hack\__pycache__

venv\Lib\site-packages\__pycache__
        _virtualenv.cpython-310.pyc (4kB 107B)
venv\Lib\site-packages\__pycache__


Removed 17kB 552Bpython -B -m pycociCStarting for C:\, D:\


C:\...\Python310\Lib\collections\__pycache__
        abc.cpython-310.pyc (251B)
        __init__.cpython-310.pyc (48kB 468B)
C:\...\Python310\Lib\collections\__pycache__

C:\...\Python310\Lib\importlib\__pycache__  
        abc.cpython-310.pyc (15kB 904B)
        ...
        __init__.cpython-310.pyc (3kB 818B)
C:\...\Python310\Lib\importlib\__pycache__  

C:\...\Python310\Lib\urllib\__pycache__
        parse.cpython-310.pyc (33kB 817B)
        __init__.cpython-310.pyc (144B)
C:\...\Python310\Lib\urllib\__pycache__

        ...

D:\...\venv\Lib\site-packages\_distutils_hack\__pycache__
        __init__.cpython-310.pyc (7kB 593B)
D:\...\venv\Lib\site-packages\_distutils_hack\__pycache__

D:\...\venv\Lib\site-packages\__pycache__
        _virtualenv.cpython-310.pyc (4kB 107B)
D:\...\venv\Lib\site-packages\__pycache__


Removed 1MB 481kB 138B
Package: pycocks
pycocksA Python implementation ofCocks' identity-based encryption (IBE) scheme[1]. IBE allows strings to be used directly as public encryption keys.Cocks' scheme uses the quadratic residuosity hardness problem, rather than bilinear pairings with other IBE schemes, e.g. Boneh-Franklin [2]. As a result, no additional dependencies are required for pairing-based cryptography; only gmpy2 is sufficient.UsageTwo classes are utilised for server- (PKG) and client-side communication:PKG—CocksPKG: implements the public key generator (PKG) for the scheme's initialisation and extracting secret keys from identity strings.Client—Cocks: used for encrypting and decrypting messages using the secret key and public modulus generated byCocksPKG.PKGfrompycocks.cocksimportCocksPKG# Instantiate the PKG## Optional parameters: bit size (default = 2048) and hash function (default = SHA512)cocks_pkg=CocksPKG()# Extract private key, r, from an identity string. This is# "User1" in this instance.## A transformed ID string, a, is also returned that is# required for encryption and decryption by the client.r,a=cocks_pkg.extract("User1")Clientfrompycocks.cocksimportCocks# Instantiate the client## Must use the same modulus, n, as the PKGcocks=Cocks(cocks_pkg.n)# Encryption example## Transformed identity string, a, is provided by the server PKGc=cocks.encrypt(b"test",a)# Decryption example## Private key, r, is generated by the server PKGmsg=cocks.decrypt(c,r,a)# => b"test"TestsUsepytestto execute tests intests/test_pycocks.pyRequirementsgmpy2 (tested v2.0.8)CitationPlease use the following if you use pycocks in a publication:@software{shepherd:pycocks,title={pycocks},version={1.0},author={Carlton Shepherd},year={2022},url={https://github.com/cgshep/pycocks}}ReferencesC. Cocks,"An identity based encryption scheme based on quadratic residues", Proceedings of the IMA International Conference on Cryptography and Coding. Springer, 2001.D. Boneh and M. Franklin,"Identity-based encryption from the Weil pairing", Annual International Cryptology Conference. Springer, 2001.
Package: pycoco
pycoco is a script that can be used to generate code
coverage info for the Python source code.The script downloads the Python source code, builds the interpreter
with code coverage options, runs the test suite and generates an HTML
report how often each source code line in each C or Python file has been
executed by the test suite.Changes in 0.7.2 (released 09/08/2010)Added the missing pixel GIFspc.gif.
Package: pycococt
pycococtCOCO-CameraTrapIndexer. An extension to pycocotools including location and sequence indexing.FeaturesExtends / Backwards compatable withpycocotoolsIndexing for Locations and SequencesInstallpipinstallpycococtUsagefrompycococt.cococtimportCOCOCTds=COCOCT('path to COCO-CameraTrap')# all the core indexes and helpers in pycocotoolsds.imgsds.annsds.catsds.catToImgsds.imgToAnns# with aditional camera trap indexesds.locs# = [#   'Location1',#   'Location2',#   'Location3',#   ...# ]ds.locToImgs# = { 'Location1': {#        'imageid': {#           'id': 'imageid',#           'location': 'Location1',#           'height': ...#         }#      },#      ...#    }ds.locToSeqs# = {#     'Location1': [#         'seq id 1_1',#         'seq id 1_2',#         ...#     ],#     'Location2': [#         'seq id 2_1',#         'seq id 2_2',#         ...#     ]#     ...# }ds.seqToImgs# = { 'sequence 1 id': [#       {#           'id': 'image id',#           ...#        },#        {#           'id': 'image id',#           ...#        },#        ...#     ],#     'sequence 2 id: [#       ...#     ]#       ...#    }
Package: pycocoevalcap
Microsoft COCO Caption EvaluationEvaluation codes for MS COCO caption generation.DescriptionThis repository provides Python 3 support for the caption evaluation metrics used for the MS COCO dataset.The code is derived from the original repository that supports Python 2.7:https://github.com/tylin/coco-caption.Caption evaluation depends on the COCO API that natively supports Python 3.RequirementsJava 1.8.0Python 3InstallationTo install pycocoevalcap and the pycocotools dependency (https://github.com/cocodataset/cocoapi), run:pip install pycocoevalcapUsageSee the example script:example/coco_eval_example.pyFiles./eval.py: The file includes COCOEavlCap class that can be used to evaluate results on COCO.tokenizer: Python wrapper of Stanford CoreNLP PTBTokenizerbleu: Bleu evalutation codesmeteor: Meteor evaluation codesrouge: Rouge-L evaluation codescider: CIDEr evaluation codesspice: SPICE evaluation codesSetupSPICE requires the download ofStanford CoreNLP 3.6.0code and models. This will be done automatically the first time the SPICE evaluation is performed.Note: SPICE will try to create a cache of parsed sentences in ./spice/cache/. This dramatically speeds up repeated evaluations. The cache directory can be moved by setting 'CACHE_DIR' in ./spice. In the same file, caching can be turned off by removing the '-cache' argument to 'spice_cmd'.ReferencesMicrosoft COCO Captions: Data Collection and Evaluation ServerPTBTokenizer: We use theStanford Tokenizerwhich is included inStanford CoreNLP 3.4.1.BLEU:BLEU: a Method for Automatic Evaluation of Machine TranslationMeteor:Project pagewith related publications. We use the latest version (1.5) of theCode. Changes have been made to the source code to properly aggreate the statistics for the entire corpus.Rouge-L:ROUGE: A Package for Automatic Evaluation of SummariesCIDEr:CIDEr: Consensus-based Image Description EvaluationSPICE:SPICE: Semantic Propositional Image Caption EvaluationDevelopersXinlei Chen (CMU)Hao Fang (University of Washington)Tsung-Yi Lin (Cornell)Ramakrishna Vedantam (Virgina Tech)AcknowledgementDavid Chiang (University of Norte Dame)Michael Denkowski (CMU)Alexander Rush (Harvard University)
Package: py-co-commit
👥 py_co_commitAn easy way to create a commit with multiple authors.Give credit to other developers when pair programming!⚙️ How does it work?It uses thisfeatureon Github and addsCo-authored-bytrailers to the commit's message.⬇️ Installationpip install py_co_commit🐚 UsageJust use thepy_co_commitcommand.If you are using virtualenv, check that it is activated!
Package: pycocotb
PyCOCOTBThis is a library which contains bindigns for RTL simulators and provides UVM like environment which simplifies feeding and checking the circuit running in RTL simulator.
Goal of this library is to remove obscurity and support code reuse. Each simulation is just python object without special properties. This allows also integration with existing test frameworks and better test automation and debugging.InstallationLinux (Ubuntu 19.10)sudo apt install build-essential python3 cmake flex bison git libboost-dev libboost-all-devdownloadverilatorapply patches fromverilator_patches_tmp( as it is done in.travis.yml)install verilatorrunsudo python3 setup.py install --verilatorto install globally orpython3 setup.py install --user --verilatorto install to~/.local/...Or if you want to just test this library without any kind of installation usepython3 setup.py build --verilatorto build c extensions.WindowsUsing windows is not recomended with verilator. Asi it is more easy to use docker than tweak Verilator to run on Windows as desired.installPython 3installVisual Studio(C++)installCMakeinstallboostinstallCygwinand save installersetup-x86_64.exeto cygwin root.useci_scripts/appveyor_install.shto install this library and it's dependenciesAfter installation verilator has to run under cygwin, but python and this library are not restricted.Current state - alfaexperimental UVM like environmentexperimental Python <-> Verilator RTL simulator binding (pycocotb.verilator)experimental Python based RTL simulator (pycocotb.basic_hdl_simulator)some examples in testsused inHWT, many example hardware tests can be found inhwtLibSimilar softwarecocotb- there is also WIP version of cocotb-verilator integrationcocotb-coverage- Functional Coverage and Constrained Randomization Extensions for Cocotbchisel-testersfiresimfli- using ModelSim Foreign Language Interface for c – VHDLkratos- hardware generator/simulatormidaspy-hpi- Python/Simulator integration using procedure callsPyVSCPython package providing a library for Verification Stimulus and Coverageuvm-python- cocotb based python UVM
Package: pycocotools
pycocotoolsThis is a fork of the originalcocoapi, with bug fixes and packaging improvements.This is also the source of the pypi packagepycocotools, available for download atpypi.Changes in this fork include:Add CircleCI testsSupport pip-installation correctlySupport windowsDon't import matplotlib unless neededClose file handle after openningFix a small bug in rleToBboxFix a segfault in RLE decodingFix deprecated usage of other librariesFor compatibility, we will not make any API changes or non-bug behavior changes to the existing APIs of the official cocoapi.Instructions for maintainers: to build a sdist package:python -m build --sdist ./PythonAPI
Package: pycocotools-stubs
pycocotools stubsUnofficial python stubs for thepycocotools package.An equivalents stubs is available ontypeshed.
This stubs are different on two points:They include the docstrings as they are otherwise not available in the IDE (as far as I know).They include numpy typing (not possible to do in typeshed).InstallationThe package is available on pypihere, you can install it with:pip install pycocotools-stubs
Package: pycoda
A python library for parsing CODA filesCode repository:http://github.com/acsone/pycodaReport bugs athttp://github.com/acsone/pycoda/issuesAuthors:Laurent Mignon (ACSONE)Changes1.1.0 (2022-05-18)github PR11:
Store the move reference and the move reference detail into separate fields
to ease reconciliation.1.0.0 (2018-09-26)Compatible python 3 (tested with 3.5)0.5 (2018-02-06)Add support for foreign account number.0.4 (2015-02-26)github ISSUE3:
Globalisation lines are considered as Normal if they are not
followed by details lines. The transaction type is now used
to detect the details lines.0.3 (2015-01-15)github PR2:
fix error in parseInformationRecord (@vparitskiy)0.2 (2014-09-15)github PR1:
bugfix in exeption msg (@vparitskiy)0.1 (2014-07-10)Initial implementation of the CODA reader
Package: pycodata
IntroductionPython wrapper around theFortran codata library.
The Fortran library does not need to be installed, the python wrapper embeds all needed dependencies.
On linux, you might have to installlibgfortranif it is not distributed with your linux distribution.InstallationSeeINSTALL.rst.DependenciesSeerequirements.txt.License informationSeeLICENSE.txt.
Package: pycodcif
A COD parser for CIF v1.1 and CIF v2.0 formatsUsagedatablocks, error_count, error_messages = parse( file, options )OptionsThe COD CIF parser is designed to detect and report the most common CIF syntax errors.
This is implemented using the extended grammar.
The behaviour of the COD CIF parser is controlled by the following options:fix_all: turns on all the following options;fix_data_header: ignores stray CIF values before the first data block and missingdata_header;fix_datablock_names: appends stray CIF values after the data block name to the data block name;fix_duplicate_tags_with_same_values: ignores two or more data items having the same value in the same data block;fix_duplicate_tags_with_empty_values: retains the value of the data item with a known value (not ‘?’ or ‘.’) if more than one data item is found in the same data block, and the rest of the values of the data item are unknown;fix_string_quotes: puts more than one unquoted values following a non-loop data item in quotes;allow_uqstring_brackets: puts unquoted strings starting with opening square bracket ([) in single quotes;fix_ctrl_z: removes ^Z symbols;fix_non_ascii_symbols: encodes non-ASCII symbols using numeric character references;fix_missing_closing_double_quote: inserts an appropriate quote where a missing single or double closing quote is detected.Usage example:parse( file, { ‘fix_data_header’ : 1 } )All other options are turned on/off likewise.Data structureThe data blocks of parsed CIF files are stored in associative arrays with the following keys:name(string): name of a CIF data block;tags(array): data names present in the CIF data block (in lowercase);values(associative array): keys are the values of thetagsarray, values are arrays containing values of each data item;types(associative array): keys are the values of thetagsarray, values are arrays containing lexically derived data types of each data value;precisions(associative array): keys are the values of thetagsarray, values are arrays containing standard uncertainties for each data item;loops(array of arrays): each inner array corresponds to a loop from the CIF data block and contains a list of data items present in the loop;inloop(associative array): keys are the values of thetagsarray, values correspond to indices of the outerloopsarray. It is used as an index to optimize data item-in-loop related searches;save_blocks(array of associative arrays): list of CIF save frames, where every frame is represented using a data structure identical to a CIF data block;cifversion(associative array): has keysmajorandminor, corresponding to the major and minor versions of CIF format, currently 1.1 or 2.0.Further readingMerkys, A., Vaitkus, A., Butkus, J., Okulič-Kazarinas, M., Kairys, V. & Gražulis, S. (2016)
“COD::CIF::Parser: an error-correcting CIF parser for the Perl language”.Journal of Applied Crystallography49.
doi:10.1107/S1600576715022396
Package: pycode128
Code128 library's python extensionPython extension for Code128 barcode generator libraryDocumentation:https://gpongelli.github.io/pycode128GitHub:https://github.com/gpongelli/pycode128PyPI:https://pypi.org/project/pycode128/Free software: MITFeaturesCode128 librarypython wrapper, included as submodule
and build when creating python extensionPoetry managed projectC code checked viacheck tool, compiled and run through pytst on all python version under Ubuntu OSMultiple OS (Linux, Windows, MacOS) and Python compilation viacibuildwhelcibuildwheel manylinux_2_28 custom imageswith pre-built python from source,
to being able to compile check against correct python versionARM-runner actioncustomimageswith pre-built python from source, to build RPI wheelsCreditsThis package was created withCookiecutterand thegpongelli/cookiecutter-pypackageproject template.
Package: pycode2seq
pycode2seqPure Python library forcode2seqembeddings.Support extension of existing pretrained code2seq embeddings to multilingual models.
We provided an example of the Java model extension with Kotlin.
Pretrained model and its usage example provided below.Installationpipinstallpycode2seqInferenceFile embeddings examplefrompycode2seqimportCode2Seqmodel=Code2Seq.load("kt_java")method_embeddings=model.methods_embeddings("File.kt")Pretrained Java and Kotlin common model will be downloaded automatically.Full functionalityimportsysfrompycode2seqimportCode2Seqdefmain(argv):model=Code2Seq.load("kt_java")# Dictionary of method names with their embeddingsmethod_embeddings=model.methods_embeddings("File.kt","kt")#Code2seq predictionspredictions=model.run_on_file(argv[1],"kt")#Predicted method namesnames=[model.prediction_to_text(prediction)forpredictioninpredictions]if__name__=="__main__":main(sys.argv)Available modelsJava (java)Kotlin (ktorkotlin)Java & Kotlin (kt_java)kt_javais compatible withjavamodel and should have the same embeddings.kotlinmodel is a part ofkt_javamodel, so they are compatible too.So you can use the commonkt_javamodel and getembeddings in one vector space for both languages.TrainingDownload astminer and run:./gradelwshadowJarMine projects for paths:pythontraining/mine_projects.py<datafolder><outputfolder><pathtoastminer'scli.sh>Combine mined paths:pythontraining/astminer_to_code2seq.py<datafolder/holdout><outputfolder><holdout>Build vocabulary with build_vocabulary.py from code2seq moduleCombine vocabularies:pythontraining/combine_vocabularies.pyExpand weights:pythontraining/expand_weights.pyUsing speedy-antlr-toolYou can usespeedy-antlrto speed up file parsing speed.Clone and installmodified example.Replace parser call with:stream=antlr4.FileStream(input_file)tree=sa_kotlin.parse(stream,"kotlinFile",sa_kotlin.SA_ErrorListener())You still need lexer to recover token values, though.Note, that to make Java parser you will need to follow speedy-antlr tutorial and make another package.Using astminer to parse filesCloneastminer fork with kotlin supportand run./gradlewshadowJarExtract methods withcli.sharguments and usage can be found intraining/mine_projects.py.Pass path to folder with csvs torun_model_on_astminer_csv().