Skip to content

Instantly share code, notes, and snippets.

Avatar

Vitaly Isaev vitalyisaev2

  • New Cloud Technologies
  • Moscow, Russia
View GitHub Profile
@vitalyisaev2
vitalyisaev2 / convert.py
Last active Sep 7, 2020
Encode video files with ffmpeg NVIDIA hardware acceleration
View convert.py
#!/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 Mar 16, 2021
Script for obtaining Gitlab API Personal Access Token
View personal_access_token.py
#!/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 Jul 27, 2020
Golang buffered channel vs blocking channel performance
View channel_test.go
/*
BenchmarkBufferedChannel-4 5000 267997 ns/op
BenchmarkBlockingChannel-4 3000 388019 ns/op
*/
package performance_test
import (
"math/rand"
"testing"
)