Saravanan666/pypi-org huggingface dataset:
Package: annofabcli
annofab-cliAnnofabのCLI(Command Line Interface)ツールです。
「タスクの一括差し戻し」や、「タスク一覧出力」など、Annofabの画面で実施するには時間がかかる操作を、コマンドとして提供しています。Annofabannofab-cliのドキュメント開発用ドキュメント注意作者または著作権者は、ソフトウェアに関してなんら責任を負いません。予告なく互換性のない変更がある可能性をご了承ください。Annofabプロジェクトに大きな変更を及ぼすコマンドも存在します。間違えて実行してしまわないよう、注意してご利用ください。廃止予定2022-11-01 以降JMESPathを指定できる--queryを削除します。使いどころがあまりないのと、jqコマンドでも対応できるためです。--wait_optionsを削除します。使いどころがあまりないためです。RequirementsPython 3.8+Install$ pip install annofabclihttps://pypi.org/project/annofabcli/Windows用の実行ファイルを利用する場合GitHubのリリースページからannofabcli-vX.X.X-windows.zipをダウンロードしてください。
zipの中にあるannofabcli.exeが実行ファイルになります。Dockerを利用する場合$ git clone https://github.com/kurusugawa-computer/annofab-cli.git
$ cd annofab-cli
$ chmod u+x docker-build.sh
$ ./docker-build.sh

$ docker run -it annofab-cli --help

# Annofabの認証情報を標準入力から指定する
$ docker run -it annofab-cli project diff prj1 prj2
Enter Annofab User ID: XXXXXX
Enter Annofab Password: 

# Annofabの認証情報を環境変数で指定する
$ docker run -it -e ANNOFAB_USER_ID=XXXX -e ANNOFAB_PASSWORD=YYYYY annofab-cli project diff prj1 prj2Annofabの認証情報の設定https://annofab-cli.readthedocs.io/ja/latest/user_guide/configurations.html参照使い方https://annofab-cli.readthedocs.io/ja/latest/user_guide/index.html参照コマンド一覧https://annofab-cli.readthedocs.io/ja/latest/command_reference/index.htmlよくある使い方受入完了状態のタスクを差し戻す"car"ラベルの"occluded"属性のアノテーションルールに間違いがあったため、以下の条件を満たすタスクを一括で差し戻します。"car"ラベルの"occluded"チェックボックスがONのアノテーションが、タスクに1つ以上存在する。前提条件プロジェクトのオーナが、annofabcliコマンドを実行する# 受入完了のタスクのtask_id一覧を、acceptance_complete_task_id.txtに出力する。
$ annofabcli task list --project_id prj1  --task_query '{"status": "complete","phase":"acceptance"}' \
 --format task_id_list --output acceptance_complete_task_id.txt

# 受入完了タスクの中で、 "car"ラベルの"occluded"チェックボックスがONのアノテーションの個数を出力する。
$ annofabcli annotation list_count --project_id prj1 --task_id file://task.txt --output annotation_count.csv \
 --annotation_query '{"label_name_en": "car", "attributes":[{"additional_data_definition_name_en": "occluded", "flag": true}]}'

# annotation_count.csvを表計算ソフトで開き、アノテーションの個数が1個以上のタスクのtask_id一覧を、task_id.txtに保存する。

# task_id.txtに記載されたタスクを差し戻す。検査コメントは「carラベルのoccluded属性を見直してください」。
# 差し戻したタスクには、最後のannotation phaseを担当したユーザを割り当てる（画面と同じ動き）。
$ annofabcli task reject --project_id prj1 --task_id file://tasks.txt --cancel_acceptance \
  --comment "carラベルのoccluded属性を見直してください"補足Windowsでannofabcliを使う場合WindowsのコマンドプロンプトやPowerShellでannofabcliを使う場合、JSON文字列内の二重引用をエスケープする必要があります。> annofabcli task list --project_id prj1  --task_query '{"\status\": \"complete\"}'
Package: annofetch
AnnoFetch is a command line script that fetches biological annotations for valid
database accessions.
Called with a file containing valid gene or protein accessions it produces a
csv-file containing available annotations for each accession.
Therefore AnnoFetch fetches entries from several databases like Genbank (NCBI),
Ena (EMBL) or UniProtKB and extracts the desired annotations.A short Tutorial is given in the README.md file
within the Example folder.
Package: annolab
This is the official python SDK for AnnoLab, the ML platform for NLP projects.AnnoLab WebsiteGetting StartedAssuming that you have Python andvirtualenvinstalled, set up your environment and install the required dependencies like this or you can install the library usingpip:$virtualenvvenv$.venv/bin/activate$python-mpipinstallannolabUsing the AnnoLab SDKTo get started, ensure you have an annolab account athttps://app.annolab.ai/signupand have created an API Key.
Instructions for creating an API Key may be found athttps://docs.annolab.ai/.Configure the sdk with your api key using one of the following two methods.Create an instance of the SDK passing your api_key.>>>fromannolabimportAnnolab>>>lab=AnnoLab(api_key='YOUR_API_KEY')Or set a global api key. All subsequent uses of the sdk will use this global key for authentication.>>>importannolab>>>fromannolabimportAnnolab>>>>>>annolab.api_key='YOUR_API_KEY'>>>lab=AnnoLab()Usage ExamplesCreating a project.lab.create_project('My New Project')# ORlab.create_project(name='My New Project',owner_name='AnnoLab')Getting an existing project.lab.find_project('My New Project')# ORlab.find_project(name='My New Project',owner_name='AnnoLab')Creating a new text source. Will be added to the “Uploads” directory by default.project=lab.find_project('My New Project')project.create_text_source(name='New Source',text='Some text or tokens for annotation.')# Specifying a directoryproject.create_text_source(name='New Source',text='Some text or tokens for annotation.',directory='Uploads')Creating a new pdf source from a file. Will be added to the “Uploads” directory by default.project=annolab.find_project('My New Project')project.create_pdf_source(file='/path/to/file')project.create_pdf_source(file='/path/to/file',name='custom_name.pdf',directory='Uploads')# You may also pass a filelike object or bytes. "name" is required when doing so.project.create_pdf_source(file=open('myfile.pdf','r+b'),name='myfile.pdf')Creating a new pdf source from a web source.project=annolab.find_project('My New Project')project.create_pdf_source_from_web(url='https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf',name='mypdf.pdf')Adding annotations.project.create_annotations(source_name='New Source',annotations=[{'type':'one','value':'value one','offsets':[0,10]},{'type':'two','value':'two','offsets':[10,20]}],)Adding annotations with relations.project.create_annotations(source_name='New Source',annotations=[{'clientId':1,'type':'one','value':'value one','offsets':[0,10]},{'clientId':2,'type':'two','value':'two','offsets':[10,20]}],relations=[{'annotations':[1,2]}])Exporting a project.project.export(filepath='/path/to/outfile.zip')# With optionsproject.export(filepath='/path/to/outfile.zip',source_ids=[1,2,3],layers=['GoldSet'],include_annotation_types=True,include_sources=True)
Package: annonex2embl
annonex2emblConverts an annotated DNA multi-sequence alignment (inNEXUSformat) to an EMBL flatfile for submission toENAvia theWebin-CLI submission tool.INSTALLATIONTo get the most recent stable version ofannonex2embl, run:pip install annonex2emblOr, alternatively, if you want to get the latest development version ofannonex2embl, run:pip install git+https://github.com/michaelgruenstaeudl/annonex2embl.gitINPUT, OUTPUT AND PREREQUISITESInput: an annotated DNA multiple sequence alignment in NEXUS format; and a comma-delimited (CSV) metadata tableOutput: a submission-ready, multi-record EMBL flatfileRequirements / Input preparationThe annotations of a NEXUS file are specified viaSETS-block, which is located beneath a DATA-block and defines sets of characters in the DNA alignment. In such a SETS-block, every gene and every exon charset must be accompanied by one CDS charset. Other charsets can be defined unaccompanied.Example of a complete SETS-BLOCKBEGIN SETS;
CHARSET matK_gene_forward = 929-2530;
CHARSET matK_CDS_forward = 929-2530;
CHARSET trnK_intron_forward = 1-928 2531-2813;
END;Examples of corresponding DESCR variableDESCR="tRNA-Lys (trnK) intron, partial sequence; maturase K (matK) gene, complete sequence"EXAMPLE USAGEcdinto the annonex2embl package, then ...On Linux / MacOSSCRPT=$PWD/scripts/annonex2embl_launcher_CLI.py
INPUT=$PWD/examples/input/TestData1.nex
METAD=$PWD/examples/input/Metadata.csv
mkdir -p $PWD/examples/temp/
OTPUT=$PWD/examples/temp/TestData1.embl
DESCR='description of alignment here'  # Do not use double-quotes
EMAIL=your_email_here@yourmailserver.com
AUTHR='your name here'  # Do not use double-quotes
MNFTS=PRJEB00000
MNFTD=${DESCR//[^[:alnum:]]/_}

python3 $SCRPT -n $INPUT -c $METAD -d "$DESCR" -e $EMAIL -a "$AUTHR" -o $OTPUT --qualifiername "note" --productlookup --manifeststudy $MNFTS --manifestdescr $MNFTD --compressOn WindowsSET SCRPT=$PWD\scripts\annonex2embl_launcher_CLI.py
SET INPUT=$PWD\examples\input\TestData1.nex
SET METAD=$PWD\examples\input\Metadata.csv
mkdir $PWD\examples\temp\
SET OTPUT=$PWD\examples\temp\TestData1.embl
SET DESCR='description of alignment here'
SET EMAIL=your_email_here@yourmailserver.com
SET AUTHR='your name here'
SET MNFTS=PRJEB00000
SET MNFTD=a_unique_description_here

python %SCRPT% -n %INPUT% -c %METAD% -d %DESCR% -e %EMAIL% -a %AUTHR% -o %OTPUT% --productlookup --manifeststudy %MNFTS% --manifestdescr %MNFTD% --compressCHANGELOGSeeCHANGELOG.mdfor a list of recent changes to the software.
Package: annoPipeline
annoPipeline - an API-enabled gene annotation pipelineannoPipelineuses APIs frommygene.infoandEntrez esummaryto annotate a user-provided list of gene symbols.Generates a pandas DataFrame with gene symbol, gene name, EntrezID, and bibliographic info for up to 5 pubmed publications where a functional reference was provided (more about functional references atGeneRIF).Designed to be useful for tasks such as:identifying relevant publications for a given functionanalyzing publications trends for genes belonging to a common pathwayidentifying influential PIs for a given gene network.Reqirements:Written for use with Python 3.7, not tested on other versions.annoPipelinerequires:numpy >= 1.16.2pandas >= 0.24.2Biopython >= 1.73openpyxl >= 2.6.1requests >= 2.21.0To Install:pip install annoPipelineOr clone the repo from github.
Then, in the annoPipeline directory, run:python setup.py installRequired dependencies will be installed if missing, may take a few seconds.Example usage:Execute the full annotation pipeline on a list of gene symbols like this:importannoPipelineasap# define a list of genes you would like annotatedgeneList=['CDK2','FGFR1','SLC6A4']# annoPipeline will execute full annotation pipeline (see individual functions below).df=ap.annoPipeline(geneList)# returns pandas df with annotations for gene and bibliographic info.ap.annoPipelinewill default save annotation output to Excel file named by geneList symbols separated by '_'.Warning!If querying asingle gene, still pass as a list. For example:importannoPipelineasapdf=ap.annoPipeline(['CDK2'])# for single gene queries still include [] - will be fixed in later versionv0.0.1 FunctionalityTask 1:From the MyGeneInfo API, use the “Gene query service" GET method to return details on a given list of human gene symbols.From the returned json, parse out the “name", “symbol" and “entrezgene" values and print to screenUsequeryGenes():importannoPipelineasapgeneList=['CDK2','FGFR1','SLC6A4']l1=ap.queryGenes(geneList)# returns list of dicts where keys are default mygene fields (symbol,name,taxid,entrezgene,ensemblgene)Task 2:Using the appropriate identifier from the above result, send a query to the MyGeneInfo “Gene annotation services" method for each geneFrom the resulting json, collate up to 5 generif descriptions per geneWrite the results to an Excel spreadsheet with columns: gene_symbol, gene_name, entrez_id, generifsUsegetAnno():importannoPipelineasapgeneList=['CDK2','FGFR1','SLC6A4']l1=ap.queryGenes(geneList)l2=ap.getAnno(l1,saveExcel=True)# saveExcel defaults Falsereturns pandas df with genes and up to 5 generifs from mygene.info.defaultsaveExcel=False, to save output to Excel must stateTrueifTrue, Excel file will be named by geneList symbols separated by '_'.Task 3:Use the Pubmed IDs associated with the above generif content to extract additional bibliographic information.UseaddBibs():importannoPipelineasapgeneList=['CDK2','FGFR1','SLC6A4']l1=ap.queryGenes(geneList)l2=ap.getAnno(l1)l3=ap.addBibs(l2)# will return df with genes and up to 5 generifs from mygene.infoCurrently returns the following bibliographic information when available:PubDateSourceTitleLastAuthorDOIPmcRefCount
Package: annopro
AnnoPROAnnoPRO generationstep 1: input proteins sequecesstep 2: features extraction by Profeatstep 3:  Feature pairwise distance calculation --> cosine, correlation, jaccardStep4: Feature 2D embedding --> umap, tsne, mdsStep5: Feature grid arrangement --> grid, scatterStep5: Transform --> minmax, standardAnnoPRO architectureEncoding layers: Protein features was learned by CNNs and Protein similarity was learned by FCs.Decoding layers: LSTMsInstallationinstall compilersdependencylapjvrequiresg++or other Cpp compiler, and annopro contains fortran extensional module and requiregfortranor other fortran compiler. Here is an example of installing them on Ubuntu.sudoaptinstallgccg++gfortran# or you can install by conda in your virtual env# command name is like# gcc: x86_64-conda_cos6-linux-gnu-cc# g++: x86_64-conda_cos6-linux-gnu-c++# gfortran: x86_64-conda_cos6-linux-gnu-gfortrancondainstallgcc_linux-64gxx_linux-64gfortran_linux-64install annoproYou can install it directly bypip install annoproor install from source code as following steps.
But you should install numpy first if you install it from source code because we neednumpy.f2pyto help us build fortran extension submodule.gitclonehttps://github.com/idrblab/AnnoPRO.gitcdAnnoPRO
condacreate-nannopropython=3.8
condaactivateannopro
pipinstall.UsageUse it as a terminal command. For all parameters, typeannopro -h.annopro-itest_proteins.fasta-ooutputUse it as a python executable packagepython-mannopro-itest_proteins.fasta-ooutputUse it as a library to integrated with your project.fromannoproimportmainmain("test_proteins.fasta","output")The result is displayed in the./output/bp(cc,mf)_result.csv.Notice: if you use annopro for the first time, annopro will
automatically download required resources when they are used
(lazy download mechanism)Possible problemspip is looking at multiple versions of XXX to determine which version is compatible with other requirements. this could take a while.Your pip is latest, back to old version such as 20.2, or just add--use-deprecated=legacy-resolverparam.Argument mismatch when building source code.Because your gfortran is latest and imcompatible,
edit setup.py and uncomment-fallow-argument-mismatchor
just use a earlier version of gfortran such as 4.8.5, 8.4ContactIf any questions, please create anissueon this repo, we will deal with it as soon as possible.
Package: annopyte
OverviewThis is designed to add and process annotations to python objects, a-laJava Annotations.Annotations are just metadata, something that is not directly used by code itself but can be queried by other parts of the program.Python itself doesn’t need special low-level implementations in order to support metadata, this library’s target is just to provide
a standard way of setting and querying metadata from python objects.Python 3 actually contains a basic version of metadata, but it’s limited to the arguments and return values of functions; this library is designed to extend
such support to other objects, so you can annotate a class, a function or any object with any kind of data.Current statusCurrently contains aPEP-3107compatible signature annotation implementation
for Python 2.x.Example codeBasic function annotation:>>> from annopyte.annotations.signature import annotate_f
>>> @annotate_f("return_value_annotation", param1="asd", param2="fgh")
... def myfunc(param1, param2=None):
...     pass
...
>>> print myfunc.__annotations__
{'return': 'return_value_annotation', 'param2': 'fgh', 'param1': 'asd'}
>>>Prospective code ( to be done )That’s the basic idea I’d like to implement for metadata usage:class Author(Annotation)
    name = "default"

@Author(name="John Doe")
class MyClass(object):
    pass

>>> query_for_metadata("mypackage", Author, name="John Doe")
[<class 'mypackage.subpackage.MyClass'>]
>>>That’s it.Homepagehttp://annopyte.franzoni.euSupport and discussionspydenji-users@googlegroups.comhttps://groups.google.com/d/forum/pydenji-usersContact meAlan Franzoni <usernameatfranzoni.eu>  (please note: write LITERALLY username in the email address!)
Package: annosSQL
annosSQL介绍annosSQL是一个基于python实现对mysql、oracle、sqllite数据库交互库，基础是基于对pymysql等库的封装，其用法有些特别。annosSQL中实现了一种缓存算法（通过LRU算法实现），对于近期相同sql的查询，
会优先从缓存获取，当缓存空间不存在该数据时，再次访问数据库。安装教程pipinstallannosSQL使用说明使用案例fromannosSQL.Innos.InterfaceimportInterface,HandlerfromannosSQL.Donos.doconnimportConnectionfromannosSQL.Donos.dosqlimportexecute@Interface()classT4:#配置处理器，这是入口，是必须@Handler()defhand(self)->list:pass#配置连接池@Connection(driver="mysql",host="127.0.0.1",user="root",password="123456",port=3306,database="czh")defconn(self)->any:pass'''查询所有数据，p1方法不能有任何的形参变量，必须是空函数，'->'箭头后面跟的是返回值类型，'list'或'dict'或'tuple'都行这里返回list数据类型'''@execute(sql="select * from user_copy1")defp1(self)->list:pass@execute(sql="select * from user_copy1")defp2(self)->dict:pass@execute(sql="select * from user_copy1")defp3(self)->tuple:pass'''占位符使用 {}/#{}/%s,条件查询时，函数的形参必须带类型，如s1方法里的id必须写出：id:int'''# {}占位符是通过str().format()实现的，此时，函数形参的位置十分重要，它将影响sql的条件的正确性@execute(sql="select * from user_copy1 where id={}")defs1(self,id:int)->list:pass# #{}占位符的基本形式如下：#{1}，通过#{}大括号里的数值来定位绑定到函数的形参@execute(sql="select * from user_copy1 where id=#{1}")defs2(self,id:int)->dict:pass# %s 多行占位符 支持数据多行数据类型：列表与元组@execute(sql="select * from user_copy1 where id=%s")defs3(self,id:int)->tuple:pass'''快捷符的使用：A(select)'''@execute(sql="A(select) user_copy1")defa1(self)->tuple:passif__name__=='__main__':t4=T4()t4.hand()#调用入口print('p1返回的数据：')p1=t4.p1()print(p1)print('p2返回的数据：')p2=t4.p2()print(p2)print('p3返回的数据：')p3=t4.p3()print(p3)print('s1返回的数据：')s1=t4.s1(1)print(s1)print('s2返回的数据：')s2=t4.s2(1)print(s2)print('s3返回的数据：')s3=t4.s2(1)print(s3)print('a1返回的数据：')a1=t4.a1()print(a1)运行结果p1返回的数据：
[[1, 'chx', '123455', '1'], [2, 'czh', '123456', '2']]
p2返回的数据：
[{'id': 1, 'user': 'chx', 'password': '123455', 'z': '1'}, {'id': 2, 'user': 'czh', 'password': '123456', 'z': '2'}]
p3返回的数据：
((1, 'chx', '123455', '1'), (2, 'czh', '123456', '2'))
s1返回的数据：
[[1, 'chx', '123455', '1']]
s2返回的数据：
[{'id': 1, 'user': 'chx', 'password': '123455', 'z': '1'}]
s3返回的数据：
[{'id': 1, 'user': 'chx', 'password': '123455', 'z': '1'}]
a1返回的数据：
((1, 'chx', '123455', '1'), (2, 'czh', '123456', '2'))xxxx其他说明#{} %s {}
# #{}、 {} 普通占位符
# %s 多行占位符 支持数据多行数据类型：列表与元组
# select * from  ->  A(select) user
# insert into table values(S{,}[])
# insert into table values(C{})
# insert into table values(L{})
# insert into table values(T{%s,%s})
Package: annot
]# annotAnnotate data analysisCommand line usageStart in a directory with some data:ls
faa-wildlife.csvTo create an annot project:annot
No .annot directory here. Want to create one? [y]/n: y
Created .annot
Created .annot/index.rst
Created .annot/index.html
Created .annot/DataTables/
Created .annot/data
Created .annot/tempTo open the annot in a web browser:annot openTo add a datasets to the page:annot add my.csvTo add comments to the page:annot markdown '# Background'
annot markdown 'This csv has my data'
-or-edit .annot/index.rst in a text editor, thenannot renderTo add content to the page from Jupyter:import annot
page = annot.Page('path/to/.annot')
page.add_dataframe(df)
page.add_plot(matplotlib.pyplot.gca())
page.add_markdown('# Results')
page.add_html('')Use from VisidataTo save visidata sheets directly to page:Using vdannot:Setup:
  PYTHONPATH=dir/with/annot.py
  export PYTHONPATH
  ~/.visidata/vdannot.py # exists
  ~/.visidatarc contains 'import vdannot'

When you have a sheet to save:
  SPACE annot-csv ENTER my_freq_table ENTERWithout using vdannot:Start this long-running process:
> annot monitor

In a different shell, open visidata. When you create a new sheet you
want to save, such as after creating a frequency table, save the
sheet as csv in the .annot/data directory
 - Ctrl-S
 - Path: .annot/data/my_freq_table.csvTo add a markdown comment:SPACE annot-markdown ENTER This is interesting data ENTER
Package: annotatec
annotatechelps you create Python packages with C embeddings.Imagine you're developing C library and already have more than 50 functions. Sometimes you change signatures of old functions or rename them. It'll be headache to write and support allctypes-declarations for Python wrapper.annotatecwill create all Python objects for you. All you need is to provide declarations, which can be placed directly into your C code.Minimal livable exampleYou have some librarylib.cand it's headerlib.h. These files were compiled intolib.so(orlib.dllin Windows).lib.csource:#include"lib.h"intsum(inta,shortb,longlongc){returna+b+c;}lib.hsource:/* @function sum* @return int* @argument int* @argument short* @argument longlong*/intsum(int,short,longlong);Here's a Python wrapper:importannotateclibc=annotatec.Loader(library="lib.so",headers=["lib.h"])That's all! Now you can test it like so:>>>libc.sum(1,2,3)<<<6ReferenceRead detailed reference inwiki-pages.
Package: annotated
Annotated=========Annotated provides a decorator that flags a function's annotations as useful, callable expressions. Each annotation will be called with its corresponding argument as first parameter, and the result will replace that argument.If no annotation was specified for this particular argument, it will behave as if `lambda x: x` had been used as annotation.`@annotated` Decorator----------------------The `@annotated` decorator is meant to decorate functions, or other objects with a `__code__` attribute (a class is **not** one). It indicates that the function decorated has "active" annotations, for example:```pythonfrom annotated import annotated@annotateddef hello(name: str):print('Hello, ' + name + '!')hello('world')# "Hello, world!"hello(None)# "Hello, None!"```Albeit a bad example (one would rather use `str.format` or the `%` notation to include a value in a string), this illustrates the behaviour of an `@annotated` function.Used this way, `@annotated` ensures that the `name` argument of the `hello` function is **always** a character string.`@annotated` also respects default values, and applies annotations to them. Thus, if we were to rewrite `hello` such as:```pythonfrom annotated import annotated@annotateddef hello(name: str='world'):print('Hello, ' + name + '!')hello()# "Hello, world!"```The default value would be honored, as well as any non-defaults.It should be noted that `@annotated` supports both return annotations (`->`), keyword argument annotations and `*`/`**` annotations.Using `@annotated` on an incompatible (`__code__`-less) object will result in a `TypeError` exception.
Package: annotated-dataset
Annotated DatasetInstallpipinstallannotated-datasetUsagefromannotated_dataset.inception_clientimportInceptionClientfromannotated_dataset.exportimportexportimportlogginglogging.basicConfig()logging.getLogger().setLevel(logging.INFO)# Create client for inception serverinception_client=InceptionClient.create_client(host='https://mapa.pangeamt.com/',username='xxx',password='xxx')# Configconfig={'dataset_name':'MAPA_BG','inception_projects':[{'name':'Bulgarian_Legal_1','use_segmentation_by_newline':True,'inception_client':inception_client},{'name':'Bulgarian_Legal_2','use_segmentation_by_newline':True,'inception_client':inception_client}],'gold_corpus_preferred_resources':['Bulgarian_Legal_1'],'export_dir':'./'}export(config)Advanced usagesee example_advanced.py
Package: annotated-images
Annotated imagesSplit folders with files (e.g. images) into train, validation and test folders.Keeps the annotation data (if there are any) together with their images.Given the input folder in the following format:input/
        img1.jpg
        img1.xml
        img1.json
        img1.*
        img2.jpg
        img2.xml
        img2.json
        img2.*
        ...
    ...Gives you this:output/
    train/
        img1.jpg
        img1.xml
        img1.json
        img1.*
        ...
    val/
        img2.jpg
        img2.xml
        img2.json
        img2.*
        ...
    test/
        whatever.jpg
        whatever.xml
        whatever.json
        whatever.*
        ...Works on any file types.Aseedlets you reproduce the splits.Counting occurrences of tagsThis package includes functions to count the occurrences of a tag in JSON and XML files.They can go through all files in a folder and count the occurrence of each tag on every (annotated) image.Installpipinstallannotated-imagesModuleimportannotated_images# To only split into training and validation set, set a tuple to `ratio`, i.e, `(.8, .2)`.annotated-images.split('input_folder',output="output",seed=1337,ratio=(.8,.1,.1))importannotated_images# Returns total count of 'tag' found in all json files in 'path'annotated-images.findTagsJson('path','tag')# Returns total count of 'tag' found in all xml files in 'path'annotated-images.findTagsXml('path','tag')Refthis package is forked fromhttps://github.com/jfilter/split-folders