This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

hac is extensible and configurable command-line tool for algorithm competitions. It:

  • prepares directory structures and source files,
  • prepares runner files (scripts used to test solutions),
  • downloads test-cases.

Install

Recommended to install as non-root:

$ pip install --upgrade --user hac

Usage

Example 1

A) For problems “A”, “B” and “C” from Codeforces contest #527 prepare:

  • source file from cpp highest priority template (has lowest X among cpp.X language templates),
  • runner from sh.5 template (interpolated for cpp language template),
  • test-cases downloaded from Codeforces.
$ hac -lcpp -rsh.5 codeforces/527 a b c

With default configuration all of the next lines do same as the one above:

$ hac -lcpp.5 -rsh.5 prep http://codeforces.com/527/A B C
$ hac prep codeforces.com/527 B 1 c
$ hac -d2 CODEFORCES/527 1 2 3
$ hac forc/527 a b c

B) Write solution for problem “B” and test it on test-cases:

$ cd 527/B
$ # ... modify B.cpp
$ ./B.cpp.sh -e  # test solution on test-cases
$ ./B.cpp.sh -c  # clean generated outputs

C) Debug solution for problem “B” on 2nd test-case:

$ ./B.cpp.sh -d 2

Example 2

Display general information about hac:

$ hac --help
$ hac --version

Display information about hac and selected site/problems:

$ hac -v show codeforces/527     # verbose
$ hac -V show codeforces/527     # terse

Support

Sites:

Site \ Fetching problems from Contest Archive
Codeforces.com YES NO
Rosalind   YES
Sphere online judge   PARTIAL
Codechef NO NO

Runner/language combinations:

  C C++ Python Java Pascal
POSIX shell sh.5 / c.5 sh.5 / cpp.5 sh.5 / py.5 sh.5 / java.5 sh.5 / pas.5

Configuration

User specific configuration should be placed in ~/.config/hac directory by default (to change configuration directory you need to set HAC_CONFIG_DIR environment variable).

In order to configure hac according to your preferences:

  1. copy default configuration files in a temporary directory,
$ HAC_CONFIG_DIR=~/temp_config hac --copy-config
  1. customize interesting files in ~/temp_config,
  2. move only customized files to ~/.config/hac, e.g.
$ mkdir -p ~/.config/hac
$ cp ~/temp_config/hacrc ~/.config/hacrc
  1. remove temporary directory.
$ rm -r ~/temp_config

This approach is desirable because only configuration files that differ from the default ones should be present in configuration directory, thereby effectively overshadowing the default configuration.

Additional

For more information about hac please see User manual

For information about contributions please check Contributing chapter from User manual.

Change Log

Please see CHANGELOG.

Licence

Please see LICENSE.

Release History

Release History

1.0.5

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
hac-1.0.5-py2.py3-none-any.whl (42.3 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Oct 16, 2015
hac-1.0.5.tar.gz (33.7 kB) Copy SHA256 Checksum SHA256 Source Oct 16, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting