Saravanan666/pypi-org huggingface dataset:
Package: caio
WarningNative Linux aio implementation supports since 4.18 kernel version.Python bindings for Linux AIO API and simple asyncio wrapper.ExampleimportasynciofromcaioimportAsyncioContextloop=asyncio.get_event_loop()asyncdefmain():# max_requests=128 by defaultctx=AsyncioContext(max_requests=128)withopen("test.file","wb+")asfp:fd=fp.fileno()# Execute one write operationawaitctx.write(b"Hello world",fd,offset=0)# Execute one read operationprint(awaitctx.read(32,fd,offset=0))# Execute one fdsync operationawaitctx.fdsync(fd)op1=ctx.write(b"Hello from ",fd,offset=0)op2=ctx.write(b"async world",fd,offset=11)awaitasyncio.gather(op1,op2)print(awaitctx.read(32,fd,offset=0))# Hello from async worldloop.run_until_complete(main())TroubleshootingThelinuximplementation works normal for modern linux kernel versions
and file systems. So you may have problems specific for your environment.
It’s not a bug and might be resolved some ways:Upgrade the kernelUse compatible file systemUse threads based or pure python implementation.The caio since version 0.7.0 contains some ways to do this.1. In runtime use the environment variableCAIO_IMPLwith
possible values:linux- use native linux kernels aio mechanismthread- use thread based implementation written in Cpython- use pure python implementation2.  Filedefault_implementationlocated near__init__.pyin caio
installation path. It’s useful for distros package maintainers. This file
might contains comments (lines starts with#symbol) and the first line
should be one oflinuxthreadorpython.Previous versions allows direct import of the target implementation.
Package: caipirinha-cmdtools
Caipirinha Command ToolsCollection of command-line toolsFree software: MIT licenseDocumentation:https://caipirinha-cmdtools.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-11-12)First release on PyPI.
Package: caipyrinha
Abstraction layer over argparse.Caipyrinha added 2 methods to argparse.ArgumentParser,callbackandparse_wc. Also a Caipyrinha instance is callable and is  equal to useparse_wcmethod.Example of use:# ex.pyimportcaipyrinhaparser=caipyrinha.Caipyrinha(prog="Your Program")parser.add_argument("--version",action='version',version="%(prog)s0.1")@parser.callback(exit=0,exclusive="group1")deffirst(flags,returns):'''Execute this option and exit'''print"bye bye"@parser.callback(action="store")defsecond(flags,returns):'''set his own return value with his parameter'''returnflags.second@parser.callback("--third",exclusive="group1")defno_used_name(flags,returns):'''you cant use this argument with first'''printreturns.secondimportsysparser(sys.argv[1:])Usage$ python ex.py --help
usage: Your Program [-h] [--version] [--first] [--second SECOND] [--third]

optional arguments:
  -h, --help       show this help message and exit
  --version        show program's version number and exit
  --first          Execute this option and exit
  --second SECOND  set his own return value with his parameter
  --third          you cant use this argument with first
$ python ex.py --first
bye bye
$ python ex.py --first --second "hello from second"
bye bye
$ python ex.py --first --second "hello from second" --third
usage: Your Program [-h] [--version] [--first] [--second SECOND] [--third]
Your Program: error: argument --third: not allowed with argument --first
$ python ex.py --second "hello from second" --third
hello from second
Package: caireCovid
caireCovid systemKaggle system for covid 19requirementstensorflow(-gpu)==1.13.1InstallYou can use our package by install withpippip install caireCovidQuestion Answering SystemIn this system, we build QA modules by a ensemble of two QA models, which areBioBERTmodel which fine-tuned on SQuAD, and MRQA model which is our submission to MRQA@EMNLP 2019.The MRQA model and the exported BioBERT model that are utilized in this project can bo downloaded by thislink.If you want to use our MRQA model in your work, please cite the following paper. The bibtex is listed below:@inproceedings{su2019generalizing,
  title={Generalizing Question Answering System with Pre-trained Language Model Fine-tuning},
  author={Su, Dan and Xu, Yan and Winata, Genta Indra and Xu, Peng and Kim, Hyeondey and Liu, Zihan and Fung, Pascale},
  booktitle={Proceedings of the 2nd Workshop on Machine Reading for Question Answering},
  pages={203--211},
  year={2019}
}
Package: cairocffi
cairocffi is aCFFI-based drop-in replacement forPycairo,
a set of Python bindings and object-oriented API forcairo.
Cairo is a 2D vector graphics library with support for multiple backends
including image buffers, PNG, PostScript, PDF, and SVG file output.Additionally, thecairocffi.pixbufmodule usesGDK-PixBufto decode various image formats for use in cairo.Free software: BSD licenseFor Python 3.7+, tested on CPython and PyPyDocumentation:https://doc.courtbouillon.org/cairocffi/Changelog:https://doc.courtbouillon.org/cairocffi/stable/changelog.htmlCode, issues, tests:https://github.com/Kozea/cairocffiCode of conduct:https://www.courtbouillon.org/code-of-conductProfessional support:https://www.courtbouillon.orgDonation:https://opencollective.com/courtbouillonAPI partially compatible with Pycairo.Works with any version of cairo.cairocffi has been created and developed by Kozea (https://kozea.fr).
Professional support, maintenance and community management is provided by
CourtBouillon (https://www.courtbouillon.org).Copyrights are retained by their contributors, no copyright assignment is
required to contribute to cairocffi. Unless explicitly stated otherwise, any
contribution intentionally submitted for inclusion is licensed under the BSD
3-clause license, without any additional terms or conditions. For full
authorship information, see the version control history.
Package: cairocffi-stubs
cairocffi-stubsThis package contains type stubs to provide more precise static types and type inference for cairocffi.Installationpip install cairocffi-stubsUsagefromioimportBytesIOimportcairocffiascairoimportmatplotlib.pyplotaspltsurface=cairo.ImageSurface(cairo.FORMAT_ARGB32,300,200)context=cairo.Context(surface)context.show_text('Hello World!')img=BytesIO(surface.write_to_png())# overloadedplt.imshow(plt.imread(img))plt.show()Static type checker can correctly recognize the return type ofsurface.write_to_png()asbyteswhen passing no arguments. No type errors will be raised.Style GuidelinesFollow the same style guidelines astypeshed.
Package: cairo-glyph
glyphA proof-of-concept package manager for Cairo contracts/libraries. Distribution through pypi. Installation through existing package managers -- pip, pipenv, poetry.Intended to be a lightweight layer on top of existing python package management. Sole responsibility is collecting contracts/libraries registered to thecontractsnamespace package, and copying their contents to a newcontracts/libfolder.Usage$ glyph --help
Usage: glyph [OPTIONS] COMMAND [ARGS]...

  A proof-of-concept package manager for Cairo.

Options:
  --install-completion  Install completion for the current shell.
  --show-completion     Show completion for the current shell, to copy it or
                        customize the installation.
  --help                Show this message and exit.

Commands:
  clean  Remove everything in the lib directory
  use    Install one or all added cairo packages in the projectUse all libraries installed to the venv:$ glyph use --all
🔎 Discovering installed contracts...

 • Using contracts.placeholder

✅ Done.TODO: add real example from pypiLibrary SetupIn order to allow your contracts to be installed, a few conventions must be followed.contracts                # The "namespace package" that the contracts are installed to
└── placeholder          # The library you are distributing
    ├── contract.cairo
    └── __init__.py      # Required to be installable.
setup.py                 # The installerThe actualsetup.pywill look something like this:fromsetuptoolsimportsetupsetup(name="placeholder",version="1",description="",long_description="",author="Jane Doe",author_email="author@example.com",license="MIT License",packages=["contracts.placeholder"],# Include all extra package data. Possible to include *.cairo onlypackage_data={"":["*"]},zip_safe=False,)Once distributed on pypi, one could:(venv) $ pip install cairo-glyph cairo-placeholder
...
(venv) $ glyph use placeholder
🔎 Discovering installed contracts...

 • Using contracts.placeholder

✅ Done.Adding the following to your project:contracts/
└── libs
    └── placeholder
        └── contract.cairo
Package: cairo-kernel
cairo_jupytercairo_jupyterhosts notebooks and code for cairo-kernel its a simple Jupyter kernel for Cairo a smart contract programing language for STARKs.Hosted on binder:Project managenemt:KanbanInstallationInstall virtualenvvirtualenv -p python3.8 venv
source venv/bin/activateTo installcairo_kernel:# Upgrade to latest version of setuptools and wheel
pip install -U setuptools
pip install -U wheel
pip install cairo-kernelUsing the KernelCairo exampleis a working example of the notebook.Notebook: TheNewmenu in the notebook should show an option for an Cairo notebook.Console frontends: To use it with the console frontends, add--kernel cairoto
their command line arguments.Running the kernel on notebookStart the notebookjupyter notebookStart cairo kernel via UIDevelopmentClone & enter the repo.git clone https://github.com/ankitchiplunkar/cairo-jupyter.gitInstall required libraries.pip install -r requirements.txtInstall the cairo-jupyter library locally:pip install -e .
    python -m cairo_kernel.install
Package: cairo-lang
IntroductionCairois a programming language for writing provable programs.DocumentationThe Cairo documentation consists of two parts: "Hello Cairo" and "How Cairo Works?".
Both parts can be found inhttps://cairo-lang.org/docs/.We recommend starting fromSetting up the environment.Installation instructionsYou should be able to download the python package zip file directly fromgithuband install it usingpip.
SeeSetting up the environment.However, if you want to build it yourself, you can build it from the git repository.
It is recommended to run the build inside a docker (as explained below),
since it guarantees that all the dependencies
are installed. Alternatively, you can try following the commands in thedocker file.Building using the dockerfileNote: This section is relevant only if you wish to build the Cairo python-package yourself,
rather than downloading it.The root directory holds a dedicated Dockerfile, which automatically builds the package and runs
the unit tests on a simulated Ubuntu 18.04 environment.
You should have docker installed (seehttps://docs.docker.com/get-docker/).Clone the repository and initialize the git submodules using:>gitclonegit@github.com:starkware-libs/cairo-lang.git
>cdcairo-langBuild the docker image:>dockerbuild--tagcairo.If everything works, you should seeSuccessfullytaggedcairo:latestOnce the docker image is built, you can fetch the python package zip file using:>container_id=$(dockercreatecairo)>dockercp${container_id}:/app/cairo-lang-0.13.0.zip.
>dockerrm-v${container_id}
Package: cairo-math-64x61
Cairo Math 64x61A fixed point 64.61 math library for Cairo & Starknet.UsageInstall withpip install cairo_math_64x61and import and use withfrom cairo_math_64x61.math64x61 import Math64x61. Previous installation as an npm module has been deprecated, the last available npm module isv1.2.0. Starting withv2.0.0the library utilizes Cairo 0.10 syntax and simplifies return values from objects to simple felts wherever possible.Signed 64.61 Fixed Point NumbersA signed 64.61-bit fixed point number is a fraction in which the numerator is a signed 125-bit integer and the denominator is 2^61. Since the denominator stays the same there is no need to store it (as in a floating point value).64.61 is utilized as the 125 bit representation allows for overflow up to 2^125 * 2^125 (250 bits) during calculation taking advantage of Cairo's 251 bit felts.Can represent values in the range of -2^64 to 2^64 with precision to 4.34e-19.Standard LibraryMath64x61includes implementation ofadd,sub,mul,div,sqrt,exp,ln,log2,log10, andpowas well as conversion to / from felts and Uint256 values,floor,ceil,min,maxand assertion methods.Trigonometry LibraryTrig64x61includes implementation ofsin,cos,tanand their inverses.Hyperbolic LibraryHyp64x61includes implementation ofsinh,cosh,tanh, and their inverses.Vector LibraryVec64x61includes implementation of vector arithmetic (add,sub,div), dot product (dot), cross product (cross) andnorm.
Package: cairo-nile
Disclaimer: this project is deprecated in favor ofOpenZeppelin/nile-rs, and is no longer maintained.OpenZeppelin | Nile ⛵Navigate yourStarkNetprojects written inCairo.OverviewNile is a CLI tool to develop or interact with StarkNet projects written in Cairo. It consists of different components for developing, compiling, testing, and deploying your smart contracts and dApps, providing a CLI for executing tasks, and a Runtime Environment (NRE) for scripting. The package is designed to be extensible and very customizable by using plugins.DocumentationOn ourdocumentation siteyou can find:A Quickstart walkthrough with commands examplesGuides on how to master development with NileUseful script examplesPluginsAnd more.InstallationCurrent supported Python versions are >=3.9 and <3.10.Installgmpon your machine (Cairo requirement).sudo apt install -y libgmp3-dev # linux
or
brew install gmp # macIf you have any trouble installing it on your Apple M1 computer,here’s a list of potential solutions.Create a folder for your project and cd into it:mkdir myproject && cd myprojectCreate a virtualenv and activate it:python3 -m venv env && source env/bin/activateInstall Nile:pip install cairo-nileQuickstartUsenile initto quickly set up your development environment:nile init🗄 Creating project directory tree
⛵️ Nile project ready! Try running:

nile compileContributeOpenZeppelin Nile exists thanks to its contributors. There are many ways you can participate and help build high quality software. Check out thecontributionguide!LicenseNile is released under the MIT License.
Package: cairo-rand-64x61
Cairo Rand 64x61A psuedrandom and procedural generation library using 64.61 fixed point math for CairoUsageInstall withpip install cairo_rand_64x61and import and use withfrom cairo_rand_64x61.simplex import Simplex.Signed 64.61 Fixed Point NumbersThis library is heavily dependend on 64.61 bit fixed point numbers. Seehttps://github.com/influenceth/cairo-math-64x61for more information.Simplex LibrarySimplexincludes an implementation of a three-dimensional simplex noise based on the GLSL implementation found here:https://github.com/ashima/webgl-noise/blob/master/src/noise3D.glsl. It is tested against output of the GLSL library. Keep in mind that in many cases the GLSL implementation will be run on GPUs using medium precision which will lead to errors with large input values forx, y, z. This cairo library doesNOTattempt to mimic this error (this error will also disappear if using high precision on GPU).ExtensibilityThis library strives to adhere to the OpenZeppelin extensibility pattern:https://docs.openzeppelin.com/contracts-cairo/0.2.1/extensibility#libraries
Package: cairotest
TheCairo smart test suiteAuthor: Jamie GabbayWhat is this?This repository containscairotest; an automated unit- and property-based test suite for theCairo programming languagebased onpytestandHypothesis.I am pleased to share this with the Cairo community, and feedback and suggestions are welcome.How to use Cairo test suiteInstallJust usepipin the usual way.  For example on a Linux environment this should work:pip3 cairotestExamplesA short tutorial ishere.For more robust usage see thecairo-integer-typeslibrary.  See any file whose name begins withtest_, as intest_biguint.pyortest_uint125.py.Install CairoPresumably if you're interested incairotestthen you have Cairo installed, but just in case ...Official Cairo install instructions are hereandmy personal setup script is belowWhy do we need a Cairo test framework?Seriously?  You do!Seethis repofor usage examples.My setupThis is what I type to get set up and running with a Cairo development environment on a fresh machine running Debian linux (Ubuntu flavour).  Help yourself (but don't blame me if something goes wrong):# Make sure the ambient Debian OS is up-to-date
sudo apt update
sudo apt upgrade

# Cairo is developed on Python 3.7 so let's get that.
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev wget libbz2-dev libgmp-dev
# Download Python 3.7 and cd into directory
wget https://www.python.org/ftp/python/3.7.13/Python-3.7.13.tgz
tar xvzf Python-3.7.13.tgz
cd Python-3.7.13
# Configure compilation
./configure --enable-optimizations
# Make (8 core system)
make -j 8
# Install
# IMPORTANT: altinstall means we don't overwrite your machine's native version of Python!
sudo make altinstall

# Create Python3.7 virtual environment
python3.7 -m venv ~/cairo_venv-3.7
# Jump into the venv
source ~/cairo_venv-3.7/bin/activate

# Install prerequisites (works for Cairo 0.8)
pip3 install jinja2 pytest pytest-reverse hypothesis cairo-lang black pytest-xdist[psutil]

# Now install cairotest
pip3 install cairotestFeedback and comments ...... are very welcome.  Thanks in advance.
Package: cairotft
cairotftcairotft is a small module for Python (3.4+) used to draw interface on
tft screen using the framebuffer interface.It’s first designed for tft screens, but cairotft can draw
interface on any framebuffer interface;
like the default /dev/fb0 on linux consoles.Licencecairotft is free software made available under a BSD license.
See LICENSE.txtFonctionnalitiessupport python 3.4 (only tested on python 3.4)support double-bufferingincluded with widgets:blick icontext marqueeincluded animation transitions formulas like mootools.Fx.Transitionsuses asyncio event loop… (more in the future)DocumentationSee the full documentation on readthedocs:http://cairotft.readthedocs.orgInstallationfrom pypicreate a virtualenv:pyvenv-3.4 ~/.virtualenvs/cairotft
source ~/.virtualenvs/cairotft/bin/activateinstall the package:pip install cairotftfrom sourcesclone the repo:git clone https://github.com/LinkCareServices/cairotft.git
cd cairotftcreate a virtualenv:pyvenv-3.4 ~/.virtualenvs/cairotft
source ~/.virtualenvs/cairotft/bin/activateinstall:python setup.py installand for development:python setup.py developand (eventually) development dependencies:pip install --upgrade -r dev-requirements.txtRunning teststestsinstall tests and developpement requirements:pip install -r dev-requirements.txton the main cairotft directory run the tests:nosetestsor with verbosity:nosetests -vNews
Package: cairo-toolkit
Cairo-toolkitA set of useful tools for cairo / starknet development.Generate / check the interfaces corresponding to your Starknet contracts.Easily order your importsInstallationpip install cairo-toolkitUsagecairo-toolkit [OPTIONS] COMMAND [ARGS]...

Options:
  --version
  --help     Show this message and exit.

Commands:
  check-interface
  generate-interface
  order-importsGenerate interfacesUsage: cairo-toolkit generate-interface [OPTIONS]

Options:
  -f, --files TEXT      File paths
  -p, --protostar       Uses `protostar.toml` to get file paths
  -d, --directory TEXT  Output directory for the interfaces. If unspecified,
                        they will be created in the same directory as the
                        contracts
  --help                Show this message and exit.Check existing interfacesUsage: cairo-toolkit check-interface [OPTIONS]

Options:
  --files TEXT          Contracts to check
  -p, --protostar       Uses `protostar.toml` to get file paths
  -d, --directory TEXT  Directory of the interfaces to check. Interfaces must
                        be named `i_<contract_name>.cairo`
  --help                Show this message and exit.Ordering imports in existing fileUsage: cairo-toolkit order-imports [OPTIONS]

Options:
  -d, --directory TEXT  Directory with cairo files to format
  -f, --files TEXT      File paths
  -i, --imports TEXT    Imports order
  --help                Show this message and exit.ExampleGenerate interfaces for the contracts incontracts/and put them ininterfaces/:find contracts/ -iname '*.cairo' -exec cairo-toolkit generate-interface --files {} \;Check the interface fortest/main.cairoagainst the interfacei_main.cairoin interfaces/:cairo-toolkit check-interface --files test/main.cairo -d interfacesOrder imports for all cairo files undertestcairo-toolkit order-imports -d testProtostarYou can use cairo-toolkit in a protostar project.
This can be paired with a github action to automatically generate the interfaces for the contracts
that specified inside theprotostar.tomlfile.
Package: cairo-type-hints
Cairo type hintsAdd type hints to your Cairo-lang files and feed the generated json files to Stark-Dot-Net code generators.Installpipinstallcairo-type-hintsExample usage:pythoncompile-cairo-type-hints\-i./src/my-awesome-contract.cairo\-o./artifacts/hints/test-hints.jsonAdding hints to structsA type hint is a comment with a colon, a space and then a type. Valid types areint,string, andaddress. For example,#: int.Type hints are added inline per member of the struct. For example:struct UserMeta:
    member index : felt #: int
    member hash : felt
    member position : Position
endMembers without a type hint will default tostringforfeltand the struct type for structs.The above Cairo-lang example outputs:[{"name":"UserMeta","members":[{"type":"int","name":"index"},{"type":"string","name":"hash"},{"type":"Position","name":"position"}],"type":"struct"}]Adding hints to functionsFunction hint comments mimic Cairo-lang function type declarations and are placed as the first statement in a function body. For example:#: (index : int, position : Position) -> (user : User)@view
func get_user_by_index {
    syscall_ptr : felt*, pedersen_ptr : HashBuiltin*,
    range_check_ptr
    } (index : felt, position : Position) -> (user : User):
    #: (index : int, position : Position) -> (user : User)
    let (hash) = users_index_to_hash.read(index)
    let (user) = get_user_by_hash(hash)
    return (user = user)
endThe above Cairo-lang example outputs:[{"name":"get_user_by_index","inputs":[{"type":"int","name":"index"},{"type":"Position","name":"position"}],"outputs":[{"type":"User","name":"user"}],"type":"function"}]DevelopmentInstall and switch to python 3.9.x$pyenvinstall3.9.9
$pyenvlocal3.9.9Create a virtual environment and activate it$python-mvenvenv
$sourcevenv/bin/activateDo some awesome work!Build and publish the package$pythonsetup.pybdist_wheelsdist
$twineuploaddist/*
Package: caispp
CaisppAboutThis package allows for high level ML model creation.  It uses Keras with a Tensorflow backend, and was originally created to be used for the curriculum of USC's CAIS++ (Center for AI in Society, Student Branch).Use CasesThe package currently supports Image Classification.InstallationTo install runpip install caispp.  This package uses Tensorflow 2.0.Example usageYou can see a jupyter notebook with ouputs in theexamples/directory.  The notebook runs the code below:from caispp import ImageDataset, ImageClassifier, Path

path = Path('example_dataset/') # Path to dataset
dataset = ImageDataset(path, show_distribution=True)

classifier = ImageClassifier(dataset)
classifier.train(epochs=10)

classifier.show_history()

classifier.test(show_distribution=True)Dataset directory structure├── example_dataset         
│   ├── test
│   │   ├── class1      # Directory with images of class1
│   │   ├── class2      # Directory with images of class2
│   │   └── ...       
│   ├── train
│   │   ├── class1      # Directory with images of class1
│   │   ├── class2      # Directory with images of class2
│   │   └── ...         
│   ├── valid           # Optional validation set    
│   │   ├── class1
│   │   ├── class2
│   │   └── ... 
└──Each of thetest/,train/, andvalid/directories contain subdirectories for each class.  In those subdirectories, put the images files of that class.Build the packageTo build the package run thebuild.shscript in the directory.  The output is stored indist/.