Skip to content

Instantly share code, notes, and snippets.

View pihanya's full-sized avatar
🛠️

Mikhail Gostev pihanya

🛠️
View GitHub Profile
@pihanya
pihanya / prompt-instructions-prompting-helper.md
Created October 5, 2025 07:22
Системный промпт для ручного LLM, который помогает создавать и улучшать промты. Подойдет как инструкции для GPT / Claude Project.

You are an expert prompt engineer with 30 years of experience and a gift for concision and pithiness.

I'm seeking your help crafting the perfect prompt to meet my needs. First, discuss the task's context and your plan for the prompt. This will help you tailor the prompt to my needs.

Here's how we can work together to make that happen:

I'll provide you with my initial prompt idea. Based on my input, you can generate a revised prompt. We'll iterate on the prompt design process until we have a final version that meets my needs. You can ask me questions to clarify my requirements, and I'II provide feedback on each iteration.

The goal is to create a prompt that is clear, concise, and easy for me to understand while also being unbounded to allow for creative and iterative design. While examples may not be possible, we can refine the prompt until it meets my needs.

@pihanya
pihanya / system-prompt-from-datasecrets-thread.md
Last active October 3, 2025 03:34
Системный промпт для ручного LLM. Подойдет как инструкции для GPT Project. Умеет в emoji-стиль, оценку уверенности и автоматический выбор роли. Способен предлагать новые правила. Вдохновлено комментариями из канала «Data Secrets» (https://t.me/data_secrets/7946)

Tone Rules

  • T1. Get right to the point.
  • T2. Always be respectful and readily share strong opinions.
  • T3. Be practical above all.
  • T4. Use a formal, professional tone with corporate jargon where applicable.

Emoji Rules

  • E1. Apply emojis thoughtfully: pair every heading or key point with exactly one emoji (e.g. 📘 Overview, 💡 Idea).
@pihanya
pihanya / SquareSumMain.kt
Last active August 23, 2025 17:28
Compute sum of squares 1..N using kotlinx.coroutines
import kotlinx.coroutines.*
import java.util.concurrent.Executors
import kotlin.system.measureTimeMillis
const val THREADS: Int = 2
const val COMPUTED_SQUARES: Int = 100
const val DELAY_MS: Long = 1000L
val threadPool = Executors.newFixedThreadPool(THREADS)
val coroutineDispatcher = threadPool.asCoroutineDispatcher()
package dev.stok.mvp
import dev.stok.CurrencyCodes
import dev.stok.StokBootstrap
import dev.stok.StokStrategy
import dev.stok.StokStrategyManager
import dev.stok.bootstrap
import dev.stok.common.extension.toDecimal
import dev.stok.common.typing.DecimalValue
import dev.stok.dsl.context.ParametersAwareContext
`timescale 1ns / 1ps
module func_test;
localparam TESTS_AMOUNT = 1;
reg[7:0] x_ar[0:TESTS_AMOUNT];
reg[7:0] y_ar[0:TESTS_AMOUNT];
reg[7:0] x;
wire[7:0] y;
`timescale 1ns / 1ps
module mult_test;
localparam test_cases = 14;
reg[7:0] a_ar [0:test_cases], b_ar [0:test_cases], res_ar [0:test_cases];
reg[3:0] shift_ar [0:test_cases];
reg[7:0] a, b;
reg[3:0] shift;
@pihanya
pihanya / mult.v
Last active April 18, 2019 21:24
`timescale 1ns / 1ps
module mult (
input clk_i,
input rst_i,
input [7:0] a_bi,
input [7:0] b_bi,
input [3:0] shift_r,
input start_i,
* {
margin: 0;
}
html {
height: 100%;
}
body {
min-height: 100%;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="author" content="Mikhail Gostev">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Две колонки</title>
<!--<script type="application/javascript" src="./js/bootstrap.js"></script>-->
<script type="application/javascript" src="handle_functions.js"></script>
@pihanya
pihanya / concurrent_tree_set.java
Created April 2, 2018 13:35
Делаем из TreeSet потокобезопасный ConcurrentTreeSet
import java.lang.reflect.Field;
import java.util.Collection;
import java.util.Comparator;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentSkipListMap;
public class ConcurrentTreeSet<T> extends TreeSet<T> {
public ConcurrentTreeSet() throws NoSuchFieldException, IllegalAccessException {
super();