Saravanan666/pypi-org huggingface dataset:
Package: table-synthesis
Table Synthesis LibraryIntroductionThis is the Table Image Synthesis tool that can generate a number of template table images given a template, with a goal of providing similar images to fine-tune the table recognition model. This is done by keeping the table structure and changing the text inside it.UsageFirst, depending on the browser you use, get the corresponding driver executable with the browser (chromedriver.exefor Chrome orgeckodriver.exefor Firefox) from the Internet. Then put the driver file in the same directory as your main file.The full model usage can be found here:from table_synthesis import SynthesizeTable

syn = SynthesizeTable(input_path='test',
                        out_path='test_out')

syn(num_synth=1)Here, theinput_pathis the path to the folder with thegt.txtfile (which is a label file exported from PPOCRLabel program), and optionally the extra html files in thehtml/folder if using TableGeneration tool.Theout_pathshould be the folder containing the output (recommended empty).Then initilalize the Synthesis class and run it to generatenum_synthimages from each label image.
Package: tablet
tabletTablet is a module that supports spreadsheet-like operations on tiny text tables.Dealing with those tiny tables or spreadsheets (usually in CSV/TSV formats) is a daily chore.The goal of this project is to provide a light-weight and easy-to-use
tool that can handle daily-routines of manipulating tabular text data.Inside the module, a “Table” class was defined to support all kinds of spreadsheet/table-like operations:tsv/csv input/outputadding/removing rows and columnslookup a key or keysiteratingslicingsearchingsortingfilteringgroupingjoiningaggregatingremoving duplicatesand moreIf you are handling larger and more complex tables, spreadsheets, or panels, I suggest you turn to pandas<http://pandas.pydata.org/>.Getting StartedSupposing a given csv file named <demo.csv> looks like below:Heat,Lane,LastName,FirstName,YOB,NOC,RT,Time
1,1,SILADJI,Caba,1990,SRB,0.69,27.89
1,2,SCOZZOLI,Fabio,1988,ITA,0.62,27.37
1,3,SNYDERS,Glenn,1987,NZL,0.66,27.64
1,4,MARKIC,Matjaz,1983,SLO,0.73,27.71
1,5,GANGLOFF,Mark,1982,USA,0.67,27.57
1,6,FELDWEHR,Hendrik,1986,GER,0.70,27.53
1,7,BARTUNEK,Petr,1991,CZE,0.64,27.87
1,8,POLYAKOV,Vladislav,1983,KAZ,0.77,27.81
2,1,RICKARD,Brenton,1983,AUS,0.71,27.80
2,2,AGACHE,Dragos,1984,ROU,0.76,27.71
2,3,DALE OEN,Alexander,1985,NOR,0.70,27.33
2,4,FRANCA DA SILVA,Felipe,1987,BRA,0.68,26.95
2,5,DUGONJIC,Damir,1988,SLO,0.75,27.51
2,6,VAN DER BURGH,Cameron,1988,RSA,0.63,26.90
2,7,TRIZNOV,Aleksandr,1991,RUS,0.70,27.73
2,8,STEKELENBURG,Lennart,1986,NED,0.69,27.51Users can use the following statements to show the top 8 best-time results:>>> import tablet as T
>>> t = T.read('demo.csv', delim=',').sort('Time')
>>> for row in t[:8]:
...     print row[2], row[3], row[-1]
...
VAN DER BURGH Cameron 26.90
FRANCA DA SILVA Felipe 26.95
DALE OEN Alexander 27.33
SCOZZOLI Fabio 27.37
DUGONJIC Damir 27.51
STEKELENBURG Lennart 27.51
FELDWEHR Hendrik 27.53
GANGLOFF Mark 27.57And output the top 8 results to a new tsv (tab-separated values) file:>>> t2 = t.cut_cols(['LastName','FirstName','Time']).cut_rows(range(8))
>>> t2.show()
H ['LastName', 'FirstName', 'Time']
0 ['VAN DER BURGH', 'Cameron', '26.90']
1 ['FRANCA DA SILVA', 'Felipe', '26.95']
2 ['DALE OEN', 'Alexander', '27.33']
3 ['SCOZZOLI', 'Fabio', '27.37']
4 ['DUGONJIC', 'Damir', '27.51']
5 ['STEKELENBURG', 'Lennart', '27.51']
6 ['FELDWEHR', 'Hendrik', '27.53']
7 ['GANGLOFF', 'Mark', '27.57']
>>> t2.write('finalists.tsv')
Package: tabletest
# TableTest [![Build Status](https://travis-ci.org/horia141/tabletest.svg)](https://travis-ci.org/horia141/tabletest) #Unit testing module for table-like test, for Python 2.For Python 3, check out [TableTest3](https://github.com/horia141/tabletest3).Many unit tests, especially those for side-effect free functions, can be written like this:```pythonimport unittestclass FooTest(unittest.TestCase):TEST_CASES = [ case_1, case_2, ... ]def test_all(self):for test_case in TEST_CASES:do something with test_case```If there are many test cases, they'll all appear as a single unit test in test runners. Furthermore,the failure of one test will cause all others to fail. Finally, it might be hard to identify whichof the tests actually fail.TableTest aims to solve this problem. Using it, we can rewrite the previous example as:```pythonimport tabletestclass FooTest(tabletest.TableTestCase):TEST_CASES = [ case_1, case_2, ... ]@tabletest.tabletest(TEST_CASES)def test_all(self, test_case):do something with test_case```When the testrunner will run this class, it will now find one test for each test case. Each testwill basically invoke `tabletest` with a single test case.The setup functions like this:* You must define a `TEST_CASE` class variable which can be iterated as a sequence.* You must define a single argumet test function which does the testing required for eachtest case.* Each element of `TEST_CASE` generates a test function, called `test_all_{xx}`, for the previousexample.* Iteration order is not guaranteed and should not be depended on.* All other `unittest.TestCase` behavior remains intact: `setUp` and `tearDown` methods, other testmethods etc.* More than one test can be annotated with tabletests per test case.* However, the name must starst with `test_`, so it is picked up by the runner.## Installation ##Installation is straightforward, via `pip`:```bashpip install tabletest```## Development ##Working on this project is pretty much standard Python development. Perhaps the most novel aspect is the usage of the [Bazel][bazel] build system. At the moment, only a `py_library`, a`py_test` and a `pypi_package` are defined as build rules. Nevertheless, tests are run through [Bazel][bazel] rather than through regular invocation. To run the tests use:```bashbazel test //:tabletest_test```To push a new version of the package to PyPi use:```bashbazel run //:tabletest_upload -- --user=[pypi user] --pass=[pypi password]```## References ##See [Tabletests][tabletests] and [How Tabletest Works][how-tabletest-works] for a longer introduction as well as a deep dive into the library.[tabletests]: https://horia141.github.com/jekyll/update/2015/08/31/tabletests.html[how-tabletest-works]: https://horia141.github.com/jekyll/update/2015/09/08/how-tabletest-works.html[bazel]: http://bazel.io
Package: table-test
# Table testNotice: This repository is not supported because the approach has not paid off. It is much better to use native pyTest.This package wrote to use table tests in python. The best practice and very useful practice is test with simple-style
structure. You don’t write any code: for-loop, conditions, exceptions and other difficult constructions in tests.
You describe your test as some cases:NameDescriptionObject (class or function)Target value or exceptionAfter and before middlewareSuch kind of tests intend of standartization and getting rid of verbosity. You can find some examples into
[tests](https://github.com/hedgehogues/table-tests/tree/tests). More sophisticated examples you can find
[here](https://github.com/Hedgehogues/youtube-crawler/tree/master/tests)# Installationgit clonehttps://github.com/Hedgehogues/table-testspip install -r requirements
Package: tabletest3
# TableTest3 [![Build Status](https://travis-ci.org/horia141/tabletest3.svg)](https://travis-ci.org/horia141/tabletest3) #Unit testing module for table-like test, for Python 3.For Python 2, check out [TableTest](https://github.com/horia141/tabletest).Many unit tests, especially those for side-effect free functions, can be written like this:```pythonimport unittestclass FooTest(unittest.TestCase):TEST_CASES = [ case_1, case_2, ... ]def test_all(self):for test_case in TEST_CASES:do something with test_case```If there are many test cases, they'll all appear as a single unit test in test runners. Furthermore,the failure of one test will cause all others to fail. Finally, it might be hard to identify whichof the tests actually fail.TableTest3 aims to solve this problem. Using it, we can rewrite the previous example as:```pythonimport tabletestclass FooTest(tabletest3.TableTestCase):TEST_CASES = [ case_1, case_2, ... ]@tabletest3.tabletest(TEST_CASES)def test_all(self, test_case):do something with test_case```When the testrunner will run this class, it will now find one test for each test case. Each testwill basically invoke `tabletest` with a single test case.The setup functions like this:* You must define a `TEST_CASE` class variable which can be iterated as a sequence.* You must define a single argumet test function which does the testing required for eachtest case.* Each element of `TEST_CASE` generates a test function, called `test_all_{xx}`, for the previousexample.* Iteration order is not guaranteed and should not be depended on.* All other `unittest.TestCase` behavior remains intact: `setUp` and `tearDown` methods, other testmethods etc.* More than one test can be annotated with tabletests per test case.* However, the name must starst with `test_`, so it is picked up by the runner.## Installation ##Installation is straightforward, via `pip`:```bashpip install tabletest3```## Development ##Working on this project is pretty much standard Python development. Perhaps the most novel aspect is the usage of the [Bazel][bazel] build system. At the moment, only a `py_library` and a `py_test` are defined as build rules. Nevertheless, tests are run through [Bazel][bazel] rather than through regular invocation. To run the tests use:```bashbazel test //:tabletest3_test```To push a new version of the package to PyPi use:```bashbazel run //:tabletest3_upload -- --user=[pypi user] --pass=[pypi password]```## References ##See [Tabletests][tabletests] and [How Tabletest Works][how-tabletest-works] for a longer introduction as well as a deep dive into the library.[tabletests]: https://horia141.github.com/jekyll/update/2015/08/31/tabletests.html[how-tabletest-works]: https://horia141.github.com/jekyll/update/2015/09/08/how-tabletest-works.html[bazel]: http://bazel.io
Package: tabletop_pta
tabletop_ptaPython Package to do Time of Arrival calculations for a Pulsar Timing Array demonstration with metronomes.Free software: MIT licenseDocumentation:https://tabletop-pta.readthedocs.io.InstallationBefore installing the tabletop_pta demonstration software one should install the
audio software needed by tabletop_pta to record and playback the metronome
pulses. This includes PyAudio and the PortAudio c-libraries it is based on.PyAudio:https://people.csail.mit.edu/hubert/pyaudio/(And PortAudio Libraries)After installing those requirements got to the directory where~/tabletop_pta/can be found and runpython setup.py installFeaturesThis software runs a set of Python scripts for finding the arrival time of metronome ticks.One may use the various functions while running Python or use one of two
graphical user interfaces called with the commands:PTAdemo_single_metronomePTAdemo_double_metronomeCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-03-13)First release on PyPI.
Package: tabletop-tools
This is a collection of tools for working Tabletop Simulatator mods.To build a mod:$ tts repackThis will put the module atbuild/savegame.json. You can also pass a path for where to build the module.To unpack a module:$ tts unpack <...path/to/savegame.json...>to unpack a savegame.ConfigYou can provide atabletop-tools.tomlat the root of a savegame, to configure tabletop-tools.Currently, there is one supported option (quantize), that causes tabletop-tools to round floats to the nearest 0.0001.quantize=true
Package: table-transformer
Table Transformer LibraryOriginal repository:https://github.com/microsoft/table-transformerIntroductionThis is the Table Transformer Model developed by Brandon Smock et al. of Microsoft AI. This repository consists ofTable Structure Recognition (TATR)for detecting and extracting table infomation into popular formats such as CSV or HTML table, plus text recognition using EasyOCR.Installationpip install table-transformerUsageThe full model usage can be found here:from table_transformer import (TableExtractionPipeline,
                               get_structure_class_thresholds,
                               visualize_cells)
from PIL import Image
from easyocr import Reader

# Get the structure class thresholds
structure_class_threshold = get_structure_class_thresholds(
    table=0.5,
    table_column=0.5,
    table_row=0.5,
    table_column_header=0.5,
    table_projected_row_header=0.5,
    table_spanning_cell=0.5,
    no_object=10
    )

# Initiliaze EasyOCR
reader = Reader(['en'], gpu=False)

# Initialize the Pipeline with the thresholds
table_transformer = TableExtractionPipeline(
    structure_class_thresholds=structure_class_threshold,
    model_path = "TATR-v1.1-All-msft.onnx",
    ocr_model=reader)

# Open the table image in PIL.Image format
directory = "image.png"

img = Image.open(directory)
# Run the pipeline
result = table_transformer(
    page_image=img,
    out_cells=True,
    out_csv=False,
    out_html=True)

# Print the result
#print(result["objects"][0])
# print(result["cells"][0])
#print(result["html"][0])
# print(result["csv"][0])

# Visualize the result as Matplotlib plot and return the figure
visualize = visualize_cells(img=img, cells=result["cells"][0], show_plot=False)
#print(type(visualize)) # PIL.Image.Image
print("Test successful!")EvaluationWith structure recognition, the original author has evaluated the v1.0 model on PubTables-1M with great results. With other datasets such as PubTabNet, the score is quite good.You can check out the score and run the evaluation with your own dataset inthislink.Version historyv1.0.3: Removed unnecessary code and added new functionalities.v1.0.2: Initial version.
Package: tabletree
Python package for exploring and linking multiple SQL-like tablesDescriptionThis package will link multiple SQL-tables together to facilitate (potentially large-scale) analysis of data from various sources. All tables are implemented using Pandas Data.Frame objects.ExamplesIn the following example, 3 tables are linked together via different columns and different data types. They form a tree: sex -> preference -> fruit.  This package  enables finding  the favoriate fruits for ‘M’ ids by transversing this table tree automatically.fromtabletreeimportTableNode,TableTree,TableLinkimportpandasaspdtab1_list=list(zip([1,2,3,4],['M','F','M','F']))tab2_list=list(zip([1,2,3,4],['red','green','yellow','blue']))tab3_list=list(zip(['red','green','yellow','blue'],['apple','grape','banana','berry']))tab4_list=list(zip([1,2,3,4],['swimming','football','piano','painting']))tab1=pd.DataFrame(tab1_list,columns=['tab1_v1','tab1_v2'])tab2=pd.DataFrame(tab2_list,columns=['tab2_v1','tab2_v2'])tab3=pd.DataFrame(tab3_list,columns=['tab3_v1','tab3_v2'])tab4=pd.DataFrame(tab4_list,columns=['tab4_v1','tab4_v2'])tn1=TableNode('sex',tab1)tn2=TableNode('preference',tab2)tn3=TableNode('fruit',tab3)tn4=TableNode('hobby',tab4)ttree=TableTree(tn1)ttree.addChildren(tn2,TableLink('tab1_v1','tab2_v1'))ttree.addChildren(tn3,TableLink('tab2_v2','tab3_v1'))ttree.addTN('sex',tn4,TableLink('tab1_v1','tab4_v1'))print(ttree.getAncestors('hobby'))#['sex', 'hobby']ttree.findMatched('fruit','sex',tn1.df.tab1_v2=='M')print(ttree.findMatched('hobby','sex',tn1.df.tab1_v2=='M'))#tab4_v1   tab4_v2#1         swimming#3         pianoprint(ttree)#['sex', [['preference', [['fruit']]], ['hobby']]]NoteGithub:https://github.com/rluo/tabletree
Package: tablet-tilt-joystick
Tablet Tilt JoystickA program that lets you use your tablet's tilting to emulate an actual joystick on a computer. Currently this only works on Linux systems as it usesuinputbehind the scenes. It might work on Macs, I haven't got a Mac so I can't test.It's calledtablettilt joystick but it will work with any handheld device with a reasonably modern web browser and an orientation sensor.Runs a light web server which you can connect to in a browser on your tablet.Basic usageInstall with pip (pip3 install tablet-tilt-joystick) then run withpython3 -m tablet_tilt_joystickor justtablet_tilt_joystickand connect to<your ip>:4242on a mobile device to get started. If a suitable image display program is found, it will also show a QR code that you can scan with a mobile device to get to the IP quickly. The joystick will show up in your system as something likepython-uinput.Advanced usageFor advanced usage instructions, runpython3 -m tablet_tilt_joystick -h.TroubleshootingIf your tablet fails to find the server, make sure this program isn't blocked by a firewall. Also try navigating to your computers ip manually on the tablet.Publishing to pypi:First install the required packages:pip install build twine.Then runpython -m buildfrom this directory. If there were no errors then runpython3 -m twine upload dist/*.Changelog:1.2.0Command line options to use custom hosting port and suppress displaying QR code1.1.1Fix missing dependencies1.1.0First version published to pypiOpens QR code1.0.0 (not published on pypi)Basic functionality of
Package: tablevalue
API ReferenceimportfromtablevalueimportTableValueMethodsMethodArgumentsDescriptionbegin_transactionSetting the transaction start signfinish_transactionconn.commit()cancel_transactionconn.rollback()transaction_is_activeIndication of transaction activitynew_rowreturn Row objectnew_bulk_insertvalues_to_bulkfast insert to databaseget_datafilter_query:dict, sort: str, limit = 100000000self.cur.fetchall()get_rowsfilter_query:dict, sort: str, limit = 100000000return list of Row objects, Easier to interact withget_grouped_datacolumns_to_group: str, columns_to_sum: str, filter_query:dict, sort: str, number_of_rows = 100000000, row_mode=Truereturn grouped datacountthe same as "select count(*) from table"updatefilter_query:dict, values_query:dictupdate datacleardelete all data from tabledeletefilter_query: dictdeleting selection dataUsage1. Get grouped dataparsed_csv=(('oleg','Asbest',2,1),('ivan','Asbest',1,2),('nastya','Krasnodar',0,2),('Max','Asbest',1,2),('Even','Krasnodar',1,2),('Rob','Krasnodar',1,2),('Mob','Ekaterinburg',1,2),('Dick','Ekaterinburg',1,2),('Cheize','Krasnodar',1,2),('Longard','Ekaterinburg',1,2),)table=TableValue()table.columns.add('Name')table.columns.add('country')table.columns.add('count_of_pets',table.Types.INTEGER)table.columns.add('count_of_children',table.Types.INTEGER)fordatainparsed_csv:new_row=table.new_row()new_row.Name=data[0]new_row.country=data[1]new_row.count_of_pets=data[2]new_row.count_of_children=data[3]new_row.apply_add()grouped_county_data=table.get_grouped_data('country','count_of_pets, count_of_children')forcountry_dataingrouped_county_data:message_county=f'{country_data.country}:   pets:{country_data.count_of_pets}, childrens:{country_data.count_of_children}'print(message_county)OutputAsbest    :   pets: 4, childrens: 5Ekaterinburg    :   pets: 3, childrens: 6Krasnodar    :   pets: 3, childrens: 82. Get countprint(table.count())Output103. Get filtered dataasbest=table.get_rows(filter_query={'country':'Asbest'})fordatainasbest:print(f'{data.name}: childrens:{data.count_of_children}. Pets:{data.count_of_pets}')Outputoleg: childrens: 1. Pets: 2ivan: childrens: 2. Pets: 1Max: childrens: 2. Pets: 14. Updatetable.update(filter_query={'name':'oleg'},values_query={'name':'OLEG'})data_oleg=table.get_rows(filter_query={'name':'OLEG'})data=data_oleg[0]print(f'{data.name}: childrens:{data.count_of_children}. Pets:{data.count_of_pets}')OutputOLEG: childrens: 1. Pets: 25. Delete recordtable.delete(filter_query={'name':'OLEG'})data_oleg=table.get_rows(filter_query={'name':'OLEG'})data=data_oleg[0]Outputdata = data_oleg[0]
IndexError: list index out of range6. TransactionsWhen there is an active transaction, commit is not performed automatically.
The following construction interferesif not self.transaction_is_active():
    self.conn.commit()GitHubhttps://github.com/nixonsis/TableValue
Package: tableview
Tableview=========A simple python module for manipulating tabular data.Quick Example-------------```pythonimport tableviewtable = tableview.load('example.csv')print table.pretty()first_three_rows = table.rows[:3]first_three_cols = table.cols[:3]intersection = table.rows[:3].cols[:3]print intersection.pretty()```Documentation-------------More comprehensive documentation lives here: http://tableview.readthedocs.org/en/latest/Running the Tests-----------------If you are a developer, running the unit tests requires pytest.  With pytest installed, execute ``pytest`` in the top level directory.
Package: tablewriter
StatusCompatibilitiesContactTableWriterInstalationpip install tablewriterDescriptionClass used to produce a ready-to-compile .tex file containing a table from a pandas or dask DataFrame object.
Can also compile the .tex to produce a .pdf.Handles using additional latex packages through thepackagesargument. The given DataFrame is copied so any
modification of the  said DataFrame after instensiation of the TableWriter object has no effect on the
TableWriter object, and vice-versa.
You should not however modify the DataFrame contained in the TableWriter object, you should just create the
TableWriter once you are sure that your DataFrame is ready.TableWriter uses pandas.DataFrame.to_latex and adds some more options to produce the .tex and the .pdf. Any
option that must be given to the to_latex method can be given to TableWriter through theto_latex_argsargument.Note that the content of the DataFrame will be converted to string. If the DataFrame contains one the following
characters ("$", "_", "^", "%", "&"), a '' is put before them.
Mathmode using '$' is handled.UsagefromtablewriterimportTableWriterimportpandasaspddf=pd.DataFrame(columns=["$x$","$x^2$"],index=["$A_{00}$","$A_{01}$"],data=[[2,4],[3,9]])table=TableWriter(df,path="ouput")table.compile()TableWriter will use os.system('pdflatex ...') to create the pdf, so you need a working installation of it.
In order not to flood the stdout with pdflatex ouput, which is quite verbose, it is silenced by default. If the
compilation fails TableWriter will return 'ValueError: Failed to compile pdf'. In that case, you can try to
recompile if usingtable.compile(silenced=False)To have the full output and try to understand what went wrong.By default, all files produced by LaTeX are deleted except the .tex and the .pdf. You can change this default
behavior :# To keep all files :table.compile(clean=False)# Or on the contrary, to remove also .tex :table.compile(clean_tex=True)You can also do a compilation that will reuse the .tex file if it already exists:table.compile(recreate=False)Here is a more complete example of table generation :fromtablewriterimportTableWriterimportpandasaspddf=pd.DataFrame(columns=["$x$","$x^2$"],index=["$A_{00}$","$A_{01}$"],data=[["2","$2^2$"],["3","$3^2$"]])table=TableWriter(path_output="tests/data/ouput",data=df,to_latex_args={"column_format":"lrr"},label="tab::example",caption="TableWriter example",hide_numbering=True,)table.compile()