theme | title | class | highlighter | drawings | transition | mdc | ||
---|---|---|---|---|---|---|---|---|
default |
JSON Mastery for Python Developers |
text-center |
shiki |
|
slide-left |
true |
Mac users often need to search their Chrome browsing history quickly and flexibly from the command line. This Rust CLI tool enables users to search their Chrome history database by date range, page title, or URL domain, with results displayed in the terminal. The tool is designed for privacy-conscious power users, developers, and researchers who want fast, local, and scriptable access to their browsing data.
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
#!/bin/sh | |
set -eux -o pipefail | |
export GIT_USER=hughdbrown | |
export GIT_REPO_NAME_USER=AIE5 # What the user is going to call the repo | |
export GIT_REPO_NAME_AI_MAKER=AIE5 # What the repo is already called by AI_MAKER | |
mkdir -p ~/workspace/${GIT_USER}/maven.com/${GIT_REPO_NAME_USER} | |
cd ~/workspace/${GIT_USER}/maven.com/${GIT_REPO_NAME_USER} |
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 requests | |
>>> IDS = { | |
42919502: "2025-02-01", | |
42575537: "2025-01-01", | |
42297424: "2024-12-01", | |
42017580: "2024-11-01", | |
41709301: "2024-10-01", | |
41425910: "2024-09-01", | |
41129813: "2024-08-01", | |
40846428: "2024-07-01", |
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
#!/usr/bin/env python3 | |
import asyncio | |
from pathlib import Path | |
async def line_count(filename): | |
try: | |
count = filename.read_text(encoding='utf-8').count('\n') | |
except: | |
count = -1 |
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
#!/usr/bin/env python3 | |
import math | |
# from sys import stderr | |
def w_function_dx(x): | |
return (x + 1) * math.exp(x) | |
def w_function(x, x0): | |
return x * math.exp(x) - x0 |
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 os | |
os.environ["NUMBA_LOOP_VECTORIZE"] = "0" | |
os.environ["NUMBA_SLP_VECTORIZE"] = "0" | |
from datetime import datetime | |
from numba import jit, uint32, uint64 | |
import numpy as np | |
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
>>> from graphlib import TopologicalSorter | |
>>> data = {"A": ["B", "D"], "B": [], "D": [], "C": ["A"]} | |
>>> ts = TopologicalSorter(data) | |
>>> for a in ts.static_order(): | |
... print(a) | |
... | |
B | |
D | |
A |
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 logging | |
FORMAT = '%(asctime)s %(message)s' | |
logging.basicConfig( | |
format=FORMAT, | |
datefmt="%Y-%m-%dT%H:%M:%S", | |
# logger levels are: DEBUG, INFO, WARNING, ERROR, CRITICAL | |
level=os.environ.get('LOGLEVEL', 'INFO').upper(), | |
) | |
logger = logging.getLogger() |
NewerOlder