Skip to content

Instantly share code, notes, and snippets.

View soltanoff's full-sized avatar
🗿
¯\_(ツ)_/¯

soltanoff

🗿
¯\_(ツ)_/¯
View GitHub Profile
@soltanoff
soltanoff / ddd.md
Last active September 23, 2025 07:52
Процессно-ориентированный DDD: от теории к прагматичной архитектуре

Процессно-ориентированный DDD: от теории к прагматичной архитектуре

Синтез экспертных взглядов на снижение совокупной стоимости владения ПО

Введение

Предметно-ориентированное проектирование (Domain-Driven Design, DDD) — это не просто набор тактических паттернов, таких как Агрегат, Сущность или Репозиторий. В своей сути, это стратегический подход к разработке сложных программных систем, основная цель которого — радикальное снижение совокупной стоимости владения (Total Cost of Ownership, TCO). К сожалению, эта ключевая цель часто теряется за ритуальным применением паттернов и догматическим следованием канонам, изложенным в литературе двадцатилетней давности.

Данный документ представляет собой попытку синтезировать и структурировать знания и практический опыт, основанные на многолетней работе по проектированию и рефакторингу крупных корпоративных систем. Цель этой работы — выйти за рамки поверхностного понимания DDD и представить целостную, прагматичную парадигму, в центре которой находится не объе

@soltanoff
soltanoff / sgr_assistant.py
Created August 26, 2025 22:13 — forked from sb-static/sgr_assistant.py
SGR Demo - assistant based on small LLM (Qwen3-4B) using llama.cpp and Schema-Guided Reasoning (SGR)
"""
This Python code demonstrates Schema-Guided Reasoning (SGR) with llama.cpp and small model - Qwen3-4B Q8_0. It:
- implements a business agent capable of planning and reasoning
- implements tool calling using only SGR and simple dispatch
- uses with a simple (inexpensive) non-reasoning model for that
This demo is modified from https://abdullin.com/schema-guided-reasoning/demo to support local llm
Test model: Qwen3-4B-Instruct-2507-Q8_0 (https://huggingface.co/unsloth/Qwen3-4B-Instruct-2507-GGUF/resolve/main/Qwen3-4B-Instruct-2507-Q8_0.gguf)
@soltanoff
soltanoff / schema-guided-reasoning.py
Created August 26, 2025 21:17 — forked from abdullin/schema-guided-reasoning.py
Demo for a Schema-Guided Reasoning (Business Assistant)
"""
This Python code demonstrates Schema-Guided Reasoning (SGR) with OpenAI. It:
- implements a business agent capable of planning and reasoning
- implements tool calling using only SGR and simple dispatch
- uses with a simple (inexpensive) non-reasoning model for that
To give this agent something to work with, we ask it to help with running
a small business - selling courses to help to achieve AGI faster.
@soltanoff
soltanoff / shared_dict.py
Created August 23, 2023 20:41
Multiprocessing: shared dict instance
import asyncio
import random
import time
from concurrent.futures import ProcessPoolExecutor
from multiprocessing import Manager
async def params_modificator(shared_params_map):
while True:
shared_params_map['some_param'] = random.randint(1, 100)
@soltanoff
soltanoff / shared_custom_instance.py
Created August 23, 2023 20:37
Multiprocessing: shared class instance
import asyncio
import random
import time
from concurrent.futures import ProcessPoolExecutor
from multiprocessing.managers import BaseManager, NamespaceProxy
class CustomManager(BaseManager):
pass
@soltanoff
soltanoff / log_rotations.sh
Created March 11, 2023 00:42
Log rotation script for Raspberry Pi
sudo journalctl --vacuum-size=200M
sudo journalctl --vacuum-time=1week
journalctl --disk-usage
@soltanoff
soltanoff / dnsmasq OS X.md
Created April 13, 2022 09:43 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@soltanoff
soltanoff / config.txt
Created December 18, 2021 00:27
Boot config for PI4 (RetroPie)
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1
@soltanoff
soltanoff / soltanoff.ru.conf
Last active March 15, 2023 22:48
Apache config for site. Use ssl (https)
<VirtualHost *:80>
ServerName soltanoff.ru
Redirect permanent / https://soltanoff.ru/
</VirtualHost>
<VirtualHost *:443>
ServerName soltanoff.ru
ProxyPreserveHost On
ErrorLog /var/log/soltanoff.ru.error.log
TransferLog /var/log/soltanoff.ru.access.log
@soltanoff
soltanoff / cs_vim.md
Last active December 24, 2018 09:16
Cheatsheet: vim

Файл настройки: ~/.vimrc

Можно редактировать файлы через сеть, например
:e <scp|ftp|ftps>://user@host/path/to/the/file.txt
:Ex или :e ./ - файловый менеджер

== Основы ==
hjkl                      перемещение в разные стороны
i                         режим вставки
I                         добавление в начало строки