🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Greasy Fork is available in English.

LeetCode Toolkit

Copy problem as Markdown, Download as Jupyter Notebook, Format on Save, Unlock IntelliSense, Find & Save Editorial

Versione datata 21/04/2025. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

Autore
eclipher
Valutazione
0 0 0
Versione
2.2.0
Creato il
08/04/2025
Aggiornato il
21/04/2025
Dimensione
208 KB
Licenza
MIT
Applica a

LeetCode Toolkit

https://github.com/eclipher/leetcode-jupyter

Feature

This userscript enhances the LeetCode problem page with various tweaking and additions. It supports both the US version of LeetCode.com, and the China version.

  • At the top of problem description, these buttons are added:

    • Copy Title
    • Copy Description: Copies the problem description in Markdown format, making it easy to paste into your notes or documentation.
    • Download as Jupyter Notebook: Bundles the title, description in Markdown, and the current content in the code editor into a single .ipynb file.
    • Find Editorial(*): Open a screenshot of the Editorial for the current problem, if it exists in the Leetcode Screenshotter repo.
  • Quality-of-life adjustments:

    • Format On Save: Automatically format code when pressing Ctrl + S.
    • Unlock IntelliSense: Enjoy autocompletion and hover suggestions without paying for premium.
  • Experimental:

    • Download Editorial(*): You can find this command under your userscript manager menu (right click context menu or extension icon on browser toolbar). If you have access to an editorial, click on the command and the editorial will be saved as an .md file. This feature currently has limitations:
      • Code in editorial will be saved as a link to a Leetcode playground.
      • Math expressions will be displayed as plain text.
      • Videos will be skipped.

(*) Editorial-related features are for US site only, as China site do not seem to lock their editorials behind premium.

About Jupyter Notebook

Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text.

This userscript helps you transfer LeetCode problems into a Jupyter Notebook document, so you can read the problem, write and run the solution, add additional notes, all at one place on your local machine.

You can open .ipynb notebooks with clients such as VS Code. By default it supports Python, but kernels for many other languages are available too.

Installation

To use this userscript, you'll need a userscript manager like Tampermonkey (available for Chrome, Firefox, and other browsers).

  1. Install Tampermonkey or a similar userscript manager for your browser.
  2. Download and install the userscript.
  3. Visit a LeetCode problem page, and you should see the new features added by the script.

Credits

This script is inspired by the following projects:

License

MIT License