Skip to content

Instantly share code, notes, and snippets.

View vitalyisaev2's full-sized avatar

Vitaly Isaev vitalyisaev2

  • Yandex
  • Moscow, Russia
View GitHub Profile
@vitalyisaev2
vitalyisaev2 / convert.py
Last active September 7, 2020 18:25
Encode video files with ffmpeg NVIDIA hardware acceleration
#!/usr/bin/env python
from pathlib import Path, PurePath
import subprocess
import os
root = "."
def main():
src_files = list(Path('uncompressed').rglob('*.mp4'))
@vitalyisaev2
vitalyisaev2 / personal_access_token.py
Last active April 19, 2024 12:53
Script for obtaining Gitlab API Personal Access Token
#!/usr/bin/python3
"""
Script that creates Personal Access Token for Gitlab API;
Tested with:
- Gitlab Community Edition 10.1.4
- Gitlab Enterprise Edition 12.6.2
- Gitlab Enterprise Edition 13.4.4
"""
import sys
import requests
@vitalyisaev2
vitalyisaev2 / channel_test.go
Last active July 27, 2020 11:18
Golang buffered channel vs blocking channel performance
/*
BenchmarkBufferedChannel-4 5000 267997 ns/op
BenchmarkBlockingChannel-4 3000 388019 ns/op
*/
package performance_test
import (
"math/rand"
"testing"
)