npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mine-forces

v0.0.26

Published

A helper cli tool for practising on Codeforces

Downloads

7

Readme

Mine Forces

travis-ci david-dm badge.fury img.shields

Introduction

MineForces is used to filter problems on Codeforces. You could get several sets of problems like this:

EG

then you could use Virtual Judge to host contests with the problems that meet your specific conditions.

Installation

You need Node.js installed and type the following in command line:

sudo npm install -g mine-forces

Usage

Usage: mineforces [options]

Options:

  -h, --help              output usage information
  -V, --version           output the version number
  -s, --setting <path>    the path of the setting file
  -u, --user <user_name>  add your id to team value
  -f, --force             force updating the problem information
  -o, --output <path>     save filter result to output path

Default Setting

Setting is stored in a JSON file. If you do not provide the path of the file with -s, the program will use the default setting:

{
  "team": [],
  "chase": [],
  "accepted": false,                        // Single
  "set_num": 10,
  "problem_num": 5,
  "force_update": false,
  "solved": [5000, 2000, 1000, 500, 100],   // Single
  "tag_accept": [],                         // Array
  "tag_reject": [],                         // Array
  "tag_reject_if_single": [],               // Array
  "tag_reject_if_none": false,              // Single
  "id_range": [0, 100000],                  // Array
  "id_alpha": [],                           // Array
  "id_reject": [],                          // Array
  "reject_sub": false,                      // Single
  "ascii_only": true,
  "show_team_status": ["total"],
  "show_problem_detail": ["title", "solved", "tag", "url"],
  "force_new_tag": false,
  "random_order": false,
  "output_path": ""
}

Team

Team contains an array of Codeforces IDs, when your team are practicing together, MineForces is useful to find problems that none of your team members has solved.

Example 1

If you want to find the unsolved problems of vjudge1, you can write a json file named team_1.json:

{
  "team": "vjudge1"
}

and type:

mineforces -s ./team_1.json

or without specifying a json file:

mineforces -u vjudge1

However, you should NEVER use vjudge[1-5] in team or chase because each of these accounts has thousands of pages of submissions.

Example 2

If you have a team contains vjudge1, vjudge2 and vjudge3, you can write a json file named team_2.json:

{
  "team": ["vjudge1", "vjudge2", "vjudge3"]
}

and type:

mineforces -s ./team_2.json

Chase

This property has the same format as team, when chase is not an empty array, only the problems that chase has solved will be returned.

Example

Imagine one day you suddenly want to solve all the problems that tourist has solved on Codeforces, you can create a json file chase.json:

{
  "team": "your_cf_id",
  "chase": "tourist"
}

and type:

mineforces -s chase.json

Accepted

The default value is false. When accepted is set to false, only the unsolved problems will be returned. However, if it is set to true, BOTH solved and unsolved problems would be returned. This property is mostly used for testing, you can ignore this property.

Set Number

The number of problem sets that will be returned.

Problem Number

The number of problems in one problem set.

Force Update

The problem stats will not update if it has updated the stats within a week. And the submission information will not be updated if the last update happended within ten minutes.

What are Single & Array?

You can see some properties followed with the comment single and some with array. For a single property, if the value is not an array, then this value is used to filter all the problems. Otherwise, the length of the array should be the same as problem_num, the value is used to filter the problem with corresponding index. While for a array property, if the value is not an array, then the value could be seen as an array with one element. If it is an array of array, then the rule is the same as single with an array supplied.

Solved

If solved is an empty array, then there is no limitation about how many users have solved the problem. If solved is non-empty, it should have the same length as problem_num. The problem which has a larger solved number will not be returned. For example, the second problem in a problem set which has been solved by 301 users will not be returned if the solved value is [400, 300, 200, 100, 50].

Example

This property is useful to control the difficulty, if you want a set of problems that has the approximately difficuly as Div 2, you can use:

{
  "team": "your_cf_id",
  "solved": [5000, 4000, 3000, 1000, 700]
}

And if you want a Div 1:

{
  "team": "your_cf_id",
  "solved": [3000, 1000, 700, 400, 100]
}

Tag Accept

If the value is empty, then all the cateogries will be returned. If the value is non-empty, only the problem with one tag appeared in the tag_accept array will be returned.

Example

If you want to solve dynamic programming problems only, you can use:

{
  "team": "your_cf_id",
  "tag_accept": "dp"
}

Tag Reject

The problem with one tag appeared in the tag_reject array will not be returned.

Tag Reject If Single

The problem which has only one tag and the tag appeared in the tag_reject_if_single array will not be returned. This is useful to filter out implementation and brute force.

Tag Reject If None

The problem with no tag will not be returned.

ID Range

If you do not want to solve old problems, you can set:

{
  "id_range": [100, 100000]  
}

then problems like 99A, 99B, 1C will not returned.

ID Alpha

If the value is an empty array, then nothing happends. If you want to solve problems like 100E, 101E, 102E, you can set:

{
  "id_alpha": "E"
}

If you want to specify each problem, you can use:

{
  "id_accept": [["A"], ["B"], ["C"], ["D"], ["E"]]
}

ID Reject

The specific problem ids will not returned:

{
  "id_reject": ["123B", "456C"]
}

Suggestions:

  • April Fools' Rounds:
    • 2012: 171 A-E
    • 2013: 290 A-F
    • 2014: 409 A-I
    • 2016: 656 A-G
    • 2017: 784 A-G
  • Superise/Unknown Language Rounds:
    • Tcl: 64 A-I
    • Io: 72 A-I
    • Pike: 100 A-J
    • Refunge: 130 A-J
    • COBOL: 153 A-E
    • Factor: 162 A-J
    • Roco: 188 A-H
    • FALSE: 470 A-H
    • Picat: 530A-I
    • Kotlin: 683 A-J

Reject Sub

Some problems have multiple difficulties (178C1, 178C2 and 178C3), these problems will not returned if reject_sub is set to true.

ASCII Only

Some problems on Codeforces are not written in English, the problem with a title that has non-ascii character will not return.

Show Team Status

Show how many problems have been solved by the team in each category. The value could be total, alpha and tag.

Force New Tag

Each problem in a problem suite should have at least one tag that has not appeared before.

Random Order

The problems in a problem suite will show in random order.

License

GPL-2.0