Saravanan666/pypi-org huggingface dataset:
Package: lefshift
Local Environment of Fluorine (LEF) Shift Prediction ToolsGetting StartedA PyPi package is available:pip install lefshiftYou can also clone the repo manually and then install the lefshift package:git clone https://github.com/PatrickPenner/lefshift.git
cd lefshift
pip install .Be aware that thedata/andmodel/directory used in the following are in
thelefshiftrepo.Runninglefshift --helpshould give you an overview of how to use the lefshift
commandline tool. You can quickly train a model using the Enamine data indata/like this:lefshift train data/train.csv --model models/my_model --id-column 'Catalog ID' --shift-column 'Shift 1 (ppm)' --smiles-column 'SMILES' --verboseTraining requires 3 columns: an ID column, a chemical shift column, and a
SMILES column. The above command gives the name of those columns explicitly.
You can also check thelefshift train --helpoutput to see the default column
names that lefshift expects.You can perform a prediction with the model you just trained with the following command:lefshift predict data/test.csv --model models/my_model data/test_predicted.csv --smiles-column 'SMILES' --verbosePrediction only requires a SMILES column. This is once again give explicitly,
but you can also ensure that there is an input column named "SMILES".To split a data set into those samples in the applicability domain of the model
and those not in the applicability domain run this command:lefshift split data/test.csv --model models/my_model data/test_known.csv data/test_unknown.csv --verboseSplitting also only requires a SMILES column. The SMILES column in the input is
already called "SMILES" so we don't have to be explicit.For more advanced usage please check the--helpoutput oflefshiftand the
subtoolstrain,predict, andsplit. There is also aQM Assisted ML Tutorial.mdthat describes a workflow to combinelefshiftandlefqm.DevelopmentFormatting pre-commit hookPre-commit is only used for consistent formatting. The core of that is the
black formatter and code style.Install the formatting pre-commit hook with:pre-commit installCode QualityAll quality criteria have a range of leniency.CriteriaThresholdpylint>9.0coverage (overall)>90%coverage (single file)>80%Utility commandsPre-commit on one file:pre-commit run --filesTest command:python -m unittest testsPyLint command:pylint lefshift tests > pylint.outCoverage commands:coverage run -m unittest tests
coverage html
Package: lefthook
Wrapper forlefthookto make it installable in the Python ecosystem. Add it into your project dependencies if you want to use lefthook in your Python project.Installationpython3-mpipinstall--userlefthookUsageYou can use this module as proxy for original lefthook. It can be installed on the first execution.python3-mlefthook--helpThis command will install the latest lefthook release and calllefthook--help. Now, you can use lefthook directly:lefthook--help
Package: leftpad
leftpadLeft pad a string in Python.
Created to try out making apippackage and uploading it to thePython Package Index (PyPI).
Inspired by theleft-padpackage on npmwhichbroke parts of the internet.Installpip install leftpadUsagefromleftpadimportleft_padleft_pad("foo",5)//=>"  foo"left_pad("foobar",6)//=>"foobar"left_pad(1,2,'0')//=>"01"left_pad(17,5,0)//=>"00017"TestingRunpython -m doctest leftpad.py.
Package: left-pad
Pad a string to the left with any number of characterspip install left-padThen>>> from left_pad import left_pad
>>> s = "abc"
>>> left_pad(s, 2, "+")
'++abc'Make sure to add left-pad to your dependencies in your next project.Or, if you want to reinvent the wheel, go ahead and try to do it
with the standard library>>> s.rjust(len(s) + 2, '+')
'++abc'
Package: leftpadx
leftpadleftpadis a Python library for padding the left of strings.Installationpip install leftpadxUsagefrom leftpad import leftpad

print(leftpad("epic", 100, "@"))Expected output:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@epic
Package: leftrb
# Leftrb/LLRBLeftrb is a Left-Leaning Red-Black (LLRB) implementation of 2–3 balanced binary
search trees in Python.This is a straightforward port of the Java code presented by Robert Sedgewick in
[his paper]((http://www.cs.princeton.edu/~rs/talks/LLRB/LLRB.pdf) and in the
book [Algorithms, 4th Edition](http://algs4.cs.princeton.edu/home/), which is written
by Robert Sedgewick and Kevin Wayne. By their permission, the [original GPL v3 licensed Java
code](http://www.cs.princeton.edu/~rs/talks/LLRB/Java/RedBlackBST.java)
is licensed as LGPL v3, and ported to Python.## OverviewA balanced binary search tree (BBST) maintains elements in sorted order under dynamic
updates (inserts and deletes) and can support various order-specific queries.Red-black trees are the de facto standard BBST algorithms, and are the underlying
data structure for symbol-table implementations within C++, Java, Python, BSD Unix,
Linux and many other modern systems.All red–black trees are based on implementing 2-3 or 2-3-4 trees within a binary tree,
using  red links to bind together internal nodes into 3-nodes or 4-nodes. Search, insert
and delete operations are O(log n) and space requirements are O(n).However, many traditional implementations have lots of repetitive code on the symmetric
branches of rotation and deletion operations. So they are not easy to reason about and
augment with other properties, which is what BBST’s are often used for: They are used
to implement other common data structures like Priority Queues and Interval Trees.The LLRB method of implementing 2-3 trees is a recent improvement over the traditional
implementation — it maintains an additional invariant that all red links must lean left
except during inserts and deletes. Because of this, they can be implemented by adding
just a few lines of code to standard BST algorithms.The LLRB tree is based on combining three ideas:Use a recursive implementation.Require that all 3-nodes lean left.Perform rotations on the way up the tree (after the recursive calls).The LLRB approach was discovered relatively recently (in 2008) by Robert Sedgewick
of Princeton University. For original code and more information read the paper“Left-leaning Red-Black Trees”at [http://www.cs.princeton.edu/~rs/talks/LLRB/LLRB.pdf](http://www.cs.princeton.edu/~rs/talks/LLRB/LLRB.pdf)## InstallationFrom Python package index:pip install leftrbor from Github source:git clonehttps://github.com/peterhil/leftrb.gitcd leftrb
python setup.py install## AboutLeftrb/LLRB was written by [Peter Hillerström](http://composed.nu/peterhil/).
Follow me on Twitter [@peterhil](http://www.twitter.com/peterhil)!
Package: leftronic
This Python package provides functions to integrate with Leftronic’s information dashboards.pushNumber() pushes a number to a Number, Horizontal/Vertical Bar, or Dial widgetpushGeo() pushes a geographic location (latitude and longitude) to a Map widgetpushText() pushes a title and message to a Text Feed widgetpushLeaderboard() pushes an array to a Leaderboard widgetpushList() pushes an array to a List widgetpushHtml() pushes a string to an HTML widget
Package: leftronicd_db
A script to periodically post information to leftronic.comInstallationMake a virtualenvpip install leftronicdConfigurationConfiguration is done in yaml.accesskeyYour leftronic API access key.streamsA list of stream configurations.Each stream requires following values:method: The method that generates the valuetype: The type of value (egnumberorleaderboard)name: Name of the streamverbosename: Verbose name of the streaminterval: Interval in seconds when the method should be called.Any other key-value pairs will be passed into the method.Example:accesskey: SECRET
streams:
    - method: leftronicd.contrib.github.repo_metric
      verbosename: django CMS Watchers
      name: django-cms-watchers
      type: number
      interval: 86400
      repo: divio/django-cms
      metric: watchers
    - method: leftronicd.contrib.github.repo_metric
      verbosename: django CMS Forks
      type: number
      interval: 86400
      name: django-cms-forks
      repo: divio/django-cms
      metric: forksBuilt-in methodsleftronicd.contrib.github.repo_metricReports a metric from a github repository.Configuration:repo: The repo name, egojii/leftronicdmetric: Which value to grab from the repo, egforksOptional configuration:username: The username (for private repos)password: The password (for private repos)Runningleftronicd <configfile>[-v]Custom methodsCustom data collecting methods can be any Python callable that returns aTwisted Deferredwhich calls attached callbacks with the value to be posted
to leftronic.com.The Python callable is called with all additional configuration parameters
given for a stream.ExampleThis example will show the amount of GitHub followers a user has.Python code (let’s assume it’s in a module called ‘custom’):from leftronicd.helpers import get_page
import json

def github_followers(username):
    def handler(data):
        return json.loads(data)['followers']
    return get_page(handler, 'https://api.github.com/users/%s' % username)As you can see, we use theleftronicd.helpers.get_pagehelper here, for
details, see below.Stream configuration:accesskey: SECRET
streams:
    - method: custom.github_followers
      verbosename: Github Followers
      name: my-github-followers
      type: number
      interval: 300
      username: ojiiHelpersleftronicd.helpers.get_pageA wrapper aroundtwisted.web.client.getPage. Takes a handler function as
first argument which is called with the content of the page if the page is
loaded successful. The handler function should then return the value to be
passed to leftronic.get_pagereturns a deferred which can be returned from
your custom methods.All arguments after the handler argument are the same as intwisted.web.client.getPage.
Package: legacyapi
A Python API for interacting with the Tron (TRX)A Command-Line Interface frameworkYou can install it in a system-wide location via pip:sudopip3installtronapiOr install it locally usingvirtualenv:virtualenv-p/usr/bin/python3~/tronapisource~/tronapi/bin/activatepip3installtronapiUsageSpecify the API endpoints:Smart ContractfromtronapiimportTronfromsolcimportcompile_sourcefull_node='https://api.trongrid.io'solidity_node='https://api.trongrid.io'event_server='https://api.trongrid.io'tron=Tron(full_node=full_node,solidity_node=solidity_node,event_server=event_server)# or default (tron = Tron())# Solidity source codecontract_source_code='''
pragma solidity ^0.4.25;

contract Hello {
    string public message;

    function Hello(string initialMessage) public {
        message = initialMessage;
    }

    function setMessage(string newMessage) public {
        message = newMessage;
    }
}

'''compiled_sol=compile_source(contract_source_code)contract_interface=compiled_sol['<stdin>:Hello']hello=tron.trx.contract(abi=contract_interface['abi'],bytecode=contract_interface['bin'])# Submit the transaction that deploys the contracttx=hello.deploy(fee_limit=10**9,call_value=0,consume_user_resource_percent=1)Base ExamplefromtronapiimportTronlogging.basicConfig(level=logging.DEBUG,format="%(asctime)s-%(levelname)s-%(message)s")logger=logging.getLogger()full_node='https://api.trongrid.io'solidity_node='https://api.trongrid.io'event_server='https://api.trongrid.io'tron=Tron(full_node=full_node,solidity_node=solidity_node,event_server=event_server)account=tron.create_accountis_valid=bool(tron.trx.is_address(account.address.hex))logger.debug('Generated account: ')logger.debug('- Private Key: '+account.private_key)logger.debug('- Public Key: '+account.public_key)logger.debug('- Address: ')logger.debug('-- Base58: '+account.address.base58)logger.debug('-- Hex: '+account.address.hex)logger.debug('-- isValid: '+str(is_valid))logger.debug('-----------')transaction=tron.trx.get_transaction('757a14cef293c69b1cf9b9d3d19c2e40a330c640b05c6ffa4d54609a9628758c')logger.debug('Transaction: ')logger.debug('- Hash: '+transaction['txID'])logger.debug('- Transaction: '+json.dumps(transaction,indent=2))logger.debug('-----------')# Eventsevent_result=tron.trx.get_event_result('TGEJj8eus46QMHPgWQe1FJ2ymBXRm96fn1',0,'Notify')logger.debug('Event result:')logger.debug('Contract Address: TGEJj8eus46QMHPgWQe1FJ2ymBXRm96fn1')logger.debug('Event Name: Notify')logger.debug('Block Number: 32162')logger.debug('- Events: '+json.dumps(event_result,indent=2))More samples and snippets are available atexamples.DocumentationDocumentation is available atdocs.DonationsTRON: TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY
Package: legacy-api-wrap
This module defines a decorator to wrap legacy APIs.
The primary use case is APIs defined before keyword-only parameters existed.>>> from legacy_api_wrap import legacy_apiWe have a function with many positional parameters lying around:>>> def fn(a, b=None, d=1, c=2):
...     return c, d, eWe want to convert the positional parametersdandcto keyword-only,
change their order and add a parameter. For this we only need to specify name
and order of the old positional parameters in the decorator.>>> @legacy_api('d', 'c')
... def fn(a, b=None, *, c=2, d=1, e=3):
...     return c, d, eAfter adding the decorator, users can keep calling the old API and get aDeprecationWarning:>>> fn(12, 13, 14) == (2, 14, 3)
True
Package: legacy-cgi
This is a fork of the standard library modulescgiandcgitb.
They are slated to be removed from the Python standard libary in
Python 3.13 byPEP-594.InstallationInstall thelegacy-cgipackage from PyPI:$ pip install legacy-cgiPurposeThe purpose of this fork is to support existing CGI scripts using
these modules.  Thus, compatibility is the primary goal.Contributions are accepted, but should be focused on bug fixes instead
of new features or major refactoring.New applications should look at theWSGIecosystem.  There’s a number
of highly-polished web frameworks available, and it’s significantly
faster in a typical deployment given a new Python process does not
need created for each request.
Package: legacycrypt
Legacy crypt — Function to check Unix passwordsThe legacycrypt module is a standalone version ofhttps://docs.python.org/3/library/crypt.htmlThis module implements an interface to the crypt(3) routine, which is a
one-way hash function based upon a modified DES algorithm; see the Unix man
page for further details. Possible uses include storing hashed passwords so
you can check passwords without storing the actual password, or attempting
to crack Unix passwords with a dictionary.Notice that the behavior of this module depends on the actual
implementation of the crypt(3) routine in the running system. Therefore,
any extensions available on the current implementation will also be
available on this module.
Package: legacyplatequery
legacyplate queryDescriptionlegacyplatequery is a legacyplate query tool developed by Shanghai Astronomical Observatory.
It provide a python package like Astroquery.InstallationYou can use pip command to install it:`shell pip install legacyplatequery `Usageimport the package.`python import  legacyplatequery as lpdata `Login`python user = 'wangweihua' password = 'xxx' lpdata.auth(user, password) `Get the total number of legacy plate`python lpdata.get_total_of_plates() `Get the total number of the stars in the star catalog`python lpdata.get_total_of_star_catalog() `Search the legacy plates withq3c_radial_query`python ra = 12.0 dec = 12.0 radius = 12 plates = lpdata.get_plates_by_radial_query(ra, dec, radius) print(plates) `Search the stars withq3c_radial_query`python stars = lpdata.get_star_catalog_by_radial_query(ra, dec) print(stars) `History0.1.0 (2023-04-11)First release on PyPI.
Package: legacystamps
legacystampsA tiny Python module to allow easy retrieval of a cutout from the Legacy survey.InstallationThis package can be installed simply by runningpip install legacystamps. It can also  be installed manually withpython setup.py install.UsageTo use it in a script, import and use the module as follows. To get a FITS cutout:importlegacystampslegacystamps.download(ra=ra,dec=dec,mode='fits',bands='grz',size=cutsize)or to get a JPEG cutout:importlegacystampslegacystamps.download(ra=ra,dec=dec,mode='jpeg',bands='grz',size=cutsize)It can also run standalone. Seelegacystamps.py -hfor available options after installation.RequirementsThe following packages are required:requeststqdmAcknowledgementsIf you use legacystamps in your work, please consider acknowledging this package throughThis work made use of the legacystamps package (https://github.com/tikk3r/legacystamps).and the acknowledgements associated tohttps://legacysurvey.org/.
Package: legaldata
Legal DataA package for crawling Australian legal data from legislation.com.au and austlii.edu.au with cache support.Please be respectful of server host resources by using a reasonable crawl delay,
honouring robots.txt and crawling at times when the server load is lighter.Install from PyPipipinstalllegaldatalegislation.com.au exampleThis example will crawl Commonwealth Acts fromlegislation.com.auand copy
files (docx, pdf, zip) to the save path.fromlegaldata.legislation.crawlerimportActCrawlercrawler=ActCrawler()save_path="./legislation.com.au/"forindex_urlincrawler.get_index_pages():acts=crawler.get_acts_from_index(index_url,save_path)austlii.edu.au exampleThis example will crawl Commonwealth Acts fromaustlii.edu.au/and copy
files (rtf, txt) to the save path.fromlegaldata.austlii.crawlerimportActCrawlercrawler=ActCrawler()save_path="./austlii.edu.au/"forindex_urlincrawler.get_index_pages():acts=crawler.get_acts_from_index(index_url,save_path)Legal Data is distributed under the MIT license.
Package: legal-documents-cn
Legal Documents CNcriminal_law_cn《中华人民共和国刑法》数据查询功能包 /《刑法》数据查询接口GitHub地址PyPI地址功能《中华人民共和国刑法》可以根据法条的编号查询到法条的内容信息。可以根据法条的内容查询到其所在的章节条等信息，支持模糊查询。安装pipinstallpandas
pipinstallnltk
pipinstalllegal_documents_cn示例fromlegal_documents_cnimportcriminal_law_cnaslawlaw.getInfoByArticleCode(article_code=219,sub_article_code=1)#第二百一十九条之一fromlegal_documents_cnimportcriminal_law_cnaslawlaw.getInfoByContent(content='小明交通肇事',vague=True)#content为需要查询的法条内容，vague为模糊查询law.getInfoByArticleName('交通肇事罪;危险驾驶罪')#根据案由（法条名称）获取信息内容。需要尽量写全案由名称。law.getInfoByArticleCode(73,3)#获取第七十三条，第三款具体内容 -> strlaw.getContentsAll()#获取刑法中所有的法条内容，return: a list of stringreturndict: 
{'description': '\n中华人民共和国刑法\n颁布日期：2020-12-26\n执行日期：2021-3-1\n时 效 性：现行有效\n刑法是规定犯罪、刑事责任和刑罚的法律，是掌握政权的统治阶级为了维护本阶级政治上的统治和各阶级经济上的利益，根据自己的意志，规定哪些行为是犯罪并且应当负何种刑事责任 ，并给予犯罪嫌疑人何种刑事处罚的法律规范的总称。\n2020年12月26日，第十三届全国人民代表大会常务委员会第二十四次会议通过刑法修正案(十一)。修改后的刑法自2021年3月1日开始施行。这也是继1997年全面修订刑法后通过的第十一个刑法修正案。\n(1979年7月1日第五届全国人民代表大会第二次会议通过，1997年3月14日第八届全国人民代表大会第五次会议修订。根据1999年12月25日中华人民共和国刑法修正案，2001年8月31日中华人民共和国刑法修正案(二)，2001年12月29日中华人民共和国刑法修正案(三)，2002年12 月28日中华人民共和国刑法修正案(四)，2005年2月28日中华人民共和国刑法修正案(五)，2006年6月29日中华人民共和国刑法修正案(六)，2009年2月28日中华人民共和国刑法修正案(七)修正，根据2009年8月27日《全国人民代表大会常务委员会关于修改部分法律的决定》修正，根据2011年2月25日中华人民共和国刑法修正案(八)修正，根据2015年8月29日第十二届全国人民代表大会常务委员会第十六次会议通过的《刑法修正案(九)》修正，根据2017年11月4日第十二届全国人民代表大会常务委员会第三十次会议通过的《刑法修正案（十）》修正，根据2020年12月26日第十三届全国人民代表大会常务委员会第二十四次会议通过的《刑法修正案（十一）》修正。)\n',
 'features': {'part_code': '编',
  'chapter_code': '章',
  'section_code': '节',
  'article_code': '条',
  'paragraph_code': '款',
  'article_sub_code': '子条',
  'part_name': '编名称',
  'chapter_name': '章名称',
  'section_name': '节名称',
  'article_name': '条名称',
  'article_content': '条内容(包括所有款)',
  'paragraph_content': '款内容'},
 'res': {'part_code': 2,
  'chapter_code': 2,
  'section_code': '',
  'article_code': 133,
  'article_sub_code': '',
  'part_name': '分则',
  'chapter_name': '危害公共安全罪',
  'section_name': '',
  'article_name': '【交通肇事罪;危险驾驶罪】',
  'article_content': '【交通肇事罪;危险驾驶罪】违反交通运输管理法规，因而发生重大事故，致人重伤、死亡或者使公私财产遭受重大损失的，处三年以下有期徒刑或者拘役;交通运输肇事后逃逸或者有其他特别恶劣情节的，处三年以上七年以下有期徒刑;因逃逸致人死亡的，处七年以上有期徒刑。'}}说明中华人民共和国刑法
颁布日期：2020-12-26
执行日期：2021-3-1
时 效 性：现行有效
刑法是规定犯罪、刑事责任和刑罚的法律，是掌握政权的统治阶级为了维护本阶级政治上的统治和各阶级经济上的利益，根据自己的意志，规定哪些行为是犯罪并且应当负何种刑事责任 ，并给予犯罪嫌疑人何种刑事处罚的法律规范的总称。
2020年12月26日，第十三届全国人民代表大会常务委员会第二十四次会议通过刑法修正案(十一)。修改后的刑法自2021年3月1日开始施行。这也是继1997年全面修订刑法后通过的第十一个刑法修正案。
(1979年7月1日第五届全国人民代表大会第二次会议通过，1997年3月14日第八届全国人民代表大会第五次会议修订。根据1999年12月25日中华人民共和国刑法修正案，2001年8月31日中华人民共和国刑法修正案(二)，2001年12月29日中华人民共和国刑法修正案(三)，2002年12 月28日中华人民共和国刑法修正案(四)，2005年2月28日中华人民共和国刑法修正案(五)，2006年6月29日中华人民共和国刑法修正案(六)，2009年2月28日中华人民共和国刑法修正案(七)修正，根据2009年8月27日《全国人民代表大会常务委员会关于修改部分法律的决定》修正，根据2011年2月25日中华人民共和国刑法修正案(八)修正，根据2015年8月29日第十二届全国人民代表大会常务委员会第十六次会议通过的《刑法修正案(九)》修正，根据2017年11月4日第十二届全国人民代表大会常务委员会第三十次会议通过的《刑法修正案（十）》修正，根据2020年12月26日第十三届全国人民代表大会常务委员会第二十四次会议通过的《刑法修正案（十一）》修正。)
——摘自刑法网更新说明2023-6-3: v0.0.12 修复刑法第101109；199；201209；301~309条款的相关功能。2023-4-13:v0.0.11 修复已知BUG2023-2-27:v0.0.10 更新了款的内容提取BUG2023-2-21:v0.0.9 修复已知BUG2023-2-21:v0.0.8 更新了款号的切割方式。（之前带有“项”的款号切割方式不准确）2023-2-20:v0.0.7 更新了通过款号查询的“第X款”查询功能。
Package: legal-pre-processing
Legal Pre-processingPre processing tools for documents with legal content.
Authors:Daniel Henrique Arruda BoeingandIsrael Oliveira.Usage:Donwload theJSONfiles that could be used as examples.$mkdir-pdata_dicts&&cddata_dicts

$wgethttps://gitlab.com/israel.oliveira.softplan/legal-pre-processing/-/raw/master/data/LegalRegExPatterns.json

$wgethttps://gitlab.com/israel.oliveira.softplan/legal-pre-processing/-/raw/master/data/LegalStopwords.json

$wgethttps://gitlab.com/israel.oliveira.softplan/legal-pre-processing/-/raw/master/data/TesauroRevisado.jsonLoad helper class and laod dictionaries.>>>fromlegal_pre_processing.utilsimportLoadDicts>>>>>>dicts=LoadDicts('legal_dicts/')>>>dicts.List['LegalRegExPatterns','TesauroRevisado','LegalStopwords']Load the class LegalPreprocess and and instantiate it.>>>fromlegal_pre_processing.legal_pre_processingimportLegalPreprocess>>>>>>model=LegalPreprocess(domain_stopwords=dicts.LegalStopwords,tesauro=dicts.TesauroRevisado,regex_pattern=dicts.LegalRegExPatterns)Load a PDF file withPyMuPDF(or other extractor) and do some tests:>>>importfitz>>>>>>doc=fitz.open('some_pdf_file_with_legal_content.pdf')>>>page=doc[page_number-1].get_text()>>>print(page)"...Com a concordância das partes foi utilizada prova emprestada em relação aos depoimentos de algumas testemunhas de defesa (decisões de 28/10/2016,  07/11/2016, de 10/11/2016 e de 09/02/2017, nos eventos 114, 175 e 199, e depoimentos nos eventos 187, 200, 287 e 513)....">>>page_preprocess=model.ProcessText(page)>>>print(page_preprocess)"...concordancia utilizada PROVA_EMPRESTADA relacao depoimentos algumas testemunhas defesa decisoes eventos depoimentos eventos..."Use heuristics available:>>>fromheuristicsimportHeuristics>>>path_pdf='example-of-rotated-text-in-latex.pdf'>>>h=Heuristics(path_pdf)>>>h.set_all_heuristics()>>>txt=h.Extract()Class Heuristics, input parameters:pdf_path:strPathtoPDFfile.th_font:float,optionalThreshold(between0and1)forfilteroutliersoffonttypes.(defaultis0.9)th_size:float,optionalThreshold(between0and1)forfilteroutliersoffontsizes.(defaultis0.9)filter_font_by_cum:bool,optionalFiltersoutliersbytheaccumulatedsum,forfonttypes.IfFalse,filterbyindivualcounting.(defaultisTrue)filter_size_by_cum:bool,optionalFiltersoutliersbytheaccumulatedsum,forfontsizes.IfFalse,filterbyindivualcounting.(defaultisTrue)Remove duplicated phrases:>>>h.set_filter_duplicated_phrases()Let only horizontal text:>>>h.set_let_horinzontal_text()Remove text with more rare used font types:>>>h.set_filter_outlier_font_types()Remove text with more rare used font sizes:>>>h.set_filter_outlier_font_sizes()TODO:Update README with a project's image and shields (seerandom-forest-mc).ActiveLGTM(seerandom-forest-mc).Refences:PyMuPDF documentation(based on version1.18.15).Legal Thesaurus(*Vocabulário Jurídico
*).