Saravanan666/pypi-org huggingface dataset:
Package: across-py
AcrossAcross is the fastest, cheapest and most secure cross-chain bridge. It is a system that uses UMA contracts to quickly move tokens across chains. This contains various utilities to support applications on across.How to useGet suggested fees from online APIUse across official API to get suggested fees.>>>importacross>>>a=across.AcrossAPI()>>>a.suggested_fees("0x7f5c764cbc14f9669b88837ca1490cca17c31607",10,1000000000){'slowFeePct':'43038790000000000','instantFeePct':'5197246000000000'}Fee CalculatorCalculates lp fee percentages when doing a transfer.fromacross.fee_calculatorimport(calculate_apy_from_utilization,calculate_realized_lp_fee_pct,)fromacross.utilsimporttoBNWeirate_model={"UBar":toBNWei("0.65"),"R0":toBNWei("0.00"),"R1":toBNWei("0.08"),"R2":toBNWei("1.00"),}interval={"utilA":0,"utilB":toBNWei(0.01),"apy":615384615384600,"wpy":11830749673498}apy_fee_pct=calculate_apy_from_utilization(rate_model,interval["utilA"],interval["utilB"])assertapy_fee_pct==interval["apy"]realized_lp_fee_pct=calculate_realized_lp_fee_pct(rate_model,interval["utilA"],interval["utilB"])assertrealized_lp_fee_pct==interval["wpy"]LP Fee CalculatorGet lp fee calculations by timestamp.fromacrossimportLpFeeCalculatorfromweb3importWeb3provider=Web3.WebsocketProvider("{YOUR-PROVIDER-ADDRESS}")calculator=LpFeeCalculator(provider)token_address="0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"# WETH on mainnetbridge_pool_address="0x7355Efc63Ae731f584380a9838292c7046c1e433"# WETH BridgePool on mainnetamount="1000000000000000000"# 1 ETHtimestamp=1645000000# timestamp in secondspercent=calculator.get_lp_fee_pct(token_address,bridge_pool_address,amount,timestamp)print(percent)How to build and testInstall poetry and install the dependencies:pip3installpoetry

poetryinstall# testpython-munittest# local install and testpip3installtwine
python3-mtwineupload--repositorytestpypidist/*
pip3install--index-urlhttps://test.pypi.org/simple/--no-depsacross
Package: acru-l
AWS Cloud Resource Utils - Library (ACRU-L)PronouncedAh-crew-el (ə-kroo͞′l)An open source framework for collecting and reusing AWS CDK constructs and stacks.Why?The problem with infrastructure as code ...Monorepos...
Snowflake code...Confounding application source code with devopsA strict interface and reuse patternsInstallationpoetry add -D acru-lpip install acru-lUsageCore ConceptsResources - Extended constructsServices - Collections of Resources that build a service interfaceStacks - Collections of ServicesResourcesExtended constructs with set defaultsServicesTBDStacksTBDAppsTBD
Package: acru-l-toolkit
ACRU-L ToolkitPronouncedAh-crew-el (ə-kroo͞′l)ToolkitPartner library toACRU-L.This project houses utilities that makes sense to use both in production application code (e.g. handler base classes) and in the main ACRU-L project, which is intended to only be used in development / devops enviroments.
Package: acryl-executor
Acryl ExecutorRemote execution agent used for running DataHub tasks, such as ingestion powered through the UI.python3-mvenv--upgrade-depsvenvsourcevenv/bin/activate
pip3install.NotesBy default, this library comes with a set of default task implementations:RUN_INGEST TaskSubprocessProcessIngestionTask- Executes a metadata ingestion run by spinning off a subprocess. Supports ingesting from a particular version, and with a specific plugin (based on the platform type requested)InMemoryIngestionTask- Executes a metadata ingestion run using the datahub library in the same process. Not great for production where we can see strange dependency conflicts when certain packages are executed together. Use this for testing, as it has no ability to check out a specific DataHub Metadata Ingestion plugin.
Package: acryl-iceberg-legacy
Iceberg PythonIceberg is a python library for programatic access to iceberg table metadata as well as data access. The intention is to provide a functional subset of the java library.Getting StartedIceberg python is currently in development, for development and testing purposes the best way to install the library is to perform the following steps:git clone https://github.com/apache/iceberg.git
cd iceberg/python_legacy
pip install -e .TestingTesting is done using tox. The config can be found intox.iniwithin the python directory of the iceberg project.# simply run tox from within the python dir
toxGet in TouchEmail:dev@iceberg.apache.orgIssuesFile a github incident
Package: acryo
acryoacryois an extensible cryo-EM/ET toolkit for Python.The purpose of this library is to make data analysis of cryo-EM/ET safer, efficient, reproducible and customizable for everyone.
Scientists can avoid the error-prone CLI-based data handling, such as writing out the results to the files every time and manage all the result just by the file names.📘 DocumentationInstallUse pippipinstallacryo-UFrom sourcegitclonegit+https://github.com/hanjinliu/acryo.gitcdacryo
pipinstall-e.FeaturesOut-of-core and parallel processing during subtomogram averaging/alignment to make full use of CPU.Extensible and ready-to-use alignment models.Manage subtomogram loading tasks from single or multiple tomograms in the same API.Tomogram and tilt series simulation.Masked PCA clustering.Code SnippetimportpolarsasplfromacryoimportSubtomogramLoader,Molecules# acryo objectsfromacryo.tiltimportsingle_axis# missing wedge modelfromacryo.pipeimportsoft_otsu# data input pipelines# construct a loaderloader=SubtomogramLoader.imread("path/to/tomogram.mrc",molecules=Molecules.from_csv("path/to/molecules.csv"),)# filter out bad alignment in polars wayloader_filt=loader.filter(pl.col("score")>0.7)# averagingavg=loader_filt.average(output_shape=(48,48,48))# alignmentaligned_loader=loader.align(template=avg,# use the average as templatemask=soft_otsu(sigma=2,radius=2),# apply soft-Otsu to template to make the masktilt=single_axis((-45,45),axis="y"),# range of tilt series degrees.cutoff=0.5,# lowpass filtering cutoffmax_shifts=(4,4,4),# search space limits)
Package: aCrypt
aCrypt - PythonCiphering made easy.FeaturesEncode a string into numbers using a secret keyDecode encoded strings into their original form using a secret keyGenerate a valid aCrypt keyUsageUsageParamsReturn Valuecreate_key()None: Noneint: keycipher()str: message, int: keystr: ciphereddecipher()str: message, int: keystr: decipheredExamplesLets say you have private JSON data that you need to encode:# lets imagine this is the datadata={"username":"ilovecats","password":"meow123"}Of course though, writing this un-encoded data can be very unsafe. So the only way to protect it is to cipher it.fromjsonimportdumps,loadsfromosimportgetenvdata={"username":"ilovecats","password":"meow123"}# turn the JSON into a string we can encodedata=dumps(data)# using a key we can store in our environment variables, we can cipher itencoded_data=cipher(data,os.getenv("CIPHER_KEY"))# you can also keep the key in a variable, thought this is unsafe as users can just use the key# voila! The data has been ciphered:print(encoded_data)And to decipher the data and use it, you can do the reverse:fromjsonimportdumps,loadsfromosimportgetenv# decipher the datadecoded_data=decipher(encoded_data,os.getenv("CIPHER_KEY"))# turn the string back into json datadata=loads(decoded_data)# now you can use it!print("Your username is"+data.username+"!")CreditsThank you to the repl.it community for providing such amazing services for free.Thank you to Atticus Kuhn for pointing out safety concerns on the project.Thank you to AmazingMech2418 (https://repl.it/@AmazingMech2418), for showing me the world of cryptography.Thank you StealthHydra179 (https://repl.it/@StealthHydra179), for being the only person who cared about programming in my school.Thank you Giothecoder (https://repl.it/@Giothecoder), for being there when I needed you most.Change Log0.0.1 - Cipher was added, deciphering was unfinished0.0.2 - Deciphering finished with lots of bugs0.0.3 - Atticus Kuhn pointed out a safety bug, and thus it was patched0.0.4 - Bugs fixes0.0.5 - Added Credits0.0.6 - AmazingMech2418 pointed out huge safety feature that should be added0.0.7 - Bugs fixes0.0.8 - Test Version0.0.9 - Test Version0.1.0 - Update 0.0.6 was revisited and implemented0.1.1 - Added changelog0.1.3 - Bug fixes0.1.4 - Made key generation more efficient0.1.5 - Added examples
Package: acs
NOTE: NOT FOR PRODUCTION USEPlease note these scripts are intended to allow experimentation with
Azure Container Service. They are not intended for production use.A set of convenience scripts for creating and testing ACS
clusters. These scripts can also be helpful in working out how to use
the REST API interfaces for managing applicaitons on an ACS cluster.# UsageSee the [documentation](http://rgardler.github.io/acs-cli).# Development## PrerequisitesPython 3apt-get install python[PIP](https://pip.pypa.io/en/stable/installing/)Azure CLI installed and configured to access the test subscription
* install Node and NPM
*sudo npm install azure-cli -g## PreparingTo install all libraries and development dependencies:` sudo pip install-e. sudo pip install-e.[test] `## General UseYou can useacs –helpfor basic help, or see the
[documentation](http://rgardler.github.com/acs-cli).# Developing## Adding a commandTo add a top level command representing a new feature follow the
these steps (in this example the new command is calledFoo:Add the commandfooand its description to the “Commands” section of the docstring for acs/cli.pyCopyacs/commands/command.tmpltoacs/commands/foo.py* Add the subcommands and options to the docstring of the foo.py file
* Implement each command in a method using the same name as the commandAdd foo.py import toacs/commands/__init__.pyCopytests/command/test_command.tmpltotest/command/test_foo.py* Implement the testsRun the tests withpython setup.py testand iterate as necessaryInstall the package withpython setup.py install## Adding a subcommandSubcommands are applied to commands, to add a subcommand do the following:Add the subcommand to the docstring of the relevant command class (e.g. foo.bar)Add a method with the same name as the subcommandAdd a testRun the tests withpython setup.py testand iterate as necessaryInstall the package withpython setup.py install## TestingRun tests using [py.test:](http://pytest.org/latest) and [coverage](https://pypi.python.org/pypi/pytest-cov):` python setup.py test `Note, by default this does not run the slow tests (like creating the
cluster and installing features. You must therefore first have run the full suite of tests at least once. You can do this with:` py.test--runslow`## ReleasingCut a release and publish to the [Python Package
Index](https://pypi.python.org/pypi) install install
[twine](http://pypi.python.org/pypi/twine. and then run:` python setup.py sdist bdist_wheel twine upload dist/* `This will build both a surce tarball and a wheel build, which will run
on all platforms.### Updating DocumentationTo build and pucblish the documentsation:` cd docs makegh-pagescd .. `
Package: acsaver
acfunsdk - AcSaveracfunsdk是非官方的AcFun弹幕视频网Python库。acsaver是acfunsdk的附属组件，提供内容离线保存支持。‼需要ffmpeg主要用于下载视频。建议去官网下载https://ffmpeg.org/download.html可执行文件ffmpegffprobe需要加入到环境变量，或复制到运行根目录。依赖库依赖: 包含在requirements.txt中acfunsdk>=0.9.5下载及html页面渲染:filetype>=1.1jinja2>=3.1pillow>=9.1命令行及输出控制:rich>=12.5click>=8.1内置+修改: 位于utils文件夹内ffmpeg_progress_yieldAbout Me♂ 整点大香蕉🍌
Package: acsets
PyACSetsA Catlab-compatible implementation of acsets in python.Included also is an AlgebraicJulia-compatible implementation of petri nets.🚀 InstallationThe most recent code and data can be installed directly from GitHub with:$pipinstallgit+https://github.com/AlgebraicJulia/py-acsets.git👐 ContributingContributions, whether filing an issue, making a pull request, or forking, are appreciated. SeeCONTRIBUTING.mdfor more information on getting involved.👋 Attribution⚖️ LicenseThe code in this package is licensed under the MIT License.🍪 CookiecutterThis package was created with@audreyfeldroy'scookiecutterpackage using@cthoyt'scookiecutter-snekpacktemplate.🛠️ For DevelopersSee developer instructionsThe final section of the README is for if you want to get involved by making a code contribution.Development InstallationTo install in development mode, use the following:$gitclonegit+https://github.com/AlgebraicJulia/py-acsets.git
$cdpy-acsets
$pipinstall-e.🥼 TestingAfter cloning the repository and installingtoxwithpip install tox, the unit tests in thetests/folder can be
run reproducibly with:$toxAdditionally, these tests are automatically re-run with each commit in aGitHub Action.📖 Building the DocumentationThe documentation can be built locally using the following:$gitclonegit+https://github.com/AlgebraicJulia/py-acsets.git
$cdpy-acsets
$tox-edocs
$opendocs/build/html/index.htmlThe documentation automatically installs the package as well as thedocsextra specified in thesetup.cfg.sphinxplugins
liketexextcan be added there. Additionally, they need to be added to theextensionslist indocs/source/conf.py.📦 Making a ReleaseAfter installing the package in development mode and installingtoxwithpip install tox, the commands for making a new release are contained within thefinishenvironment
intox.ini. Run the following from the shell:$tox-efinishThis script does the following:UsesBump2Versionto switch the version number in thesetup.cfg,src/acsets/version.py, anddocs/source/conf.pyto not have the-devsuffixPackages the code in both a tar archive and a wheel usingbuildUploads to PyPI usingtwine. Be sure to have a.pypircfile configured to avoid the need for manual input at this
stepPush to GitHub. You'll need to make a release going with the commit where the version was bumped.Bump the version to the next patch. If you made big changes and want to bump the version by minor, you can
usetox -e bumpversion minorafter.
Package: acs_examine_student_assignment
AboutConsole app and Python API for automated assignment examination of ourACSstudents.InstallationTo install acs_examine_student_assignment run:$ pip install acs_examine_student_assignmentConsole app usageQuick start:$ acs_examine_student_assignment <computer>Show help:$ acs_examine_student_assignment --helpPython API usageQuick start:>>> import logging
>>> logging.basicConfig(level=logging.DEBUG, format="[%(levelname)s] %(message)s")

>>> from acs_examine_student_assignment import examine_student_assignment
>>> examine_student_assignment('extracted', 's200')ContributeIf you find any bugs, or wish to propose new featuresplease let us know.If you’d like to contribute, simply forkthe repository, commit your changes
and send a pull request. Make sure you add yourself toAUTHORS.
Package: acs_extract_student_assignments
AboutConsole app and Python API for extracting assignments from exam archives of ourACSstudents.InstallationTo install acs_extract_student_assignments run:$ pip install acs_extract_student_assignmentsConsole app usageQuick start:$ acs_extract_student_assignmentsShow help:$ acs_extract_student_assignments --helpPython API usageQuick start:>>> import logging
>>> logging.basicConfig(level=logging.DEBUG, format="[%(levelname)s] %(message)s")

>>> from acs_extract_student_assignments import find_student_assignments, store_student_assignments
>>> student_assignments = find_student_assignments('archives')
>>> store_student_assignments(student_assignments, 'extracted')ContributeIf you find any bugs, or wish to propose new featuresplease let us know.If you’d like to contribute, simply forkthe repository, commit your changes
and send a pull request. Make sure you add yourself toAUTHORS.
Package: acshell
AtCoder ShellThis is the shell library to execute AtCoder submission on your commandline, for Python/PyPy user.Basic operationIf you want to know more information about commands, executeacsh help.
(Note that the command results are output in Japanese.)1. Installationpipinstallacshell2. Loginacshlogin# acsh lgYour account credentials are stored for a certain period of time.3. Create "Contest folder"acshloadagc001# acsh ld agc001The "contest folder" of specified contest is created where you are currently. Each task folder is generated in the contest folder.4. Write your codeImplement the answers in the file likeagc001_a.pycreated in the folder for each task.5. Run your codes with published testcasesConfirm the formats of the command arguments below.acshtest[task][num][lang]acshcheck[task][lang]# acsh t# acsh coptionrequiredvalue formattaskYestask code such asA,BnumYes (intest)number of testcase as integerlangxlanguage(pythonorpypy)6. Submit your codesConfirm the formats of the command arguments below. Unlike the test running, you have to specify which language you submit codes as.acshsubmit[task][lang]# acsh soptionrequiredvalue formattaskYestask code such asA,BlangYeslanguage(pythonorpypy)7. Confirm results of your submissionacshrecent# for recent submissionacshstatus# for your contest scores# acsh rc# acsh rsAdditional OperationsSetup your cheat sheetsFollow the steps below to use your own prepared cheat-sheet codes,
Please check the arguments with theacsh helpcommand.Setupopen the config folder by executingacsh edit-cheat/acsh ec.write your cheat sheets, and place the folder opened.Usageexecuteacsh add-cheat <task_code> <cheat_name (without extension)>so add the specified cheat file in the task folder.writefrom <filename> import <func/class name>in your code.The cheat files will be merged with main code file when you submit.Setup initial codesIf you want to set a template code, addinitial.pyin the cheat-sheet setup shown above.Pyenv managementIf you want to run codes by pypy, you should use pyenv for python version management.
(This package can be run on python3.8, but you should use 3.11 for the exact debug in contests.)Install the latest version of3.11.*andpypy3.10-7.3.*.execute the command below.pyenvABCA: The Python version you usually useB: The version of installed3.11.*C: The version of installedpypy3.10-7.3.*
Package: acsia-smtpclient
ACSIA SMTPClientA simple smtpclient client based on pythonUsageacsia_smtpclient --from demarcog83 --to giuseppe.demarco@unical.it --subject ciao --body "my email content" --host smtp.gmail.com -p 587  --username demarcog83@gmail.com --password "*********" --use-tls --use-sslAuthorGiuseppe De Marco
Package: acsploit
ACsploit: a tool for generating worst-case inputs for algorithmsByTwo Six TechnologiesACsploit is an interactive command-line utility to generate worst-case inputs to commonly used algorithms. These
worst-case inputs are designed to result in the target program utilizing a large amount of resources (e.g. time or memory).ACsploit is designed to be easy to use and contribute to. Future features will include adding arbitrary constraints to inputs,
creating an API, and hooking into running programs to feed worst-case input directly to functions of interest.Join us on the ACsploit Slackhere!UsageStart ACsploit withpython3 acsploit.py. From there, you can use thehelpcommand to see what commands are available.
You can callhelpon any of them to learn more about how to use that command, such ashelp set.To see the available exploits, use theshowcommand. To stage one for use, useuse [exploit_name]. To see a
description of the exploit, runinfo. At any point, you can runoptionsto see the current input, output, and
exploit options, and then useset [option_name] [value]to set an option. To see detailed descriptions of the options,
useoptions describe.Tab completion is enabled for exploit and option names.Finally, userunto generate output from the exploit.ACsploit supports abbreviated commands, bash commands using!,CTRL+Rhistory search, and more.Command-line Options--load-file SCRIPTruns the commands inSCRIPTas if they had been entered in an interactive ACsploit session and then exits.#can be used for comments as in Python.--debugenables debug mode, in which ACsploit prints stack-traces when errors occur.DocumentationDocuments are generated using pdoc3 and can be found in thedocsdirectory.Generating DocumentsRunpip3 install pdoc3to install the documentation dependencies and then runpython generate_docs.pyWarningCaution should be used in generating and accessing ACsploit exploits. Using unreasonable exploit parameters may cause denial of service on generation. Additionally, the canned exploits (e.g. compression bombs) may cause denial of service if accessed by relevant applications.TestsTests for ACsploit can be invoked from inside theacsploitdirectory by runningpython -m pytest test. Alternatively, individual tests can be invoked by runningpython -m pytest test/path/to/test.py.To run the tests and obtain an HTML coverage report run the following:python -m pytest --cov=. --cov-report html:cov test/Finally to run the tests in parellel the-nflag can be used followed by the number of tests to run in parallel.  On Linux and Mac the following works:python -m pytest -n`nproc` --cov=. --cov-report html:cov test/Contributing to ACsploitWe welcome community contributions to all aspects of ACsploit! For guidelines on contributing, please seeCONTRIBUTING.mdLicenseAcsploit is available under the 3-clause BSD license (seeLICENSE)
Package: acss
# Assetto Corsa Stats ServiceThis project contains the following components:- cron script: this is the script that reads and processes driver results and stores data in a sqlite db file.- stats service: this is a wsgi service used to interact with the stored data and the minimal http interface AC provides## Stats serviceExposed paths:- */api/server_info*: return information for the configured server- */api/tracks*: return a list of unique tracks stored in db- */api/tracks/{track_name}/bestlaps*: return a list of all the best laps for a specific track.- */api/tracks/{track_name}/{car_names}/bestlaps*: return a list of all the best laps for a specific track and cars.Example: ```[..., {"car_name": "ferrari_458_gt2", "track_name": "monza", "driver_name": "FooBar", "best_lap": 426007}, ...]```## Installation```python setup.py install (virtualenv is recommended)```### Example crontab job```*/2 * * * * /opt/assetto_stats_service/python27/bin/acss_cron /path/to/assetto_corsa/dedicated/server/results /opt/assetto_stats_service/acss.db```### Example supervisord service configuration:```[program:assetto_corsa_stats]command=/opt/assetto_stats_service/python27/bin/acssd /opt/assetto_stats_service/etc/acss.confdirectory=/opt/assetto_stats_servicenumprocs=1user=nobody```
Package: acs_student_attendance
AboutConsole app and Python API for analyzing and reporting the lab attendance of ourACSstudents.InstallationTo install acs_student_attendance run:$ pip install acs_student_attendanceConsole app usageQuick start:$ acs_student_attendance stud_auth.log semester-config.ymlShow help:$ acs_student_attendance --helpPython API usageQuick start:>>> from acs_student_attendance.analysis import StudentAttendanceAnalysisWithExport
>>> log_lines = open('stud_auth.log')
>>> analyzer = StudentAttendanceAnalysisWithExport('semester-config.yml')
>>> results = analyzer(log_lines)ContributeIf you find any bugs, or wish to propose new featuresplease let us know.If you’d like to contribute, simply forkthe repository, commit your changes
and send a pull request. Make sure you add yourself toAUTHORS.