All Projects → kaushik94 → Alex

kaushik94 / Alex

Licence: MIT license
A CLI to compile python codes embedded with test cases. For lazy competitive progra....

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Alex

fridge
Fridge for Codechef: An android app for downloading and browsing questions and contests from codechef.com offline
Stars: ✭ 17 (+0%)
Mutual labels:  competitive-programming, competitive-programming-contests
cp-contests
💻 Archive of Competitive Programming Contests hosted by IIITV CC
Stars: ✭ 28 (+64.71%)
Mutual labels:  competitive-programming, competitive-programming-contests
cpalgorithms
Algorithms and Techniques for competitive programming
Stars: ✭ 16 (-5.88%)
Mutual labels:  competitive-programming, competitive-programming-contests
CPTH
🌟 Competitive Programming Template Headers | With documentation, CI tests and Codecov
Stars: ✭ 23 (+35.29%)
Mutual labels:  competitive-programming, competitive-programming-contests
cppdump
Standard dumps of data structures/algorithms
Stars: ✭ 18 (+5.88%)
Mutual labels:  competitive-programming, competitive-programming-contests
icpc
Resources for Competitive Programming
Stars: ✭ 14 (-17.65%)
Mutual labels:  competitive-programming, competitive-programming-contests
test-case-generator
Test Case generator for competitive coding. Test case generator for competitive programming and potentially for software testing.
Stars: ✭ 28 (+64.71%)
Mutual labels:  competitive-programming, competitive-programming-contests
Competitive Programming Score API
API to get user details for competitive coding platforms - Codeforces, Codechef, SPOJ, Interviewbit
Stars: ✭ 118 (+594.12%)
Mutual labels:  competitive-programming, competitive-programming-contests
cpAPI
A Flask API that gives updates about the upcoming contests on various Coding Platforms.
Stars: ✭ 13 (-23.53%)
Mutual labels:  competitive-programming, competitive-programming-contests
TeamReference
Team reference for Competitive Programming. Algorithms implementations very used in the ACM-ICPC contests. Latex template to build your own team reference.
Stars: ✭ 29 (+70.59%)
Mutual labels:  competitive-programming, competitive-programming-contests
HackerRank-Solutions
This project include solutions of the problem from HackerRank which will be helpful for coding interview preparations. Subscribe for more updates 👇
Stars: ✭ 18 (+5.88%)
Mutual labels:  competitive-programming, competitive-programming-contests
ProgrammingProblems
Our answers to some programming problems,like ACM ICPC problems and others.(All problems are available on http://uva.onlinejudge.org or https://open.kattis.com) ** PLEASE STAR THE REPO IF IT 'S USEFUL :) **
Stars: ✭ 27 (+58.82%)
Mutual labels:  competitive-programming, competitive-programming-contests
AlmanaqueBrute
Repositório para códigos de competição
Stars: ✭ 22 (+29.41%)
Mutual labels:  competitive-programming
CP
Competitive Coding
Stars: ✭ 25 (+47.06%)
Mutual labels:  competitive-programming
AtCoderClans
【非公式】AtCoderがもっと楽しくなるリンク集です。有志による非公式サービス・ツール・ライブラリ・記事などをまとめています。
Stars: ✭ 74 (+335.29%)
Mutual labels:  competitive-programming
Competitive-Programming-June-Course-
Problem Solving Ability Skills Course
Stars: ✭ 24 (+41.18%)
Mutual labels:  competitive-programming
codeforces2pdf
Light tool to extract CodeForces problems into PDF files
Stars: ✭ 18 (+5.88%)
Mutual labels:  competitive-programming
Algorithms and DS
The Algorithm Studies during the ACM-ICPC Lab lectures
Stars: ✭ 39 (+129.41%)
Mutual labels:  competitive-programming
InterviewPrep
A repository containing link of good interview questions
Stars: ✭ 54 (+217.65%)
Mutual labels:  competitive-programming
vjudge-to-oj
Import your vJudge solutions to actual online judges. Currently supports UVa, CodeForces, SPOJ, and CodeForces GYM.
Stars: ✭ 43 (+152.94%)
Mutual labels:  competitive-programming

Alex

alt tag A Command Line Interface to execute test cases embedded within a python code. Its as simple as 123, just embed the code in the given format and do $ alex <filename>.py

Installation

Using pip:

$ pip install alex-py

From source:

$ python setup.py install

Requirements

  • python 2.7.x
  • docopt>=1.6.2

Usage

The file should contain test cases in the format:

  • The inputs for the file should be in the format
"""I
your input should go here
"""
  • The outputs for the file should be in the format
"""O
your expected output should go in here.
"""

The above 2 comments can be anywhere in the file. If you run only with inputs, you will just recieve the output. Also you can have multiple inputs/outputs but length of outputs(if any) should have the same length as inputs, input-output should have same order.

And then execute

$ alex <file-name>

Example

The following is an example file for demonstration: The below file is test.py which is a python solution to this problem on Hackerrank.

def solveMeSecond(a,b):
   return a+b

n = int(raw_input())

for i in range(0,n):
    a, b = raw_input().split()
    a,b = int(a),int(b)
    res = solveMeSecond(a,b)
    print res
    
"""I
2
2 3
3 7
"""

"""O
5
10
"""

Now execute

$ alex test.py
Alex is working on  test.py

YOUR OUTPUT
===========
5
10

EXPECTED OUTPUT
===============
5
10

PASS/FAIL (of 1 testcases)
=========
TESTCASE 1 PASS

You can aslo have multiple testcases like this:

def solveMeSecond(a,b):
   return a+b

n = int(raw_input())

for i in range(0,n):
    a, b = raw_input().split()
    a,b = int(a),int(b)
    res = solveMeSecond(a,b)
    print res

"""I
2
2 3
3 7
"""

"""O
5
10
"""

"""I
3
1 2
3 7
4 5
"""

"""O
3
10
9
"""

If you run:

$ alex test.py

output :

Alex is working on  test.py

YOUR OUTPUT
===========
5
10

3
10
9

EXPECTED OUTPUT
===============
5
10

3
10
9

PASS/FAIL (of 2 testcases)
=========
TESTCASE 1 PASS
TESTCASE 2 PASS

#Contributors

@kaushik94 @brennan-v-

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].