Saravanan666/pypi-org huggingface dataset:
Package: codecontest
How toUsed as a projectpython-mpipinstallpip-tools
pip-compile--upgrade# produces and update requirements.txtpip-sync

uvicornsrc.web:app--reload# run as web appUsed as a packagepython-mpipinstall-e.# install locallyPublish as a packagepython-mpipinstallbuildtwine

python-mbuild# build sdist(tar.gz) and bdist(wheel)twineuploaddist/*# publish to pypiReferencepip-toolshttps://realpython.com/pypi-publish-python-package/https://pybind11.readthedocs.io/en/stable/compiling.html
Package: code-contracts
code-contractsis a library that provides:ContractsFunctions that impose requirements when entering a function or method - also commonly calledpreconditions.AssertionsFunctions that impose requirements in the body of a function or method. This is not a complete suite of assertions;
instead, they are meant to be complementary to those available inunittest.TestCase.The goal of this library is not to make Python a statically-typed language. Instead, it aims to help you define what
is expected from your code before it executes, so that you can more easily track and prevent bugs.So here’s how you can use contracts:fromcontractsimportcontractdefbuild_rocket(name,model,company):contract.is_not_empty(name)contract.is_greater_than(model,0)contract.is_not_empty(company)print("You built a{0}{1}rocket from{2}.".format(name,model,company))if__name__=="__main__":build_rocket("Falcon",9,"SpaceX")And here’s how you can use assertions to unit test the above function:importunittestfromcontractsimportassertionclassRocketTests(unittest.TestCase):deftest_build_rocket(self):assertion.does_not_raise(ValueError,build_rocket,"Falcon",9,"SpaceX")code-contractsofficially supports Python 3.3 and onwards.InstallationSimply run the following command in your favorite terminal:$pipinstallcode-contractsDocumentationThe full documentation is available athttp://contracts.readthedocs.io/.
Package: codecov-validator
DescriptionValidates thecodecov.ymlconfiguration file.This package is simply thecurlcommand described in thecodecov documentationconverted to python.This package was inspired bygitlab-lint, package that checks.gitlab-ci.ymlconfiguration file.UsageThe recommended use is to add in the.pre-commit-config.yamlfile- repo: https://github.com/mashi/codecov-validator
  rev: v1.0.0  # replace by any tag version >= 1.0.0 available
  hooks:
    - id: ccv
      # args: [--filename, .codecov.yml]  # example with argumentsIn this way, thecodecov.ymlfile is checked beforecommitand prevents the user
from including invalid files in the version control.Instructions (Development)Create a virtual environment and install the required packages withpython3 -m venv .venv
source .venv/bin/activate
pip install wheel
pip install -r requirements.txt
pre-commit install
Package: codecraft
CodeCraftAI code assistant to help you write code faster, cover it with tests and moreGetting startedcdpath/to/your/project
pipinstallcodecraftexportOPENAI_API_KEY=your-key-goes-hereUsageOnce installed, codecraft can be run through its command-line interface.Command-line InterfaceRun a codecraft session using the following command:codecraftOptional Arguments:-q or --query: Run with a specific query.-c or --coverage: Run with coverage analysis.codecraft--query"Your query here"codecraft--coverageRequirementspython: 3.10+First runOn the first runcodecraftcreate folder.codecraft/promptswith main prompts so you can tune prompts for your projectAlsocodecraftwill add.codecraftto.gitignorefile - not to use prompts in GITEnvsCODECRAFT_MODEL_NAMEModel name in OpenAI API to useOPENAI_API_KEYAPI key for OpenAI APICODECRAFT_COV_FOLDERFolder to use in coverage report (default:.)ContributingContributions tocodecraftare welcome! Please read our contributing guidelines for details on how to submit pull requestsClone repositorygitclone...Install dependenciespoetryinstallUse with your projectcdpath/to/your/project
pipinstall-epath/to/cloned/codecraft
codecraftLicensecodecraftis licensed under MIT LicenseContactFor any queries or suggestions, feel free to contact us at [hello@welltory.com]
Package: code-creator
code-creator (cc)(A Short) DescriptionA package to generate python-code at python-run-timecan be used for:generation of large mathematical modelsdynamization of python coderesolving function chainsembedding into algorithmic differentiationGetting StartedInstallation... via pip from PYPI (python package index)pipinstallcode-creator... or locally (using pip)gitclonehttps://gitlab.com/berlinade/code-creator.gitcdcode-creator
pipinstall-e.Usage...under constructionDocumentation... can be found here (under construction):https://berlinade.gitlab.io/code-creator/Find code-creator@ GitLab:https://gitlab.com/berlinade/code-creator@ PYPI:https://pypi.org/project/code-creator/author:codima on youtube.com(Informal Info on) Licensethis version of the "polynom" has been published under GPLv3 (seeLICENSE).Alternative Licenses are negotiable.
Package: codecrumbs
codecrumbsCodecrumbs is a Python library (and pytest plugin) for source code refactoring across library boundaries.
It allows you to change the API of your library and to propagate this changes to every one who uses your library.More can be found in thedocumentation.ExampleSimple example which renames one argument:classExample:# old code ...# def method(self,v):#    print(v)@renamed_argument("v","value")defmethod(self,value):print(value)# some where elsee=Example()e.method(v=5)and apply the refactoring later# if you have a standalone scriptcodecrumbsexample.py# or if you have testspytest--codecrumbs-fixtest_example.pywhich will rename the argumente.method(value=5)You can usecodecrumbsinstead ofpythonto execute your code, orpytestto run your tests and apply the renamings automatically.This can be used to fix the small things in your library you wanted to fix but never did,
because you wanted to stay backwards compatible or didn't wanted you user to fix 1000 renamings in their code.InstallationYou can installcodecrumbsviapipfromPyPI:pip install codecrumbsThe pytest support comes out of the box and everyone who depends on your library can usepytest --codecrumbs-fixto apply the changes you declared.FeaturesWith codecrumbs you can fix:method / attribute namesrename named arguments of functionsContributingContributions are very welcome. Tests can be run withtox, please ensure
the coverage at least stays the same before you submit a pull request.IssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.LicenseDistributed under the terms of theMITlicense, "pytest-codecrumbs" is free and open source software
Package: code-crypt
[![CircleCI](https://circleci.com/gh/Nextdoor/code-crypt.svg)](https://circleci.com/gh/Nextdoor/code-crypt)# Code CryptCode Crypt provides a simple Python library and command line interface tomanage your application secrets within a project repository. Master keys aremanaged externally by the AWS Key Management Service (KMS), which performenvelope encryption on a RSA private key used for decrypts on individualsecrets within a particular environment context. Encrypted secrets are keptas binary files within the project folder using hybrid RSA-AES cryptopgraphy.It supports Python 2.6 or newer and all Python 3 versions.## Features- Self-serve for project contributors- Scalable for a large amount of secrets (1 KMS API call to decrypt all secrets)- CRUD operations on a per-secret basis- Environment contexts (development, staging, production)## Initialize ProjectWe have a project `my_project` that we'd like to initialize with 3 differentenvironment contexts (`development`, `staging` and `production`) with their ownKMS master keys.$ APP_ROOT=/Users/bob/my_project code-crypt --env development --init --kms-key-id aaaaaaaa-bbbb-cccc-dddd-123456111111$ APP_ROOT=/Users/bob/my_project code-crypt --env staging --init --kms-key-id eeeeeeee-ffff-gggg-hhhh-123456222222$ APP_ROOT=/Users/bob/my_project code-crypt --env production --init --kms-key-id iiiiiiii-jjjj-kkkk-llll-123456333333This will initialize the project folder with a data directory of the followingstructure:$ pwd/Users/bob/my_project$ tree.└── code_crypt└── data├── keys│   ├── development│   │   ├── encrypted_private_key.pem│   │   └── public_key.asc│   ├── production│   │   ├── encrypted_private_key.pem│   │   └── public_key.asc│   └── staging│       ├── encrypted_private_key.pem│       └── public_key.asc└── secrets├── development├── production└── staging(Note: `--env` defaults to `development` and won't be explicitly used in thisguide going forward.)## Encrypt SecretsSingle secrets can be encrypted with `--encrypt` option.$ APP_ROOT=/Users/bob/my_project code-crypt --encrypt SOME_SECRET='a1b2c3'In this case an encrypted binary file would be created at`code_crypt/data/secrets/development/SOME_SECRET.bin`.## Decrypt Secrets (CLI)Single secrets can be decrypted with `--decrypt` option which returns aplaintext value.$ APP_ROOT=/Users/bob/my_project code-crypt --decrypt SOME_SECRETa1b2c3Multiple secrets can be decrypted with the `--decrypt-all` option which returnsa JSON stringof key-value pairs.$ APP_ROOT=/Users/bob/my_project code-crypt --decrypt-all{"SOME_SECRET": "a1b2c3"}## Decrypt Secrets (Application)Prerequisite: Grant your application run-time authentication to its environment's respectiveKMS master key.Create a Code Crypt object and run the `decrypt()` function.from code_crypt import core as code_cryptCC = code_crypt.CodeCrypt(app_root=MY_APP_ROOT, env=MY_ENV)CC_SECRETS = CC.decrypt()The resulting `CC_SECRETS` object is a dict of decrypted secret key-value pairs.# Developer SetupIf you are interested in working on the codebase, setting up your developmentenvironment is quick and easy.$ virtualenv .venv$ source .venv/bin/activate$ pip install -r requirements.txt
Package: codecs7z
codecs7za (light) binding for 7-zip codecs.For now Deflate/Deflate64/BZip2 are covered.caveatsLZMA/PPMd are not covered as they are not self-contained format (decoding OPTIONs have to be specified and SetDecoderProperties2 even looks implementation-specific), hence not covered. For PPMd, usepyppmd.Deflate(64) decompressors have to be flushed, hence decompression is incompatible with zipfile. For Deflate64 decompression, usezipfile-deflate64.tested versionsPython 2.7Python 3.9PyPy [2.7] 7.3.3PyPy [3.7] 7.3.5For PyPy2, pip needs to be 20.1.x cfhttps://github.com/pypa/pip/issues/8653PyPy needs to be 7.3.1+ cfhttps://github.com/pybind/pybind11/issues/2436Pyston [3.8] 2.3Windows installationOn Python <3.5 you need to switch src/p7zip submodule tag to build Windows wheel and sdist installation is not supported, sofor http-direct-install you need to use binary wheel.
Package: codec-social-network
Uses a codec that every social network accepts$pipinstallcodec-social-networkfromcodec_social_networkimportconvert_vid# If you are having problems uploading your videos to social networks,# use this function to convert them. The codec works with every social network# folders will be created if they don't exist# ffmpeg must be installedconvert_vid(r"F:\newvidxx2.mp4",r"F:\convertedvideossocialnet\newvidxx2.mp4")
Package: codectrl
codeCTRL (python)A python library for thecodeCTRLlogger.Thecodectrl.logfunction collects and formats information about
the file/function/line of code it got called on and sends it to
the codeCTRL server, if available.Installationpippip install codectrlManual install (linux & MacOS)Clone the repository:git clone https://github.com/pwnCTRL/codectrl-python-logger.git
cd codectrl-python-loggerBuild the package:python3 setup.py buildInstall the package.
Depending on your python install this may require root privileges.(sudo) python3 setup.py installUsageMake sure you have thecodeCTRLapplication running.Anywhere in a python codebase you can insertcodectrl.log()to print logs to the codeCTRL app.The function takes any number of arbitrary positional
and keyword arguments.All positional arguments get included in the logmessageusingstr()orjson.dumps(obj, indent=4)in case of dicts.Keyword arguments, other than "reserved" ones, get appended
to the logs as {key}={value}Reserved arguments:host:
By default set to127.0.0.1, this argument holds the address of the codeCTRL server.port:
By default set to3001, this is the port the codeCTRL server should be contacted at.surround:
By default3, this argument specifies the number of lines of code that should be displayed around the call tocodectrl.log.
Package: coded
CodedCoded is a programming language and Python extension designed to make programming just a little bit easier.With Coded, you can easily build projects - no matter how complex.Our libraries allow you to create whatever you can imagine, with just a few lines of code.DocumentationView the full documentationCurrent features:write()writeline()prompt()clear()rand()readf()writef()rm()rmdir()syscmd()delay()request_get()request_get_cookies()request_post()request_post_content()request_post_cookies()getenv()setenv()get_working_dir()hash_sha512()hash_sha256()hash_sha384()hash_sha224()hash_sha1()hash_md5()USERNAME(property)PID(property)UID(property)OS_TYPE(property)true(property)false(property)envs(property)pypath(property)Colour(class)Colour()(constructor)Colour.RED(property)Colour.GREEN(property)Colour.BLUE(property)Colour.YELLOW(property)Colour.CYAN(property)Colour.MAGENTA(property)Colour.hex_to_rgb()Colour.rgb_to_hexColour.str()Colour.eq()Ansi(class)Ansi.RESET(property)Ansi.FBLACK(property)Ansi.BBLACK(property)Ansi.RESET(property)Ansi.FBLACK(property)Ansi.BBLACK(property)Ansi.FRED(property)Ansi.BRED(property)Ansi.FGREEN(property)Ansi.BGREEN(property)Ansi.FBLUE(property)Ansi.BBLUE(property)Ansi.FYELLOW(property)Ansi.BYELLOW(property)Ansi.FCYAN(property)Ansi.BCYAN(property)Ansi.FMAGENTA(property)Ansi.BMAGENTA(property)Ansi.FWHITE(property)Ansi.BWHITE(property)Ansi.FLBLACK(property)Ansi.BLBLACK(property)Ansi.FLRED(property)Ansi.BLRED(property)Ansi.FLGREEN(property)Ansi.BLGREEN(property)Ansi.FLBLUE(property)Ansi.BLBLUE(property)Ansi.FLYELLOW(property)Ansi.BLYELLOW(property)Ansi.FLCYAN(property)Ansi.BLCYAN(property)Ansi.FLMAGENTA(property)Ansi.BLMAGENTA(property)Ansi.FLWHITE(property)Ansi.BLWHITE(property)Window(class)Window(constructor)Window.run()Window.quit_window()Window.event()Window.keydown()Window.keyup()Window.mousedown()Window.mouseup()Window.mousex()Window.mousey()Window.mousepos()Window.keys_pressed()Window.key_is_down()Time(class)Time()(constructor)Time.convert_time()Time.get_real_time()And MANY more!Changelog1.1:Created basic project structureCreated CodedAddedwrite1.2:Addedwriteline1.3:AddedpromptReconfigured program structureRemoved submodules (e.g.console.writeis now justwrite)Added changelogAdded project descriptionAdded documentation linkFixedwritelinetuple bug1.4:UseosmoduleAddedclearAddedcurrent featuresview.1.5:Added function documentation inlineHandles exceptions inpromptAll newer minor versions:Bug fixesNew featuresView full changelog
Package: codedapertures
CodedApertures is a python package that allows one to easily generate and display common coded aperture patterns. Coded apertures are a spatial encoding technique for straight-line optics, wherein traditional lensing (e.g., visible light) is not possible. Even wherein tradiational lensing is possible, there may be other advantages (infinite depth of field). Coded apertures may therefore be used for hard x-ray and gamma-ray imaging for astrophysics, medical imaging, and homeland security applications.
Package: code-data-share
IntroductionThe main goal of code-data-share-for-python is to improve the efficiency
of importing python module, including time and memory footprint,
by persistence of code object of imported modules
with a memory-mapped file.For more information not included in this README,
e.g. detailed user and developer guide, performance results,
please refer to ourwiki page.Basic Usagecode-data-share-for-python provides mechanism to
determine imported packages,
dump a memory mapped file from the list of packages
and import packages directly from the memory mapped file.Installpip install code-data-shareDetermine the imported packages# tracer: list imported packages to mod.lst
PYCDSMODE=TRACE PYCDSLIST=mod.lst python -c 'import json'Create the memory-mapped file# dumper: create archive named mod.img from mod.lst
python -c 'import cds.dump; cds.dump.run_dump("mod.lst", "mod.img")'Import packages from archive# replayer
PYCDSMODE=SHARE PYCDSARCHIVE=mod.img python -c 'import json'AppCDS in JavaThe design is inspired by the Application Class-Data Sharing (AppCDS) feature,
introduced in OpenJDK.
AppCDS allows a set of application classes to be pre-processed into a shared archive file,
which can then be memory-mapped at runtime to reduce startup time and memory footprint.
Package: code-data-share-for-python
IntroductionThe main goal of code-data-share-for-python is to improve the efficiency
of importing python module, including time and memory footprint.The design is inspired by the Application Class-Data Sharing (AppCDS) feature,
introduced in OpenJDK.
AppCDS allows a set of application classes to be pre-processed into a shared archive file,
which can then be memory-mapped at runtime to reduce startup time and memory footprint.code-data-share-for-python use memory mapping to store and share data likely to not change.
Detail design and implementation will be elaborate below.Design & ImplementationWIPTestingSeedocs/TESTING.rst
Package: codedeploy_monitor
CodeDeployMonitor is a little tool that can create new deployments forAWS CodeDeploy,
and monitor them for successful completion. It also has amonitor-onlymode, in case you create
deployments via another tool (aws-cli, for example).CodeDeployMonitor use theboto3library.** This program is currently in pre-alpha state, so be aware of bugs.**InstallationCodeDeployMonitor can easily be installed withpip:# Make sure we have an up-to-date version of pip and setuptools:$pipinstall--upgradepipsetuptools$pipinstallcodedeploy-monitorUsageCodeDeployMonitor tries to mimic theaws-clicommand-line parameters as close as possible. Both deployments from S3 and GitHub are supported.To create and monitor a new deployment:$codedeploy_monitorcreate-deployment--application-namemy-app--deployment-groupmy-group--s3-locationbucket=my-bucket,key=releases/myapp.tgz,bundleType=tgzTo monitor an existing deployment:$codedeploy_monitormonitor-deploymentd-xxxxxxxxxUse the following commands to see a list of all command-line options:$codedeploy_monitorcreate-deployment--help$codedeploy_monitormonitor-deployment--helpLicenseThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3 as published by
the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program.
Package: codedepth
codedepthGenerates and graphs how many levels of imports are needed for each file in a projectSupported LanguagesPython 🟢Lua 🟢JavaScript 🟡 (Some styles of import statement may not be detected as a dependency)DependenciesYou will need Graphviz v2.48.0 installed as an application - installation instructions can be found athttps://graphviz.org/download/QuickstartFrom the command line (this will use default parameters and output a ranked directional graph as a PDF):> python -m codedepth <path of the target directory>The PDF will be generated in the working directory.
If<path of the target directory>is omitted, the working directory will be used as the target.In a python script:fromcodedepthimportScorerscorer=Scorer(r"<path of the target directory>")# Replace this path string with your own# Calculates scores for all files in the target directoryscorer.parse_all()"""Generates a PDF saved in the working directory,containing a ranked directional graph of the file dependencies for the target directory.Once this is generated, it will be opened automatically.Also generates and saves a file containing the DOT code required to create the graph"""scorer.plot_ranked()
Package: code-diff
Code DiffFast AST based code differencing in PythonSoftware projects are constantly evolving to integrate new features or improve existing implementations. To keep track of this progress, it becomes important to track individual code changes. Code differencing provides a way
to identify the smallest code change between two
implementations.code.diffprovides a fast alternative to standard code differencing techniques with a focus
on AST based code differencing. As part of this library, we include a fast reimplementation of theGumTreealgorithm. However, by relying on
a best-effort AST parser, we are able to generate
AST code changes for individual code snippets. Many
programming languages including Python, Java and JavaScript are supported!InstallationThe package is tested under Python 3. It can be installed via:pip install code-diffUsagecode.diff can compute a code difference for nearly any program code in a few lines of code:importcode_diffascd# Pythonoutput=cd.difference('''def my_func():print("Hello World")''','''def say_helloworld():print("Hello World")''',lang="python")# Output: my_func -> say_helloworldoutput.edit_script()# Output:# [#  Update((identifier:my_func, line 1:12 - 1:19), say_helloworld)#]# Javaoutput=cd.difference('''int x = x + 1;''','''int x = x / 2;''',lang="java")# Output: x + 1 -> x / 2output.edit_script()# Output: [#  Insert(/:/, (binary_operator, line 0:4 - 0:9), 1),#  Update((integer:1, line 0:8 - 0:9), 2),#  Delete((+:+, line 0:6 - 0:7))#]Language supportcode.diff supports most programming languages
where an AST can be computed. To parse an AST,
the underlying parser employscode.tokenize:A frontend for
tree-sitter to effectively parse and tokenize
program code in Python.tree-sitter:A best-effort AST parser supporting
many programming languages including Python, Java and JavaScript.To decide whether your code can be handled by code.diff please review the libraries above.GumTree:To compute an edit script between a source and target AST, we employ a Python reimplementation of theGumTreealgorithm. Note however that the computed script are heavily dependent on the AST representation of the given code. Therefore, AST edit script computed with code.diff might significantly differ to the one computed by GumTree.Release history0.1.1Fix of the release informationPackage now useable by installing from PyPI0.1.0Initial functionalityDocumentationSStuB TestingProject InfoThe goal of this project is to provide developer with easy access to AST-based code differencing. This is currently developed as a helper library for internal research projects. Therefore, it will only be updated as needed.Feel free to open an issue if anything unexpected
happens.Cedric Richter-@cedricrichter-cedric.richter@uni-oldenburg.deDistributed under the MIT license. SeeLICENSEfor more information.