Code Monkey home page Code Monkey logo

advent_of_code_2021's Introduction

advent_of_code_2021

The home of my code written to tackle 2021's Advent of Code (https://adventofcode.com)

Solutions

These are written in Ruby (2.7.4), and live in the lib directory.

Setup (for tests)

Running tests requires rspec. If you are developing solutions in this repo, before running tests you would need to run (in the terminal):

bundle install

Initialising a new task

You can create the basic template files for a given task by running (for example):

rake 'init[dec_01]'

This will create (and initialise with some boilerplate code) the following files:

  • lib/dec_01.rb
  • spec/dec_01_spec.rb (for tests)
  • inputs/test/test_dec_01.txt (for test data)
  • inputs/dec_01.txt (for challenge input)

Then you just have to copy the inputs from the challenge into the inputs/ files.

Running rake immediately afterwards should result in 2 failures.

rake

You can run tests by simply running rake at the terminal, or you can run the code to produce the solutions by running (for example):

rake dec_01

If you want to do this for your own input data, replace the relevant files in the inputs directory first.

advent_of_code_2021's People

Contributors

gtm19 avatar

Watchers

 avatar

Forkers

cuneyter

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.