Saravanan666/pypi-org huggingface dataset:
Package: ac
# AC.py - Python Autoconf ### Introduction #AC.py is a Python implementation of the popular autoconf tool used in
ascertaining a sane, stable environment before attempting to build large
projects. The purpose of AC.py is to provide a simpler way of performing
these tests, along with added functionality to resolve environmental issues
at the same time.### License #AC.py is licensed with [GPLv3](http://www.gnu.org). This is free software that
may be used by anyone for any purposes and distributed freely, and comes with
no warranty.### Author Info. #
Originally authored by
[Tom A. Thorogood](mailto:tom@tomthorogood.com).AC.py’s central repository is located at
[github.com/tomthorogood/ac.py](http://www.github.com/tomthorogood/ac.py).## Installation #AC.py can be installed usingpip install acoreasy_install acAdditionally, you can clone and install yourself using:git clone git://github.com/tomthorogood/AC.py
cd AC.py
python setup.py installYou do not need to install ac.py in order to use it. It can be cloned and used
as any standard Python module.## Usage #AC.py aims to be simpler than than traditional autoconf, and is highly
customizable. The following tutorial will allow you to:Test for libraries and executablesSet up distribution-specific alternatives for failed testsUse test results to populate fields in a manifest Makefile.## The Shell Environment#AC.py will always attempt to test the shell environment first. The default
shell can be changed using the–shellflag. When running any shell scripts
generated by AC.py or written by you, the hashbang interpreter directive will
always be at the head of each script (#!/bin/sh), using the results from the
shell environment test.If you do not want your users to have to use the shell flag, but do want to
require a specific shell environment, you can set the default using# ac.set_shell
ac.set_shell(“sh”)
ac.set_shell(“bash”)
ac.set_shell(“tcsh”)However, it is highgly recommended that you use bash commands and scripts that
will work across all platforms and shells.## Required Successes #Tests marked as required (or called with a ‘require’ function) will halt
the configuration script if the test is not a success and there is no
fail alternative provided.## A Generic Test #You can use any Python scripting to come up with a true/false result and
pass the result into the test framework using# ac.test(“test_name”, result, [required=True|False])
Package: ac8593-key-manager
Key ManagerThis library creates a simple key manager so that the actual key is hidden from the code. This was done as a part of the homework for Data Engineering class at NYUInstallationpip install ac8593_key_manager==0.2.0Get startedSuppose Max wants to hide the key from his code. All he needs to do is create a .txt file and put his key in that file.
Then, he can add the name of the key file to the .gitginore. This ensures that his key does not get pushed to git and can be
passed around independantly of the code he writes. Moreover, people can use their own keys too without having to change the code!Let's say Max saves his key in max_api_key.txtfromac8593_key_managerimportKeyManager# Instantiate a KeyManager objectkey_manager=KeyManager('max_api_key.txt')# Call the get_key method to get the key. This key can be used to build the Polygon API clientkey=key_manager.get_key()
Package: acac
acac競プロ便利 CLI ツール。AtCoderとアルゴ式に対応。＊現在 Pre-release のため、挙動やコマンドは変更される場合があります。概要競技プログラミングの過去問を解くときの（個人的に）典型的なワークフローを CLI として自動化したものです。過去問だけでなく開催中のコンテストでも使えますが、ログイン機能は実装されていないため、手動で HTML ファイルを取得する必要があります。インストールPython 3.7 以上がインストールされていれば利用可能です。pipinstallacac事前準備作業ディレクトリに移動して、acac initを実行します。# 例mkdirkyoprocdkyopro
acacinitacac.tomlが作成されます。これが設定ファイルです。使用例まず、ブラウザで問題ページ（例えば、ABC 280 A - Pawn on a Grid）にアクセスします。URL をコピーします使用可能な場合、以下のショートカットキーが便利です。Windows:Ctrl+L,Ctrl+CMac:command+L,command+Cターミナルで以下のようなコマンドを実行すると、問題用のフォルダ（以下、問題フォルダ）に環境が自動作成されます。acachttps://atcoder.jp/contests/abc280/tasks/abc280_a処理の詳細問題フォルダを作成します。ソースコードのテンプレートファイルが用意されていれば、そのファイルをコピーします。そうでなければ、ソースコード用の空ファイルを作成します。（cache.htmlが無ければ）問題ページにアクセスし、HTML ファイルをcache.htmlとして保存します。metadata.tomlを作成します。問題ページのタイトルと URL が格納されます。問題ページ中からテストケースのサンプルを抽出し、テキストファイルとして保存します。acac.tomlで設定したコマンドを実行します。acac.tomlで設定したメッセージをクリップボードにコピーします。私は Git のコミットメッセージを設定しています。コードを書いて問題を解きます。ターミナルで以下のようなコマンドを実行します。acachttps://atcoder.jp/contests/abc280/tasks/abc280_a-jすると、以下のように処理されます。acac.tomlで設定したコマンドを実行します（バージョン確認、コンパイル等）。用意されたテストケースに対してジャッジを行います。acac.tomlで設定したコマンドを実行します（クリーンアップ等）。すべて AC であれば、ソースコードがクリップボードにコピーされますので、ブラウザに貼り付けて提出してください。「他の人の提出を確認しますか？」と聞かれるので、yと答えれば、同じ言語で AC した提出の一覧ページをブラウザで開きます。acac.tomlで設定したメッセージをクリップボードにコピーします。設定ファイル私が実際に使用している設定ファイルはこちらです。# 設定ファイルの例[create]# 環境作成後に実行されるコマンドのリスト（以下は git add をして、VSCode でソースコード用のファイルを開いている）post_create_commands=["git add ${dir_path}/in ${dir_path}/out ${dir_path}/metadata.toml","code . ${dir_path}/${source_file_name}",]# 環境作成後にクリップボードにコピーされるメッセージclipboard_message="Create: ${url}"[judge]# ジャッジ後にソースコードをクリップボードにコピーするかどうかcopy_source_code_when_ac=true# ジャッジ後にクリップボードにコピーされるメッセージclipboard_message="AC: ${url} ${source_file_name}"[language]# デフォルトの使用言語default="cpp"[language.settings.cpp]# ソースコードのファイル名source_file_name="main.cpp"# テンプレートファイルのパスtemplate_file_path="templates/main.cpp"[language.settings.cpp.commands]# ジャッジ前に実行するコマンドのリスト（以下はバージョンを表示し、コンパイルしている）pre_execute=["g++ --version","g++ ${dir_path}/${source_file_name} -o ${dir_path}/a.out",]# 実行コマンドexecute="${dir_path}/a.out"# ジャッジ後に実行するコマンドのリスト（以下は `a.out` を削除している）post_execute=["rm ${dir_path}/a.out"][language.settings.python3]# ...${var}の置換リスト置換前置換後${dir_path}問題フォルダのパス${lang}言語名${source_file_name}ソースコードのファイル名（パスではありません）${url}問題ページの URLコマンドオプションモード指定オプションモード-c, --create作業環境構築（デフォルト）-j, --judgeジャッジ-m, --manualURL にアクセスせず、HTML ファイルを手動で配置してテストケースを作成するログインが必要な場合、acac <url> -mを実行後、問題フォルダに問題ページの HTML ファイルを配置してください。その他acac.tomlに指定したデフォルト値を一時的に上書きするような動きをします。イコールは必須です。オプション上書きされるもの-l, --lang, lang=LANG_NAME使用言語-s, --source, source=SOURCE_FILE_NAMEソースコードのファイル名# 例acachttps://atcoder.jp/contests/abc280/tasks/abc280_a-l=python3--source=main2.py
acachttps://atcoder.jp/contests/abc280/tasks/abc280_a-s=main2.pylang=python3--judgeコンセプトなぜacac create <url>やacac judge <url>のような一般的な CLI の慣例に沿っていないのかacac <url>で環境作成コードを書くターミナルでCtrl+P末尾に-jをつけてジャッジという流れを高速で行うためです。基本的に、一つの問題に対し複数のコマンドを実行することが多いので、URL のあとにコマンドやオプションを指定する方式を採っています。問題フォルダ構成が URL そのままで冗長なのはなぜか開発当初はAtCoder/ABC/280/A/のようなフォルダ構成にしていましたが、過去のコンテストの URL 規則との整合性や、未来への拡張性、ghqのような厳密性を保持するため、現在のような形にしました。
Package: acachecontrol
Async CacheControl for aiohttpRequires Python3.6+Note: Library is still under development, there might be a lot of bugs.For contributing see development_notes.md as a starting guideWhat and whyThere is a good and simple libraryCacheControlwritten for python requests library. And there is nothing similar for aiohttp. "Async CacheControl" project strives to cover this hole.UsageimportasynciofromacachecontrolimportAsyncCache,AsyncCacheControlasyncdefmain():cache=AsyncCache(config={"sleep_time":0.2})# `AsyncCache()` with default configuration is used# if `cache` not providedasyncwithAsyncCacheControl(cache=cache)ascached_sess:asyncwithcached_sess.get('http://example.com')asresp:resp_text=awaitresp.text()print(resp_text)asyncio.run(main())Extending or creating new classesIt is possible to use any cache backend, which should implement OrderedDict interfaces:__contains__,__len__,__getitem__,__setitem__,get,pop,popitem,move_to_end:classCustomCacheBackend():def__init__(self):self.item_order=[]self.storage={}def__contains__(self,key):returnkeyinself.storagedef__len__(self):returnlen(self.storage)def__getitem__(self,key):returnself.storage[key]def__setitem__(self,key,value):self.storage[key]=valueself.item_order.append(key)defget(self,key):returnself.storage.get(key)defpop(self,key):self.item_order.remove(key)returnself.storage.pop(key)defmove_to_end(self,key):last_index=len(self.item_order)-1key_index=self.item_order.index(key)whilekey_index<last_index:self.item_order[key_index]=self.item_order[key_index+1]key_index+=1self.item_order[last_index]=keydefpopitem(self,last=True):key=self.item_order.pop()iflastelseself.item_order.pop(0)value=self.storage.pop(key)returnvalueThen you can use it inAsyncCache:importasynciofromacachecontrolimportAsyncCache,AsyncCacheControlasyncdefmain():cache=AsyncCache(cache_backend=CustomCacheBackend())asyncwithAsyncCacheControl(cache=cache)ascached_sess:asyncwithcached_sess.get('http://example.com')asresp:resp_text=awaitresp.text()print(resp_text)asyncio.run(main())Similarly, you can replace RequestContextManager (assume its implementation in modulecustom_implementations):importasynciofromacachecontrolimportAsyncCache,AsyncCacheControlfromcustom_implementationsimportCustomRequestContextManagerasyncdefmain():asyncwithAsyncCacheControl(request_context_manager_cls=CustomRequestContextManager)ascached_sess:asyncwithcached_sess.get('http://example.com')asresp:resp_text=awaitresp.text()print(resp_text)asyncio.run(main())
Package: academia-rl
academiaThis package’s purpose is to provide easy-to-use tools for Curriculum Learning.
It is a part of an engineering thesis at Warsaw University of Technology that
touches on the topic of curriculum learning.Documentationhttps://academia.readthedocs.io/SourcesAn unordered list of interesting books and papersBooksReinforcement Learning: An Introduction (Barto, Sutton)PapersPaper LinkShort DescriptionRelated PapersCurriculum Learning for Reinforcement Learning Domains: A Framework and SurveySurvey of curriculum learning papers. Formalises curriuclum learning based on a variety of attributes and gives a good introduction into the topic.Curriculum Design for Machine Learners in Sequential Decision TasksTalks about curricula desgined by non-experts (i.e. people who do not know much/anything about a given domain). Uses "dog training" game as the basis of their experiments. Users can design a curriculum by sequencing any number of tasks in more or less complex environments. A target (more difficult) task is also provided to the user but they are not allowed to include it in the curriculum. A trainer model is used to go through the curriculum and provide feedback to the agent. They measure how good a curriculum is by the number of feedbacks that the trainer has to give to the agent i.e. if a curriculum is well designed the agent will require a relatively smaller number of feedbacks from the trainer to move on to the next task. They use three different trainer behaviours and show that the type of the trainer oes not influence the impact of curriuclum design i.e. if a curriculum is well designed under one trainer it is also well designed under another trainer. Another condition for a curriculum to be considered good is that the number of feedbacks over the entire curriculum (with the target task) should be smaller than the number of feedbacks when training on the target task alone. Results show that non-experts can design a better-than-random curriculum when it comes to reducing number of feedbacks on the target task alone but are not better-than-random in desigining a curriculum that decreases the overall number of feedbacks.Language and Policy Learning from Human-delivered Feedback,Learning behaviors via human-delivered discrete feedbackProximal Policy Optimization AlgorithmsNot directly related to Curriculum Learning but related to Reinforcement Learning.A Deep Hierarchical Approach to Lifelong Learning in MinecraftHaven't read it yet, not directly connected to CL but should still be helpful
Package: academictorrents
Copyright (c) 2018 academictorrentsPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.Description: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.0
Classifier: Programming Language :: Python :: 3.1
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Package: academlo
Academlo: Python Web Framework built for learning purposesAcademlo is a Python web framework built for learning purposes.It's a WSGI framework and can be used with any WSGI application server such as Gunicorn.InstallationpipinstallacademloHow to use itBasic usage:fromacademlo.apiimportAPIapp=API()@app.route("/home")defhome(request,response):response.text="Hello from the HOME page"@app.route("/hello/{name}")defgreeting(request,response,name):response.text=f"Hello,{name}"@app.route("/book")classBooksResource:defget(self,req,resp):resp.text="Books Page"defpost(self,req,resp):resp.text="Endpoint to create a book"@app.route("/template")deftemplate_handler(req,resp):resp.body=app.template("index.html",context={"name":"academlo","title":"Best Framework"}).encode()Unit TestsThe recommended way of writing unit tests is withpytest. There are two built in fixtures
that you may want to use when writing unit tests with academlo. The first one isappwhich is an instance of the mainAPIclass:deftest_route_overlap_throws_exception(app):@app.route("/")defhome(req,resp):resp.text="Welcome Home."withpytest.raises(AssertionError):@app.route("/")defhome2(req,resp):resp.text="Welcome Home2."The other one isclientthat you can use to send HTTP requests to your handlers. It is based on the famousrequestsand it should feel very familiar:deftest_parameterized_route(app,client):@app.route("/{name}")defhello(req,resp,name):resp.text=f"hey{name}"assertclient.get("http://testserver/matthew").text=="hey matthew"TemplatesThe default folder for templates istemplates. You can change it when initializing the mainAPI()class:app=API(templates_dir="templates_dir_name")Then you can use HTML files in that folder like so in a handler:@app.route("/show/template")defhandler_with_template(req,resp):resp.html=app.template("example.html",context={"title":"Awesome Framework","body":"welcome to the future!"})Static FilesJust like templates, the default folder for static files isstaticand you can override it:app=API(static_dir="static_dir_name")Then you can use the files inside this folder in HTML files:<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><title>{{title}}</title><linkhref="/static/main.css"rel="stylesheet"type="text/css"></head><body><h1>{{body}}</h1><p>This is a paragraph</p></body></html>MiddlewareYou can create custom middleware classes by inheriting from theacademlo.middleware.Middlewareclass and overriding its two methods
that are called before and after each request:fromacademlo.apiimportAPIfromacademlo.middlewareimportMiddlewareapp=API()classSimpleCustomMiddleware(Middleware):defprocess_request(self,req):print("Before dispatch",req.url)defprocess_response(self,req,res):print("After dispatch",req.url)app.add_middleware(SimpleCustomMiddleware)
Package: academlogen9
Academlo: Python Web Framework built for learning purposesAcademlo is a Python web framework built for learning purposes.It's a WSGI framework and can be used with any WSGI application server such as Gunicorn.Installationpipinstallacademlo_gen_9How to use itBasic usage:fromacademlo_gen_9.apiimportAPIapp=API()@app.route("/home")defhome(request,response):response.text="Hello from the HOME page"@app.route("/hello/{name}")defgreeting(request,response,name):response.text=f"Hello,{name}"@app.route("/book")classBooksResource:defget(self,req,resp):resp.text="Books Page"defpost(self,req,resp):resp.text="Endpoint to create a book"@app.route("/template")deftemplate_handler(req,resp):resp.body=app.template("index.html",context={"name":"academlo_gen_9","title":"Best Framework"}).encode()Unit TestsThe recommended way of writing unit tests is withpytest. There are two built in fixtures
that you may want to use when writing unit tests with academlo. The first one isappwhich is an instance of the mainAPIclass:deftest_route_overlap_throws_exception(app):@app.route("/")defhome(req,resp):resp.text="Welcome Home."withpytest.raises(AssertionError):@app.route("/")defhome2(req,resp):resp.text="Welcome Home2."The other one isclientthat you can use to send HTTP requests to your handlers. It is based on the famousrequestsand it should feel very familiar:deftest_parameterized_route(app,client):@app.route("/{name}")defhello(req,resp,name):resp.text=f"hey{name}"assertclient.get("http://testserver/matthew").text=="hey matthew"TemplatesThe default folder for templates istemplates. You can change it when initializing the mainAPI()class:app=API(templates_dir="templates_dir_name")Then you can use HTML files in that folder like so in a handler:@app.route("/show/template")defhandler_with_template(req,resp):resp.html=app.template("example.html",context={"title":"Awesome Framework","body":"welcome to the future!"})Static FilesJust like templates, the default folder for static files isstaticand you can override it:app=API(static_dir="static_dir_name")Then you can use the files inside this folder in HTML files:<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><title>{{title}}</title><linkhref="/static/main.css"rel="stylesheet"type="text/css"></head><body><h1>{{body}}</h1><p>This is a paragraph</p></body></html>MiddlewareYou can create custom middleware classes by inheriting from theacademlo.middleware.Middlewareclass and overriding its two methods
that are called before and after each request:fromacademlo_gen_9.apiimportAPIfromacademlo_gen_9.middlewareimportMiddlewareapp=API()classSimpleCustomMiddleware(Middleware):defprocess_request(self,req):print("Before dispatch",req.url)defprocess_response(self,req,res):print("After dispatch",req.url)app.add_middleware(SimpleCustomMiddleware)
Package: acai-aws
Acai AWSDRY, configurable, declarative node library for working with Amazon Web Service Lambdas.FeaturesHighly configurable apigateway internal routerOpenapi schema adherence for all event typesExtensible and customizable middleware for validation and other tasksDRY coding interfaces without the need of boilerplateEase-of-use with theserverless frameworkLocal Development supportHappy Path Programming (See Philosophy below)PhilosophyThe Acai philosophy is to provide a dry, configurable, declarative library for use with the amazon lambdas, which encourages Happy Path Programming (HPP).Happy Path Programming is an idea in which inputs are all validated before operated on. This ensures code follows the happy path without the need for mid-level, nested exceptions and all the nasty exception handling that comes with that. The library uses layers of customizable middleware options to allow a developer to easily dictate what constitutes a valid input, without nested conditionals, try/catch blocks or other coding blocks which distract from the happy path that covers the majority of that codes intended operation.InstallationThis is apythonmodule available through thepypi registry.Before installing,download and install python.
python 3 or higher is required.Installation is done using thepip installcommand:$pipinstallacai_aws# pipenv install acai_aws# poetry add acai_awsDocumentation & ExamplesFull DocsTutorialExamplesContributingIf you would like to contribute please make sure to follow the established patterns and unit test your code:Unit TestingTo run unit test, enter command:$pipenvinstall
$pipenvruntest
Package: acalang
AcaAca, a functional programming language, and shitty toy.Aca is a toy functional programming language initially inspired by ISWIM.  The
interpreter is currently written in Python.Install$pipinstallacalangExampleCommand line usage$catfoo.acaletmain=dechurch3$acafoo.aca3$acafoo.aca-S# `noeval' mode(lambdax:dechurch(x))((lambdax:x)((lambdaf:lambdax:(f(f(f(x)))))))$aca# REPL$aca-S# REPL with `noeval'Lambda calculuslet main =
    (\x y f. f x y)Standard library for basic datatypeslet a = zero
let b = succ zero
let main = dechurch b
-- 1Sugar for Church numeralslet main = 0

-- This is identical to
{-
let main =
    (\x . x)
-}Special builtin functions for debugging (decoded into Python value)let main =
    dechurch 42
-- Output: 42

let main =
    debool true
-- Output: True

let main =
    dereal (neg (u2i 42))
-- Output: -42Simple module import withuse$foo.acaletfoo=42$bar.aca
usefooletmain=dechurchfoo

$acabar.aca42GoalsBeforev1.0.0:Untyped lambda calculusv1.0.0:Simply typed lambda calculusv2.0.0:System FLicenseMIT
Package: acall
acallDeveloper GuideSetup# create conda environment$mambaenvcreate-fenv.yml# update conda environment$mambaenvupdate-nacall--fileenv.ymlInstallpipinstall-e.# install from pypipipinstallacallnbdev# activate conda environment$condaactivateacall# make sure the acall package is installed in development mode$pipinstall-e.# make changes under nbs/ directory# ...# compile to have changes apply to the acall package$nbdev_preparePublishing# publish to pypi$nbdev_pypi# publish to conda$nbdev_conda--build_args'-c conda-forge'$nbdev_conda--mambabuild--build_args'-c conda-forge -c dsm-72'UsageInstallationInstall latest from the GitHubrepository:$pipinstallgit+https://github.com/dsm-72/acall.gitor fromconda$condainstall-cdsm-72acallor frompypi$pipinstallacallDocumentationDocumentation can be found hosted on GitHubrepositorypages. Additionally you can find
package manager specific guidelines oncondaandpypirespectively.
Package: acamodels
datamodelsDatamodels based onpydanticused in Python tools developed at Aarhus City Archives.StructureEach model is placed in a separate.pyfile in order to achieve maintainability and better version control. In addition, each model must be served in__init__.pysuch that it is possible to callfrom acamodels import model.VersioningUpdatingone or more models is considered apatchversion, e.g.0.1.0 -> 0.1.1Addingnew models is considered aminorversion, e.g.0.1.0 -> 0.2.0Major versions will be pushed when models have reached a yet to be determined mature stage.