Giter VIP home page Giter VIP logo

advent-of-code-2019-fork's Introduction

Advent of code 2018 submissions

⁣    🌟
    🎄
   🎄🎄
  🎄🎄🎄
 🎄🎄🎄🎄
🎄🎄🎄🎄🎄
  🎁🎁🎁

These are proposed submissions for the Advent of Code 2018.

The solutions are automatically tested with travis.

Build Status

Usage

To run submissions use run.py script

usage: run.py [-h] [--last] [-d DAY] [-p PART] [-a AUTHORS] [-i IGNORE]
              [-l LANGUAGES] [-f] [-r] [-s]

Run contest submissions

optional arguments:
  -h, --help            show this help message and exit
  --last                Run submissions from last day
  -d DAY, --day DAY     Run submissions for specific day
  -p PART, --part PART  Run submissions for specific day part
  -a AUTHORS, --authors AUTHORS
                        Run submissions from specific authors, ex: user1,user2
  -i IGNORE, --ignore IGNORE
                        Ignore submissions from specific authors
  -l LANGUAGES, --languages LANGUAGES
                        Run submissions written in specific languages, ex:
                        js,py, supported: c cpp go js py rb rs sh
  -f, --force           Force running submissions even if tool is missing
  -r, --restricted      Restrict each author to their input only
  -s, --silent          Disable debug mode

Contribute

For now we support c, c++, javascript, go, python 3, ruby, rust (stable) and shell scripts.

You can use create.py tool to create a new empty submission:

usage: create.py [-h] [-p {1,2}] [-l {c,cpp,go,js,py,rb,rs,sh}] author day

Creates new empty submission

positional arguments:
  author                Name of author (github login)
  day                   Day of problem (between 1 and 25)

optional arguments:
  -h, --help            show this help message and exit
  -p {1,2}, --part {1,2}
                        Create submission for one day part only
  -l {c,cpp,go,js,py,rb,rs,sh}, --language {c,cpp,go,js,py,rb,rs,sh}
                        Use specified language

Using python

If you don't use create.py tool you should follow this convention:

day-[number]/part-[number]/[your_login].py    # your submission code
day-[number]/inputs/[your_login].txt          # your input file

Your submission code should inherit from the SubmissionPy class from runners.python module:

from runners.python import SubmissionPy

class MyAwesomeSubmission(SubmissionPy):

    def run(self, s):
        # :param s: input in string format
        # :return: solution flag

You can add other functions & modules if you need to. Any external dependency should be added to requirements.txt.

History

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.