{"id":23589405,"url":"https://github.com/ewdlop/documentgenerator","last_synced_at":"2025-06-22T00:03:46.589Z","repository":{"id":244353060,"uuid":"813446054","full_name":"ewdlop/DocumentGenerator","owner":"ewdlop","description":"Documentation.","archived":false,"fork":false,"pushed_at":"2025-02-22T09:04:03.000Z","size":172,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-17T08:09:33.355Z","etag":null,"topics":["data-mimicking","degoogling","forgery","html","latex","markdown","parser","pdf","test-data-generator","x2y"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ewdlop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-11T05:25:37.000Z","updated_at":"2025-05-05T22:05:14.000Z","dependencies_parsed_at":"2025-01-06T00:25:59.283Z","dependency_job_id":"b759e814-bc03-4f4b-a4bb-e4ed742e15f0","html_url":"https://github.com/ewdlop/DocumentGenerator","commit_stats":null,"previous_names":["ewdlop/documentgenerator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ewdlop/DocumentGenerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewdlop%2FDocumentGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewdlop%2FDocumentGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewdlop%2FDocumentGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewdlop%2FDocumentGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ewdlop","download_url":"https://codeload.github.com/ewdlop/DocumentGenerator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewdlop%2FDocumentGenerator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261212279,"owners_count":23125577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-mimicking","degoogling","forgery","html","latex","markdown","parser","pdf","test-data-generator","x2y"],"created_at":"2024-12-27T06:13:58.143Z","updated_at":"2025-06-22T00:03:41.559Z","avatar_url":"https://github.com/ewdlop.png","language":"Jupyter Notebook","readme":"# DocumentGenerator\n\n#\nHere's how to run LaTeX locally with YAML configuration:\n\nTo use this:\n\n```yaml\n# latex-config.yaml\nlatex:\n  compiler: pdflatex\n  output_dir: ./build\n  templates_dir: ./templates\n  packages:\n    - amsmath\n    - amssymb\n    - mathtools\n    \ndocument:\n  title: \"Hamiltonian Systems\"\n  author: \"Author Name\"\n  template: article\n\n# main.tex\n\\documentclass{article}\n\\usepackage{amsmath}\n\\usepackage{amssymb}\n\\usepackage{mathtools}\n\n\\begin{document}\n\\title{Hamiltonian Systems}\n\\author{Author Name}\n\\maketitle\n\n\\section{Definitions}\nA Hamiltonian system is represented by a function $H: M \\to \\mathbb{R}$, with evolution dictated by Hamilton's equations.\n\nCanonical coordinates consist of position $q_i$ and momentum $p_i$ pairs.\n\n\\end{document}\n\n# build.py\nimport yaml\nimport subprocess\n\ndef build_latex():\n    with open('latex-config.yaml', 'r') as f:\n        config = yaml.safe_load(f)\n    \n    cmd = [\n        config['latex']['compiler'],\n        '-output-directory',\n        config['latex']['output_dir'],\n        'main.tex'\n    ]\n    subprocess.run(cmd)\n\nif __name__ == '__main__':\n    build_latex()\n```\n\n1. Install TeXLive or MiKTeX\n\n2. Create directory structure with config files\n\n3. Run: python build.py\n\nRequirements:\n\n```\n\npip install pyyaml\n\n```\n\nThe script will compile the LaTeX document according to the YAML configuration.\n\n# dawin\n\nhttps://www.markdownguide.org/tools/dawin/\n\nhttps://guide.dawin.io/basic-syntax#%D8%A7%D9%84%D9%82%D9%88%D8%A7%D8%A6%D9%85-%D8%A7%D9%84%D9%85%D9%86%D9%82%D9%91%D8%B7%D8%A9-%D8%BA%D9%8A%D8%B1-%D8%A7%D9%84%D9%85%D8%B1%D8%AA%D9%91%D8%A8%D8%A9\n\n\n# GitBook\n\nhttps://www.gitbook.com/?utm_source=legacy\u0026utm_medium=redirect\u0026utm_campaign=close_legacy\n\n# RAG\n\nhttps://aws.amazon.com/what-is/retrieval-augmented-generation/\n\n# Doxygen + Graphviz\nhttps://stackoverflow.com/questions/9484879/graphviz-doxygen-to-generate-uml-class-diagrams\n\n\n# Citaiton Machine\n\nhttps://www.scribbr.com/citation/generator/folders/2SW3rWl9aNisXzPZg9dKY9/lists/2LRvxShvLPGS5BKYE6nno4/\n\n# MergeHtmlDocs Function\n\nThe `MergeHtmlDocs` function in the `HtmlDocHelper` class allows you to merge two HTML documents without duplicating any nodes. This function ensures that the resulting merged document contains all unique nodes from both input documents.\n\n## Usage\n\nTo use the `MergeHtmlDocs` function, follow these steps:\n\n1. Ensure you have the `HtmlDocHelper` class available in your project.\n2. Call the `MergeHtmlDocs` function with two HTML document strings as parameters.\n3. The function will return the merged HTML document as a string.\n\n## Example\n\n```csharp\nstring htmlDoc1 = \"\u003chtml\u003e\u003cbody\u003e\u003cdiv class='container'\u003e\u003cp id='paragraph1'\u003eHello\u003c/p\u003e\u003c/div\u003e\u003c/body\u003e\u003c/html\u003e\";\nstring htmlDoc2 = \"\u003chtml\u003e\u003cbody\u003e\u003cdiv class='container'\u003e\u003cp id='paragraph2'\u003eWorld\u003c/p\u003e\u003c/div\u003e\u003cfooter\u003eFooter content\u003c/footer\u003e\u003c/body\u003e\u003c/html\u003e\";\n\nstring mergedHtml = HtmlDocHelper.MergeHtmlDocs(htmlDoc1, htmlDoc2);\n\nConsole.WriteLine(mergedHtml);\n\n```\n## Pumping Lemma Across Language Classes\n\n### Regular Language Pumping Lemma\n\n#### Definition\nFor any regular language L, there exists a pumping length p \u003e 0 such that any string s ∈ L where |s| ≥ p can be divided into three parts s = xyz where:\n1. |y| \u003e 0\n2. |xy| ≤ p\n3. For all i ≥ 0, xyⁱz ∈ L\n\n##### Example Proof: L = {aⁿbⁿ | n ≥ 0} is not regular\n1. Assume L is regular\n2. Let p be the pumping length\n3. Consider s = aᵖbᵖ ∈ L\n4. By the pumping lemma, s = xyz where |y| \u003e 0 and |xy| ≤ p\n5. This means y = aᵏ for some k \u003e 0\n6. When we pump i = 2: xyyz = aᵖ⁺ᵏbᵖ\n7. This string has unequal numbers of a's and b's, so it's not in L\n8. Contradiction! Therefore L is not regular\n\n### Context-Free Language Pumping Lemma\n\n#### Definition\nFor any context-free language L, there exists a pumping length p \u003e 0 such that any string s ∈ L where |s| ≥ p can be divided into five parts s = uvxyz where:\n1. |vy| \u003e 0\n2. |vxy| ≤ p\n3. For all i ≥ 0, uvⁱxyⁱz ∈ L\n\n##### Example Proof: L = {aⁿbⁿcⁿ | n ≥ 0} is not context-free\n1. Assume L is context-free\n2. Let p be the pumping length\n3. Consider s = aᵖbᵖcᵖ ∈ L\n4. By the pumping lemma, s = uvxyz where |vy| \u003e 0 and |vxy| ≤ p\n5. Due to |vxy| ≤ p, vxy can contain at most two different letters\n6. Case 1: If v and y contain only a's and/or b's\n   - Pumping will create a string with too many a's and b's\n7. Case 2: If v and y contain only b's and/or c's\n   - Pumping will create a string with too many b's and c's\n8. Case 3: If v and y contain a's and c's\n   - Pumping will create a string with unequal numbers\n9. All cases lead to contradiction! Therefore L is not context-free\n\n## Recursively Enumerable Languages\n\n### Key Differences\n- I don't think it gets it.\n- No pumping lemma exists for recursively enumerable languages\n- Can't use pumping lemma to prove a language is not recursively enumerable\n- Need other techniques like diagonalization or reduction\n\n### Alternative Tools\n1. Rice's Theorem\n2. Reduction from Halting Problem\n3. Mapping Reduction\n4. Many-one Reduction\n\n## Practice Problems\n\n### Problem 1: Prove L = {ww | w ∈ {a,b}*} is not regular\n1. Assume L is regular with pumping length p\n2. Consider s = aᵖbᵖaᵖbᵖ ∈ L\n3. By pumping lemma, s = xyz where |y| \u003e 0 and |xy| ≤ p\n4. This means y must consist only of a's\n5. When pumped (i = 2), we get a string not in form ww\n6. Contradiction! L is not regular\n\n### Problem 2: Prove L = {aⁿbᵐcᵏ | n \u003e m \u003e k \u003e 0} is not context-free\n1. Assume L is context-free with pumping length p\n2. Consider s = aᵖ⁺²bᵖ⁺¹cᵖ ∈ L\n3. By pumping lemma, s = uvxyz where |vy| \u003e 0 and |vxy| ≤ p\n4. Due to |vxy| ≤ p, v and y together can't contain all three letters\n5. Case analysis shows all pumping possibilities violate n \u003e m \u003e k\n6. Contradiction! L is not context-free\n\n## Common Patterns in Pumping Lemma Proofs\n\n### For Regular Languages\n1. Choose string length ≥ p carefully\n2. Focus on y being within first p characters\n3. Look for cases where repetition breaks counting requirements\n\n### For Context-Free Languages\n1. Choose string where |vxy| ≤ p matters\n2. Case analysis based on what letters appear in v and y\n3. Look for violations of multiple counting relationships\n\n### Tips for Successful Proofs\n1. Start with assumption language is in desired class\n2. Choose witness string carefully\n3. Use pigeonhole principle for case analysis\n4. Show all cases lead to contradiction\n5. Conclude language is not in desired class\n\nIn this example, the `MergeHtmlDocs` function merges the two input HTML documents and returns the merged result. The resulting merged HTML document will contain all unique nodes from both input documents.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewdlop%2Fdocumentgenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fewdlop%2Fdocumentgenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewdlop%2Fdocumentgenerator/lists"}