Skip to content

Instantly share code, notes, and snippets.

View akrisanov's full-sized avatar

Andrey Krisanov akrisanov

View GitHub Profile
@akrisanov
akrisanov / linux-setup.sh
Created February 9, 2025 18:36 — forked from dhh/linux-setup.sh
linux-setup.sh
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT.
#
#
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
@akrisanov
akrisanov / downloader.cs
Created December 26, 2024 14:34
The application downloads a list of URLs
using System.Net.Http;
namespace UrlDownloader;
public class Downloader
{
private readonly string _downloadPath = "downloads";
private readonly HttpClient _httpClient;
private readonly SemaphoreSlim _semaphore;
@akrisanov
akrisanov / LLM.md
Created April 18, 2023 22:22 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@akrisanov
akrisanov / 02_let.ml
Last active February 19, 2023 20:07
OCaml From Very Beginning
let isvowel c =
c = 'a' || c = 'e' || c = 'i' || c = 'o' || c = 'u';;
let isconsonant c = not (isvowel c);;
let rec factorial n =
if n <= 0 then 1
else n * factorial (n - 1);;
#!/bin/bash
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
# Create subfolder to store renamed files
createDestination() {
destination="$(dirname "$file")/sorted"
mkdir -p "$destination"
}
# See explanation of linters at https://golangci-lint.run/usage/linters/
linters:
disable-all: true
enable:
- bodyclose
# Disabled due to flakes: https://github.com/sourcegraph/sourcegraph/issues/33183
# - depguard
- forbidigo
- gocritic
- goimports
using System;
class Program {
static void Main(string[] args) {
var name = "Microsoft";
Console.WriteLine($"Hello, {name}!");
}
}
@akrisanov
akrisanov / Makefile
Last active May 9, 2025 14:19
Makefile for FastAPI project
.PHONY: psql up down venv check-deps update-deps install-deps isort black mypy flake8 bandit lint test migrate serve
ifneq (,$(wildcard ./.env))
include .env
export
endif
VENV=.venv
PYTHON=$(VENV)/bin/python3
@akrisanov
akrisanov / Gemfile
Created November 20, 2020 22:59 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers