Git Product home page Git Product logo

leetcode2github's People

Contributors

allcontributors[bot] avatar sungho-joo avatar yurirocha15 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

leetcode2github's Issues

Question 2013 python test error

Question 2013 generated the following test:

@pytest.fixture(scope="session")
def init_variables_2013():
    from src.leetcode_2013_detect_squares import add

    solution = add()

    def _init_variables_2013():
        return solution

    yield _init_variables_2013


class TestClass2013:
    def test_solution_0(self, init_variables_2013):
        assert init_variables_2013().add([3, 10]) == None
        assert init_variables_2013().add([11, 2]) == None
        assert init_variables_2013().add([3, 2]) == None
        assert init_variables_2013().count([11, 10]) == 1
        assert init_variables_2013().count([14, 8]) == 0
        assert init_variables_2013().add([11, 2]) == None
        assert init_variables_2013().count([11, 10]) == 2

Which should be:

@pytest.fixture(scope="session")
def init_variables_2013():
    from src.leetcode_2013_detect_squares import DetectSquares

    solution = DetectSquares()

    def _init_variables_2013():
        return solution

    yield _init_variables_2013


class TestClass2013:
    def test_solution_0(self, init_variables_2013):
        assert init_variables_2013().add([3, 10]) == None
        assert init_variables_2013().add([11, 2]) == None
        assert init_variables_2013().add([3, 2]) == None
        assert init_variables_2013().count([11, 10]) == 1
        assert init_variables_2013().count([14, 8]) == 0
        assert init_variables_2013().add([11, 2]) == None
        assert init_variables_2013().count([11, 10]) == 2

The error message when the user is not logged to leetcode is misleading

Error:

('submission_id',)
Traceback (most recent call last):
  File "/home/yuri/.pyenv/versions/3.8.5/envs/leet2git/lib/python3.8/site-packages/leet2git/leet2git.py", line 129, in submit
    lc.submit_question(code, question_data.internal_id, title_slug, cm.config["language"])
  File "/home/yuri/.pyenv/versions/3.8.5/envs/leet2git/lib/python3.8/site-packages/leet2git/leetcode_client.py", line 282, in submit_question
    submission_id: int = json.loads(response.text)[submission_field]
KeyError: 'submission_id'

Actual leetcode response:

{"error": "User is not authenticated"}

function name error

raw function name inside problem class is in snake style, whereas the name is in camel style in leetcode

readme addition extra line error

when problems are added to table in README file, there is an extra linethat added problems are not properly combined with original table

problem description error

when question is scrapped from lc, number with powers were used to be sth like 10^5

However, with latest commit, it is copied sth like 105 which is same as naive copy version.

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.