Saravanan666/pypi-org huggingface dataset:
Package: cost-of-code
Cost Of CodeHow much would it have cost if GPT-4 had written your code?Installationpipinstallcost-of-codeUsagecost-of-codeArgumentsArgumentDescriptionDefault Value--repo-pathThe path to the git repository../--branch-nameThe name of the branch to analyze.master--cost-per-thousand-tokensThe cost (in USD) per thousand tokens according to the current OpenAI pricing.0.06--extension-whitelistA comma-separated list of file extensions to consider when analyzing the repository.*.py,*.js,*.java,*.c,*.cpp,*.goThis will output the total number of tokens in the repository and the estimated cost to generate these tokens using GPT-4.Sample outputTotal tokens in the current state of the repo: 1334
Estimated cost for the current state of the repo: $0.08
Total tokens in all added lines: 1517
Estimated cost for all added lines: $0.09How It WorksThe script starts by scanning the specified git repository.It uses GitPython to collect all the files that are currently tracked by git. This means it will not scan files that are ignored by git (like those specified in .gitignore).It uses gitpython to collect the lines added in each git commit.Only the added lines from the git diff patches are considered and tokenized. It does not tokenize lines that have been removed. If the user is not in a git repository, an error message is displayed and the program exits.It then tokenizes the lines from these files using thetiktokenPython package from OpenAI.tiktokenis a tokenizer that counts the tokens in the same way the OpenAI API does.The tokens from each file are then counted.It also uses gitpython to count the number of tokens added to the repo so far by scanning through the git commit history. Only the added lines in each git commit are considered for this token count.The script finally estimates how much it would cost to generate the same amount of tokens using GPT-4, based on the current pricing.It reports two cost estimates: one for the current state of the repository (total tokens in the code files in the current state), and one for the total added tokens over the entire history of the repository. This gives you a sense of how the cost to generate your codebase with GPT-4 would have accumulated over time as the codebase grew.Please note: this tool assumes that the current cost per 1,000 tokens for using GPT-4 is $0.06, as per OpenAI's current pricing. If OpenAI's pricing changes, you can update this value using the--cost-per-thousand-tokensargument.
Package: costra
CostraThis is a tool for automatic evaluation of Czech sentence embeddings using Costra 1.1 dataset.More information can be found in the following paper:Petra Barančíková and Ondřej Bojar:Costra 1.1: An Inquiry into Geometric Properties of
Sentence Spaces. In:
TSD 2020. Lecture Notes in Computer Science, vol 12284. Springer, Cham.The presentation of the paper with the accompanying video can be foundhere.Installation$pipinstallcostraUsageYou can get sentences from Costra using the following command:fromcostraimportcostrasentences=costra.get_sentences()Use the sentences to generate your embeddings. The embeddings are evaluating the following way:costra.evaluate(YOUR_EMBEDDINGS)CitationIf you use the tool for academic purporses, please consider citingthe following paper:@inproceedings{Costra,author={Petra Baran{\v{\c}}{\'{\i}}kov{\'{a}} and Ond{\v{\r}}ej Bojar},editor={Petr Sojka and Ivan Kope{\v{\c}}ek and Karel Pala and Ales Hor{\'{a}}k},title={Costra 1.1: An Inquiry into Geometric Properties of Sentence Spaces},booktitle={Text, Speech, and Dialogue - 23rd International Conference, {TSD}2020, Brno, Czech Republic, September 8-11, 2020, Proceedings},series={Lecture Notes in Computer Science},volume={12284},pages={135--143},publisher={Springer},year={2020},url={https://doi.org/10.1007/978-3-030-58323-1\_14},doi={10.1007/978-3-030-58323-1\_14},}LicenseThe data is distributed under theCreative Commons 4.0 BY.
Package: costreduce
CostReduceUsageInstallFor use this project, you need to install :pip install costreduceAfter install is complete. You can use thecostreduce --helpcommand.First RunCheck that you have correctly configured theAWS cli.costreduce analyze --provider aws --service ec2 --region us-east-1DevelopementRequirementsCheck that you have correctly configured theAWS cli.
For install requirements.poetry installFor launch virtual env.poetry shellAnalyze clipython costreduce/main.py analyze --provider aws --service ec2 --region us-east-1
Package: cos-uploader
COS Uploader跨平台的腾讯云对象存储上传工具支持 Windows、Linux、MacOS可以用于图片上传（图床）、文件分享等带有日志记录功能，可以查看上传历史支持通过系统自带的工具快速上传文件（Windows：「发送到」；MacOS：「快捷指令」）安装我们推荐使用pipx安装 COS Uploader，请参见其官网来安装 pipx。# 安装方法 1：使用 pipx 安装 (推荐)pipxinstallcos-uploader# 安装方法 2：使用 pip 安装pip3installcos-uploader# 安装方法 3：手动创建虚拟环境安装 (可能会出现未经测试的问题)mkdir-p~/.cos-uploader/bin
python3-mvenv~/.cos-uploader/venvsource~/.cos-uploader/venv/bin/activate
pipinstallcos-uploader
ln-s~/.cos-uploader/venv/bin/cos-uploader*~/.cos-uploader/binecho'export PATH="$PATH:$HOME/.cos-uploader/bin"'>>~/.profile使用安装完成后，请运行cos-uploader-install来初始化配置，然后编辑~/.cos-uploader/config.toml来配置 COS Uploader。请确保secret-id、secret-key、bucket、region配置正确，否则无法上传文件。如果输入cos-uploader-install后提示找不到命令，可能是 PATH 环境变量没有生效或没有配置，请依次检查：重新启动当前 shell，如exec zsh或exec bash重新启动当前终端，在 GUI 下应退出终端应用（iTerm2 下按Command ⌘+Q、Windows Terminal 下关闭窗口）查看 PATH 变量使用 pipx，需要根据 pipx 的提示将~/.local/bin添加到 PATHWindows 版的 Python 默认不会将Scripts添加到 PATH，需要手动添加。打开设置——系统——关于点击右侧「高级系统设置」，添加C:\Users\<用户名>\AppData\Roaming\Python\<Python版本>\Scripts到 PATH如果使用了手动创建虚拟环境安装（安装方法 3），请将~/.cos-uploader/bin添加到 PATH配置完成后，可以使用cos-uploader命令来上传文件。# 上传文件试试，测试配置是否正确echo"Hello World">hello.txt
cos-uploaderhello.txtWindows 平台功能在运行cos-uploader-install时，会自动创建「发送到」菜单项。配置完成config.toml后，在「资源管理器」中右键想要上传的文件，在菜单中选择「发送到」，然后选择「COS Uploader」即可上传该文件。MacOS 平台功能请导入COS Uploader 快捷指令导入完成后，请打开「快捷指令」App，选择左上角菜单中的「快捷指令——设置——高级」，勾选「允许运行脚本」。配置完成config.toml后，在 Finder 中右键想要上传的文件，在菜单中选择「快速操作」，然后选择「COS Uploader」即可上传该文件。查看历史COS Uploader 会记录上传历史，可以通过cos-uploader-history命令来查看。输出记录按照时间戳降序排列。cos-uploader-history默认会输出全部记录，可以通过-n参数来限制输出的记录数量。cos-uploader-history-n10COS Uploader 按月分割文件，文件日志格式为~/cos-uploader/history-yyyy-MM.ndjson，其中yyyy-MM为年月。cos-uploader-history仅输出当前月份的记录，可以通过-y、-m参数来指定时间。cos-uploader-history-y2023-m1COS Uploader 使用 NDJSON 格式来记录上传历史，可以通过cos-uploader-history -r来查看原始记录。cos-uploader-history-n10-r优化海外使用体验如果您上传文件的设备位于中国大陆境外，请修改config.toml如下：oversea-upload=true如果您的文件使用者位于中国大陆境外，请修改config.toml如下，并使用输出的Acc URL来访问文件。注意：需要在腾讯云控制台开启该 bucket 的「加速域名」功能。[domains]enabled=["accelerate"]# 在此处添加 accelerate，原来的可以删掉也可以保留COS Uploader 默认在 URL 格式化的时候，使用 UTC 时间。如果需要使用本地时间（使用上传设备的系统时间），请修改config.toml如下：utc-time=false构建COS Uploader 使用 Poetry 构建。请先安装 Poetry，然后执行以下命令：gitclonehttps://github.com/baobao1270/cos-uploader.gitcdcos-uploader
poetryinstall要发布到 PyPI，请执行以下命令：poetrypublish--build许可COS Uploader 使用 MIT 协议
Package: cot
COT (the Common OVF Tool) is a tool for editingOpen Virtualization Format(.ovf,.ova) virtual appliances, with a focus on virtualized network
appliances such as theCisco CSR 1000VandCisco IOS XRvplatforms.COT’s capabilities include:Add a disk or other file to an OVF/OVAEdit OVF hardware information (CPUs, RAM, NICs, configuration profiles, etc.)Edit product description information in an OVF/OVAEdit OVF environment propertiesDisplay a descriptive summary of the contents of an OVA or OVF packageEmbed a bootstrap configuration text file into an OVF/OVA.Remove files and disks from an OVF or OVA packageDeploy an OVF/OVA to an ESXi (VMware vSphere or vCenter) server to provision
a new virtual machine (VM), including serial port configuration as needed.For more information, refer to thedocumentation.
Package: cotat
cotat is a visualization tool for the analysis of contact tracing data. Given
a dataframe of people (along with their attributes) and a dataframe of
known contacts among the individuals, cotat exports an interactive HTML
visualization of the network. Furthermore, certain columns of the people
dataframe can be labeled as "membership columns" which allows one to visualize
which people belong to the same groups (e.g. building, club, etc..) even if
a contact between those individuals has not been reported.ExamplesInstallationThe quickest way to get started is with a pip install.pip install cotatLicenseLicensed under theMIT License
Package: cotea
cotea(COntrol Thread Execution Ansible)cotea is:Tool that provides Python API to run Ansible programmatically.cotea allows:To controlAnsible execution by iterating over the Ansible plays and tasksTo embedAnsible into another systemTo debugAnsible execution by getting the values of Ansible variables and by retrieving the results of the execution of Ansible tasks/playsInstallationpipinstallcoteaQuick startfromcotea.runnerimportrunnerfromcotea.arguments_makerimportargument_makerinv_path="/path/to/inventory"playbook_path="/path/to/playbook"arg_maker=argument_maker()# setting ansible-playbook flagsarg_maker.add_arg("-i",inv_path)arg_maker.add_arg("-vvv")# setting extra-varsextra_vars={"SPARK_VERSION":"3.0.2"}arg_maker.add_arg("--extra-vars",extra_vars)r=runner(playbook_path,am)whiler.has_next_play():current_play=r.get_cur_play_name()print("PLAY:",current_play)whiler.has_next_task():next_task=r.get_next_task_name()print("\tTASK:",next_task)r.run_next_task()r.finish_ansible()Any argument of the "ansible-playbook" command can be passed by usingargument_makerobjects.
The launch and control of the Ansible is carried out using therunnerobject.
With the help of cotea one can do certain things dynamically at specific Ansible execution points.Debugging# imports and object creation...whiler.has_next_play():whiler.has_next_task():task_results=r.run_next_task()some_task_failed=Falsefailed_task=Nonealready_ignore_failed=r.get_already_ignore_failed()already_ignore_unrch=r.get_already_ignore_unrch()fortaskintask_results:task_uuid=task.original_task_uuid# checking that task didn't have ignore_errors: trueiftask.is_failed:ifnottask_uuidinalready_ignore_failed:some_task_failed=Truefailed_task=task.task_ansible_objectbreak# checking that task didn't have ignore_unreachable: trueiftask.is_unreachable:ifnottask_uuidinalready_ignore_unrch:some_task_failed=Truefailed_task=task.task_ansible_objectbreak# the task was failed and didn't have# ignore_errors or ignore_unreachable flags -# going to interactive debugging modifsome_task_failed:interactive_discotech(failed_task,r)r.ignore_errors_of_next_task()r.finish_ansible()ifr.was_error():print("Ansible error was:",r.get_error_msg())Cotea also contains interactive debugging mode. Using the cotea one can detects that the task was failed in runtime (including the check that task didn't have ignore_errors or ignore_unreachable flag) and call theinteractive_discotech()method in that case as shown above.  Supported commands:'ft' - print info about the Failed Task'msg' - print all ansible error MSGs (including the ignored ones)'p' - print Progress bar'h'/'help' - print help message're' - RErun of the failed task'v' - add new Variable as extra var'c' - Continue ansible execution (go to the next task)'nt' - add New Task'w' - Watch ansible variable valueA detailed overview of all interfaces is provided incotea documentation.
Package: cotegen
Coding Test Input GeneratorCoTeGen automatically generates test suite of a typical coding test problem from the bottom. First, an initial test suite can be constructed with minimal cost. Next, search-based input generation with mutation fitness complement the initial test suite. Using mutated reference solution as a simplified form of wrong answers, we aim to kill as many mutants as possible. Hence, mutation coverage is provided as a complementary result.PyPI Release:https://pypi.org/project/cotegen/Academic Report:DropboxAdding New Reference SolutionAfter installing ourcotegenpackage, You can write a new reference solution as a simple python file to generate corresponding test cases.Please locate your reference solution file inexamples/tasksdirectory to utilize command line execution.You should define a new class inheritscotegen.Taskand with the same with filename.input_parameters,solve(reference solution),compare, andconvert_input_to_stringare essential methods to override.Please refer the example:importcotegen# http://codeforces.com/problemset/problem/1/AclassCF1A(cotegen.Task):input_parameters=\{'n':cotegen.types.Integer(1,10**9),'m':cotegen.types.Integer(1,10**9),'a':cotegen.types.Integer(1,10**9),}defsolve(n:int,m:int,a:int)->int:# 1 <= n, m, a <= 10**9return((n+(a-1))//a)*((m+(a-1))//a)@staticmethoddefcompare(user_answer:int,jury_answer:int)->bool:returnuser_answer==jury_answer@staticmethoddefconvert_input_to_string(n:int,m:int,a:int):return"%d%d%d\n"%(n,m,a)if__name__=='__main__':importosCF1A.generate_test_files(os.path.expanduser("~/Downloads/CS453/CF1A"))Define Input ParametersPredefine the types of input parameters and the range of each argument as a dictionary format.Currently,CoTeGensupports following types:cotegen.types.Integercotegen.types.IntegerSequencecotegen.types.NonIncreasingIntegerSequencecotegen.types.FixedVariableLengthIntegerSequencecotegen.types.IntegerPermutationDefine constraintIf needed, define the constraints among input parameters as list.constraints=[cotegen.constraints.Leq('M','N')]You can utilize these predefined constraints:cotegen.constraints.Leq(Lessthanorequal)cotegen.constraints.ListLengthLeqIntegercotegen.constraints.ListLengthReqIntegeror, use custom constraints giving custom function (which receives parameter dictionary and returns true/false) as an argumentcotegen.constraints.CustomConstraint(lambdatest:'d1'notintestor'd2'notintestortest['d1']!=test['d2'])Command Line Usagepython -m cotegen run random --filename <filename>

python -m cotegen run mutation --filename <filename> --show-survived <true or false>

python -m cotegen run kill --filename <filename> --save <directory path> --mutation-fitness <true or false>For example:python -m cotegen run random --filename CF158A

python -m cotegen run mutation --filename CF158A

python -m cotegen run kill --filename CF158A --save ~/Downloads --mutation-fitness true
Package: cotengra
cotengrais a python library for contracting tensor networks or einsum
expressions involving large numbers of tensors - the main docs can be found
atcotengra.readthedocs.io.
Some of the key feautures ofcotengrainclude:drop-ineinsumreplacementan explicitcontraction treeobject that can be flexibly built, modified and visualizeda'hyper optimizer'that samples trees while tuning the generating meta-paremetersdynamic slicingfor massive memory savings and parallelismsupport forhyperedge tensor networks and thus arbitrary einsum equationspathsthat can be supplied tonumpy.einsum,opt_einsum,quimbamong othersperforming contractionswith tensors from many libraries viacotengra,
even if they don't provideeinsumortensordotbut do have (batch) matrix
multiplication
Package: cothread
cothreadThecothreadPython library is designed for building tools using cooperative
threading.  This means that, with care, programs can effectively run several
tasks simultaneously.Thecothread.catoolslibrary is designed to support easy channel access from
Python, and makes essential use of the features of cooperative threads – in
particular,catools.camonitor()notifies updates in the background.See the documentation for more details.InstallationTo install the latest release, type:pip install cothreadTo install the latest code directly from source, type:pip install git+git://github.com/DiamondLightSource/cothreadDocumentationFull documentation is available athttps://DiamondLightSource.github.io/cothread
Package: cotidia-import-export
django-import-export is a Django application and library for importing
and exporting data with included admin integration.Features:support multiple formats (Excel, CSV, JSON, …
and everything else thattablibsupport)admin integration for importingpreview import changesadmin integration for exportingexport data respecting admin filtersDocumentationhttps://django-import-export.readthedocs.org/en/latest/Example appcd tests && ./manage.py runserverUsername and password for admin are ‘admin’, ‘password’.
Package: cotimelog
cotimelog, inspired from [ConcurrentLogHandler](https://pypi.python.org/pypi/ConcurrentLogHandler/0.9.1).
To be honest, it is almost the same code. Just edit to make the log file rotated by time.Installationpip install cotimelogConcurrentTimeRotatingFileHandlerThis class is a log handler which is a drop-in replacement for the python standard log handlerTimedRotatingFileHandler.
The TimedRotatingFileHandler will failed to rotate when multiple processes are trying to
write into the same file. You will meet this issue when you use uwsgi.
ThisConcurrentTimeRotatingFileHandlerclass is mainly developed to fix this issue.UsageUsingConcurrentTimeRotatingFileHandlerimport os
import time
from logging import getLogger, INFO
from cotimelog import ConcurrentTimeRotatingFileHandler

# Use an absolute path to prevent file rotation trouble.
log = getLogger()
logfile = os.path.abspath("mylogfile.log")
# Rotate log after 1 second
rotateHandler = ConcurrentTimeRotatingFileHandler(logfile, mode="a", when="S", backupCount=5)
log.addHandler(rotateHandler)
log.setLevel(INFO)

[log.info(str(i)) for i in range(10)]
time.sleep(1)
[log.info(str(i)) for i in range(10, 100)]LicenseApache License, Version 2.0
Package: coto
coto: An AWS Management Console ClientAlmost any AWS service can be fully controlled using the AWS API, for this we strongly recommend the use ofboto3. The problem is, that there exist some administrative tasks for which there is no public API, and there exist someAWS tasks that still require the AWS Account Root User.For example when creating a new account in an AWS Organization, there are some things that you are unable to do using the documented APIs, such as:set tax registration information (no documented API)set additional contacts (no documented API)reset AWS Account Root User password (no documented API)setup MFA for the AWS Account Root User (requires root user)Note:This project provides a client for the undocumented APIs that are used by the AWS Management Console.These APIs will be changing without any upfront warning!As a result of this, coto can break at any moment.ExamplesLogin using a boto session.importboto3importcotosession=coto.Session(boto3_session=boto3.Session())Login using root user password.importcotosession=coto.Session(email='email@example.com',password='s3cur3 p4ssw0rd!')Login using root user password with virtual MFA.importcotosession=coto.Session(email='email@example.com',password='s3cur3 p4ssw0rd!',mfa_secret='MFAxSECRETxSEEDxXXXXXXXXXXXXXXXXXX')Get account informationiam=session.client('iam')iam.get_account_info()Set tax registrationbilling=session.client('billing')billing.set_tax_registration(TaxRegistration={'address':{'addressLine1':'Adresweg 1','addressLine2':None,'city':'Delft','countryCode':'NL','postalCode':'2600 AA','state':'Zuid-Holland',},'authority':{'country':'NL','state':None},'legalName':'Besloten Venootschap B.V.','localTaxRegistration':False,'registrationId':'NL000000000B01',})Developmentpipenv install -d
pipenv run nosetests tests
cd docs
pipenv run make html
Package: cotohappy
CotohapPy: Cotoha for PythonCotohapPy (Japanese: コトハッピー) is for connecting toCotoha API, one of the Japanese morphological analysis engines, and is for reshaping the response more readably.InstallationThe easiest way to install the latest version is by using pip/easy_install to pull it from PyPI:pipinstallcotohappyYou may also use Git to clone the repository from GitHub and install it manually:gitclonehttps://github.com/278Mt/cotohappy.gitcdcotohappy
pythonsetup.pyinstallPython 3.7 and 3.8 are supported (frequently updated).RequirementsjsonrequestsUsageThis is one of the examples.├──payload.json
└──sjgyoen.pyJSON preperation (payload.json):{"AccessTokenPublishURL":"https://api.ce-cotoha.com/v1/oauth/accesstokens","APIBaseURL":"https://api.ce-cotoha.com/api/dev/","ClientId":"ABCDEFGHIJKLMNOPQRSTUVWXYZ123456","ClientSecret":"7890abcdefghijkl"}Programme (sjgyoen.py)importcotohappyimportrequestsfrombs4importBeautifulSoupdefget_kotonoha_story():url='https://www.kotonohanoniwa.jp/page/product.html'res=requests.get(url)soup=BeautifulSoup(res.content,'html.parser')p=soup.find_all('p',class_='mb24')[-1]returnp.textif__name__=='__main__':coy=cotohappy.API()""" getting parse """print('\n#### parse origin ####')sentence=get_kotonoha_story()kuzure=Falseparse_li=coy.parse(sentence,kuzure)forparseinparse_li:print(parse)print(parse.key_name)""" getting tokens; it is a little more difficult than MeCab Janome """print('\n#### parse tokens ####')forparseinparse_li:fortokeninparse.tokens:print(token)print(token.key_name)""" if you extract just nouns, you write: """print('\n#### extract nouns ####')nouns:[str]=[]forparseinparse_li:fortokeninparse.tokens:iftoken.pos=='名詞':nouns.append(token.form)print(nouns)Output:#### parse origin ####
靴職人を	 0,1,D,1,2
目指す	 1,2,D,0,1
高校生・タカオは、	 2,51,D,2,3
雨の	 3,4,D,0,1
朝は	 4,7,D,0,1
...
互いの	 47,48,D,0,1
思いを	 48,51,D,0,1
よそに	 49,51,D,0,1
梅雨は	 50,51,D,0,1
明けようとしていた。	 51,-1,O,0,6
form	 id,head,dep,chunk_head,chunk_func

#### parse tokens ####
靴	 0,クツ,靴,名詞,*,*,*,*,*
職人	 1,ショクニン,職人,名詞,*,*,*,*,*
を	 2,ヲ,を,格助詞,連用,*,*,*,*
目指	 3,メザ,目指す,動詞語幹,S,*,*,*,*
す	 4,ス,す,動詞接尾辞,連体,*,*,*,*
...
し	 148,シ,し,動詞活用語尾,*,*,*,*,*
て	 149,テ,て,動詞接尾辞,接続,連用,*,*,*
い	 150,イ,いる,動詞語幹,A,Lて連用,*,*,*
た	 151,タ,た,動詞接尾辞,終止,*,*,*,*
。	 152,,。,句点,*,*,*,*,*
form	 id,kana,lemma,pos,features[:5]

#### extract nouns ####
['靴', '職人', '高校生', 'タカオ', '雨', '朝', '学校', '公園', '日本', '庭園', '靴', 'スケッチ', 'ある日', 'タカオ', 'ひとり', '缶', 'ビール', '年上', '女性', 'ユキノ', 'ふたり', '約束', '雨', '日', '逢瀬', '心', '居場所', 'ユキノ', '彼女', '靴', 'タカオ', '六月', '空', '揺れ', '互い', '思い', 'よそ', '梅雨']Please check details onexamples.Whats's new?0.4.1, 0.4.2Partial errors elimination.0.4.0kuzureanddefaultbecomekuzure=Trueandkuzure=False0.3.6, 0.3.7Partial errors elimination.0.3.5In version 0.3.5, you can choose translating mode: for example, "information-seeking" in sentence type, to "情報獲得".0.3.4In version 0.3.4, you can use technical term dictionaries on parse, named entity extraction, keyword extraction and similarity calculation. However, I, origin master of CotohapPy, cannot use nor examine the mode because I use Cotoha API for Developer, not for Enterprise. I want for Academic.
Package: cotoolz
A set of utility functions for coroutines.ExampleIn this example we will be showingcomap.comapis like__builtins__.map; however, it knows about the coroutine
protocol (send,throw, andclose). Here we will show how you can
map over a coroutine while still being able to send into it.>>>defmy_coroutine():...yield(yield(yield1))>>>fromcotoolzimportcomap>>>cm=comap(lambdaa:a+1,my_coroutine())>>>next(cm)2>>>cm.send(2)3>>>cm.send(3)4>>>cm.send(4)Traceback(mostrecentcalllast):...StopIterationDependenciescotoolzdepends on CPython 3 and some means of compiling C99.
We recommend usinggccto compilecotoolz.