Download cpython_2/environment/repo/Doc/includes/sqlite3/md5func.py from lolbench26/LoLBench: direct link, hf CLI and curl.
- Browser
- Download file 254 Bytes
-
https://huggingface.co/datasets/lolbench26/LoLBench/resolve/main/cpython_2/environment/repo/Doc/includes/sqlite3/md5func.py
- Command line
-
hf download hf://datasets/lolbench26/LoLBench/cpython_2/environment/repo/Doc/includes/sqlite3/md5func.py
-
curl -L -o md5func.py https://huggingface.co/datasets/lolbench26/LoLBench/resolve/main/cpython_2/environment/repo/Doc/includes/sqlite3/md5func.py
254 Bytes
| import sqlite3 | |
| import hashlib | |
| def md5sum(t): | |
| return hashlib.md5(t).hexdigest() | |
| con = sqlite3.connect(":memory:") | |
| con.create_function("md5", 1, md5sum) | |
| cur = con.cursor() | |
| cur.execute("select md5(?)", (b"foo",)) | |
| print(cur.fetchone()[0]) | |
| con.close() | |