Git Product home page Git Product logo

deniscostadsc / playground Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 20.0 22.77 MB

A place to play programming

License: MIT License

C++ 57.30% C 4.46% JavaScript 1.51% Python 15.21% Shell 10.88% Go 0.44% Makefile 0.72% Dockerfile 1.47% C# 1.04% Clojure 2.07% Java 1.07% Dart 0.77% Haskell 0.32% Lua 0.29% Pascal 0.34% PHP 0.32% Ruby 0.18% Rust 0.83% Scala 0.43% R 0.35%
icpc algorithms study programming-contests data-structure uri-online-judge facebook-hacker-cup google-code-jam spoj uva-online-judge

playground's Introduction

Playground - A place to play programming.

CI

In this repository, you'll see my solutions for programming/security challenges/contest sites. Here you can find my solutions for:

Project structure

The following tasks are available in the Makefile:

make clean  # remove files created by the run task
make languages  # show numbers of solutions in different languages per folder
make lint [LINTS='language extensions']  # check lint for all solutions if no LINTS is passed
make lint-fix [LINTS='language extensions']  # format all code if no LINTS is passed
make new-problem FOLDER=path/to/create LANGUAGE='language extension'  # create solution template
make run [FOLDER=path/to/run] [LANGUAGES='language extensions']  # run solutions
make wrong  # show all solutions that are not complete yet

Some of these tasks run scripts on the scripts folder and Docker containers from the .docker folder. Needless to say, these tasks require Docker and Docker-compose.

If you are starting your repo to store your solutions for programming competition from the scratch, you can use the same structure I have used. You'll need to copy the following folders and files:

  • .clang-format
  • .docker/
  • .flake8
  • .github
  • .isort.cfg
  • Makefile
  • editor-config
  • scripts/

The scripts/CI assume a few things:

  • You use a folder for each problem;
  • Each problem folder has a problem.md file. CI scripts use this file to search for problems;
  • Problem folders may have an in.txt file. That file holds the input test for that problem. Some problems don't have input;
  • Each problem folder has an out.txt file. That file holds expected output to test (using diff) output generated by your program;
  • All scripts ignore solution whose the folder holds a file name WRONG. You can create this flag file for solutions that aren't completed yet.

Bellow, you can see an example of a problem folder structure:

$ tree solutions/beecrowd/
solutions/beecrowd/
├── 1000
│   ├── 1000.c
│   ├── 1000.clj
│   ├── 1000.cpp
│   ├── 1000.cs
│   ├── 1000.dart
│   ├── 1000.go
│   ├── 1000.hs
│   ├── 1000.java
│   ├── 1000.js
│   ├── 1000.kt
│   ├── 1000.lua
│   ├── 1000.ml
│   ├── 1000.pas
│   ├── 1000.php
│   ├── 1000.py
│   ├── 1000.r
│   ├── 1000.rb
│   ├── 1000.rs
│   ├── 1000.scala
│   ├── imgs
│   │   └── UOJ_1000.png
│   ├── out.txt
│   ├── problem.md
│   └── tags.txt
...

playground's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

playground's Issues

Arrumar script marathon

Ao rodar o marathon, ele deve:

  • criar um arquivo WRONG se a saída do programa for diferente da saída oficial

  • remover o arquivo WRONG se a saída do programa for igual da saída oficial

  • só deve executar nos diretórios com um arquivos chamado 'problem.txt'

  • a saída deve conter apenas uma linha, como mostrado abaixo:

    371.cpp - OK
    1002.cpp - OK
    1045.py - WRONG

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.