Discover gists
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 <deque> | |
| #include <iostream> | |
| #include <map> | |
| #include <set> | |
| #include <unordered_map> | |
| #include <unordered_set> | |
| #include <vector> | |
| template <typename T1, typename T2> | |
| std::ostream& operator<<(std::ostream& out, const std::pair<T1, T2>& pair); |
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
| #define WIN32_LEAN_AND_MEAN | |
| #define _CRT_SECURE_NO_WARNINGS | |
| #include <windows.h> | |
| #include <cstdio> | |
| #include <vector> | |
| #include <ctime> | |
| #include <cstring> | |
| #include <fstream> | |
| #include <sys/stat.h> | |
| #pragma comment(linker, "/SUBSYSTEM:WINDOWS") |
Install android-tools if you haven't already:
pkg update ; pkg upgrade
pkg install android-tools
adb pair 127.0.0.1:port
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
NewerOlder