Saravanan666/pypi-org huggingface dataset:
Package: doc-to-readme
Automated (Python) Module Documentation in READMEWhat's this?Automated docstring extraction and creation/update of documentation (of python modules) in README File.Why?Because it's nice :-)How?doc_to_md.pyloops through all Python files in the Repository and extracts the function calls + the
corresponding short description from the docstrings. These are added to a dictionary and afterwards converted to
a Markdown Table. Finally, the sectionFunctions & Classesis appended / updated in the README File.There are several options how to use it:a)Python Packageb)CI Pipelinea) install & use Python PackageAvailable onPyPIpipinstalldoc-to-readmeUse within Pythonimportdoc_to_md.doc_to_mdasdtmdtm.update_markdown_file(file="README.md",root_dir=None,# Directory used as root for searching modules, defaults to folder containing README.mdexclude_modules=None,# List of modules to be excludedspecified_modules=None,# Only these modules will be includedseparate=True# Create one table per module)Command Linepython-mdoc_to_md.doc_to_md-f"README.md"[-rROOT_DIR][-eEXCLUDE_MODULES][-mSELECTED_MODULES][--separated]-rROOT_DIR# Directory used as root for searching modules, defaults to folder containing README.md-eEXCLUDE_MODULES# List of modules to be excluded-mSELECTED_MODULES# Only these modules will be included--separated# Create one table per moduleb) add to Pipeline (GitHub, GitLab or Bitbucket)Documentationon how to set up the pipelines to update a file on every push.Step-by-step guideon how to integratedoc_to_readmein your RepositoryCopyright © 2023 by Mirjam ZiselsbergerThis code is free to use under the terms of theMIT license.Functions & Classesdoc_to_md.pyTypeName/CallDescriptionfunctionloop_through_repo(file: str, root_dir: str = None, exclude_modules: Optional[Tuple[str, ...]] = None, specified_modules: Optional[Tuple[str, ...]] = None) -> NoneCollect documentation from functions & classes.functionadd_summary_to_md(overview_dict: Dict[str, Optional[Union[str, Dict[str, str]]]], markdown: str, separate: bool = True)Add Table with all Functions & Classes to Markdown file.functionupdate_markdown_file(file: str = "../../README.md", root_dir: str = None, exclude_modules: Optional[Tuple[str, ...]] = ("test", "functions_for_testing", "classes_for_testing", "doc_to_md"), specified_modules: Optional[Tuple[str, ...]] = None, separate: bool = True)Add/update 'Functions & Classes' Section in Markdown file.functionparse_through_file(file: str) -> Dict[str, Dict[str, str]]Parse through file, return dict with classes and functions.Created with:doc_to_readmeMIT© 2023 Mirjam ZiselsbergerLast Update:2023-05-03
Package: doctor-testerson
Doctor Testerson (Dr. T)Provides a stupid littledr.tcommand to run Python doctests.How To...PublishUpdate the version inpyproject.toml.Commit, tagvX.Y.Z, push.Log in toPyPIand go tohttps://pypi.org/manage/account/to generate an API token.Throwpoetryat it:poetry publish --build --username __token__ --password <token>Bump patch by 1 and append-dev, commit and push (now we're on the "dev"
version of the next patch version).
Package: doctor-wheel
doctor_wheeldoctor-wheelis an utility to reduce the size of your binary wheels
by stripping their .so extensions
withGNU stripIt requiresstripto be available in PATH, and will refuse to run
if it is not found.Usagedoctor-wheel name-of-your-wheel-file.whl name-of-second-wheel-file.whl ...You can provide as many wheel files as you want.
They will be altered in place though. The files will be unzipped to a temporary directory.Installationpip install doctor-wheelChange logv1.2:dropped satella requirement, so made available for Python 2.7
Package: doc-tour
Doc TourAn nasty way to parse python knowledgeTutorialInstallationPlese install onanaconda3python-mpipinstalldoc_tourRunningOn your terminal, the default port is 8080, Now visithttp://localhost:8080for web UIdoctourOr assgin a portdoctour--port=8001Exam variable during your codingeg. while you're doing nlp and using lstm, you wonder what the code in pytorch is, what's its inheritance structure, which of the functions was defined in the lstm code, which other functions are inherited from its ancestorsfromtorchimportnnimportnumpyasnpimportdoctouryou can exam class, fuction, module, variable...doctour.exam(nn.LSTM)please visit http://localhost:8080/doc/read/LSTM_173834/140681093056304/





<DocTour:LSTM_173834>
Package: doc-transformers
Doc TransformersDocument processing using transformers. This is still in developmental phase, currently supports only extraction of form data i.e (key - value pairs)pipinstall-qdoc-transformersPre-requisitesPlease install the following seperatelypip install pip --upgrade
pip install -q git+https://github.com/huggingface/transformers.git

pip install pyyaml==5.1

# workaround: install old version of pytorch since detectron2 hasn't released packages for pytorch 1.9 (issue: https://github.com/facebookresearch/detectron2/issues/3158)
pip install torch==1.8.0+cu101 torchvision==0.9.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html

# install detectron2 that matches pytorch 1.8
# See https://detectron2.readthedocs.io/tutorials/install.html for instructions
pip install -q detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.8/index.htmlImplementation# loads the pretrained dataset alsofromdoc_transformersimportparser# loads the image and labelsimage=parser.load_image(input_path_image)labels=parser.load_tags()# loads the modelfeature_extractor,processor,model=parser.load_models()# gets the bounding boxes, predictions, extracted words and image processedkp=parser.process_image(image,feature_extractor,processor,model,labels)ResultsInput & OutputTableAfter saving to csv the result looks like the followingLABELTEXTtitleCREDIT CARD VOUCHER ANY RESTAURANTtitleANYWHEREkeyDATE:value02/02/2014keyTIME:value11:11keyCARDkeyTYPE:valueMCkeyACCT:valueXXXX XXXX XXXXvalue1111keyTRANSkeyKEY:valueHYU8789798234keyAUTHkeyCODE:value12345keyEXPkeyDATE:valueXX/XXkeyCHECK:value1111keyTABLE:value11/11keySERVER:value34valueMONIKAkeySubtotal:value$1969value.69keyGratuity: Total:Code credits@HuggingFacePlease note that this is still in development phase and will be improved in the near future
Package: docts
doctspython package doctsinstallpipinstall-Udocts
pipinstallgit+ssh://git@github.com/foyoux/docts.git
pipinstallgit+https://github.com/foyoux/docts.git翻译 xlf 文件将文档提取到 xlf 文件 或 将 xlf 文件重新生成文档，请参阅旧文档 - 仅作参考代码看下面frompygtransimportTranslatefromdoctsimportDoctsif__name__=='__main__':translator=Translate(proxies={'https':'http://localhost:10809'})doc=Docts('<xlf_file_path>',translator)# 翻译完成的将保存到 xlf_file_path 文件同目录doc.save_words()
Package: docubox
DocuBox is a swiss army knife for document solution.
It is a single binary that has multiple document solution commands internally.
The project name is borrowed from a famous BusyBox.BusyBox combines many tiny unix commands into single binary,
and installed with many names by symbolic links. It run for its name,DocuBox combines several python document solution commands into single binary,
When rename or link the binary assphinx-build, it behavesphinx-buildcommand.
When rename or link the binary samkdocs, it behavemkdocscommand.
It runs document solution commands on Windows, Linux and OS X with a single-file standalone binary.DocuBox is also a docubox binary generator.
It can generate ducubox binary for the platform built on.
We build it with PyInstaller , a user can run commands without installing a Python interpreter or any dependencies.Document:ReadTheDocs.orgDownload binary:https://codeberg.org/miurahr/docubox/releasesLicenseSphinx-standalone is licensed under the 2-clauses BSD license.
SeeLICENSEfile for details.
Package: docuit
Docuit is a tool which makes sure your README stays up to date and
simplifies getting the needed parts out of the README.When working with multiple repositories, maybe different languages, the
steps tobuild,test,runanddeployneeds to be fetched
to use the source. In good cases with a proper documentation it is
sometimes tedious to find that over and over again.Docuit parses the README for the needed part prints them out ord can
execute the steps right away.docuit checkto make sure all necessary parts exist and prints
out what is missing.docuit build|test|run|deployPrints the content of the section.--execflag will execute the steps.Using docuit makes sure all repositories have a similar README
structure, simplifies using of the code and with the right setup can
also simplify the continues deploy process:docuit deploy--exec.Buildpip install-rrequirements.txtTestflake8 *.pyRundocuitDeploypython setup.py sdist upload
Package: document-classifier
basic-document-classifierA simple CNN for n-class classification of document images.It doesn't take colour into account (it transforms to grayscale).
For small numbers of classes (2 to 4) this model can achieve > 90% accuracy with as little as 10 to 30 training images per class.
Training data can be provided inany image format supported byPIL.Installationpip install document-classifierorpoetry add document-classifierUsagefromdocument_classifierimportCNN# Create a classification model for 3 document classes.classifier=CNN(class_number=3)# Train the model based on images stored on the file system.training_metrics=classifier.train(batch_size=8,epochs=40,train_data_path="./train_data",test_data_path="./test_data")# "./train_data" and "./test_data" have to contain a subfolder for# each document class, e.g. "./train_data/letter" or "./train_data/report".# View training metrics like the validation accuracy on the test data.print(training_metrics.history["val_acc"])# Save the trained model to the file system.classifier.save(model_path="./my_model")# Load the model from the file system.classifier=CNN.load(model_path="./my_model")# Predict the class of some document image stored in the file system.prediction=classifier.predict(image="./my_image.jpg")# The image parameter also taks binary image data as a bytes object.The prediction result is a 2-tuple containing the document class label as a string and the confidence score as a float.Changes0.1.2Give every CNN instance its own isolated tensorflow graph and session0.1.1Fix a bug that occured when using multiple model instances at the same timeTODOThe model architecture is fixed for now and geared towards smaller numbers of classes and training images.
I'm working on automatic scaling for the CNN.
Package: document-clipper
document-clipperA set of utility classes and functions to process documents with PythonFree software: MIT licenseDocumentation:https://document-clipper.readthedocs.io.InstallationThedocument_clipperpackage uses libraries that relies on several command-line tools included in thepoppler-utilspackage such as:
-pdftohtml-pdfimages-pftocairoBefore attempting to usedocument_clipper, please install thepoppler-utilspackage.For instance, in Ubuntu, you may do so by running the following command:$sudoapt-getinstallpoppler-utilsThen, you may installdocument_clipperas usual via Python package managers, such as PIP:$pipinstalldocument_clipperFeaturesFetch the number of pages associated to a PDF file.Extract the coordinates and dimensions of a given text located in a PDF file.Combine multiple PDFs into a single PDF.Combine multiple PDFand imagefiles into a single PDF.Generate a new PDF file containing a subset of a provided source PDF file’s pages. Rotations can be applied to each page individually.Optionally fix the document(s) involved in the slicing/merging processes beforehand.History0.1.0 (2017-06-27)First release on PyPI.
Package: document-contents-extractor
pdf-contents-extractorExtract Table of Contents (TOC) as text from a pdf- or djvu-document (for use in e.g. handyoutliner)requires:for PDF, pytesseract and PyMuPDF (both can be easily installed with pip)for DJVU, the ddjvu command available in the pathAfter installation type in a terminal: extract_contents /path/filename startpage lastpage
(e.g.:extract_contents example.djvu 3 6)
where startpage and lastpage are pagenumbers of the content pages.
The script automatically recognizes the format (pdf or djvu)The default tesseract language is english. Another language(s) can be set with -l flag (e.g.:-l eng+nldfor english and dutch) but it requires the correct tesseract langpack to be installed.for extra options and help type: extract_contents -hThe contents can be further edited in a text-editor and added to the pdf-file with handyoutliner (http://handyoutlinerfo.sourceforge.net/)
Package: document-cropper
Document-CropperPython document cropper which can be applied to images.About The ProjectThere are a several articles and GitHub repos dedicated to document segmentation; however, I didn't find one that worked right out of the box, so I created this one. It can be used for preprocessing document images for further text recognition on them or for saving them in proper format.Built WithNumPySciPyscikit-imageMatplotlibInstallationThis project can be easily installed via pippipinstalldocument-cropperUsageimportdocument_cropperasdcTo crop image you should use:dc.crop_image("path_to_example.jpg","name_for_the_result.jpg")If you want to see all stages of processing you can use:# Save the stages as imagedc.crop_image_pipeline("path_to_example.jpg","name_for_the_result.jpg")# Show the stages as matplotlib figuredc.crop_image_pipeline("path_to_example.jpg")For more examples, please refer to theDocumentation(back to top)
Package: documentDownloader
文档下载器可用于下载book118的PDF文档思路爬虫爬取图片链接下载图片将图片拼合成pdf文件参数说明参数解释必备参数-h、--help显示帮助❌-u、--url要下载的文件的网页地址✔-o、--output文件保存名，默认是文档的标题.pdf❌-p、--proxy设置要使用的代理地址（默认使用环境变量中HTTP_PROXY和HTTPS_PROXY设置的值），可以使用-p ''强制设置不走代理❌-f、--force强制重新下载，不使用缓存❌-t、--thread要使用的线程数，如不指定默认是10❌-s、--safe如果被服务器拒绝可以打开此选项，将强制单线程，并增加请求和下载的间隔时间❌使用模块使用已上传到 PyPI 的包python3-mpipinstalldocumentDownloader安装完成后即可直接使用documentDownloader命令如：documentDownloader -u https://max.book118.com/html/2020/0109/5301014320002213.shtm -o '单身人群专题研究报告-2019' -p http://127.0.0.1:1080 -f -t 20直接使用源码中的 main.py克隆该项目，或在releases页面选择版本下载安装Python3安装依赖模块(Pillow、reportlab、requests)python -m pip install -r requirements.txt使用python3 main.py执行如：python main.py -u https://max.book118.com/html/2020/0109/5301014320002213.shtm -o '单身人群专题研究报告-2019' -p http://127.0.0.1:1080 -f -t 20仅供学习爬虫及相关知识，请支持正版图书虽然book118上的好多pdf也是盗版吧贡献列表OhYeeJodeZer更新2019-01-29: Book118网站更新,更改对应部分代码.@JodeZer2020-01-09: 重构代码，增加多线程下载加速，允许使用代理，允许通过已有缓存直接建立pdf，自动识别图片大小生成pdf@OhYee2020-05-25: 发布到 PyPI2021-10-18: Book118网站更新，更改部分代码； 设置默认导出pdf的文件名为文档标题； 对无法免费预览全文的文档增加提示； 调整请求间隔为2秒(实测请求间隔小于2秒很可能会返回空地址)； 增加"慢速下载"选项，防止下载过快被服务器拒绝。@alxt17
Package: documented
documentedTemplated docstrings for Python classes.FeaturesDescribe your business logic in docstrings of your classes and exceptions;When printing an object or an exception, the library will substitute the placeholders in the docstring text with runtime values,And you (or your user) will see a human-readable text.InstallationpipinstalldocumentedExamplefromdataclassesimportdataclassfromdocumentedimportDocumentedError@dataclassclassInsufficientWizardryLevel(DocumentedError):"""🧙 Your level of wizardry is insufficient ☹Spell: {self.spell}Minimum level required: {self.required_level}Actual level: {self.actual_level} {self.comment}Unseen University will be happy to assist in your training! 🎓"""spell:strrequired_level:intactual_level:int@propertydefcomment(self)->str:ifself.actual_level<=0:return'(You are Rincewind, right? Hi!)'else:return''raiseInsufficientWizardryLevel(spell='Animal transformation',required_level=8,actual_level=0,)which prints:---------------------------------------------------------------------
InsufficientWizardryLevel           Traceback (most recent call last)
<ipython-input-1-d8ccdb953cf6> in <module>
     27 
     28 
---> 29 raise InsufficientWizardryLevel(
     30     spell='Animal transformation',
     31     required_level=8,

InsufficientWizardryLevel: 
🧙 Your level of wizardry is insufficient ☹

    Spell: Animal transformation
    Minimum level required: 8
    Actual level: 0 (You are Rincewind, right? Hi!)

Unseen University will be happy to assist in your training! 🎓For more examples, see:https://anatoly-scherbakov.github.io/documented/This project was generated withwemake-python-package.
Package: documenteer
DocumenteerDocumenteer provides tools, extensions, and configurations for Rubin Observatory's Sphinx documentation projects,user guides,technotesand EUPS-packaged stacks (such as theLSST Science Pipelines).For more information about Documenteer, see the documentation athttps://documenteer.lsst.io.Browse thelsst-doc-engineeringGitHub topic for more Rubin Observatory documentation engineering projects.Quick installation:Foruser guides:pipinstall"documenteer[guide]"Fortechnical note projects:pipinstall"documenteer[technote]"For thestack projects(such as theLSST Science Pipelines):pipinstall"documenteer[pipelines]"
Package: document-embedding
Document EmbeddingsBased on the results of:https://arxiv.org/abs/2304.14796Implemented MethodsAverage Pooling, with adjustable range for sentences used.PERT weighted average poolingUsageWrapper for Sentence-Embedding, which is used to provide embedding functionalityfromsentence_transformersimportSentenceTransformersentence_model=SentenceTransformer("paraphrase-multilingual-MiniLM-L12-v2")document_model=AverageDocumentEmbedding(sentence_model,language='german')doc1="Arbitrary text"doc2="..."document_model.encode([doc1,doc2,...])
Package: document-insighter
Document Insighter Python Clientdocument-insighteris a set of tools that enables developers to interactive with Document Insighter API, like query extraction results.Installationpip install document-insighterGetting StartedAuthenticationOKTA Base ApplicationsConfigure ENV variables# Client application credentialsINSIGHTER_CLIENT_IDP=xxxxINSIGHTER_CLIENT_ID=xxxxINSIGHTER_CLIENT_SECRET=xxxx# Client access token file path, no need to create itINSIGHTER_CLIENT_TOKEN_PATH=insighter_token.json# Tenant name, which can be found in settings pageINSIGHTER_TENANT=xxxxFetch Tokenfromdocument_insighter.api_clientimportOktaApplicationClientfromdocument_insighter.modelimportEnv,Extraction# Change to Env.PRODUCTION for productiondocument_insighter=OktaApplicationClient(Env.STAGING)document_insighter.fetch_token()Service Account Base ApplicationsConfigure ENV variables# Client application credentialsINSIGHTER_SA_CLIENT_ID=xxxxINSIGHTER_SA_CLIENT_SECRET=xxxx# Path of service account access token, which download from settings pageINSIGHTER_SA_CLIENT_TOKEN_PATH=service-account-token.json# Tenant name, which can be found in settings pageINSIGHTER_TENANT=xxxxCreate Clientfromdocument_insighter.api_clientimportServiceAccountClientfromdocument_insighter.modelimportEnvdocument_insighter=ServiceAccountClient(Env.STAGING)Query Extractionsfromdatetimeimportdatetimepages_generator=document_insighter.query_extractions_pages(datetime(2022,4,13),datetime(2022,4,14),page_size=50)extraction_dicts=[xforpageinpages_generatorforxinpage]# read first extractionsections=extraction_dicts[0].get('data').get('sections')batch_sections=list(filter(lambdax:x.get('category')=='coa_batch',sections))aggregation_sections=list(filter(lambdax:x.get('category')=='coa_aggregation',sections))# load json to modelsfromtypingimportListextractions:List[Extraction]=[Extraction.from_dict(x)forxinextraction_dicts]Upload and Poll Extractionsextractions=document_insighter.upload_and_poll("BR",'tests/data/br_document.pdf')LicenseMIT
Package: document_it
# DocumentItDocumentIt renders [markdown]() syntax to HTML and uploads it to the[Mozilla Developer Network](https://developer.mozilla.org/)It is run by:document-it [options] manifest [manifest] [...]See `document-it --help` for options.  It will render to a localtemporary directory by default but you can specify its output with`--dest` (although you will need to pass `--user` and `--password` toPOST data).## ManifestsA manifest is in the form:relative_file_path    page_name...The file path is relative to the manifest.(*TODO: more columns of options may be added in subsequent release toe.g. specify input format and expand macros)An example manifest is athttp://k0s.org/mozilla/hg/DocumentIt/file/tip/example.manifest## TODOCurrently, to POST, DocumentIt assumes `curl` is available on thepath. This is an obvious deficiency and it should be replaced with arequest from (e.g.) `urllib2`.In addition to http://developer.mozilla.org it would be nice to POSTto `http://wiki.mozilla.org` as well.  This would allow stagingdocuments at `wiki.mozilla.org` and then moving to MDN.There are other features that would be nice to have:- inclusion of other files- inclusion of `--help` documentationIn general the approach taken shouldn't compromise the generalapproach that the documentation should be the documentation, notpre-documentation.  This may be achieved by the use of (e.g. regex)macros.  For instance:append(--help.*$,shell(mozmill --help))
Package: document-lib-python
Aerospike Document API (Python)Python port of the Aerospike Document API inJava.This is currently in beta, so there may be bugs or features that aren't supported yet.More InfoAPI DocumentationPyPI PackageCompatibilityPython 3.7.x - 3.9.13.Aerospike Python Client 7.0.2FeaturesNot all JSONPath queries are currently supported. Here is a list of currently supported features:Supported?FeatureExamples[x]Map access$.item, $["item"][x]List access$.list[0][x]Wildcard map access$.*[x]Wildcard list access$.list[*][x]List slices$.list[2:4][x]List step slices$.list[2:4:1][x]List set of indices$.list[2,4][x]Recursive access$..item[x]Exists filter$.listOfMaps[?(@.mapitem)][x]Comparison filter$.listOfMaps[?(@.mapitem > 10)][x]And filter$.listOfMaps[?(@.mapitem > 10 & @.mapitem < 50)][x]Or filter$.listOfMaps[?(@.mapitem < 10 | @.mapitem > 50)][ ]Variable filter$.listOfMaps[?(@.mapitem < $['rootitem'])][x]Regex filter*$.listOfMaps[?(@.mapitem =~ "(?i).*mesa")][-]Functions$.list.length()supported* Python regex expressions are usedContributingTo add features to this project, please seeCONTRIBUTING.mdin the repository source code.
Package: document-merge-service
Document Merge ServiceA document template merge service providing an API to manage templates and merge them with given data. It can also be used to convert Docx files to PDF.InstallationRequirementsdockerdocker-composeAfter installing and configuring those, downloaddocker-compose.ymland run the following command:docker-composeup-dYou can now access the api athttp://localhost:8000/api/v1/which includes a browsable api.Workaround LibreOffice lockupThe workaround has a setting calledISOLATE_UNOCONV, it is only enabled in the
development environment. IfISOLATE_UNOCONVis enabled the container needsCAP_SYS_ADMIN. See docker-compose.override.yml.cap_add:-CAP_SYS_ADMINsecurity_opt:-apparmor:unconfinedenvironment:-ISOLATE_UNOCONV=trueGetting startedUploading templatesUpload templates using the following:curl--formtemplate=@docx-template.docx--formname="Test Template"--formengine=docx-templatehttp://localhost:8000/api/v1/template/Merging a templateAfter uploading successfully, you can merge a template with the following call:curl-H"Content-Type: application/json"--data'{"data": {"test": "Test Input"}}'http://localhost:8000/api/v1/template/test-template/merge/>output.docxConverting a templateTo convert a standalone Docx file the following call can be used:curl-XPOST--formfile=@my-test-file.docx--formtarget_format="pdf"http://localhost:8000/api/v1/convert>example.pdfFurther readingConfiguration- Further configuration and how to do a production setupUsage- How to use the DMS and it's featuresContributing- Look here to see how to start with your first
contribution. Contributions are welcome!LicenseCode released under theGPL-3.0-or-later license.