Saravanan666/pypi-org huggingface dataset:
Package: tocka-django-unslashed
This middleware provides the inverse of the Django CommonMiddlewareAPPEND_SLASHfeature. It can automatically remove trailing URL
slashes and 301 redirect to the non-slash-terminated URL. This behavior
is performed if the initial URL ends in a slash and is invalid, removing
the trailing slash produces a valid URL, andREMOVE_SLASHis set to
True. Otherwise there is no effect.For example, foo.com/bar/ will be redirected to foo.com/bar if you don’t
have a valid URL pattern for foo.com/bar/ but do have a valid pattern
for foo.com/bar andREMOVE_SLASH=True.Fork infoThis is a fork fromhttps://github.com/harshvb7/django-unslashed, which
is in turn a fork ofhttps://github.com/dghubble/django-unslashed.Changes to this fork: * updated for Django 1.10, compatible down to
1.8, and Python 2.7, 3.3-3.5. * PyPI package name with prefixtocka-* Added CircleCI and Codecov, removed TravisCIInstallTo installdjango-unslashed,pip install tocka-django-unslashedIf you’re using arequirements.txtfile, adddjango-unslashed>=0.3.0to it.UsageModify your Djangosettings.pyfile to addunslashed.middleware.RemoveSlashMiddlewareto yourMIDDLEWARE_CLASSESjust before or afterdjango.middleware.common.CommonMiddleware.MIDDLEWARE_CLASSES=(# ...'unslashed.middleware.RemoveSlashMiddleware','django.middleware.common.CommonMiddleware',# ...)SetREMOVE_SLASHto True andAPPEND_SLASHto False,APPEND_SLASH=FalseREMOVE_SLASH=TrueIfREMOVE_SLASHis False or unset, the RemoveSlashMiddleware has no
effect.SetUNSLASHED_USE_302_REDIRECTto True if you want to use
HttpRedirect instead of HttpPermanentRedirect,UNSLASHED_USE_302_REDIRECT=TrueRationaleWeb applicationsshouldhave a URL structure which either:Uses trailing slashes and redirects to append slashes if invalid
non-slashed-terminated URLs are accessed.Uses no trailing slash URLs and redirects to unslahed URLs if invalid
slash terminated URLs are accessed. The prior is the Django default,
while the later is possible by adding this middleware to your
project.NotesBased closely on Django’s APPEND_SLASH CommonMiddlewareimplementation.TestingToxThis will run tests on multiple versions of Python and Django, as
defined intox.ini.$gitclonehttps://github.com/frnhr/django-unslashed.git$cddjango-unslashed$pipinstall-rrequirements-dev.txt$tox.........________________________________________________________________________________________________________summary_________________________________________________________________________________________________________django_master-py35:commandssucceededdjango_master-py34:commandssucceededdjango_master-py27:commandssucceededdjango110-py35:commandssucceededdjango110-py34:commandssucceededdjango110-py27:commandssucceededdjango19-py35:commandssucceededdjango19-py34:commandssucceededdjango19-py27:commandssucceededdjango18-py35:commandssucceededdjango18-py34:commandssucceededdjango18-py33:commandssucceededdjango18-py27:commandssucceededlint:commandssucceededcongratulations:)LicenseMIT License
Package: tock-py
tock-pyBuild chatbots using Tock and PythonDISCLAIMERSWork in progressNot production readynot yet implementedManaging User / conversational contextTestingPrerequisitesRun a Tock bot in API modeCreate a Bot application using the web connector type in Tock Studio and get your API keyEnvironmentWe suggest you to create an isolated Python virtual environment:$ python3 -m venv env
$ source env/bin/activateInstall tock-py on your project$ pip install tock-pyUsageimport logging
import os

from tock.bot import TockBot
from tock.bus import TockBotBus
from tock.story import story

logging.basicConfig(
    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
    level=logging.DEBUG
)

# First create story that handle "greetings" intent
@story(
    intent="greetings",
    other_starter_intents=[],
    secondary_intents=[]
)
def greetings(bus: TockBotBus):
    bus.send("Hello i'm a tock-py bot")

# If decorator @story is not provided, the intention with the function name is user
def goodbye(bus: TockBotBus):
    bus.send("Hello i'm a tock-py bot")

# Configure your bot and start it
TockBot() \
    .register_story(greetings) \
    .register_story(goodbye) \
    .start_websocket(apikey=os.environ['TOCK_APIKEY'])


# You can also use webhook mode
# TockBot() \
#     .register_story(greetings) \
#     .register_story(goodbye) \
#     .start_webhook("0.0.0.0", "tock-py", 5000)Sentencebus.send("Hello i'm a tock sentence")Suggestionbus.send(
    Sentence.Builder("Hello i'm a tock sentence")
        .add_suggestion("with suggestion")
        .build()
)Card with actionbus.send(
    Card
        .Builder()
        .with_title("card title")
        .with_sub_title("with subtitle")
        .with_attachment("https://www.sncf.com/themes/sncfcom/img/favicon.png", AttachmentType.IMAGE)
        .add_action("visit", "http://www.sncf.com")
        .build()
)Carouselcard = Card \
    .Builder() \
    .with_title("Card title") \
    .with_sub_title("wit subtitle") \
    .with_attachment("https://www.sncf.com/themes/sncfcom/img/favicon.png", AttachmentType.IMAGE) \
    .add_action("visit", "http://www.sncf.com") \
    .build()
    
bus.send(
    Carousel
        .Builder()
        .add_card(card)
        .add_card(card)
        .add_card(card)
        .build()
)Custom stateYour bot can store custom state data in sessiondef greetings(bus):
    if bus.session.get_item("greetings_flag") is None:
        bus.send("Welcome")
    else:
        bus.send("Welcome back")
    bus.session.set_item("greetings_flag", True)You can clear sessiondef goodbye(bus):
    bus.session.clear()
Package: to-cloud-run
將服務部署到 GCP Cloud Run這個 Python 腳本可以幫助你快速將你的服務部署到 GCP Cloud Run。你只需要提供服務名稱、Docker 映像標籤、GCP 服務帳戶等參數，它就會自動編譯 Docker 映像並部署到 GCP Cloud Run 上。前置作業在開始之前，你需要先安裝以下工具：DockerGoogle Cloud SDK你還需要擁有一個 GCP 帳戶以及一個 GCP 專案。在你的 GCP 專案中，你需要創建一個服務帳戶，並為它授予以下權限：Cloud Run AdminService Account UserStorage AdminViewer最後，你需要在你的本地環境中設置以下環境變量：GCP_PROJECT_ID：你的 GCP 專案 ID。GCP_SERVICE_ACCOUNT：你創建的 GCP 服務帳戶的 email。pip install 使用方法pip install to-cloud-runpython -m to_cloud_rungithub 使用方法下載to_cloud_run.py腳本。在你的服務目錄中創建一個.env文件，並在其中設置GCP_PROJECT_ID和GCP_SERVICE_ACCOUNT環境變量。創建一個requirements.txt文件，列出你的 Python 依賴項。創建一個app.py文件，編寫你的服務代碼。在命令行中運行以下命令：pythonto_cloud_run.py-n<service-name>-t<image-tag>-s<service-account>其中，<service-name>是你的服務名稱，<image-tag>是你的 Docker 映像標籤，<service-account>是你的 GCP 服務帳戶 email。你可以使用其他可選參數來配置 Cloud Run 的 CPU、內存、最大實例數等參數。等待部署完成。部署完成後，你可以在 GCP Cloud Run 控制台上查看你的服務。可選參數-n, --service-name：你的服務名稱。-p, --platform：Docker 映像編譯平台，默認為linux/amd64。-t, --image-tag：Docker 映像標籤。-s, --service-account：GCP 服務帳戶 email。-c, --cpu：Cloud Run CPU 分配，默認為0.08。-m, --memory：Cloud Run 內存分配，默認為128Mi。-i, --max-instances：Cloud Run 最大實例數，默認為1。-r, --region：Cloud Run 部署區域，默認為us-central1。-o, --port：容器端口，默認為8000。注意事項該腳本僅支持 Python 3.6 及以上版本。該腳本需要使用 Docker 進行映像編譯，請確保你已經安裝了 Docker。該腳本需要使用 Google Cloud SDK 進行 Cloud Run 部署，請確保你已經安裝了 Google Cloud SDK。該腳本會在當前目錄下創建一個Dockerfile文件，請確保該目錄有寫入權限。該腳本會自動將 Docker 映像推送到 GCR 中，請確保你有相應的權限。該腳本會自動設置 Cloud Run 部署區域為us-central1，如果需要部署到其他區域，請使用-r參數指定。該腳本會自動設置 Cloud Run 最大實例數為1，如果需要多實例運行，請使用-i參數指定。
Package: toc-markdown
Markdown Table of Contents GeneratorThis tool scans Markdown files to detect headers and subsequently creates a Table of Contents (TOC) with direct links to the respective sections. It either updates an existing TOC or generates a new one if none is found.Table of ContentsFeaturesInstallationIntegration with VimFeaturesAutomatically generates a table of contents for your Markdown files.Either updates an existing TOC or inserts a new one if absent.Supports headers of levels 2 to 3.Provides clickable links leading to the corresponding sections within the document.Preserves the structure and formatting of the Markdown file.InstallationTo install, usepiporpipx:pipxinstalltoc-markdownIntegration with VimFor a seamless experience in updating the TOC of your Markdown files through Vim, ensure thetoc-markdowntool is either accessible from your PATH or specify its absolute path in the Vim configuration.Include thetoc-markdowntool in your PATH environment variable, enabling direct execution from Vim.ORIf thetoc-markdowntool isn't in the PATH, specify its absolute path in the Vim configuration provided below.Next, add the following line to your.vimrcfile:autocmdFileTypemarkdownnnoremap<buffer><leader>t:w<cr>:!toc-markdown %:p<cr>:e!<cr>With this setup, simply press<leader>tin normal mode when editing a Markdown file in Vim. This will save the file, run thetoc-markdowntool on it, and then reload the edited file to display the refreshed TOC.
Package: tocm-reference-data
ToCM_reference_dataA python library to process reference data usefull for my projects.How toThis is a small code example of how this library worksimporttocm_reference_dataasrefimportmatplotlib.pyplotaspltforlineinref.Hestand_2015.figure7.lines:plt.plot(line.x,line.y,label=line.label)plt.legend()plt.show()print(ref.Hestand_2015.metadata)
Package: tocode
tocodeThis is a library that can convert the strings to code and return the literal eval of that, it will convert strings which contain:liststuplesdictionariessets
into the python eval.OverviewThe most important thing in this library that make it unique is:if your strings don't have anyquotationno worries it will add quotations for you!examplebefore:! "{'this': 5, (Alex, Daniel): are good boys, (5, 4): 8.5}"after:+ "{'this': 5, ('Alex', 'Daniel'): 'are good boys', (5, 4): 8.5}UsageIn the following paragraphs, I am going to describe how you can get and use tocode for your own projects.Getting itTo download tocode library, either fork this github repo or simply use Pypi via pip.$pipinstalltocodeUsing ittocode was programmed with ease-of-use in mind. First, import literal_eval from tocode.for more exact usage documents you can see the example fileshereimporttocode# Example:my_array=" ['Hello', Goodbye my friend, 2.5, (4, ok), {one: 450, 'two': 12}] "my_array=tocode.literal_eval(my_array,no_string_quotation=True)"""if some of the strings don't have quotation set `no_string_quotation` to Trueotherwise, set it to False or leave it."""# will return the list into a python listoutput:['Hello','Goodbye my friend',2.5,(4,'ok'),{'one':450,'two':12}]SupportSupported versions of python for this library are as follow:Python v3.4Python v3.5Python v3.6Python v3.7Python v3.8Python v3.9Python v3.10LicenseThis project is under BST license read ithere:Permission 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.
Package: tocot
tocotTable Of Contents wO TsukuruThis script build a TOC for markdownRequiredPython >= 3.7Installpip install tocotUsage$ tocot --help
Usage: tocot [OPTIONS] IN_FILE OUT_FILE

Options:
  -l, --level INTEGER    [default: 2]
  -e, --to_embed TEXT    [default: [TOC]]
  --exclude_symbol TEXT  [default: exclude-toc]
  --help                 Show this message and exit.exampleYou have to write "[TOC]" in your markdown file, then run below command, "[TOC]" is replaced to Table of Contents.$ tocot README.md new_README.mdREADME.md# test
これはテスト

# 目次
[TOC]

# level1
## level2
### level3
#### level4
##### level5
###### level6

## 日本語のテスト

#### level3を飛ばす

# exclude <!-- exclude-toc -->
除外されるはず

\```
# exclude
code blockの中なので無視される
\```new_README.md<a id="sec1-0"></a>
# test
これはテスト

<a id="sec2-0"></a>
# 目次
* [test](#sec1-0)
* [目次](#sec2-0)
* [level1](#sec3-0)
  * [level2](#sec3-1)
  * [日本語のテスト](#sec3-2)


<a id="sec3-0"></a>
# level1
<a id="sec3-1"></a>
## level2
### level3
#### level4
##### level5
###### level6

<a id="sec3-2"></a>
## 日本語のテスト

#### level3を飛ばす

# exclude <!-- exclude-toc -->
除外される

\```
# exclude
code blockの中なので無視される
\```If you want to change "[TOC]" to "table of contents template".$ tocot -e "table of contents template" README.md new_README.mdYou can select how deep include Table of contents.
Including title level is defined the number of "#".$ tocot -l 4 README.md new_README.mdIf you want to exclude title, you write comment "exclude-toc" next to the title.$ tocot README.md new_README.mdYou can change "exclude-toc" to "i hate this title".$ tocot --exclude_symbol "i hate this title" README.md new_README.mdif you want to debug, you can write to stdout.$ tocot README.md -
Package: toctree-plus
Enhanced Sphinx TocTree which shows classes, functions etc. as if they were sections.DocsTestsPyPIAnacondaActivityQAOtherThis idea has been suggested insphinx-doc/sphinx#6316andsphinx-doc/sphinx#6435You can seetoctree-plusin action inthis project’s documentation,
and the documentation fordomdf-python-tools(ReadTheDocs Sphinx Theme) andwhey(Furo Sphinx Theme).Installationtoctree_pluscan be installed from PyPI or Anaconda.To install withpip:$python-mpipinstalltoctree_plusTo install withconda:First add the required channels$condaconfig--addchannelshttps://conda.anaconda.org/conda-forge$condaconfig--addchannelshttps://conda.anaconda.org/domdfcodingThen install$condainstalltoctree_plusEnabletoctree_plusby adding"sphinxcontrib.toctree_plus"to theextensionsvariable inconf.py:extensions=[..."sphinxcontrib.toctree_plus",]For more information seehttps://www.sphinx-doc.org/en/master/usage/extensions/index.html#third-party-extensions.ConfigurationThere is currently only a single configuration option:toctree_plus_types.
This determines the directive types that appear in the toctree. The default value is{"class", "function", "method"}.LinksSource:https://github.com/sphinx-toolbox/toctree_plusBugs:https://github.com/sphinx-toolbox/toctree_plus/issues
Package: tod
TodCentral management of your personal configs using a git repository and symlinks.InstallationInstall the client:pip install todPoint to your configuration repo:# Environment variables will be expanded.
export TOD_FILE_REPO='/path/to/your/repo'Config Repo LayoutThe Config Repo format is as follows:Root Config Directory
├── files
│   ├── file_a
│   ├── ...
│   └── file_z
└── mapping.iniThemapping.inifile maps configs from thefilesdirectory to their installation path.
Currently everything lives under adefaultsection, and all mappings are of the formCONFIG_FILE: INSTALL_PATH.
An example config is shown below.  It would map$REPO/files/vimrcto~/.vimrc, andREPO/files/tmux.confto~/.tmux.conf:[default]
vimrc: ~/.vimrc
tmux.conf: ~/.tmux.conf

[git]
gitconfig: ~/.gitconfigUsageSee the current status of the of all sections:tod statusSee the current status of a single section:tod status -s SECTIONLink a single config into the system:tod link -S SECTION -n NAMELink a single section into the system:tod link -s SECTION -aLink all sections into the system:tod link -aUnlink a single config from the system:tod unlink -s SECTION -n NAMEUnlink a all sections from the system:tod unlink -aTODOAdd section inheritanceexample:[osx]inherits all of[vim],[git], and[zsh]Add more helpers to initiliaze a system quicklytod init-gGIT_URI-sSECTIONwould clone the specified git repo then link the specified section into the system.Force linking.move the conflicting files to a backup location, then link as needed.
Package: todd
toddis an interactive console TODO-list manager with VI key bindings.It provides a minimalistic interface with a view on your todo list,
following in the spirit of spirit ofrangerandmutt.The file format conforms totodo.txt. This means
you have full control over your data and can choose to store it locally
or in the cloud (like Dropbox). You can use different applications to
access your tasks on your desktop or mobile devices.Thanks to the creator and contributors oftodotxt-machinefor providing the basis for this project.FeaturesView your tasks in a column formatted list with relative due datesSwitch context (only view tasks that you can work on)Sort by due date or prioritySearch/filterEdit in plain text with tab completion or adjust priority and dueDue dates can be set withweekday name (mo, tu, …)offset (2din two days,3min three moths,1yin a
year)a fixed date (YYYY-MM-DD)InstallationSupports Python 3.6 on Linux or macOS.Usingpippip3 install todd(Orpip install toddif Python 3 is the default for your system.)ManuallyDownload or clone this repo and run thetodd.pyscript.git clone https://github.com/laktak/todd
cd todd
pip3 install -r requirements.txt
./todd.pyCommand Line Optionstodd

Usage:
  todd [--config FILE] [TODOFILE] [DONEFILE]
  todd (-h | --help)
  todd --version
  todd --show-default-bindings

Options:
  -c FILE --config=FILE               Path to your todd configuraton file [default: ~/.toddrc]
  -h --help                           Show this screen.
  --version                           Show version.
  --show-default-bindings             Show default keybindings in config parser formatConfig FileYou can tell todd to use the same todo.txt file whenever it starts up by
adding afileentry to the~/.toddrcfile. If you want to
archive done tasks, you can specify a done.txt file using anarchiveentry. You can also set you preferred colorscheme or even define new
themes.Here is a short example:[settings]
file = ~/todo.txt
archive = ~/done.txt
enable-word-wrap = True
colorscheme = myawesomethemeColor SchemesHere is a config file with a complete colorscheme definition:[settings]
file = ~/todo.txt
colorscheme = myawesometheme

[colorscheme-myawesometheme]
plain=h250
...You can add colorschemes by adding sections with names that start withcolorscheme-. Then under the[settings]section you can say
which colorscheme you want to use.The format for a color definitions is:name=[foreground],[background]Foreground and background colors are follow the 256 color formatsdefined by
urwid.
You can see all the colors definedhere.Key BindingsSee active key bindings withhor?in todd.You can customize any key binding by adding a setting to the[keys]section of your config file~/.toddrc.For a list of the default key bindings run:todd --show-default-bindings
Package: todd-ai
Toolkit for Object Detection Distillation_/_/_/_/_/                _/        _/
   _/      _/_/      _/_/_/    _/_/_/
  _/    _/    _/  _/    _/  _/    _/
 _/    _/    _/  _/    _/  _/    _/
_/      _/_/      _/_/_/    _/_/_/InstallationPrerequisites:torchtorchvisionmmcv/mmcv_full (optional)pipinstalltodd_aiDeveloper Guidespipinstall.\[dev,doc,test\]TODOComplete repr
Package: toddleocr
ToddleOCR 拓牍ToddleOCR是一个基于Torch实现的OCR（光学字符识别）项目，它fork自PaddleOCR，并经过作者进行了改进和优化。该项目旨在通过使用Torch框架来学习和理解OCR技术的实现原理。项目名称的含义ToddleOCR这个名称有三层意思：结合了Torch和Paddle两个框架的特点，因此命名为Toddle。"Toddle"在英文中意味着蹒跚学步，也代表这个项目是作者在学习过程中的探索和尝试。"Toddle"在中文中音译为"拓牍"，意指从竹片上拓印文字，引申为从图片中提取文字。项目状态目前，ToddleOCR处于探索阶段，仍在不断地进行改进和优化。欢迎开发者和研究者参与其中，一起探索OCR技术的前沿。项目文档目前还是PaddleOCR的文档。功能特点在ToddleOCR中，你可以期望以下功能特点：文字检测：能够在图像中准确地检测出文字区域的位置和边界框。文字识别：能够将检测到的文字区域进行识别，输出对应的文字内容。表格识别：能够将检测到的单元格重建成表格关键信息提取： 包括语言实体识别(SER)，关系抽取(RE)多语言支持：支持多种语言的文字检测和识别，包括中文、英文等常见语言。- 高性能：经过优化的算法和模型结构，能够在保证准确性的同时提高处理速度。快速开始环境要求在开始之前，请确保你已经安装了以下环境：Python 3.xTorch 2.x其他依赖库（具体依赖请参考项目文档）安装克隆项目代码到本地：gitclonehttps://github.com/arry-lee/ToddleOCR.git或者pipinstalltoddleocr进入项目目录：cdToddleOCR安装依赖：pipinstall-rrequirements.txt下载模型
目前提供的模型可以在这里手动下载，代码运行时也会自动下载：zh_ocr_cls_v1.rar文本角度分类模型zh_ocr_det_v3.rar中英文检测模型zh_ocr_rec_v3.rar中英文识别模型zh_str_tab_m2.rar表格识别重建模型使用示例准备输入图像文件，例如input.jpg。运行OCR示例脚本：pythontoddleocrinput.jpg这将输出检测到的文字区域和对应的识别结果。如何配置新的算法与PaddleOCR相比，本项目摒弃yaml的配置方法，采用纯python语言，类yaml的配置方法，但更灵活，而且可以使用复杂的引用计算，并且所见即所得，具体的请参考
ptocr/config.py 中的ConfigModel类，继承并重写你的参数。关于配置的语法，只有两点需要特别注意的，为了方便配置和简化配置量 ,项目内部定义了一个辅助类，提供了一些语法糖，如下：使用 _ 类，这是一个多功能的辅助类，有以下几个语法功能：类似偏函数的偏类：_(DBHead,arg1=0,arg2=1) ==> partial(DBHead, **kwargs)字符串动态导入类：_("DBHead",arg1=0,arg2=1) ==> partial(DBHead, **kwargs)没有位置参数等效于字典：_(arg1=0,arg2=1) ==> dict(arg1=0,arg2=1)预热学习率规划器：等效并列列表,用于 Transformers：_[train:eval:infer,train:eval:...],
切片语法的三个位置分别表示训练，测试，推理模式下的预处理器，
特别的：...省略号表示同前一个，
空的或None表示该位置不需要这个预处理器，例如[DecodeLabel:...:]表示训练和测试需要DecodeLabel，推理不需要,这种表示方法是为了简化配置，共享处理器减少实例的创建class_:def__new__(cls,class_=None,/,**kwargs):ifclass_isNone:returnkwargsifissubclass(class_,LRScheduler)and"warmup_epoch"inkwargs:warmup_epochs=kwargs.pop("warmup_epoch")class_=warmup_scheduler(class_,warmup_epochs)returnpartial(class_,**kwargs)ifisinstance(class_,type|types.FunctionType):returnpartial(class_,**kwargs)ifisinstance(class_,str):fromtools.modelhubimportHubhub=Hub(os.path.dirname(__file__))# 这个操作很耗时，尽量不使用字符串形式的导入class_=hub(class_)returnpartial(class_,**kwargs)def__class_getitem__(cls,item):out=[[],[],[]]foriinitem:ifisinstance(i,slice):ls=[i.start,i.stop,i.step]last=Noneforoneinls:ifoneisnotNone:last=onebreakfori,oneinenumerate(ls):ifoneis...:out[i].append(last)elifone:out[i].append(one)else:foroneinout:one.append(i)returnout使用注解语法区分训练参数和测试参数
ConfigModel 有两个内部类 Data 和 Loader 子类可以采用注解语法区分训练时配置和测试时配置，例如：classLoader:shuffle:False=Truedrop_last:True=Falsebatch_size:1=8num_workers:0=4等号后面表示训练时参数，冒号后面表示测试时参数，没有冒号则相同
这种表示方法同样是为了简化配置更多的可以参考已经实现的算法，例如models/det/det_db_rvd.py贡献如果你对ToddleOCR感兴趣，并且希望为项目做出贡献，欢迎提交问题、提出建议或者发送Pull Request。我们乐于接受来自社区的贡献，共同推动项目的发展。帮助与支持如果你在使用过程中遇到任何问题，或者需要进一步的帮助与支持，请参考项目文档或者联系我们的团队。相关链接项目主页：https://github.com/arry-lee/ToddleOCRPaddleOCR：https://github.com/paddlepaddle/PaddleOCR文档：https://github.com/arry-lee/ToddleOCR/docs许可证本项目的发布受Apache 2.0 license许可认证。
Package: todi
todiAnother command line tool to manage to-do tasks.
Made to be simple and easy to use.I created this project in order to learn the process of publishing a package inPyPi.
So yes, you can install it frompipor clone/fork this project.Features:📝List,Add,UpdateandDeletetasks.✔️ Change status:TODO(default),DOINGandDONE.🗑️Cleancommand to removeDONEtasks.💾ExportandImporttodi backups.Installpip install todiUpgradepip install --upgrade todiUsageSee a list of all available commands:todi --helpOngoing project...
Package: todict
Python-todict allows you to easily turn any python object into a dictionary.
It can then be easily serialized, to json for example.
The class of the object you want to convert needs to inherit from two mixin classes and hold an attribute listing the attributes to export.
List, dict, tuple and set attributes are supported and any attribute object that implements the mixins are recursively converted.Usage>>> from todict.mixins import ToDictMixin, FromDictMixin
>>> class MyClass(ToDictMixin, FromDictMixin):
...     TO_SERIALIZE = ["my_attr"]
...     def __init__(self):
...         self.my_attr = "data"
...
>>> MyClass().to_dict()
{'my_attr': 'data'}
>>> restored_obj = MyClass.from_dict({'my_attr': 'test'})
>>> getattr(restored_obj, "my_attr")
'test'InstallationPython-todict can be installed with pip:$ pip install todictLaunch tests>>> pip install -r requirements-dev.txt
>>> toxPython: 2.7, 3.6.