{"id":26047904,"url":"https://github.com/bachboy0/montecarlo","last_synced_at":"2026-04-21T14:32:19.484Z","repository":{"id":281008548,"uuid":"943898070","full_name":"bachboy0/montecarlo","owner":"bachboy0","description":"Python-based Monte Carlo simulations for statistical analysis and modeling.","archived":false,"fork":false,"pushed_at":"2025-03-06T13:27:18.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T14:23:56.839Z","etag":null,"topics":["monte-carlo-methods","numpy","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bachboy0.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-06T12:56:42.000Z","updated_at":"2025-03-06T13:27:21.000Z","dependencies_parsed_at":"2025-03-06T14:35:00.969Z","dependency_job_id":null,"html_url":"https://github.com/bachboy0/montecarlo","commit_stats":null,"previous_names":["bachboy0/montecarlo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachboy0%2Fmontecarlo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachboy0%2Fmontecarlo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachboy0%2Fmontecarlo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachboy0%2Fmontecarlo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bachboy0","download_url":"https://codeload.github.com/bachboy0/montecarlo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242473052,"owners_count":20134021,"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":["monte-carlo-methods","numpy","python"],"created_at":"2025-03-07T23:14:57.454Z","updated_at":"2026-04-21T14:32:19.408Z","avatar_url":"https://github.com/bachboy0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Monte Carlo Method for Pi Estimation\n\n## Overview\n\nThis project simulates the estimation of π (Pi) using the Monte Carlo method.\nIt randomly generates points and evaluates them against a circle to approximate π.\n\n## File Structure\n\nThe project is composed of the following files:\n\n- **main.py**:  \n  The entry point for the application. It manages user interaction, gathers input, and runs the simulation.\n  \n- **monte_carlogic.py**:  \n  Contains the core logic for running the Monte Carlo simulation and evaluating the results.\n  \n- **monte_plot.py**:  \n  Provides visualization for the simulation by plotting points, a square, and a circle.\n  \n- **input_validation.py**:  \n  Handles user input and validation of numerical values and the circle’s radius.\n\n## Visualization\n\nUsers can visualize the simulation process and results. The generated plots display:\n- A square and a circle for reference.\n- Points generated during simulation.\n\nIf interactive display is not available, the plot will be saved as \"monte_carlo_plot.png\" in the current directory.\n\n## How to Run\n\n```bash\n# Navigate to the project directory\ncd /path/to/your/montecarlo\n\n# Activate virtual environment (if created)\nsource venv/bin/activate  # Linux/Mac\n# or\nvenv\\Scripts\\activate  # Windows\n\n# Run the main program\npython main.py\n```\n\n## Requirements\n\n- Python 3.x\n- NumPy\n- Matplotlib\n\nInstall the required packages with:\n\n```bash\npip install numpy matplotlib\n```\n\n---\n\n# モンテカルロ法によるπの推定\n\n## 概要\n\nこのプロジェクトは、モンテカルロ法を使用してπ（円周率）の推定を行います。\nランダムな点を生成し、円と比較することでπの近似値を求めます。\n\n## ファイル構成\n\nプロジェクトは以下のファイルで構成されています：\n\n- **main.py**:  \n  アプリケーションのエントリーポイント。ユーザーとの対話、入力の取得、およびシミュレーションの実行を管理します。\n  \n- **monte_carlogic.py**:  \n  モンテカルロ法によるシミュレーションのコアロジックと、結果の評価を含む機能を提供します。\n  \n- **monte_plot.py**:  \n  シミュレーション結果の視覚化を行うため、点、正方形、円をプロットで表示します。\n  \n- **input_validation.py**:  \n  ユーザー入力の処理と、数値や円の半径のバリデーションを担当します。\n\n## 視覚化\n\nシミュレーションの過程とその結果を視覚化できます。生成されるプロットは以下の要素を含みます：\n- 参照用の正方形と円\n- シミュレーション中に生成された点\n\nインタラクティブな表示が利用できない場合、プロットはカレントディレクトリ内に「monte_carlo_plot.png」として保存されます。\n\n## 実行方法\n\n```bash\n# プロジェクトディレクトリに移動\ncd /path/to/your/montecarlo\n\n# 仮想環境を有効化（作成済みの場合）\nsource venv/bin/activate  # Linux/Mac用\n# または\nvenv\\Scripts\\activate  # Windows用\n\n# プログラムの実行\npython main.py\n```\n\n## 必要条件\n\n- Python 3.x\n- NumPy\n- Matplotlib\n\n以下のコマンドで必要パッケージをインストールしてください：\n\n```bash\npip install numpy matplotlib\n```\n\n---\n\n# 몬테카를로 방식을 이용한 π 추정\n\n## 개요\n\n이 프로젝트는 몬테카를로 방식을 사용하여 π (파이)를 추정합니다.\n무작위로 점을 생성하고, 원과 비교하여 π의 근사값을 계산합니다.\n\n## 파일 구조\n\n프로젝트는 다음 파일들로 구성되어 있습니다:\n\n- **main.py**:  \n  프로그램의 진입점으로, 사용자와의 상호작용, 입력 처리 및 시뮬레이션 실행을 담당합니다.\n  \n- **monte_carlogic.py**:  \n  몬테카를로 시뮬레이션의 핵심 로직과 결과 평가 기능을 포함합니다.\n  \n- **monte_plot.py**:  \n  시뮬레이션 결과를 시각화하기 위해 점, 정사각형, 원을 플롯합니다.\n  \n- **input_validation.py**:  \n  사용자 입력 처리와 숫자, 원의 반지름에 대한 유효성 검사를 수행합니다.\n\n## 시각화\n\n사용자는 시뮬레이션 과정과 결과를 시각화할 수 있습니다. 생성된 플롯에는 다음 요소가 포함됩니다:\n- 기준이 되는 정사각형과 원\n- 시뮬레이션 중 생성된 무작위 점들\n\n만약 인터랙티브한 표시가 불가능할 경우, 플롯은 현재 디렉토리에 \"monte_carlo_plot.png\" 파일로 저장됩니다.\n\n## 실행 방법\n\n```bash\n# 프로젝트 디렉토리로 이동\ncd /path/to/your/montecarlo\n\n# 가상 환경 활성화(생성된 경우)\nsource venv/bin/activate  # Linux/Mac용\n# 또는\nvenv\\Scripts\\activate  # Windows용\n\n# 프로그램 실행\npython main.py\n```\n\n## 요구 사항\n\n- Python 3.x\n- NumPy\n- Matplotlib\n\n필요한 패키지는 다음 명령어로 설치할 수 있습니다:\n\n```bash\npip install numpy matplotlib\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbachboy0%2Fmontecarlo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbachboy0%2Fmontecarlo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbachboy0%2Fmontecarlo/lists"}