Skip to content

Instantly share code, notes, and snippets.

# Оценка шансов на бюджет, 2026-07-09
Абитуриент: HK47 / Yarost228. Баллы ЕГЭ: русский 73, математика 90, информатика 78. Сумма без индивидуальных достижений: 241.
Диапазоны являются практической оценкой, а не прогнозом приемной комиссии.
Уровни: очень высокий 75%+, высокий 60-75%, средний 35-60%, низкий 15-35%, очень низкий 5-15%, почти ноль до 5%.
## ДГТУ
Foods: Potatoes, Corn, Bread, Vegetables, Tofu, Meat, Eggs, Sausage, Fruit, Snack, Cake
Food Multiplier: 1.00
Fertilizer: Fertilizer II
Supported Population: 6000.0
Bottleneck Food: Potatoes (21.00/21.00 at target)
Bottleneck Crop: Vegetables (31.68/31.68 used)
Total Fertilizer Usage: 43.87/month
Total Added Water Usage: 330.96/month
Extra Requirements:
@dukelion
dukelion / gist:2c821050cd26be74113f709b735524f1
Created April 6, 2026 18:57
COI recipes energy efficiency
# Refinery HSU Equations
This note tracks refinery-chain recipes in terms of `HSU`, short for `High Steam Unit`.
`1 HSU` is defined as the energy content of `1` unit of `Steam (high)`. Using the high-pressure turbine recipe:
- `4 Steam (high) -> 6000 kW for 10 s`
- so `4 HSU = 60000 kW*s`
- therefore `1 HSU = 15000 kW*s`
#!/usr/bin/env python
import os,sys,re
from sets import Set
from pipes import quote
FILE_TYPES=[
'.mkv',
'.avi',
'.mp4',
'.flv'
#!/bin/bash
TMPPATH="/tmp"
function run_ffmpeg(){
input_file=$1
output_file=$2
echo ffmpeg from $1 to $2
#ffmpeg -v info -hide_banner -i ${input_file} -c:v libx264 -x264opts bitrate=1200:vbv-maxrate=1200:vbv bufsize=200:nal-hrd=cbr:force-cfr=1 -r 30 -movflags +faststart -pix_fmt yuv420p -preset slow -tune film -c:a aac -ar 44100 -b:a 128k ${output_file}.mp4
}
SRC=$1
Total objects size:82485061812
Total objects number:28316047
CNS:{:count=>5925, :size=>116272}
Top 10 projects by size
58aae0be9ba4d900075ef35f
{"q:"=>{:size=>79802075800, :count=>4394003}, :total=>{:size=>79802091074, :count=>4394049}, "m:"=>{:size=>15274, :count=>46}}
5afa8ce03215080009198861
{"q:"=>{:size=>1341877908, :count=>728228}, :total=>{:size=>1341886696, :count=>728234}, "m:"=>{:size=>8788, :count=>6}}
59883dad8f237e000a1e3025
{"q:"=>{:size=>873431360, :count=>750968}, :total=>{:size=>873449766, :count=>750996}, "m:"=>{:size=>18406, :count=>28}}
@dukelion
dukelion / set-elb-access-logs.py
Last active March 13, 2018 08:01
Make sure ELB access logs enabled for MQ
#!/usr/bin/env python
import boto3
from os import getenv
region = getenv('AWS_REGION','us-east-1')
ec2 = boto3.client('elbv2', region_name=region)
response = ec2.describe_load_balancers()
grepAccessLogParam = lambda x: x['Key'] == 'access_logs.s3.enabled'
grepAccessLogBucket = lambda x: x['Key'] == 'access_logs.s3.bucket'
@dukelion
dukelion / Dockerfile
Created September 15, 2017 08:23
Rocksdb tools image
# docker-rocksdb
Alpine Linux image with compiled and installed RocksDB with all compression libraries
dukelion@x1-carbon:~/source/docker-rocksdb$ cat Dockerfile
FROM golang:1.8-alpine
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >>/etc/apk/repositories && \
echo "@community http://nl.alpinelinux.org/alpine/edge/community" >>/etc/apk/repositories
RUN apk add --update --no-cache build-base linux-headers git cmake bash #wget mercurial g++ autoconf libgflags-dev cmake bash jemalloc perl
RUN apk add --update --no-cache zlib zlib-dev bzip2 bzip2-dev snappy snappy-dev lz4 lz4-dev zstd@community zstd-dev@community jemalloc jemalloc-dev libtbb-dev@testing libtbb@testing
### Keybase proof
I hereby claim:
* I am dukelion on github.
* I am dukelion (https://keybase.io/dukelion) on keybase.
* I have a public key whose fingerprint is CEB5 ED18 CC1C EFD8 9500 DF05 886C 160F FBDA 45A9
To claim this, I am signing this object:
listen 443 ssl;
ssl on;
ssl_certificate /etc/letsencrypt/live/wiki.iron.io/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/wiki.iron.io/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/wiki.iron.io/fullchain.pem;
ssl_dhparam /etc/ssl/private/dhparam.key;
ssl_session_timeout 24h;
ssl_session_cache shared:SSL:10m;
ssl_stapling on;
ssl_stapling_verify on;