Skip to content

Instantly share code, notes, and snippets.

View alexeygrigorev's full-sized avatar
:octocat:
Githubbing

Alexey Grigorev alexeygrigorev

:octocat:
Githubbing
View GitHub Profile
@alexeygrigorev
alexeygrigorev / README.md
Created December 28, 2025 13:10
Remove claude code

AWS Claude Web Instance Setup

Automated setup of a cheap AWS EC2 instance running Claude Code with a web UI.

Prompt:

create the cheapest instance on aws with 8gb of ram (arm is okay) and use ssh (razer.pem) to get there and install claude there, copy the same config as you use now and make claude

@alexeygrigorev
alexeygrigorev / impute_linear.py
Created December 13, 2022 13:17
Linear imputer for missing values
import pandas as pd
from datetime import datetime
from sklearn.linear_model import LinearRegression
def impute_linear(df, X_cols, y_col):
df = df.copy()
null_values = df[y_col].isnull()
import random
import functools
from IPython.display import display, clear_output
from ipywidgets import Button, Dropdown, HTML, HBox, IntSlider, FloatSlider, Textarea, Output
def annotate(examples,
options=None,
shuffle=False,
@alexeygrigorev
alexeygrigorev / hello.py
Created June 14, 2022 09:27
Prefect test
from datetime import datetime
from prefect import task, flow
from prefect import get_run_logger
@task
def hello_task(date):
logger = get_run_logger()
logger.info("INFO level log message.")
logger.info(f'date={date}')
return date
@alexeygrigorev
alexeygrigorev / README.md
Last active August 19, 2025 13:40
Moving Zoom audio recordings to Dropbox

Move Zoom Recording

I was tired manually moving the recording of the podcast to Dropbox so I decided to automate it

It works for Windows only. For Linux / MacOS you'll need to modify the code for showing messages

Clone the repo

@alexeygrigorev
alexeygrigorev / README.md
Last active August 3, 2024 18:05
Processing book of the week data in slack dump
import sys
import json
NOTEBOOK_FILE = sys.argv[1]
print(f'messing up with {NOTEBOOK_FILE}')
with open(NOTEBOOK_FILE, 'rt') as f_in:
doc = json.load(f_in)
@alexeygrigorev
alexeygrigorev / _cutting-mp4-files.md
Last active February 14, 2021 11:49
Cutting videos with FFMpeg

Cutting videos with FFMpeg without re-encoding

Here's how you use it:

./cut.sh conf2.mp4 out1.mp4 00:00:05 00:53:47
def make_batches(seq, n):
result = []
for i in range(0, len(seq), n):
batch = seq[i:i+n]
result.append(batch)
return result
@alexeygrigorev
alexeygrigorev / progress.py
Last active September 26, 2025 19:47
A function for parallel map with tqdm
from concurrent.futures import ThreadPoolExecutor
from tqdm import tqdm
num_threads = 4
pool = ThreadPoolExecutor(max_workers=6)
def map_progress(pool, seq, f):
results = []