yurirocha15 / leetcode2github Goto Github PK
View Code? Open in Web Editor NEWIntegrates your leetcode answers with github
License: MIT License
Integrates your leetcode answers with github
License: MIT License
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
When same problem is added, it is filtered in source code.
However, same problem is added to README file.
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"}
raw function name inside problem class is in snake style, whereas the name is in camel style in leetcode
when we format through black(current black version is 20.8b1), one of test file makes error. (ID=1706)
error making test case of leetcode 77
https://leetcode.com/problems/combinations/
it seems line above causes the problem.
It's very unusual type of output.
Even though output starts with "Output: ", contents of outputs are not in the same line but continued for few lines below.
Maybe we don't really have to care about this case.
when running getting-all-submission, error occurs when getting problems with multiple methods in it.
For example, in my case, problems 1865, 1656, 1825 outputs error when formatting. (because answers were not downloaded)
when problems are added to table in README file, there is an extra linethat added problems are not properly combined with original table
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.
There seem to have some issues with the subprocess library.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.