FastSnake


NameFastSnake JSON
Version 1.5.6 PyPI version JSON
download
home_pageNone
SummaryA Python Helper CLI for Competitive Programming
upload_time2024-06-14 18:29:57
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseNone
keywords algorithms cli codeforces competition competitive programming contest helper marathon structures
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FastSnake

[![Python Package](https://github.com/JeanExtreme002/FastSnake/workflows/Python%20Package/badge.svg)](https://github.com/JeanExtreme002/FastSnake/actions)
[![Pypi](https://img.shields.io/pypi/v/FastSnake?logo=pypi)](https://pypi.org/project/FastSnake/)
[![License](https://img.shields.io/pypi/l/FastSnake)](https://github.com/JeanExtreme002/FastSnake)
[![Platforms](https://img.shields.io/badge/platforms-Windows%20%7C%20Linux-8A2BE2)](https://pypi.org/project/FastSnake/)
[![Python Version](https://img.shields.io/badge/python-3.7+-yellow)](https://pypi.org/project/FastSnake/)
[![Downloads](https://static.pepy.tech/personalized-badge/fastsnake?period=total&units=international_system&left_color=grey&right_color=orange&left_text=downloads)](https://pypi.org/project/FastSnake/)

FastSnake is a command-line tool that allows you to easily create, expand, run, and test Python / C++ solutions for competitive programming problems, besides automatically downloading test cases from the best contest platforms.

This project provides useful CLI tools for competitive programming, such as test case generators, algorithms and data structures, tools for platforms Codeforces and AtCoder, and other features that assist you during the development and testing of solutions.

## Installing FastSnake:
```
$ pip install FastSnake
```

Use one of the commands below to check if the installation was successful.
```
$ fastsnake -v
```
or
```
$ python3 -m fastsnake -v
```

## Basic Usage:
Starting a contest from Codeforces...
```
$ fastsnake codeforces -sc <contest_id>
```
**Note:** The contest ID can be found at contest URL `https://codeforces.com/contest/<id>`
<br>

Once you have written your solution, test it.
```
$ fastsnake test <problem>
```

You can also create your own generator, at `test_generators` folder, to bruteforce your solution.
```
$ fastsnake test <problem> -g <n_tests>
```
*Note:* By default, FastSnake will analyze the output with case sensitivity. However, you can enable case-insensitive analysis by using the `--case-insensitive` flag.


### Starting a Custom Contest
Use the command below to start your own contest.
```
$ fastsnake start-custom-contest <n_problems>
```

### Algorithms and Structures

FastSnake provides some algorithms and structures that can be injected to your final solution. See the sample below:

**Python Solution:**
```py
from fastsnake.algorithms.min_coins import *

coins = []

for x in input().split():
    coins.append(int(x))

value = int(input())

result = min_coins(coins, value)
print(result)
```
Use the argument `--list <algorithms | structures | external>` to see all algorithms and structures provided by FastSnake.

**Injecting the algorithm to the final solution...**
```
$ fastsnake compile main.py
```
Check out the code of the generated Python module.
<br>

### Testing and Compiling
You may test and compile your solution using the command below:
```
$ fastsnake test <problem> -c
```
If the solution was accepted at all test cases, it will be compiled.


### Adding External Modules
You may also add your own modules to the external package of fastsnake.
```
$ fastsnake add-external <path | url> --name <module_name> [--url]
```
For downloading the module from web, use the flag `--url`.


## Step Counter
The `--step-counter` flag of the command `test` can be used to count the approximate number of steps executed by your solution. 

By default, it analyzes the entire code, but you can set a starting point by adding the following comment on the line:
```
# [START STEP COUNTER]
...
```
**Note:** The step counter only analyzes the code that has been required for testing. This means that if you don't compile your code before testing using the `--compile-before` flag, it won't consider fastsnake algorithms and structures.

## Support for C++ Language
You may use C++ language to solve contests by using the flag `--cpp` when starting a contest. 

However, some features available in the Python language won't yet be available for C++. 

## More Information
Use the following command for more information about FastSnake CLI:
```
$ fastsnake -h
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "FastSnake",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "algorithms, cli, codeforces, competition, competitive programming, contest, helper, marathon, structures",
    "author": null,
    "author_email": "Jean Loui Bernard Silva de Jesus <jeanextreme002@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/16/d4/85d334fc2e7fa14d11c71d3e9314ca027bcf4202c4f48baa9b59dc9643db/fastsnake-1.5.6.tar.gz",
    "platform": null,
    "description": "# FastSnake\n\n[![Python Package](https://github.com/JeanExtreme002/FastSnake/workflows/Python%20Package/badge.svg)](https://github.com/JeanExtreme002/FastSnake/actions)\n[![Pypi](https://img.shields.io/pypi/v/FastSnake?logo=pypi)](https://pypi.org/project/FastSnake/)\n[![License](https://img.shields.io/pypi/l/FastSnake)](https://github.com/JeanExtreme002/FastSnake)\n[![Platforms](https://img.shields.io/badge/platforms-Windows%20%7C%20Linux-8A2BE2)](https://pypi.org/project/FastSnake/)\n[![Python Version](https://img.shields.io/badge/python-3.7+-yellow)](https://pypi.org/project/FastSnake/)\n[![Downloads](https://static.pepy.tech/personalized-badge/fastsnake?period=total&units=international_system&left_color=grey&right_color=orange&left_text=downloads)](https://pypi.org/project/FastSnake/)\n\nFastSnake is a command-line tool that allows you to easily create, expand, run, and test Python / C++ solutions for competitive programming problems, besides automatically downloading test cases from the best contest platforms.\n\nThis project provides useful CLI tools for competitive programming, such as test case generators, algorithms and data structures, tools for platforms Codeforces and AtCoder, and other features that assist you during the development and testing of solutions.\n\n## Installing FastSnake:\n```\n$ pip install FastSnake\n```\n\nUse one of the commands below to check if the installation was successful.\n```\n$ fastsnake -v\n```\nor\n```\n$ python3 -m fastsnake -v\n```\n\n## Basic Usage:\nStarting a contest from Codeforces...\n```\n$ fastsnake codeforces -sc <contest_id>\n```\n**Note:** The contest ID can be found at contest URL `https://codeforces.com/contest/<id>`\n<br>\n\nOnce you have written your solution, test it.\n```\n$ fastsnake test <problem>\n```\n\nYou can also create your own generator, at `test_generators` folder, to bruteforce your solution.\n```\n$ fastsnake test <problem> -g <n_tests>\n```\n*Note:* By default, FastSnake will analyze the output with case sensitivity. However, you can enable case-insensitive analysis by using the `--case-insensitive` flag.\n\n\n### Starting a Custom Contest\nUse the command below to start your own contest.\n```\n$ fastsnake start-custom-contest <n_problems>\n```\n\n### Algorithms and Structures\n\nFastSnake provides some algorithms and structures that can be injected to your final solution. See the sample below:\n\n**Python Solution:**\n```py\nfrom fastsnake.algorithms.min_coins import *\n\ncoins = []\n\nfor x in input().split():\n    coins.append(int(x))\n\nvalue = int(input())\n\nresult = min_coins(coins, value)\nprint(result)\n```\nUse the argument `--list <algorithms | structures | external>` to see all algorithms and structures provided by FastSnake.\n\n**Injecting the algorithm to the final solution...**\n```\n$ fastsnake compile main.py\n```\nCheck out the code of the generated Python module.\n<br>\n\n### Testing and Compiling\nYou may test and compile your solution using the command below:\n```\n$ fastsnake test <problem> -c\n```\nIf the solution was accepted at all test cases, it will be compiled.\n\n\n### Adding External Modules\nYou may also add your own modules to the external package of fastsnake.\n```\n$ fastsnake add-external <path | url> --name <module_name> [--url]\n```\nFor downloading the module from web, use the flag `--url`.\n\n\n## Step Counter\nThe `--step-counter` flag of the command `test` can be used to count the approximate number of steps executed by your solution. \n\nBy default, it analyzes the entire code, but you can set a starting point by adding the following comment on the line:\n```\n# [START STEP COUNTER]\n...\n```\n**Note:** The step counter only analyzes the code that has been required for testing. This means that if you don't compile your code before testing using the `--compile-before` flag, it won't consider fastsnake algorithms and structures.\n\n## Support for C++ Language\nYou may use C++ language to solve contests by using the flag `--cpp` when starting a contest. \n\nHowever, some features available in the Python language won't yet be available for C++. \n\n## More Information\nUse the following command for more information about FastSnake CLI:\n```\n$ fastsnake -h\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python Helper CLI for Competitive Programming",
    "version": "1.5.6",
    "project_urls": {
        "Homepage": "https://github.com/JeanExtreme002/FastSnake"
    },
    "split_keywords": [
        "algorithms",
        " cli",
        " codeforces",
        " competition",
        " competitive programming",
        " contest",
        " helper",
        " marathon",
        " structures"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8499e31c8bd220cd3449a32bc2b714e0a273f75ded8d8eb9bdb8697937af82b5",
                "md5": "c47e0d27da663403820bea1206022b7d",
                "sha256": "79136dff075aca48d431bbedd62a01c77b0a28c1260846a8f03e26ff5f1c0fbf"
            },
            "downloads": -1,
            "filename": "fastsnake-1.5.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c47e0d27da663403820bea1206022b7d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 31862,
            "upload_time": "2024-06-14T18:29:54",
            "upload_time_iso_8601": "2024-06-14T18:29:54.732864Z",
            "url": "https://files.pythonhosted.org/packages/84/99/e31c8bd220cd3449a32bc2b714e0a273f75ded8d8eb9bdb8697937af82b5/fastsnake-1.5.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16d485d334fc2e7fa14d11c71d3e9314ca027bcf4202c4f48baa9b59dc9643db",
                "md5": "6dce0fcebf942dc9fc0b3c936a371cdf",
                "sha256": "1e5ab53c1ea56663fd5b30c1e4f6b6f6c0d70c2883934850364f9961491f604a"
            },
            "downloads": -1,
            "filename": "fastsnake-1.5.6.tar.gz",
            "has_sig": false,
            "md5_digest": "6dce0fcebf942dc9fc0b3c936a371cdf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 31202,
            "upload_time": "2024-06-14T18:29:57",
            "upload_time_iso_8601": "2024-06-14T18:29:57.631688Z",
            "url": "https://files.pythonhosted.org/packages/16/d4/85d334fc2e7fa14d11c71d3e9314ca027bcf4202c4f48baa9b59dc9643db/fastsnake-1.5.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-14 18:29:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "JeanExtreme002",
    "github_project": "FastSnake",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "fastsnake"
}
        
Elapsed time: 0.25560s