Keçeci Binomial Squares (Keçeci Binom Kareleri), Keçeci-Narayana Shapes: The Keçeci Binomial Square is a series of binomial coefficients forming a square or other geometric shapes region within Khayyam (مثلث خیام), Pascal, Binomial Triangle, selected from a specified starting row with defined size and alignment.
Project description
Keçeci Binomial Squares (Keçeci Binom Kareleri): Keçeci's Arithmetical Square (Keçeci Aritmetik Karesi, Keçeci'nin Aritmetik Karesi)
Keçeci Binomial Shapes: Keçeci Binomial Şekilleri
Keçeci-Narayana Shapes: Keçeci-Narayana Şekilleri
Keçeci Binomial Squares (Keçeci Binom Kareleri) 
| PyPI |
|
| Conda |
|
| DOI |
|
| License: AGPL-3.0 license |
|
Description / Açıklama
Keçeci Binomial Squares (Keçeci Binom Kareleri): Keçeci's Arithmetical Square (Keçeci Aritmetik Karesi, Keçeci'nin Aritmetik Karesi):
Keçeci Binomial Shapes: Keçeci Binomial Şekilleri
Keçeci Binomial Squares (Keçeci Binom Kareleri): The Keçeci Binomial Square is a series of binomial coefficients forming a square or other geometric shapes region within Khayyam (مثلث خیام), Pascal, Binomial Triangle, selected from a specified starting row with defined size and alignment.
Keçeci Binom Karesi, Hayyam (مثلث خیام), Pascal, Binomial üçgeni içinde belirli bir başlangıç satırından itibaren, seçili boyut ve hizalamada bir kare veya diğer geometrik şekiller oluşturan binom katsayıları serisidir.
0.1.8: Keçeci-Narayana Shapes: Keçeci-Narayana Şekilleri
Installation / Kurulum
conda install bilgi::kececisquares -y
pip install kececisquares
https://anaconda.org/bilgi/kececisquares
https://pypi.org/project/kececisquares/
https://github.com/WhiteSymmetry/kececisquares
https://zenodo.org/records/15411671
Usage / Kullanım
Example
import kececisquares as ks
# Manuel parametre dict'i oluştur
test_params = {
"triangle_source": "binomial",
"num_rows": 12,
"region_size": 4,
"start_row_0idx": 5,
"region_type": "square",
"shape_type": "hexagon",
"alignment": "center",
"is_filled": True,
"show_numbers": True,
"save_plot": False,
"save_path": None,
"export_csv": False,
"export_json": False,
"csv_path": None,
"json_path": None,
"narayana_shape_type": None,
"narayana_width": None,
"region_label": "Square-Kare"
}
# Tek satırda çalıştır
ks.generate_full_report(test_params)
import matplotlib.pyplot as plt
import kececisquares as ks
from kececisquares import get_user_parameters, generate_full_report
# 1. Kullanıcıdan parametreleri al
params = get_user_parameters()
# 2. Parametre geçerliyse görselleştirmeyi başlat
if params:
try:
print("\n⏳ Keçeci Visualizer çalışıyor...")
report = ks.generate_full_report(params)
# 3. Sonuçları özetle
print("\n" + "="*50)
print("📦 OLUŞTURULAN ÇIKTILAR")
print("="*50)
print(f" 🔹 Seçilen Eleman: {report['statistics']['count']}")
print(f" 🔹 Toplam Değer : {report['statistics']['sum']:,}")
for key in ("plot", "csv", "json"):
if report.get(key):
print(f" ✅ {key.upper():<5}: {report[key]}")
print("="*50)
print("🎉 İşlem başarıyla tamamlandı.")
except Exception as e:
print(f"\n❌ Hata oluştu: {e}")
import matplotlib.pyplot as plt
import kececisquares as ks
from kececisquares import (
get_user_parameters,
generate_binomial_triangle,
generate_narayana_triangle,
draw_kececi_region,
export_to_csv,
export_to_json,
calculate_region_statistics
)
# 1. Parametre al
params = get_user_parameters()
if not params:
exit("❌ Parametre alınamadı.")
# 2. Üçgeni oluştur
if params["triangle_source"] == "narayana":
triangle = generate_narayana_triangle(params["num_rows"])
else:
triangle = generate_binomial_triangle(params["num_rows"])
# 3. Görselleştir (5 değer döner: fig, ax, series_data, indices, total_value)
result = ks.draw_kececi_region(
triangle_data=triangle,
num_rows=params["num_rows"],
region_size=params["region_size"],
start_row_0based=params["start_row_0idx"],
region_type=params["region_type"],
shape_to_draw=params["shape_type"],
alignment=params["alignment"],
is_filled=params["is_filled"],
show_values=params["show_numbers"],
triangle_source=params["triangle_source"],
narayana_shape_type=params.get("narayana_shape_type"),
narayana_width=params.get("narayana_width"),
show_plot=False # Manuel kontrol için False
)
if result[0] is None:
exit("❌ Görselleştirme başarısız.")
fig, ax, series_data, indices, total = result
# 4. İstatistikleri hesapla
stats = calculate_region_statistics(series_data, params["region_label"])
print(f"\n📊 Toplam: {total:,} | Eleman: {len(series_data)} | Ortalama: {stats['mean']:.2f}")
# 5. Dışa Aktar (İsteğe bağlı)
if params.get("csv_path"):
ks.export_to_csv(series_data, indices, params["csv_path"])
if params.get("json_path"):
payload = {"series": series_data, "stats": stats, "config": params}
ks.export_to_json(payload, params["json_path"])
# 6. Plot'u kaydet ve göster
if params.get("save_path"):
fig.savefig(params["save_path"], dpi=200, bbox_inches="tight")
print(f"✅ PNG kaydedildi: {params['save_path']}")
plt.show()
#!/usr/bin/env python3
"""Quick test for the fixes."""
from kececisquares import (
generate_binomial_triangle,
kececi_binomial_square,
draw_shape_on_axis,
draw_kececi_region
)
import matplotlib.pyplot as plt
print("🔧 Testing fixes...")
# Test 1: Function signature
tri = generate_binomial_triangle(10)
try:
series, total, indices = kececi_binomial_square(tri, 4, 5, "center")
print(f"✅ kececi_binomial_square: OK ({len(series)} values, total={total})")
except TypeError as e:
print(f"❌ kececi_binomial_square: {e}")
# Test 2: draw_shape_on_axis with RegularPolygon
try:
fig, ax = plt.subplots()
draw_shape_on_axis(ax, 0, 0, "hexagon", 0.5, "gold", "black")
plt.close(fig)
print("✅ draw_shape_on_axis: OK")
except TypeError as e:
print(f"❌ draw_shape_on_axis: {e}")
# Test 3: Full visualization
try:
result = draw_kececi_region(
triangle_data=tri, num_rows=10, region_size=4, start_row_0based=5,
region_type="square", show_plot=False
)
if result[0] is not None:
print("✅ draw_kececi_region: OK")
plt.close(result[0])
else:
print("❌ draw_kececi_region: returned None")
except Exception as e:
print(f"❌ draw_kececi_region: {e}")
print("\n🎉 All tests completed!")
from kececisquares import generate_full_report, print_triangle_matrix
# Örnek 1: Tek fonksiyonla tam rapor
params = {
"triangle_source": "binomial",
"num_rows": 15,
"region_size": 4,
"start_row_0idx": 5,
"region_type": "square",
"alignment": "center",
"save_path": "output.png",
"csv_path": "output.csv",
"json_path": "output.json",
}
result = generate_full_report(params)
print(f"📁 Generated: { {k:v for k,v in result.items() if v} }")
# Örnek 2: Sadece matris yazdırma
from kececisquares import generate_binomial_triangle, print_triangle_matrix
tri = generate_binomial_triangle(10)
print_triangle_matrix(tri, title="Pascal Triangle (10 rows)")
License / Lisans
This project is licensed under the AGPL3.0-or-later License. See the LICENSE file for details.
Citation
If this library was useful to you in your research, please cite us. Following the GitHub citation standards, here is the recommended citation.
BibTeX
@misc{kececi_2025_15411670,
author = {Keçeci, Mehmet},
title = {kececisquares},
month = may,
year = 2025,
publisher = {GitHub, PyPI, Anaconda, Zenodo},
version = {0.1.0},
doi = {10.5281/zenodo.15411670},
url = {https://doi.org/10.5281/zenodo.15411670},
}
@misc{kececi_2025_15425855,
author = {Keçeci, Mehmet},
title = {The Keçeci Binomial Square: A Reinterpretation of
the Standard Binomial Expansion and Its Potential
Applications
},
month = may,
year = 2025,
publisher = {Zenodo},
doi = {10.5281/zenodo.15425855},
url = {https://doi.org/10.5281/zenodo.15425855},
}
APA
Keçeci, M. (2025). kececisquares [Data set]. WorkflowHub. https://doi.org/10.48546/workflowhub.datafile.15.1
Keçeci, M. (2025). Keçeci's Arithmetical Square. Authorea. June, 2025. https://doi.org/10.22541/au.175070836.63624913/v1
Keçeci, M. (2025). kececisquares. Zenodo. https://doi.org/10.5281/zenodo.15411670
Keçeci, M. (2025). The Keçeci Binomial Square: A Reinterpretation of the Standard Binomial Expansion and Its Potential Applications. https://doi.org/10.5281/zenodo.15425529
Chicago
Keçeci, Mehmet. kececisquares [Data set]. WorkflowHub, 2025. https://doi.org/10.48546/workflowhub.datafile.15.1
Keçeci, Mehmet. "Keçeci's Arithmetical Square". Authorea. June, 2025. https://doi.org/10.22541/au.175070836.63624913/v1
Keçeci, Mehmet. "kececisquares". Zenodo, 01 May 2025. https://doi.org/10.5281/zenodo.15411670
Keçeci, Mehmet. "The Keçeci Binomial Square: A Reinterpretation of the Standard Binomial Expansion and Its Potential Applications", 15 Mayıs 2025. https://doi.org/10.5281/zenodo.15425529
Pixi:
pixi init kececisquares
cd kececisquares
pixi workspace channel add https://prefix.dev/channels/bilgi --prepend
✔ Added https://prefix.dev/channels/bilgi
pixi add kececisquares
✔ Added kececisquares >=...,<1
pixi install
pixi shell
pixi run python -c "import kececisquares; print(kececisquares.version)"
Çıktı:
pixi remove kececisquares
conda install -c https://prefix.dev/channels/bilgi kececisquares
pixi run python -c "import kececisquares; print(kececisquares.version)"
Çıktı:
pixi run pip list | grep kececisquares
kececisquares
pixi run pip show kececisquares
Name: kececisquares
Version:
Summary: Keçeci Squares
Home-page: https://github.com/WhiteSymmetry/kececisquares
Author: Mehmet Keçeci
Author-email: Mehmet Keçeci <...>
License: GNU AFFERO GENERAL PUBLIC LICENSE
Copyright (c) 2025-2026 Mehmet Keçeci
- https://pypi.org/project/kececisquares/
- https://anaconda.org/bilgi/kececisquares
- https://prefix.dev/channels/bilgi/packages/kececisquares
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kececisquares-0.1.8.tar.gz.
File metadata
- Download URL: kececisquares-0.1.8.tar.gz
- Upload date:
- Size: 58.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6c019c8d00468ac813e00c98ab51aaa502cd55171b52c7937a7de6ecc78f155
|
|
| MD5 |
19d65b54f478dad5af0a53fba1eb8381
|
|
| BLAKE2b-256 |
c72b32a7c8c53bed55068a20b26d5302686d0b8b5656b839738521c1338becdd
|
Provenance
The following attestation bundles were made for kececisquares-0.1.8.tar.gz:
Publisher:
workflow.yml on WhiteSymmetry/kececisquares
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kececisquares-0.1.8.tar.gz -
Subject digest:
c6c019c8d00468ac813e00c98ab51aaa502cd55171b52c7937a7de6ecc78f155 - Sigstore transparency entry: 1553343660
- Sigstore integration time:
-
Permalink:
WhiteSymmetry/kececisquares@09c5d060726301578ce39c64c117aff3d7c8636c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/WhiteSymmetry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@09c5d060726301578ce39c64c117aff3d7c8636c -
Trigger Event:
push
-
Statement type:
File details
Details for the file kececisquares-0.1.8-py3-none-any.whl.
File metadata
- Download URL: kececisquares-0.1.8-py3-none-any.whl
- Upload date:
- Size: 41.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dabbc80805e6a7629df6854c6b07d5af917ffd07b9882fb8182c7471f92f6653
|
|
| MD5 |
49cca9a9c5914f7bc90afb8cd72a0b31
|
|
| BLAKE2b-256 |
494ec030bfde895d6237f92c5679c5733736e0cc822916d5156f5280de90b26b
|
Provenance
The following attestation bundles were made for kececisquares-0.1.8-py3-none-any.whl:
Publisher:
workflow.yml on WhiteSymmetry/kececisquares
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kececisquares-0.1.8-py3-none-any.whl -
Subject digest:
dabbc80805e6a7629df6854c6b07d5af917ffd07b9882fb8182c7471f92f6653 - Sigstore transparency entry: 1553343685
- Sigstore integration time:
-
Permalink:
WhiteSymmetry/kececisquares@09c5d060726301578ce39c64c117aff3d7c8636c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/WhiteSymmetry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@09c5d060726301578ce39c64c117aff3d7c8636c -
Trigger Event:
push
-
Statement type: