Saravanan666/pypi-org huggingface dataset:
Package: py-pde
py-pdepy-pdeis a Python package for solving partial differential equations (PDEs).
The package provides classes for grids on which scalar and tensor fields can be
defined. The associated differential operators are computed using a
numba-compiled implementation of finite differences. This allows defining,
inspecting, and solving typical PDEs that appear for instance in the study of
dynamical systems in physics. The focus of the package lies on easy usage to
explore the behavior of PDEs. However, core computations can be compiled
transparently using numba for speed.Try it online!Installationpy-pdeis available onpypi, so you should be able to install it throughpip:pipinstallpy-pdeIn order to have all features of the package available, you might want to
install the following optional packages:pipinstallh5pypandasmpi4pynumba-mpiMoreover,ffmpegneeds to be installed for creating movies.As an alternative, you can installpy-pdethroughcondausing theconda-forgechannel:condainstall-cconda-forgepy-pdeInstallation withcondaincludes all dependencies ofpy-pde.UsageA simple example showing the evolution of the diffusion equation in 2d:importpdegrid=pde.UnitGrid([64,64])# generate gridstate=pde.ScalarField.random_uniform(grid)# generate initial conditioneq=pde.DiffusionPDE(diffusivity=0.1)# define the pderesult=eq.solve(state,t_range=10)# solve the pderesult.plot()# plot the resulting fieldPDEs can also be specified by simply writing expressions of the evolution rate.
For instance, theCahn-Hilliard equationcan be implemented aseq=pde.PDE({'c':'laplace(c**3 - c - laplace(c))'})which can be used in place of theDiffusionPDEin the example above.More informationTutorial notebooks in thetutorials folderExamples gallerywith an overview of the capabilities of the packageTheDiscussions on GitHubFull documentation on readthedocsor asa single PDF file.Thepaper published in the Journal of Open Source SoftwarePractical tutorial on pattern formation in biological cells
Package: pypdf
pypdfpypdf is a free and open-source pure-python PDF library capable of splitting,merging,cropping, and transformingthe pages of PDF files. It can also add
custom data, viewing options, andpasswordsto PDF files. pypdf canretrieve textandmetadatafrom PDFs as well.Seepdflyfor a CLI application that uses pypdf to interact with PDFs.InstallationInstall pypdf using pip:pip install pypdfFor using pypdf with AES encryption or decryption, install extra dependencies:pip install pypdf[crypto]NOTE:pypdf3.1.0 and above include significant improvements compared to
previous versions. Please refer tothe migration
guidefor
more information.UsagefrompypdfimportPdfReaderreader=PdfReader("example.pdf")number_of_pages=len(reader.pages)page=reader.pages[0]text=page.extract_text()pypdf can do a lot more, e.g. splitting, merging, reading and creating
annotations, decrypting and encrypting, and more. Check outthe
documentationfor additional usage
examples!For questions and answers, visitStackOverflow(tagged withpypdf).ContributionsMaintaining pypdf is a collaborative effort. You can support the project by
writing documentation, helping to narrow down issues, and submitting code.
See theCONTRIBUTING.mdfile for more information.Q&AThe experience pypdf users have covers the whole range from beginners who
want to make their live easier to experts who developed software before PDF
existed. You can contribute to the pypdf community by answering questions
onStackOverflow,
helping indiscussions,
and asking users who report issues forMCVE's (Code + example PDF!).IssuesA good bug ticket includes a MCVE - a minimal complete verifiable example.
For pypdf, this means that you must upload a PDF that causes the bug to occur
as well as the code you're executing with all of the output. Useprint(pypdf.__version__)to tell us which version you're using.CodeAll code contributions are welcome, but smaller ones have a better chance to
get included in a timely manner. Adding unit tests for new features or test
cases for bugs you've fixed help us to ensure that the Pull Request (PR) is fine.pypdf includes a test suite which can be executed withpytest:$pytest=====================testsessionstarts=====================platformlinux--Python3.6.15,pytest-7.0.1,pluggy-1.0.0
rootdir:/home/moose/GitHub/Martin/pypdf
plugins:cov-3.0.0
collected233items

tests/test_basic_features.py..[0%]tests/test_constants.py.[1%]tests/test_filters.py.................x.....[11%]tests/test_generic.py.................................[25%].............[30%]tests/test_javascript.py..[31%]tests/test_merger.py.[32%]tests/test_page.py.........................[42%]tests/test_pagerange.py................[49%]tests/test_papersizes.py..................[57%]tests/test_reader.py..................................[72%]...............[78%]tests/test_utils.py....................[87%]tests/test_workflows.py..........[91%]tests/test_writer.py.................[98%]tests/test_xmp.py...[100%]==========232passed,1xfailed,1warningin4.52s==========
Package: py-pdf-collate
# py-pdf-collatepy-pdf-collate is a Python script that collates your PDF documents.## What is it used forTurn your single-sided scanner into a duplex!There is currently only one sorting method, but more will be added shortly.It will take the following page order:1, 3, 5, 2, 4, 6And collate it to:1, 2, 3, 4, 5, 6## Installation1. Install ```py-pdf-collate` package:pip install py-pdf-collate2. Run on the command line:pdf_collate [filename] [output filename (optional)]If you do not provide an output filename, it will override your source file by default.## Upcoming featuresI will be adding the following sort order:1, 3, 5, 6, 4, 2
Package: pyPDFeditor-GUI
pyPDFeditor-GUIThis project is based on PyQt5 and PyMuPDF and tested on Windows 10 & 11.Welcome 🎃🎉Welcome to use pyPDFeditor-GUI. pyPDFeditor-GUI is a simple cross-platform application, thanks
toPython,PyQt5andPyMuPDF, designed to work on simple PDF handling.I tried my best to make it close to Fluent UI. Icons used can be found🔗here.FeaturesSupport 3 languages: English, 日本語 (Japanese), and 中文 (Traditional Chinese)Fluent UI designCross-platform supportOpen-source and free to use under MIT licenceFrameless Window on
Windows (Snap Layouton Windows 11 is supported)What's inMerge files no matter they are PDF files (.pdf), image files (.jpg.png.jpeg.bmp.tiff.svg), or
e-book files (.epub.xps.fb2.cbz) into one PDF file📚(...right-click the page then) Delete pages or rearrange pages(...right-click the page then) Extract images from a page(...right-click the page then) Rotate a page(...right-click the page then) Save a page as a PDF file or image file (.png.psd.ppm)Add watermark (PDF only)Set password either user or/and owner password (PDF only)🔒Set permissions (PDF only)🔏Edit catalogue structure of the file (PDF only)📑Edit metadata of the file (PDF only)📝Convert image files or e-book files to PDFRequirements 🧩Python>=3.7PyQt5>=5.15.4
PyMuPDF>=1.19.2Install & Runinstall from sourceyou will needsetuptoolsandwheelinstalled$cd<path>
$pipinstall.where<path>is the directorysetup.pylocates.install from PyPi$pipinstall-UpyPDFeditor-GUIbuild thy own packagethis requiresbuild,setuptoolsandwheelinstalled$pipinstall-rrequirements.txt
$python-mbuildRun$ pdfeditorto launch the application.$ python -m pypdfeditor_core --resetto reset the application; this will delete all settings and caches. Default
settings will be created at next launch.$ python -m pypdfeditor_core --removeto remove the whole application.$ python -m pypdfeditor_core --debugto enable showing all mupdf errors and/or warnings.Screenshot 🎞️on Windows 11:SupportSnap Layoutson Windows 11OthersSetting and cache files are stored in the directoryC:\User\USER\.pyPDFeditor-GUI(Windows) orhome/USER/.pyPDFeditor-GUI(Linux and macOS).Please report any errors toIssues. Thank you!
Package: pypdfium
PyPDFiumA simple python wrapper forPDFium.InstallationpipinstallpypdfiumQuick startimportsysfromPILimportImageimportctypesimportpypdfiumasPDFIUMPDFIUM.FPDF_InitLibraryWithConfig(PDFIUM.FPDF_LIBRARY_CONFIG(2,None,None,0))if__name__=="__main__":iflen(sys.argv)<2:print("USAGE: demo.py somefile.pdf")exit(0)fname=sys.argv[1]doc=PDFIUM.FPDF_LoadDocument(fname,None)# load documentpage_count=PDFIUM.FPDF_GetPageCount(doc)# get page countsassert(page_count>=1)page=PDFIUM.FPDF_LoadPage(doc,0)# load the first pagewidth=int(PDFIUM.FPDF_GetPageWidthF(page)+0.5)# get page widthheight=int(PDFIUM.FPDF_GetPageHeightF(page)+0.5)# get page height# render to bitmapbitmap=PDFIUM.FPDFBitmap_Create(width,height,0)PDFIUM.FPDFBitmap_FillRect(bitmap,0,0,width,height,0xFFFFFFFF)PDFIUM.FPDF_RenderPageBitmap(bitmap,page,0,0,width,height,0,PDFIUM.FPDF_LCD_TEXT|PDFIUM.FPDF_ANNOT)# retrieve data from bitmapbuffer=PDFIUM.FPDFBitmap_GetBuffer(bitmap)buffer_=ctypes.cast(buffer,ctypes.POINTER(ctypes.c_ubyte*(width*height*4)))img=Image.frombuffer("RGBA",(width,height),buffer_.contents,"raw","BGRA",0,1)img.save("out.png")ifbitmapisnotNone:PDFIUM.FPDFBitmap_Destroy(bitmap)PDFIUM.FPDF_ClosePage(page)PDFIUM.FPDF_CloseDocument(doc)NotesWorking on 64bit Windows, Mac OS X and Linux.Thepypdfium.pyfile is generated byctypesgenwith command:ctypesgen -lpdfium -L somewhere/pdfium-linux/lib somewhere/pdfium-linux/include/*.h -o pypdfium.pyPDFium binaries are fromhttps://github.com/bblanchon/pdfium-binariesAPI documentation:https://developers.foxitsoftware.com/resources/pdf-sdk/c_api_reference_pdfium/A PDF manager based on pypdfium:https://github.com/YinlinHu/kuafu
Package: pypdflib
pypdflib: Python based PDF Rendering Library============================================Features:---------------------------* Uses Pango Cairo for rendering* Supports Complex scripts such as Indic scriptsHow to Install:---------------------------1. Get the sourcecodegit clone http://git.gitorious.org/pypdflib/pypdflib.gitorgit clone http://github.com/santhoshtr/pypdflib.git2. Create the eggspython setup.py build3. Install the librarysudo python setup.py install---Copyright (C) 2010, Santhosh Thottingal.Copying and distribution of this file, with or without modification,are permitted in any medium without royalty provided the copyrightnotice and this notice are preserved.  This file is offered as-is,without warranty of any kind.
Package: pypdf-lib
pypdf-libA (maybe) Better PDF Parsing for Python focused on textual extraction. WIP.This library is a Python Wrapper built aroundPdfAct, which is built using Java.Pre-requisitesJava# Linuxapt-getupdate&&apt-getinstall-ydefault-jre# openjdk-8-jre-headless / openjdk-11-jdk / openjdk-11-jre-headless# Macbrewinstalljava# Windows# idkInstallation!pipinstall--upgradegit+https://github.com/trisongz/pypdf-lib.git!pipinstall--upgradepypdf-libUsagefrompypdfimportPyPDFfromfileioimportFilebase_dir='/content/output'File.mkdirs(base_dir)# Using a remap function expects the file extension to be mapped properly - i.e. if 'txt' is selected, .txt file extension should be returned.defremap_fnames(fname):fname=File.base(fname).replace('- ','').replace(' ','_').strip().replace('.pdf','.json')returnFile.join(base_dir,fname)converter=PyPDF(input_dir='/content/inputs',output_dir='/content/output',units=['paragraphs','blocks'],visualize=True)# remap_funct is optional.forresinconverter.extract(remap_funct=remap_fnames):print(res)# > /content/output/your_json_file_1.jsonconverter.extracted'''{'/content/inputs/input_1.pdf': '/content/output/your_json_file_1.json','/content/inputs/input_2.pdf': '/content/output/your_json_file_2.json','/content/inputs/input_3.pdf': '/content/output/your_json_file_3.json','params': {'exclude_roles': None,'format': 'json','include_roles': ['title','body','appendix','keywords','heading','general_terms','toc','caption','table','other','categories','keywords','page_header'],'units': ['paragraphs', 'blocks'],'visualize': True,'with_control_characters': False}}'''
Package: pypdfml
pypdfml=======Simple XML wrapper for reportlab with jinja2 support## Requirements* reportlab* PIL* jinja2 (optional)## Usage```from pypdfml import PyPDFMLpdf = PyPDFML('example.xml')context = {'what': 'world'}pdf.generate(context)pdf.save()```## ExamplesThe following [template](https://github.com/badzong/pypdfml/blob/master/pypdfml/templates/example.xml) generates this [PDF document](https://github.com/badzong/pypdfml/blob/master/example.pdf)
Package: pypdf-table-extraction
Camelot: PDF Table Extraction for HumansCamelotis a Python library that can help you extract tables from PDFs!Note:You can also check outExcalibur, the web interface to Camelot!Here's how you can extract tables from PDFs.You can check out the PDF used in this examplehere.>>> import camelot
>>> tables = camelot.read_pdf('foo.pdf')
>>> tables
<TableList n=1>
>>> tables.export('foo.csv', f='csv', compress=True) # json, excel, html, markdown, sqlite
>>> tables[0]
<Table shape=(7, 7)>
>>> tables[0].parsing_report
{
    'accuracy': 99.02,
    'whitespace': 12.24,
    'order': 1,
    'page': 1
}
>>> tables[0].to_csv('foo.csv') # to_json, to_excel, to_html, to_markdown, to_sqlite
>>> tables[0].df # get a pandas DataFrame!Cycle NameKI (1/km)Distance (mi)Percent Fuel SavingsImproved SpeedDecreased AccelEliminate StopsDecreased Idle2012_23.301.35.9%9.5%29.2%17.4%2145_10.6811.22.4%0.1%9.5%2.7%4234_10.5958.78.5%1.3%8.5%3.3%2032_20.1757.821.7%0.3%2.7%1.2%4171_10.07173.958.1%1.6%2.1%0.5%Camelot also comes packaged with acommand-line interface!Note:Camelot only works with text-based PDFs and not scanned documents. (As Tabulaexplains, "If you can click and drag to select text in your table in a PDF viewer, then your PDF is text-based".)You can check out some frequently asked questionshere.Why Camelot?Configurability: Camelot gives you control over the table extraction process withtweakable settings.Metrics: You can discard bad tables based on metrics like accuracy and whitespace, without having to manually look at each table.Output: Each table is extracted into apandas DataFrame, which seamlessly integrates intoETL and data analysis workflows. You can also export tables to multiple formats, which include CSV, JSON, Excel, HTML, Markdown, and Sqlite.Seecomparison with similar libraries and tools.Support the developmentIf Camelot has helped you, please consider supporting its development with a one-time or monthly donationon OpenCollective.InstallationUsing condaThe easiest way to install Camelot is withconda, which is a package manager and environment management system for theAnacondadistribution.$ conda install -c conda-forge camelot-pyUsing pipAfterinstalling the dependencies(tkandghostscript), you can also just use pip to install Camelot:$ pip install "camelot-py[base]"From the source codeAfterinstalling the dependencies, clone the repo using:$ git clone https://www.github.com/camelot-dev/camelotand install Camelot using pip:$ cd camelot
$ pip install ".[base]"DocumentationThe documentation is available athttp://camelot-py.readthedocs.io/.Wrapperscamelot-phpprovides aPHPwrapper on Camelot.ContributingTheContributor's Guidehas detailed information about contributing issues, documentation, code, and tests.VersioningCamelot usesSemantic Versioning. For the available versions, see the tags on this repository. For the changelog, you can check outHISTORY.md.LicenseThis project is licensed under the MIT License, see theLICENSEfile for details.
Package: py-pdf-term
py-pdf-termA fully-configurable terminology extraction module written in PythonInstallationpip install py-pdf-termYou also need to install spaCy modelsja_core_news_smanden_core_web_sm, which this module depends on.pip install https://github.com/explosion/spacy-models/releases/download/ja_core_news_sm-3.6.0/ja_core_news_sm-3.6.0.tar.gz
pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.6.0/en_core_web_sm-3.6.0.tar.gzDocumentationhttps://kumachan-mis.github.io/py-pdf-term
Package: pypdftk
Python module to drive the awesome [pdftk][0] binary.Proudly brought to you by the [revolunet][1] team andawesome
contributorsFeaturesfill_formFill a PDF with given data and returns the output PDF pathpdf_path: input PDFdatas: dictionnary of fielf names / valuesout_file(default=auto) : output PDF path. will use tempfile if
not providedflatten(default=True) : flatten the final PDFconcatMerge multiple PDFs into one single file and returns the output PDF pathfiles: list of PDF files to concatenateout_file(default=auto) : output PDF path. will use tempfile if
not providedget_pagesConcatenate a list of page ranges into one single file and returns the
output PDF pathpdf_path: input PDFranges(default=[]) :[]for clone,[[2]]for
extracting 2nd page,[[1],[2,5],[3]]for concatenating pages 1,
2-5, 3out_file(default=auto) : output PDF path. will use tempfile if
not providedsplitSplit a single PDF in many pages and return a list of pages pathspdf_path: input PDFout_dir(default=auto) : output PDFs dir. will use tempfile if
not providedwarningif you give a out_dir parameter, ensure its empty, or the
split function may destroy your files and return incorrect results.gen_xfdfGenerate a XFDF file suited for filling PDF forms and return the
generated XFDF file pathdatas: dictionnary of datasget_num_pagesReturn the number of pages for a given PDFpdf_path: input PDF filereplace_pageReplace a page in a PDF (pdf_path) by the PDF pointed by
pdf_to_insert_path.pdf_pathis the PDF that will have its page replaced.page_numberis the number of the page in pdf_path to be replaced.
It is 1-based.pdf_to_insert_pathis the PDF that will be inserted at the old
page.stampApplies a stamp (fromstamp_pdf_path) to the PDF file inpdf_path. If nooutput_pdf_pathis provided, it returns a
temporary file with the result PDF.[compress | uncompress]These are only useful when you want to edit PDF code in a text
editor like vim or emacs.  Remove PDF page stream compression by
applying the uncompress filter. Use the compress filter to
restore compression.pdf_path: input PDF fileout_file(default=auto) : output PDF path. will use tempfile if
not providedflatten(default=True) : flatten the final PDFdump_data_fieldsRead PDF and output form field statistics.pdf_path: input PDF fileExampleFill a PDF model and add a cover page :```python import pypdftkdatas = { ’first
Package: pypdftk-secure
# pypdftk [![circleci](https://circleci.com/gh/revolunet/pypdftk.svg?style=shield&circle-token=78ab3159527f865cf8ee850b3c1c9fcce8ccf631)](https://circleci.com/gh/revolunet/pypdftk) [![travis](https://travis-ci.org/yguarata/pypdftk.svg?branch=master)](https://travis-ci.org/yguarata/pypdftk)Python module to drive the awesome [pdftk][0] binary.Proudly brought to you by the [revolunet][1] team and [awesome contributors](https://github.com/revolunet/pypdftk/graphs/contributors)## pdftk pathBy default, path is/usr/bin/pdftk, but you can override it with thePDFTK_PATHenvironment variable## Licence
This module is released under the permissive [MIT license](http://revolunet.mit-license.org). Your contributions are always welcome.[0]:http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/[1]:http://revolunet.com
Package: pypdftk-snap-wrkarnd
pypdftkPython module to drive the awesomepdftkbinary.Proudly brought to you by therevolunetteam andawesome contributorsFeaturesfill_formFill a PDF with given data and returns the output PDF pathpdf_path: input PDFdatas: dictionnary of fielf names / valuesout_file(default=auto) : output PDF path. will use tempfile if not providedflatten(default=True) : flatten the final PDFconcatMerge multiple PDFs into one single file and returns the output PDF pathfiles: list of PDF files to concatenateout_file(default=auto) : output PDF path. will use tempfile if not providedsplitSplit a single PDF in many pages and return a list of pages pathspdf_path: input PDFout_dir(default=auto) : output PDFs dir. will use tempfile if not providedwarningif you give a out_dir parameter, ensure its empty, or the split function may destroy your files and return incorrect results.gen_xfdfGenerate a XFDF file suited for filling PDF forms and return the generated XFDF file pathdatas: dictionnary of datasget_num_pagesReturn the number of pages for a given PDFpdf_path: input PDF filereplace_pageReplace a page in a PDF (pdf_path) by the PDF pointed by pdf_to_insert_path.pdf_pathis the PDF that will have its page replaced.page_numberis the number of the page in pdf_path to be replaced. It is 1-based.pdf_to_insert_pathis the PDF that will be inserted at the old page.stampApplies a stamp (fromstamp_pdf_path) to the PDF file inpdf_path. If nooutput_pdf_pathis provided, it returns a temporary file with the result PDF.[compress | uncompress]These are only useful when you want to edit PDF code in a text
editor like vim or emacs.  Remove PDF page stream compression by
applying the uncompress filter. Use the compress filter to
restore compression.pdf_path: input PDF fileout_file(default=auto) : output PDF path. will use tempfile if not providedflatten(default=True) : flatten the final PDFdump_data_fieldsRead PDF and output form field statistics.pdf_path: input PDF fileExampleFill a PDF model and add a cover page :importpypdftkdatas={'firstname':'Julien','company':'revolunet','price':42}generated_pdf=pypdftk.fill_form('/path/to/model.pdf',datas)out_pdf=pypdftk.concat(['/path/to/cover.pdf',generated_pdf])pdftk pathBy default, path is/usr/bin/pdftk, but you can override it with thePDFTK_PATHenvironment variableLicenceThis module is released under the permissiveMIT license. Your contributions are always welcome.
Package: pypdist
pypdist: Python Package for Univariate Probability DistributionsThis packages aims to model data according to common univariate probability distributions.So far, it includes:Gaussian distribtuion:pypdist.Gaussian.Binomial distribution:pypdist.Binomial.Installationpip install pypdistExamplesGaussian DistributionfrompypdistimportGaussiangauss=Gaussian(0,1)print(gauss)Binomial DistributionfrompypdistimportBinomialbinom=Binomial(0,1)print(binom)
Package: py-pdlrens2code
py_pdlrens2codePython Boilerplate contains all the boilerplate you need to create a Python package.Free software: MIT licenseDocumentation:https://py-pdlrens2code.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-03-08)First release on PyPI.
Package: pypdm
PyPDMPython3 library for controlling Alphanov's PDM laser sources. Currently supported PDM protocol version is 3.4. Daisy-chain configuration for multiple devices is supported, so it is possible to use many PDMs with only one serial link.InstallationClone the repository then use pip3 to install the package.pip3 install pypdmDocumentationA quick documentation is available onRead the Docs. A simple usage example is also provided below.RequirementsThis library requires the following packages:pyserialSafetyWhen a PDM object is deleted, the library may try to switch off the laser source for safety. However, you shall not rely on this behavior and always beware of dangers when using laser equipments! Please always wear laser safety goggles or use any appropriate safety equipment to prevent any harmful accident.Usage exampleBasic laser activation in continuous modeimportpypdmpdm=pypdm.PDM(1,'COM0')# Set offset current in mA.pdm.offset_current=30pdm.activation=True# Apply new settings to the device.pdm.apply()Basic laser configuration for pulsed operationimportpypdmpdm=pypdm.PDM(1,'COM0')# Set pulse power to 50%pdm.current_source=pypdm.CurrentSource.NUMERICpdm.current_percentage=50pdm.activation=True# Apply new settings to the device.pdm.apply()List of available propertiesimportpypdmpdm=pypdm.PDM(1,'COM0')print('Mode:',pdm.mode)print('Synchronization source:',pdm.sync_source)print('Delay line type:',pdm.delay_line_type)print('Frequency (Hz):',pdm.frequency)print('Pulse width (ps):',pdm.pulse_width)print('Delay (ps):',pdm.delay)print('Offset current (mA):',pdm.offset_current)print('Current (%):',pdm.current_percentage)print('Current (mA):',pdm.current)print('Temperature (C°):',pdm.temperature)print('Maximum current (mA):',pdm.maximum_current)print('Interlock status:',pdm.interlock_status)print('Laser activation:',pdm.laser_activation)Use of two sources in daisy-chain configurationimportpypdmpdm1=pypdm.PDM(1,'COM0')pdm2=pypdm.PDM(2,pdm1)