Skip to content

Instantly share code, notes, and snippets.

View av-elier's full-sized avatar
⚙️

Alexey Pozdnyakov av-elier

⚙️
  • TradingView
View GitHub Profile
@av-elier
av-elier / goreplay_to_tank_ammo_file.py
Created May 13, 2022 18:30
Convert goreplay file to yandex.tank ammo file
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
gor_delimeter = "🐵🙈🙉"
def make_ammo(req, case):
""" makes phantom ammo """
@av-elier
av-elier / Functional-if-reimplementation.scala
Created October 31, 2016 18:50
Functional-if-reimplementation.scala
def `if`[T](cond: Boolean) = {
class Then(cond: Boolean, t: => T) {
def `else`(elseF: => T): T= if (!cond) elseF else t
}
def `then`(thenF: => T) = new Then(cond, thenF)
`then` _
}