Saravanan666/pypi-org huggingface dataset:
Package: ask4args
Ask4argsAsk for function args by Terminal UI / GUI, ensuring the type annotation. Inspired bypython-fire, and it maybe need a human-friendly interactive UI.Installpip install ask4args -USimple Usagepython3 -m ask4args module:functionTerminal UIGUIMore Usage Examplesfromask4args.coreimportAsk4Args,Ask4ArgsGUI,Ask4ArgsWebfromtypingimportList,Dictdeftest_normal_function(a:int,b:int=2,**args_dict:Dict[str,int]):# first a value=1, args_dict['c']=3, others use default.# press 1, enter, enter, enter, c, enter, 3, enter, enterasserta==1assertb==2assertargs_dict['c']==3return('success',vars())deftest_keyword_only_function(a:float,b:int=2,*,c:bool=False,d:str='string',e:int=None,f:List[int]=None,**args_dict:Dict[str,int]):"""Read the doc, and test kw-only args.:param a: one float num:type a: float:param b: one int num, defaults to 4:type b: int, optional:param c: boolen arg, defaults to False:type c: bool, optional:param d: string arg, defaults to 'string':type d: str, optional:return: return the args_dict:rtype: Dict[str, list]"""asserta==1.1assertb==2assertcisFalseassertd=='string'asserte==1assertf==[1,2,3]assertargs_dict['h']==3return('success',vars())classTestClass(object):deftest_method(self,a:str,b:int=1):asserta==''assertb==1return('success',vars())@classmethoddeftest_class_method(cls,a:str,b:int=1):asserta==''assertb==1return('success',vars())deftest_defaults(a:int):asserta==1return('success',vars())if__name__=="__main__":# cls = Ask4ArgsWebcls=Ask4Args# cls = Ask4ArgsGUI# =====================# =====================# ('success', {'a': 1, 'b': 2, 'args_dict': {'c': 3}})# cls(test_normal_function).run()# =====================# ('success', {'a': 1.1, 'b': 2, 'c': False, 'd': 'string', 'e': 1, 'f': [1, 2, 3], 'args_dict': {'h': 3}})# cls(test_keyword_only_function,#     choices={#         'e': [1, 2, 3, 4, 5]#     },#     checkboxes={#         'f': [1, 2, 3, 4, 5]#     }).run()# =====================# cls(TestClass().test_method).run()# =====================# cls(TestClass().test_class_method).run()# =====================# cls(test_defaults, defaults={'a': 1}).run()passTODOTerminal UIGUIWeb UI(no need to do)
Package: ask-academic-dates
Ask SchoolsThis package helps convert Ask School suffixes to the school full name.InstallationAsk Academic Datecan be installed from PyPI usingpipor your package manager of choice:pip install ask_academic_datesUsageExample:fromask_academic_datesimportfind_academic_yearfromdatetimeimportdatedefcheck_find_academic_year():given_date=date(2019,5,3)result=find_academic_year(given_date)assertresult=='2018-2019'Code of ConductEveryone interacting in the project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow thePyPA Code of Conduct.
Package: askanna
AskAnna CLI & Python SDKThe AskAnna CLI offers a command line interface to the AskAnna platform. With the Python SDK you can run AskAnna
functions directly from your Python script. The CLI & Python SDK simplifies the communication with the AskAnna
platform and provides facilities for supporting every part of a data science project.DocumentationFor the latest information check theAskAnna Documentation. Or open directly the
documentation for:Command line (CLI)Python SDKQuickstartInstall AskAnnapipinstallaskannaUpdate AskAnnapipinstall-UaskannaLogin to AskAnnaaskannaloginThis will create a.askanna.ymlin your home directory.Authorization tokenWhen the AskAnna CLI & Python SDK is used in for example a CI/CD, one can configure authentication by setting an
environment variable:exportAA_REMOTE=https://beta-api.askanna.euexportAA_TOKEN={{APITOKEN}}The API token can be found in the created~/.askanna.ymlfile after you logged in withaskanna login.How to push code to AskAnnaRun the innit-command on the main directory of your project. The command will create a new project on AskAnna and will
add aaskanna.ymlfile to your local project directory. In theaskanna.ymlfile you can configure jobs. For more
information, see theaskanna.yml documentation.askannainitIf you want to start a project from scratch (or a template), you can run the create-command.askannacreateWith the push-command your code will be uploaded to the project in AskAnna.askannapushTrack metricsTo track metrics for your runs, you can use the functiontrack_metric. For more information, see themetrics documentation.fromaskannaimporttrack_metrictrack_metric("name","value")Track variablesTo track variables for your runs, you can use the functiontrack_variable. For more information, see thevariables documentation.fromaskannaimporttrack_variabletrack_variable("name","value")
Package: askanna-cli
askanna-cliaskanna-cli offers a CLI interface for creating AskAnna and supported DSP
projects. It simplifies the communication with the AskAnna platform and
provides facilities for supporting every part of the data science process.DocumentationQuickstartInstall askanna-cli::pip install git+https://gitlab.askanna.io/open/askanna-cli.git#egg=askanna-cliLogin to askanna:askanna loginThis will create a.askanna.ymlin your home folder.When used in a CI, one can configure authentication by setting an environment variable:exportAA_REMOTE=https://beta-api.askanna.eu/v1/exportAA_TOKEN=<yourapitoken,canbefoundin~/.askanna.yml>Upload your package to AskAnna:
First setup youraskanna.yml:project:
   url: "https://beta.askanna.eu/workspace/project/7MQT-6309-9g3t-R5QR/"
   name: "AskAnna Sandbox"
   uuid: "f1e2144a-87f9-4936-8562-4304c51332ea"Values on the URL anduuidneeds to be configured for your own project.Uploading a package from a CI environment requires the following variables to be set:exportAA_REMOTE=https://beta-api.askanna.eu/v1/exportAA_TOKEN=<yourapitoken>exportPROJECT_UUID=<uuidforyourproject>FeaturesRunning TestsDoes the code actually work?source<YOURVIRTUALENV>/bin/activate(myenv)$pipinstalltox(myenv)$toxCreditsTools used in rendering this package:Cookiecutter:https://github.com/audreyr/cookiecuttercookiecutter-pypackage:https://github.com/audreyr/cookiecutter-pypackageHistory0.1.0 (2019-12-05)First commit to repo
Package: ask-api
ask-apiEN DOC说明ask-api 是一个python框架，借助LLM(目前支持chatgpt-api)模型的代码理解能力，让你能够与你的python代码对话，提供包括但不限于如下的能力：通过提问了解函数的用途。直接通过自然语言来执行函数。将操作过程中的各种异常信息，通过自然语言的方式告知用户。与函数进行其他自由对话。安装(待完善)</code></pre>
<h4>开发计划(进行中)</h4>
<ul>
<li><inputtype="checkbox"checked=""disabled=""/>基于openai的chatgpt-api，支持对python函数进行提问，了解函数的用途。</li>
<li><inputtype="checkbox"checked=""disabled=""/>支持中文以及英文两种类型的prompt。</li>
<li><inputtype="checkbox"disabled=""/>通过pip安装。</li>
<li><inputtype="checkbox"disabled=""/>支持自定义的prompt。</li>
<li><inputtype="checkbox"checked=""disabled=""/>支持通过自然语言命令来执行函数。</li>
<li><inputtype="checkbox"disabled=""/>支持其他LLM模型或api作为底层算法支持</li>
</ul>
<h4>示例(持续完善中)</h4>
<ul>
<li>更多细节，请参考<ahref="./examples/zh_askapi_example.ipynb">中文示例</a></li>
<li>示例函数</li>
</ul>
<prelang="python"><code>#示例函数，给定url，下载数据并保存至指定目录
importwget
importosBASE_PATH="./tmp/"defdownload_data(url,save_path=None)->str:"""下载数据并保存至指定目录Args:url (_type_): 需要下载的数据的urlsave_path (_type_): 保存数据的目录Returns:str: 保存数据的目录"""ifsave_pathisNone:save_path=wget.detect_filename(url)ifnotos.path.exists(BASE_PATH):os.makedirs(BASE_PATH)save_path=f'{BASE_PATH}/{save_path}'wget.download(url,save_path)returnsave_path利用ask-api对函数进行提问，了解函数的用途fromask_api.ask_apiimportask_func# 获取函数的功能说明session=ask_func(download_data,message="",mode='desc')print("*"*100)print(session.get_current())利用ask-api，直接通过自然语言来执行函数# 使用自然语言调用函数session=ask_func(download_data,message="请帮我下载这个数据：https://github.com/redis/redis/archive/7.0.9.tar.gz",mode="execute")print(session.get_current())函数执行为异步执行，可以通过wait_task方法等待函数执行完成# get result of the function taskfromask_api.util.askapi_asynimportwait_tasktask=session.get_current().get_task()iftaskisNone:print("task is complete!")print(session.get_current())else:print("task is running")result=wait_task(task)print(result)异常命令的处理# 异常指令处理session=ask_func(download_data,message="请帮我下载",mode="execute")print(session.get_current())函数执行异常的处理# 任务执行中异常处理session=ask_func(download_data,message="请帮我下载这个数据：xxx.xxx",mode="execute")print("*"*100)print(session.get_current())print("*"*100)task=session.get_current().get_task()result_message=wait_task(task)print(result_message)与函数进行其他自由对话(TODO)
Package: askbot
Askbot will work alone or with other django apps (with some limitations, please see below), Django 2.2, PostgresQL(recommended) and MySQL >5.6This version of Askbot supports only Django 2 and Python 3. Versions 0.10.x and earlier support Python 2.

To upgrade, or select version of Askbot working with earlier versions of Django,
please follow instructions at
https://github.com/ASKBOT/askbot-devel/blob/master/askbot/doc/source/upgrade.rstQuestions? Suggestions? Found a bug? -> please post athttp://askbot.org/en/questions/Featuresstandard Q&A functionalities including votes, reputation system, etc.user levels: admin, moderator, regular, suspended, blockedper-user inbox for responses & flagged items (for moderators)email alerts - instant and delayed, optionally tag filteredsearch by full text and a set of tags simultaneouslyimports data from StackExchange, Jive, ZenDeskInstallationThe general steps are:install the codeif there is no database yet - create onecreate a new or configure existing django site for askbotcreate/update the database tablesMethods to install codepip install askbotdownload .tar.gzfile from the bottom of this page, then runpython setup.py installclone code from the githubgit clone git://github.com/ASKBOT/askbot-devel.git, and thenpython setup.py developCreate/configure django siteEither run commandaskbot-setupor merge contents of directoryaskbot/setup_templatesin the source code into your project directory.Create/update database tablesBack up your database if it is not blank, then two commands:python manage.py migratepython manage.py migrateThere are two apps to migrate - askbot and django_authopenid (a forked version of the original, included within askbot), so you can as well migrate them separatelyLimitationsThere are some limitations that will be removed in the future. If any of these cause issues - please do not hesitate to contactsupport@askbot.com.Askbot patchesauth_usertable. The migration script will automatically add missing columns, however it will not overwrite any existing columns. Please do back up your database before adding askbot to an existing site.Included into askbot there are two forked apps:django_authopenidandlivesettings. If you have these apps on your site, you may have trouble installing askbot.User registration and login system is bundled with Askbot, but can be replaced with any other. It is quite good though, it allows logging in with password and many authentication service providers, including popular social services and recover account by email.If there are any other collisions, askbot will simply fail to install, it will not damage your data.Background InformationAskbot is based on CNPROG project by Mike Chen and Sailing Cai, project which was originally inspired by StackOverflow and Yahoo Answers.
Package: askbot-selimgul
Askbot will work alone or with other django apps (with some limitations, please see below), Django 2.2, PostgresQL(recommended) and MySQL >5.6This version of Askbot supports only Django 2 and Python 3. Versions 0.10.x and earlier support Python 2.

To upgrade, or select version of Askbot working with earlier versions of Django,
please follow instructions at
https://github.com/ASKBOT/askbot-devel/blob/master/askbot/doc/source/upgrade.rstQuestions? Suggestions? Found a bug? -> please post athttp://askbot.org/en/questions/Featuresstandard Q&A functionalities including votes, reputation system, etc.user levels: admin, moderator, regular, suspended, blockedper-user inbox for responses & flagged items (for moderators)email alerts - instant and delayed, optionally tag filteredsearch by full text and a set of tags simultaneouslyimports data from StackExchange, Jive, ZenDeskInstallationThe general steps are:install the codeif there is no database yet - create onecreate a new or configure existing django site for askbotcreate/update the database tablesMethods to install codepip install askbotdownload .tar.gzfile from the bottom of this page, then runpython setup.py installclone code from the githubgit clone git://github.com/ASKBOT/askbot-devel.git, and thenpython setup.py developCreate/configure django siteEither run commandaskbot-setupor merge contents of directoryaskbot/setup_templatesin the source code into your project directory.Create/update database tablesBack up your database if it is not blank, then two commands:python manage.py migratepython manage.py migrateThere are two apps to migrate - askbot and django_authopenid (a forked version of the original, included within askbot), so you can as well migrate them separatelyLimitationsThere are some limitations that will be removed in the future. If any of these cause issues - please do not hesitate to contactsupport@askbot.com.Askbot patchesauth_usertable. The migration script will automatically add missing columns, however it will not overwrite any existing columns. Please do back up your database before adding askbot to an existing site.Included into askbot there are two forked apps:django_authopenidandlivesettings. If you have these apps on your site, you may have trouble installing askbot.User registration and login system is bundled with Askbot, but can be replaced with any other. It is quite good though, it allows logging in with password and many authentication service providers, including popular social services and recover account by email.If there are any other collisions, askbot will simply fail to install, it will not damage your data.Background InformationAskbot is based on CNPROG project by Mike Chen and Sailing Cai, project which was originally inspired by StackOverflow and Yahoo Answers.
Package: askbot-tuan
Askbot will work alone or with other django apps (with some limitations, please see below), Django 1.1.1 - 1.2.3(*), MySQL(**) and PostgresQL(recommended) (>=8.3).Questions? Suggestions? Found a bug? -> please post athttp://askbot.org/Featuresstandard Q&A functionalities including votes, reputation system, etc.user levels: admin, moderator, regular, suspended, blockedper-user inbox for responses & flagged items (for moderators)email alerts - instant and delayed, optionally tag filteredsearch by full text and a set of tags simultaneouslycan import data from stackexchange database fileInstallationThe general steps are:install the codeif there is no database yet - create onecreate a new or configure existing django site for askbotcreate/update the database tablesMethods to install codepip install askbot-tuaneasy_install askbot-tuanCreate/configure django siteEither run commandaskbot-setupor merge contents of directoryaskbot/setup_templatesin the source code into your project directory.Create/update database tablesBack up your database if it is not blank, then two commands:python manage.py syncdbpython manage.py migrateThere are two apps to migrate - askbot and django_authopenid (a forked version of the original, included within askbot), so you can as well migrate them separatelyLimitationsThere are some limitations that will be removed in the future. If any of these cause issues - please do not hesitate to contactadmin@askbot.org.Askbot patchesauth_usertable. The migration script will automatically add missing columns, however it will not overwrite any existing columns. Please do back up your database before adding askbot to an existing site.Included into askbot there are two forked apps:django_authopenidandlivesettings. If you have these apps on your site, you may have trouble installing askbot.User registration and login system is bundled with Askbot. It is quite good though, it allows logging in with password and many authentication service providers, including popular social services and recover account by email.If there are any other collisions, askbot will simply fail to install, it will not damage your data.Background InformationAskbot is based on CNPROG project by Mike Chen and Sailing Cai, project which was originally inspired by StackOverflow and Yahoo Answers.Footnotes(*) - If you want to install with django 1.2.x a dependency “Coffin-0.3” needs to be replaced with “Coffin-0.3.3” - this will be automated in the future versions of the setup script.(**) - With MySQL you have to use MyISAM data backend, because it’s the only one that supports Full Text Search.
Package: askbot-tuanpa
Askbot will work alone or with other django apps (with some limitations, please see below), Django 1.1.1 - 1.2.3(*), MySQL(**) and PostgresQL(recommended) (>=8.3).Questions? Suggestions? Found a bug? -> please post athttp://askbot.org/Featuresstandard Q&A functionalities including votes, reputation system, etc.user levels: admin, moderator, regular, suspended, blockedper-user inbox for responses & flagged items (for moderators)email alerts - instant and delayed, optionally tag filteredsearch by full text and a set of tags simultaneouslycan import data from stackexchange database fileInstallationThe general steps are:install the codeif there is no database yet - create onecreate a new or configure existing django site for askbotcreate/update the database tablesMethods to install codepip install askboteasy_install askbotdownload .tar.gzfile from the bottom of this page, then runpython setup.py installclone code from the githubgit clone git://github.com/ASKBOT/askbot-devel.git, and thenpython setup.py developCreate/configure django siteEither run commandaskbot-setupor merge contents of directoryaskbot/setup_templatesin the source code into your project directory.Create/update database tablesBack up your database if it is not blank, then two commands:python manage.py syncdbpython manage.py migrateThere are two apps to migrate - askbot and django_authopenid (a forked version of the original, included within askbot), so you can as well migrate them separatelyLimitationsThere are some limitations that will be removed in the future. If any of these cause issues - please do not hesitate to contactadmin@askbot.org.Askbot patchesauth_usertable. The migration script will automatically add missing columns, however it will not overwrite any existing columns. Please do back up your database before adding askbot to an existing site.Included into askbot there are two forked apps:django_authopenidandlivesettings. If you have these apps on your site, you may have trouble installing askbot.User registration and login system is bundled with Askbot. It is quite good though, it allows logging in with password and many authentication service providers, including popular social services and recover account by email.If there are any other collisions, askbot will simply fail to install, it will not damage your data.Background InformationAskbot is based on CNPROG project by Mike Chen and Sailing Cai, project which was originally inspired by StackOverflow and Yahoo Answers.Footnotes(*) - If you want to install with django 1.2.x a dependency “Coffin-0.3” needs to be replaced with “Coffin-0.3.3” - this will be automated in the future versions of the setup script.(**) - With MySQL you have to use MyISAM data backend, because it’s the only one that supports Full Text Search.
Package: askcli
<h1>Create Menu like this</h1><pre><code>from askcli import Menu, Itemitems = list()# create items listitems = [Item('a', 'Action A'), Item('b', 'Action B'), 'action 3', Item('q', 'Quitter')]m = Menu(items)# print and wait keypressm.launch()print('_______')print("you choose {0} : {1}".format(m.choose, m.get_choosen_text()))</code></pre><strong>render</strong><pre><code>  a - Action ab - Action b3 - action 3q - Quitter? input : fX - error key, (unavailable)? input : q_______toy choose menu q : Quitter</code></pre><h1>Yes/No questions</h1><pre><code>from askcli.ask_bool import AskBoola = AskBool('valid',t_text="Yes",f_text="No",required=True)res = a.launch(err_mess="choose [yes] or [no]")print('_____')print("bool: {0}. choice {1}".format(res, a.get_text()))</code></pre><strong>render</strong><pre><code>? Confirmer [o/N] : yesx choose [yes] or [no]? Confirmer [o/N] : oui_____bool: True. choix Oui</code></pre><p><img src="http://doc.thivolle-cazat.fr/public/askcli/logo-50.png" alt="AskCli_img"><br><a href="https://github.com/thivolle-cazat-cedric/py-askcli.git">github project</a></p>
Package: askcmd
askcmd使用指南简介askcmd是一个轻量简便的命令行工具，帮助用户根据自然语言生成或解释命令行命令。使用 OpenAI 的gpt-3.5-turbo模型来生成或解释用户的查询。暂不使用本地模型，避免臃肿，目标是任何机器上随时使用避免繁琐的配置，设置key即用主要针对日常简短的命令，而不是大量的脚本生成，所以尽量的简化安装pip安装pip install askcmd从源码安装：gitclonehttps://github.com/newfyu/askcmd.gitcdaskcmd
pythonsetup.pyinstall设置首次使用以下参数来配置askcmd:askcmd--keyYOUR_OPENAI_KEY# 首次使用必须设置askcmd--api-baseAPI_BASE# 可选，设置反向代理地址，如果你的网络无法访问 OpenAI，可尝试设置为比如 "https://api.openai-proxy.com" 等公开的反向代理地址。输入 "none" 移除之前设置的反向代理地址。askcmd--proxyYOUR_PROXY# 可选，如果你是用自己的本地代理工具，在此处设置代理地址，例如 "http://127.0.0.1:1087"如果不知道代理怎么设置，直接无脑下面的命令askcmd--api-basehttps://api.openai-proxy.com使用askcmd# oraskcmd<任何查询>
Package: askCO
askCO: search and query records from Te Papa's collections APIThis script provides an interface for getting data from the Museum of New Zealand Te Papa Tongarewa. With it, you can run searches and request individual records, which are returned as python objects.See theAPI documentationfor what's available and how to construct searches.Te Papa's API requires a registration key in the headers of each request – go tohttps://data.tepapa.govt.nz/docs/register.htmlto register. I recommend adding the API key to an environment variable called 'TE-PAPA-KEY', and then calling that from your script to pass to askCO.InstallationInstall using pip:pip install askCOaskCO requires therequestsmodule.Run a search queryThetryCO.pyfile lays out a prepared search for a page ofMyosotisspecimen records in thePlantscollection. It calls the API key, sets functional and query parameters, and sets up then runs the search request.ASearchrequest object uses:quiet: Can beTrueorFalse. If False, askCO prints messages to the console like the URL being requested.timeout: How long in seconds before the query times out.attempts: How many times a single query will be retried after an error like a timeout or connection error.endpoint: Which API endpoint to query. Defaults toobjectbut others likeagent,taxon, andplaceare available.query: The term you're searching for. If not searching for something specific, use the*wildcard.filters: Any filters you want to use in a list of key/value pairs. Can specify a collection to search here.fields: Cut the response down to specified fields. Leave asNoneto get the full record, or use a list of comma-separated fieldnames.size: How many results to return at once.start: Where to begin the page of results. Useful when requesting subsequent pages of a search.TheScrollrequest object is similar, though it finds and returns all records, not just a page. It uses most of the same parameters, but notstart. Scrolling works well with asizeof1000. It can also use:duration: How long to keep the scroll query alive for on the API side. Defaults to1minute.max_records: How many records to retrieve, if you don't want everything.sleep: How long to wait between requests for scroll pages. Set this to0.1to ensure you avoid getting rate limited.Search and scroll results are stored as a list of dictionaries in therecordsattribute of the request object.HTTP status is stored as an integer in thestatus_codeattribute.Get a recordWhen requesting a single record, theResourcerequest object still uses:api_keyquiettimeoutattemptsendpointIt also takes anirnparameter, the specific number for that record within the endpoint. Make sure you've set the correct endpoint - /object/123456 isn't the same as /agent/123456.The record's data is stored as a dictionary in theresponse_textattribute of the request object.HTTP status is stored as an integer in thestatus_codeattribute.Get related records by adding the following parameters:related(set to True)size(the number of related records to return)types(a comma separated list oftypevalues, egObject,SpecimenorPerson)