Git Product home page Git Product logo

kattis-cli's People

Contributors

arnav-ag avatar austrin avatar gkreitz avatar hczhcz avatar isammoc avatar jasoncannon avatar jessefarebro avatar joelniemela avatar mikaelgoldmann avatar niemela avatar pehrsoderman avatar simonlindholm avatar tyilo avatar weerox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kattis-cli's Issues

Python: command not found

Since apple has removed the system-provided Python 2 installation, the second line in the kattis script gives the following error on newer macs:

/Users/user/kattis-cli/kattis: line 2: python: command not found

Setting an alias in your .zshrc does not solve the problem since it is not processed by the script.

Missing SSL support in python2 breaks the script

Easiest fix is probably to make it python3 only. With python2, the user needs to go to some effort to make it work. At least on Mac and Ubuntu 14.04 it doesn't work out of the box with python2.

Workarounds:

  • Depending on your setup, this might not be a problem for you
  • You can try running the script using python3

Provide score in Accepted result

When submitting on scoring problems, the result given is simply Accepted and does not include the score.
This means you have to open the website to see the score of your submission.
It would be nice if the score was added so that instead of

Accepted (0.05 s)

the user would see

Accepted (25) (0.05 s)

when scoring 25 points out of say 100.

os.getenv('HOME') returns noneType on Windows.

Running submit.py on Windows gives the following erorr:

Traceback (most recent call last):
File "submit.py", line 365, in
main()
File "submit.py", line 280, in main
cfg = get_config()
File "submit.py", line 75, in get_config
if not cfg.read([os.path.join(os.getenv('HOME'), '.kattisrc'),
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2288.0_x64__qbz5n2kfra8p0\lib\ntpath.py", line 76, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType

This is because os.getenv('HOME') returns noneType.

open_submission(submit_response, cfg) function is broken

PROBLEM:
Firstly, the function executes submissions_url = get_url(cfg, 'submissionsurl', 'submissions'), which is an error as .kattisrc contains submissionurl, not submissionsurl.

Secondly, the url is for accessing submissions is https://open.kattis.com/submissions/, not https://open.kattis.com/submit/.

FIX:
I added the line opensubmission: https://open.kattis.com/submissions to the end of.kattisrc and also changed submissions_url = get_url(cfg, 'submissionsurl', 'submissions') on line 170 to submissions_url = get_url(cfg, 'opensubmission', 'submissions')

This would require the modification of the file at https://open.kattis.com/download/kattisrc

Hello Kattis Devs:

I am trying to use PostMan.exe to study and replicate the results from submit.py line 97
[requests.post(login_url, data=login_args, headers=_HEADERS)]

I am new to Postman and am not having any luck if any of you developers could instruct me in this it would be appreciated.

Kind Regards,
Mark

Invalid language error while submitting JavaScript

Hey!

I was trying to submit a JavaScript solution to the brokenswords problem and got an error.

attila@attila-desktop broken_swords % kattis brokenswords.js                
Problem: brokenswords
Language: JavaScript
Files: brokenswords.js
Submit (y/N)?
y
Invalid language

attila@attila-desktop broken_swords % 

The language is correctly detected as well as the problem, but after submission I got the 'Invalid language' error.

Explicitly setting the language to something else, for instance C, works as expected.

attila@attila-desktop [130] broken_swords % kattis -l c -p brokenswords brokenswords.js
Problem: brokenswords
Language: c
Files: brokenswords.js
Submit (y/N)?
y
Submission received. Submission ID: 7267240.
Open in browser (y/N)?
n
attila@attila-desktop broken_swords % 

Submitting on the website provides two options for Java Script: Node.js and SpiderMonkey.
I suspect that that has something to do with the problem.

Is there a way to set Node.js explicitly when submitting a solution?

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.