This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;; | |
| ;; 作者: 李继刚 | |
| ;; 日期: 2025-11-12 | |
| ;; 剑名: 圆桌讨论 | |
| ;; 剑意: 构建一个以“求真”为目标的结构化对话框架。该框架由一位极具洞察力的主持人 | |
| ;; 进行引导,邀请代表不同思想的“典型代表人物”进行一场高强度的、即时响应式的 | |
| ;; 深度对话。主持人将在每轮总结时生成视觉化的思考框架(ASCII Chart),通过 | |
| ;; “主动质询” 与“协同共建”,对用户提出的议题进行协同探索,最终生成深刻的、 | |
| ;; 结构化的知识网络。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| The most atomic way to train and inference a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| nvidia-smi -h | |
| NVIDIA System Management Interface -- v520.61.05 | |
| NVSMI provides monitoring information for Tesla and select Quadro devices. | |
| The data is presented in either a plain text or an XML format, via stdout or a file. | |
| NVSMI also provides several management operations for changing the device state. | |
| Note that the functionality of NVSMI is exposed through the NVML C-based | |
| library. See the NVIDIA developer website for more information about NVML. | |
| Python wrappers to NVML are also available. The output of NVSMI is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import IPython | |
| import os | |
| notebook_file_path = IPython.extract_module_locals()[1]["__vsc_ipynb_file__"] | |
| print(notebook_file_path) | |
| dir_path = os.path.dirname(notebook_file_path) | |
| print(dir_path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "editor.acceptSuggestionOnEnter": "off", | |
| "editor.fontFamily": "JetBrains Mono, Menlo, Monaco, 'Courier New', monospace", | |
| "editor.fontLigatures": true, | |
| "editor.wordWrap": "on", | |
| "explorer.confirmDragAndDrop": false, | |
| "python.languageServer": "Pylance", | |
| "workbench.activityBar.orientation": "vertical", | |
| "workbench.colorTheme": "Default Light Modern", | |
| "[python]": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://hub.docker.com/_/python | |
| FROM python:3.11 | |
| # runtime dependencies | |
| RUN set -eux; \ | |
| apt-get update; \ | |
| apt-get install -y --no-install-recommends \ | |
| git \ | |
| ; \ | |
| rm -rf /var/lib/apt/lists/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| stages: | |
| - build | |
| - pack | |
| - upload | |
| - release | |
| variables: | |
| ARTIFACTS_NAME: ${CI_PROJECT_NAME}.tar.gz | |
| build: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo prime-select | |
| > Usage: /usr/bin/prime-select nvidia|intel|on-demand|query | |
| sudo prime-select query | |
| > on-demand | |
| sudo prime-select intel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <vector> | |
| using namespace std; | |
| class Solution { | |
| public: | |
| void dfs(int target, vector<int>& groups, int current, int& result) { | |
| if (current >= target || current == 0) { | |
| return; |
NewerOlder