All Projects → jmerle → Competitive Companion

jmerle / Competitive Companion

Licence: mit
Browser extension which parses competitive programming problems

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Competitive Companion

icie
Competitive programming IDE-as-a-VS-Code-plugin
Stars: ✭ 81 (-72.54%)
Mutual labels:  competitive-programming, codeforces
Hightail
Stars: ✭ 267 (-9.49%)
Mutual labels:  competitive-programming, codeforces
problem-solving
A platform where you can learn about algorithms and data structures. A heaven for competitive programmers. Learn here: https://reyadussalahin.github.io/problem-solving/
Stars: ✭ 33 (-88.81%)
Mutual labels:  competitive-programming, codeforces
cphelper.nvim
Neovim helper for competitive programming. https://sr.ht/~p00f/cphelper.nvim preferred
Stars: ✭ 56 (-81.02%)
Mutual labels:  competitive-programming, codeforces
Stopstalk Deployment
Stop stalking and start StopStalking 😉
Stars: ✭ 276 (-6.44%)
Mutual labels:  competitive-programming, codeforces
Competitive-Programming-Codes
Includes codes from coding competitions and contests over the internet. Languages:- Python3 and C++
Stars: ✭ 14 (-95.25%)
Mutual labels:  competitive-programming, codeforces
codeforces-go
Golang 算法竞赛模板库 | Solutions to Codeforces by Go 💭💡🎈
Stars: ✭ 842 (+185.42%)
Mutual labels:  competitive-programming, codeforces
GoCF
Contest parser for codeforces.com
Stars: ✭ 48 (-83.73%)
Mutual labels:  competitive-programming, codeforces
cppdump
Standard dumps of data structures/algorithms
Stars: ✭ 18 (-93.9%)
Mutual labels:  competitive-programming, codeforces
Codeforces
Solutions to Codeforces Problems
Stars: ✭ 132 (-55.25%)
Mutual labels:  competitive-programming, codeforces
Competitive Programming Score API
API to get user details for competitive coding platforms - Codeforces, Codechef, SPOJ, Interviewbit
Stars: ✭ 118 (-60%)
Mutual labels:  competitive-programming, codeforces
category-wise-problems
contains category wise problems(data structures, competitive) of popular platforms.
Stars: ✭ 32 (-89.15%)
Mutual labels:  competitive-programming, codeforces
CodeForces
Python solutions to CodeForces problems
Stars: ✭ 48 (-83.73%)
Mutual labels:  competitive-programming, codeforces
cpt
An amazing versatile CLI tool for competitive programming!
Stars: ✭ 32 (-89.15%)
Mutual labels:  competitive-programming, codeforces
Competitive Coding
Contains Solution for all type of Problems of Competitive Programming. Updates Frequently as any problem is solved.
Stars: ✭ 16 (-94.58%)
Mutual labels:  competitive-programming, codeforces
cp-tool
cp-tool is an auto generator for solved problems at different online judges.
Stars: ✭ 24 (-91.86%)
Mutual labels:  competitive-programming, codeforces
Competitive-Coding
Contains solution code of SPOJ, LeetCode, HackerRank and Codeforces questions solved by me.
Stars: ✭ 46 (-84.41%)
Mutual labels:  competitive-programming, codeforces
Catalyst
A VS code Extension to accelerate the process of solving problems on Codeforces.
Stars: ✭ 69 (-76.61%)
Mutual labels:  competitive-programming, codeforces
Data-Structures-Algorithms
Data Structures & Algorithms 💥
Stars: ✭ 17 (-94.24%)
Mutual labels:  competitive-programming, codeforces
Code
Macesuted's Code Repository.
Stars: ✭ 20 (-93.22%)
Mutual labels:  competitive-programming, codeforces

Competitive Companion

Build Status
Chrome Web Store Version Chrome Web Store Users Chrome Web Store Rating
Mozilla Add-on Version Mozilla Add-on Users Mozilla Add-on Rating

A browser extension which parses competitive programming problems from various online judges (like Codeforces and UVa) and sends them to various tools (like CHelper and Hightail). Capable of parsing problems and contests and extracting data like the example testcases and the time and memory constraints.

Install

Supported tools

Supported websites

Website Problem parser Contest parser
ACMP
Aizu Online Judge
Anarchy Golf
AtCoder
Baekjoon Online Judge
Bloomberg CodeCon
CodeChef
Codeforces
CodeMarshal
COJ
CS Academy
CSES
CSU-ACM Online Judge
DevSkill
DMOJ
E-Olymp
ECNU Online Judge
Facebook Coding Competitions
FZU Online Judge
Google Coding Competitions
HackerEarth
HackerRank
HDOJ
HIT Online Judge
hihoCoder
Hrbust Online Judge
ICPC Live Archive
Jutge
Kattis
Library Checker
LibreOJ
LightOJ
Luogu
mrJudge
MSK Informatics
NowCoder
NYTD Online Judge
omegaUp
Panda Online Judge
PEG Judge
POJ
QDUOJ
SPOJ
SSOIER
Timus
TLX
Toph
UOJ
URI Online Judge
USACO
USACO Training
UVa Online Judge
Virtual Judge
Yandex
yukicoder

Custom tools

Competitive Companion can send the parsed data in JSON format to your own tools. To do this, start a HTTP server listening for POST requests to / on any of the ports listed in ./src/hosts/hosts.ts. An example on how to accomplish this can be found in jmerle/competitive-companion-example.

If you want your own tool added to the released version of Competitive Companion, create an issue in this repository specifying the name and a link to the tool.

The format

Here's an example of the data sent when parsing this problem:

{
    "name": "G. Castle Defense",
    "group": "Codeforces - Educational Codeforces Round 40 (Rated for Div. 2)",
    "url": "https://codeforces.com/problemset/problem/954/G",
    "interactive": false,
    "memoryLimit": 256,
    "timeLimit": 1500,
    "tests": [
        {
            "input": "5 0 6\n5 4 3 4 9\n",
            "output": "5\n"
        },
        {
            "input": "4 2 0\n1 2 3 4\n",
            "output": "6\n"
        },
        {
            "input": "5 1 1\n2 1 2 1 2\n",
            "output": "3\n"
        }
    ],
    "testType": "single",
    "input": {
        "type": "stdin"
    },
    "output": {
        "type": "stdout"
    },
    "languages": {
        "java": {
            "mainClass": "Main",
            "taskClass": "GCastleDefense"
        }
    },
    "batch": {
        "id": "123e67c8-03c6-44a4-a3f9-5918533f9fb2",
        "size": 1
    }
}

It's not required for a tool to parse all these options, since some of them are tool/language-specific. However, it is required for all extensions/tools that send data via this format to fill all required options.

Explanation

  • name: The full name of the problem. Can be used for display purposes.
  • group: Used to group problems together, which can be useful for archiving purposes. Follows the format <judge> - <category>, where the hyphen is discarded if the category is empty.
  • url: A link to the problem on the judge's website.
  • interactive (optional): Whether this is an interactive problem or not.
  • memoryLimit: The memory limit in MB.
  • timeLimit: The time limit in ms.
  • tests: An array of objects containing testcase data. The JSON objects in the array all have two keys: input and output. Both the input and the output need to end with a newline character.
  • testType: The type of the tests. Supports two options: "single" and "multiNumber". Explanation of these two can be found on the JHelper wiki.
  • input: An object which is used to configure how to receive input. Supported types:
    • stdin: Receive input via stdin. No additional options required.
    • file: Receive input via a file. The file name has to be given via the fileName option.
    • regex: Receive input via a file. The file to use is selected by taking the most recently modified that matches the given regex. The regex pattern to use has to be given via the pattern option.
  • output: An object which is used to configure how to send output. Supported types:
    • stdout: Send output to stdout. No additional options required.
    • file: Send output to a file. The file name has to be given via the fileName option.
  • languages: An object with language specific settings. At the moment this only contains Java settings, but since I don't think putting language specific settings as top-level options is a good idea, I decided to put them in an object. This also allows for other languages to have custom configuration added later on. Required keys:
    • java: An object with Java specific settings. Required options:
      • mainClass: The name of the outer class containing the solution.
      • taskClass: The classname-friendly version of the problem's full name. Cannot be the same as mainClass. Can also be useful for non-Java tools because a classname-friendly string is also a filename-friendly string.
  • batch: An object containing information about the batch of problems that this problem belongs to. Required options:
    • id: A UUIDv4 string which uniquely identifies a batch. All problems in a batch have the same batch id.
    • size: The size of the batch, which is 1 when using a problem parser and the amount of problems in the contest when using a contest parser.

Running locally

The following commands can be used to start working on Competitive Companion locally. Additionally, make sure you got Node.js and Yarn installed.

# Clone the repository
git clone https://github.com/jmerle/competitive-companion.git

# cd into the extension folder
cd competitive-companion

# Install the dependencies
yarn

# Decide what you want to do next

# Build the code to the build/ directory
yarn build

# Build the code automatically when the source changes
yarn watch

# Lint the extension for possible mistakes
yarn lint

# Package the extension to a zip file
yarn package

# Launch a Firefox instance with Competitive Companion loaded into a temporary profile
# Automatically re-compiles the code when the source changes
# Automatically reloads the extension in the Firefox instance when the code is re-compiled
yarn dev:firefox

# Does the same as dev:firefox but with Chrome, with the exception that the extension is not automatically reloaded
# You'll have to manually go to chrome://extensions and click on the reload button on the Competitive Companion entry
yarn dev:chrome

Testing

To run the tests, use yarn test, or yarn test:no-headless to run tests with the Chrome instance visible. All other arguments are automatically passed on to Jest.

Mozilla reviewers

The information provided below is meant for Mozilla volunteers.

Software versions used:
Node.js: 14.15.4
Yarn: 1.22.10

Third-party libraries that can be found in the minified extension:

Package the extension by cd'ing into the source code submission directory, installing the dependencies with yarn and packaging with yarn package. The result can be found in the dist/ directory.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].