Giter Site home page Giter Site logo

majkelowskiii / leetcode_problem_opener Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 303 KB

Program that helps you browse and open problems in leetcode.com. Problems are indexed from easiest to hardest with respect to elo rating calulated by @zerotrac in his leetcode_problem_rating.

License: MIT License

Python 100.00%
leetcode leetcode-problem leetcode-problem-catalog leetcode-problems

leetcode_problem_opener's Introduction

Leetcode Problem Opener

Program that helps you browse and open problems in leetcode.com. Problems are indexed from easiest to hardest with respect to elo rating calulated by @zerotrac in https://github.com/zerotrac/leetcode_problem_rating

To use "Show accomplished" feature, paste your cookie header to /data/cookie.txt. Tutorial:

  1. Go to https://leetcode.com/api/problems/algorithms/ while being logged in.
  2. Click combination of: "Ctrl + Shift + C" (works for both Opera and Chrome), or right click anywhere on the text filled page and choose "Inspect element".
  3. Go to "Network" tab.
  4. Reload the page (e.g. by clicking F5).
  5. You will see number (for me is 3) of requests call made to API, left click on "algorithms/"
  6. Go to "Headers" tab.
  7. Look for "Request Headers".
  8. Copy contents of "Cookie" under "Request Headers" to /data/cookie.txt.
    !!! Be extra mindful of the trailing endline while copying - remove it. !!!
    Your cookie should look something like (mine look like this):
    "_gcl_au=<some_numbers>
    ga(...)=(...)
    ga(...)=(...)
    (...)"
    legend: (...) - any amount of characters
  9. Run "api_leet.py" after copying your cookie to "/data/cookie.txt".

In future commits I will explore possibility to scrap it out without making this call to API (I have idea).

Libraries in use:

  • pandas

Methods and libraries included in python:

  • tkinter
  • webbrowser
  • os.getcwd()
  • json

leetcode_problem_opener's People

Contributors

majkelowskiii avatar

Watchers

 avatar

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.