Skip to content

Instantly share code, notes, and snippets.

View Erlemar's full-sized avatar

Andrey Erlemar

View GitHub Profile
---
name: draft-critic-mm
description: Review drafted DSWoK vault notes (dswok.com) against .claude/writing_style_guide.md and vault conventions. Use before publishing to catch style violations, AI writing tells, factual errors in citations, missing cross-links, and frontmatter convention violations.
tools: Read, Grep, Glob
---
You are a style and convention critic for the DSWoK reference vault (dswok.com). Your job is to review a drafted vault note against `.claude/writing_style_guide.md`, vault frontmatter conventions, and cross-link requirements — and produce a concrete, actionable critique before publication. This agent is for vault notes only (not blog posts, not book reviews).
## How to review
Fill one broken-link stub in the DSWoK vault: research the topic, draft the note in DSWoK voice, run `draft-critic-mm`, save to the right folder, and refresh `missing_notes.md`.
Use the path `ROOT = '/Documents/DSWoK'`.
## Inputs
- `$ARGUMENTS` (optional). If provided, treat as the stub title to fill (e.g. "AUC", "Negative sampling", "T5"). If omitted, pick the highest-impact stub from `missing_notes.md` (most references first; ties broken by alphabetical order).
## Workflow
import pandas as pd
import altair as alt
import numpy as np
alt.data_transformers.disable_max_rows()
from IPython.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))
import matplotlib_inline.backend_inline
matplotlib_inline.backend_inline.set_matplotlib_formats('retina')
res_layers = list(range(1, 66))
upper_shale = [1, 2, 3, 4]
middle_shale =[29, 30, 31, 32, 33, 34]
lower_shale = [62, 63, 64, 65]
shale_layers = upper_shale + middle_shale + lower_shale
sand_layers = [x for x in res_layers if x not in shale_layers]
# create figure
import plotly.graph_objects as go
import numpy as np
import pandas as pd
df = pd.read_csv('/Users/andreylukyanenko/Downloads/df_numpy_3d_B4_pred.csv')
# Create figure
fig = go.Figure()
# Add traces, one for each slider step
for step in range(1, 126):
@Erlemar
Erlemar / plot_3d_time.py
Last active October 18, 2022 16:53
Plot 3d data with slider
import plotly.graph_objects as go
import numpy as np
import pandas as pd
df = pd.read_csv('/Users/andreylukyanenko/Downloads/df_numpy_3d_B4_pred.csv')
# Create figure
fig = go.Figure()
# Add traces, one for each slider step
for step in range(1, 66):
df_small = df.loc[df['k'] == step]
import itertools
import random
from typing import List, Tuple
import numpy as np
from interfaces.TaggingOperation import TaggingOperation
from tasks.TaskTypes import TaskType
@Erlemar
Erlemar / ner_sberloga.ipynb
Created June 24, 2021 09:37
Code for NER talk in Sberloga
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from fastai import *
@Erlemar
Erlemar / hydra_run.py
Created May 3, 2020 09:22
Run experiment with hydra, pytorch-lightning, comet
import os
import hydra
import pytorch_lightning as pl
from omegaconf import DictConfig
from pytorch_lightning.loggers import CometLogger, TensorBoardLogger
from src.lightning_classes.lightning_nbeats import LitM5NBeats
from src.utils.utils import set_seed