Skip to content

Instantly share code, notes, and snippets.

View akrisanov's full-sized avatar

Andrey Krisanov akrisanov

View GitHub Profile
@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 January 11, 2024 13:49
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
@akrisanov
akrisanov / decimal_places.py
Last active November 5, 2020 05:49
hyperskill.org – Python
# Round the number from input to the required number of decimals.
#
# The input format:
# Two lines: the first with a floating-point number, the second with an integer representing the decimal count.
#
# The output format:
# A formatted string containing the rounded number.
number = float(input())
precision = int(input())
@akrisanov
akrisanov / Dockerfile
Created September 29, 2020 21:23
Dockerize Go App
FROM golang:1.13.6-stretch AS builder
RUN apt-get update && apt-get install git ca-certificates && update-ca-certificates
ENV GO111MODULE=on\
CGO_ENABLED=0
WORKDIR /build
# Cache go modules – they don't change much often