{"id":23397756,"url":"https://github.com/jack-mil/pascal-tri","last_synced_at":"2025-04-08T18:28:26.793Z","repository":{"id":57450943,"uuid":"247479725","full_name":"jack-mil/pascal-tri","owner":"jack-mil","description":"Python 3 Package to generate Pascal's Triangle","archived":false,"fork":false,"pushed_at":"2021-08-10T02:35:01.000Z","size":46,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T03:11:10.149Z","etag":null,"topics":["pascal-triangle-generator","pypi-package","python3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pascal-tri/","language":"Python","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/jack-mil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-15T14:13:35.000Z","updated_at":"2021-08-10T02:35:04.000Z","dependencies_parsed_at":"2022-09-26T17:31:21.595Z","dependency_job_id":null,"html_url":"https://github.com/jack-mil/pascal-tri","commit_stats":null,"previous_names":["jack-mil/pascal"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack-mil%2Fpascal-tri","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack-mil%2Fpascal-tri/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack-mil%2Fpascal-tri/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jack-mil%2Fpascal-tri/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jack-mil","download_url":"https://codeload.github.com/jack-mil/pascal-tri/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247901223,"owners_count":21015221,"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":["pascal-triangle-generator","pypi-package","python3"],"created_at":"2024-12-22T08:36:06.307Z","updated_at":"2025-04-08T18:28:26.775Z","avatar_url":"https://github.com/jack-mil.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pascal-Triangle\n\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://pypi.org/project/pascal-tri/\"\u003e\u003cimg alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/pascal-tri?style=flat-square\u0026label=Python\u0026logo=python\u0026logoColor=yellow\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/pascal-tri/\"\u003e \u003cimg alt=\"PyPi\" src=\"https://img.shields.io/pypi/v/pascal-tri?style=flat-square\u0026label=PyPI\u0026logo=pypi\u0026logoColor=yellow\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/pascal-tri/\"\u003e\u003cimg alt=\"PyPI - Downloads\" src=\"https://img.shields.io/pypi/dm/pascal-tri?style=flat-square\u0026label=Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/jack-mil/pascal-triangle/blob/master/LICENSE\"\u003e \u003cimg alt=\"Github\" src=\"https://img.shields.io/github/license/jack-mil/pascal-triangle?style=flat-square\u0026label=License\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"Formatting\" src=\"https://img.shields.io/badge/Code%20Style-Black-000000?style=flat-square\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Module for generating and printing Pascal's Triangle ##\n### Requires *Python 3.9* (type hints) ###\n\nExplicit implementation of Pascal's Triangle algorithm. Each row can be generated separately from all others. This vastly speeds up time if all you need is row 100 for example.\nThis module is intended to be useful for mathematics or anytime a row(s) of Pascal's triangle might be useful.\n\n\n### Installation ###\n*Pascal-triangle* can be installed directly with pip to use as a library and shell command by running `pip install pascal-tri`\n\nOR clone the repo and run `python -m pascal`\n\n\n### Includes methods for ###\n\u003e * generating a list of triangle rows\n\u003e * pretty printing a triangle with correct spacing and alignment\n\nThe pascal module defines the following methods, access with\n```py\nfrom pascal import *\n```\n```py\n    # To generate a explicit row 'n' of Pascal's triangle:\n        calculate_row(n: int) -\u003e PascalRow\n\n    # To generate a list of 'n' rows:\n        pascal(n: int) -\u003e PascalTriangle\n\n    # Pretty print to stdout a triangle with 'n' rows or (optionally) a supplied triangle:\n        print_pascal(n: int, triangle: PascalTriangle = None) -\u003e None\n```\nCan be run as a script as well.\n\n    python -m pascal [-h] [-l LINES]\n      If LINES not specified, runs in interactive loop\n\n\n## Learning objectives ##\n\nThis project exists as an exercise in learning these techonlogies/concepts\n - Python type hinting (VS code intellisense integration)\n - Making distributable Python packages (PyPi)\n - Github Actions to build/publish automatically","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjack-mil%2Fpascal-tri","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjack-mil%2Fpascal-tri","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjack-mil%2Fpascal-tri/lists"}