Package: tupper
Tupper's Self-Referential Formula plotterThis Python package calculates and plots Tupper's Self-Referential Formula.I've written about the formula and this project atTupper’s Self-Referential Formula in Python.The video that influenced this whole thing is here:https://www.youtube.com/watch?v=_s5RFgd59ao█                   █                █ ██ █     █                █  █ █     █    █ ██ █      █   █
        █                   █ █      █       █  █ █     █                █  █ █     █    █  █ █      █   █
██      █                  █  █      █    ██ █  █ █ █ █ █ ██ ████  ███ ███ █  █ █ █ █    █  █  █      █  █
 █      █                  █  █  █ █ █       █ █  █  █  █    █ █ █ █ █ █ █ █  █ █ █ █    █ █   █      █  █
 █      █                  █  █  █ █ █       █ █  █ █ █ █    █ █ █ ███ ███ █  █  █  █    █ █   █      █  █
 █      █               █ █   █   █  █  ██        █     █                  █  █ █   █  █       █   ██  █ █
███   █ █               █ █   █  █   █ █  █       █     █                   █ █     █  █      █   █  █ █ █
     █  █ ██ █   ██   ███ █   █      █   █        ███ ███                   █ ███ ███ █       █     █  █ █
███ █   █ █ █ █ █  █ █  █ █   █ ████ █  █                                                          █   █ █
     █  █ █ █ █ █  █ █  █ █   █      █ █                                                          █    █ █
██    █ █ █ █ █  ██   ███ █   █ █ ██ █ ████                                                       ████ █ █
  █     █                 █   █ █  █ █                                                          █      █ █
 █      █                  █  █ █  █ █                                                          █     █  █
█       █                  █  █ █ █  █                                                         █      █  █
███     █                  █  █ █ █  █                                                                █  █
        █                   █ █      █                                                               █   █
        ███                 █ ███  ███                                                               █ ███RequirementsPython 3Installationpip3installtupperConsole usagepython3-mtupperOptional arguments:--help-- show usage instructions.--k <number>-- the value ofkto plot.--true <string>-- the string to print fortruthypoints.--false <string>-- the string to print forfalsypoints.--export <filename>-- export the (x, y) coordinates and their truthy solution to a CSV file.If you don't specifykthenk=9609393799189588849716729621278527547150043396601293066515055192717028023952664
2468964284217435071812126715378277062335599323728087414430789132596394133772348
7857735749823926629715517173716995165232890538221612403238855866184013235585136
0488286933379024914542292886670810961844960917051834540678277315517054053816273
8096760256562501698148208341878316384911559022561000365235137034387446184837873
7238198224849863465033159410054974700593138339226497249461751545728366702369745
461014655997933798537483143786841806593422227898388722980000748404719Code usageSolverclassTo solve ad-hoc(x, y)points, import theSolverclass and call thesolve(x, y)function:fromtupperimportSolver# ...s=Solver()b=s.solve(x,y)x()andy()functions are provided for yielding the coordinates of a graph:fromtupperimportSolver# ...s=Solver()k=960939379918958...foryins.y(k):forxins.x():b=s.solve(x,y)StringPlotterclassStringPlotterexposes two functions for rendering graphs as text.row()yields the characters for any given row:fromtupperimportStringPlotter# ...sp=StringPlotter(true_mark="x",false_mark=" ")k=960939379918958...forcinsp.row(k):print(c,end="")graph()yields the characters for the entire graph, including newlines at the end of each row:fromtupperimportStringPlotter# ...sp=StringPlotter(true_mark="x",false_mark=" ")k=960939379918958...forcinsp.graph(k):print(c,end="")Test dataThetest_datadirectory contains CSV files for testing the calculation.Each file contains three columns:Thexcoordinate.Theycoordinate.The expectedtrue/falsesolution.