FastSnake


NameFastSnake JSON
Version 1.4.19 PyPI version JSON
download
home_pageNone
SummaryA Python Helper CLI for Competitive Programming
upload_time2024-05-03 02:03:41
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseNone
keywords algorithms cli codeforces competition competitive programming contest helper marathon structures
VCS
bugtrack_url
requirements beautifulsoup4 pytest requests
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/)

Tired of having to copy and paste your code from your personal library into every solution you write? Or always having to copy and paste test cases from contests? FastSnake is a command-line tool that allows you to easily create, expand, run, and test Python solutions for competitive programming problems.

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.


## 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/96/49/3a79172334dee8b1e0b5dfd19da9abb1680692bcb32f55fc71603fa4ef87/fastsnake-1.4.19.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\nTired of having to copy and paste your code from your personal library into every solution you write? Or always having to copy and paste test cases from contests? FastSnake is a command-line tool that allows you to easily create, expand, run, and test Python solutions for competitive programming problems.\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\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.4.19",
    "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": "dfef35bafc08af76297187133351088221fa79716575a1d84233124f80305f47",
                "md5": "8e1ee9a6e74c40b50c3b1dabaacf0595",
                "sha256": "a401d5ce55edd6b534240c5d2ec7cef0e482d1acb5c7f337ea8e69caf176a5bd"
            },
            "downloads": -1,
            "filename": "fastsnake-1.4.19-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8e1ee9a6e74c40b50c3b1dabaacf0595",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 25294,
            "upload_time": "2024-05-03T02:03:40",
            "upload_time_iso_8601": "2024-05-03T02:03:40.273879Z",
            "url": "https://files.pythonhosted.org/packages/df/ef/35bafc08af76297187133351088221fa79716575a1d84233124f80305f47/fastsnake-1.4.19-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "96493a79172334dee8b1e0b5dfd19da9abb1680692bcb32f55fc71603fa4ef87",
                "md5": "ad613a62e77b89df065f4bb81811b250",
                "sha256": "49112f5a7d2f81aebece62b1d3ba39a48207c7e35e62fa3623b0afddbe0a4bee"
            },
            "downloads": -1,
            "filename": "fastsnake-1.4.19.tar.gz",
            "has_sig": false,
            "md5_digest": "ad613a62e77b89df065f4bb81811b250",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 22617,
            "upload_time": "2024-05-03T02:03:41",
            "upload_time_iso_8601": "2024-05-03T02:03:41.810973Z",
            "url": "https://files.pythonhosted.org/packages/96/49/3a79172334dee8b1e0b5dfd19da9abb1680692bcb32f55fc71603fa4ef87/fastsnake-1.4.19.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-03 02:03:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "JeanExtreme002",
    "github_project": "FastSnake",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "beautifulsoup4",
            "specs": []
        },
        {
            "name": "pytest",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        }
    ],
    "lcname": "fastsnake"
}
        
Elapsed time: 0.35113s