Skip to content

Instantly share code, notes, and snippets.

View kirushyk's full-sized avatar
🏠
Working from home

Kyrylo V. Polezhaiev kirushyk

🏠
Working from home
View GitHub Profile
@tylercubell
tylercubell / automatically_restart_live_stream.py
Created February 11, 2019 01:07
GStreamer Automatically Restart Live Stream On Error
import gi
gi.require_version('Gst', '1.0')
from gi.repository import GObject, Gst
Gst.init(None)
class Main:
def __init__(self):
self.pipeline = Gst.Pipeline.new("pipeline")
self.bus = self.pipeline.get_bus()
@geffy
geffy / stacking_example.py
Created October 7, 2017 17:33
Stacking example
# -*- coding: utf-8 -*-
"""
Created on Mon Sep 23 23:16:44 2017
@author: Marios Michailidis
This is an example that performs stacking to improve mean squared error
This examples uses 2 bases learners (a linear regression and a random forest)
and linear regression (again) as a meta learner to achieve the best score.
The initial train data are split in 2 halves to commence the stacking.
@rambabusaravanan
rambabusaravanan / detect-js-framework.js
Last active April 8, 2024 12:39
Detect JS Framework used in a Website
// Paste these lines into website's console (Win/Linux: Ctrl + Shift + I / Mac: Cmd + Alt + I)
if(!!window.React ||
!!document.querySelector('[data-reactroot], [data-reactid]') ||
Array.from(document.querySelectorAll('*')).some(e => e._reactRootContainer !== undefined || Object.keys(e).some(k => k.startsWith('__reactContainer')))
)
console.log('React.js');
if(!!document.querySelector('script[id=__NEXT_DATA__]'))
console.log('Next.js');
@awesomebytes
awesomebytes / simple_debian_repository.md
Last active March 5, 2024 18:17
How to create a simple debian repository with minimal dependences

Simple debian repository

How to have a simple debian repository to offer your packages.

Requirements

You probably have them already installed

  • Python (I used 2.7).
  • dpkg-scanpackages: sudo apt-get install dpkg-dev
  • gzip: sudo apt-get install gzip
@imax
imax / cheatsheet.markdown
Last active July 25, 2022 11:36
Relocation cheatsheet

Compare cost of living in different locations around the world.

Country (city) Salary (gross) Taxes Apartment Visa More info
Germany (Berlin) €50-60k 27-33% €700-1200/mo Blue Card, 1-3 months, spouse can work de_faq на русском Numbeo
Estonia (Tallinn) €35-45k 41.5% €600-1200/mo 2 months, spouse can work Taxes
xxx

Legend:

@gboudreau
gboudreau / install-ffmpeg-amazon-linux.sh
Last active November 21, 2023 19:48
How to compile ffmpeg on Amazon Linux (EC2)
#!/bin/sh
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264
if [ "`/usr/bin/whoami`" != "root" ]; then
echo "You need to execute this script as root."
exit 1
fi
cat > /etc/yum.repos.d/centos.repo<<EOF
@koute
koute / opengl3_hello.c
Created November 9, 2013 23:16
Minimal SDL2 + OpenGL3 example.
/*
Minimal SDL2 + OpenGL3 example.
Author: https://github.com/koute
This file is in the public domain; you can do whatever you want with it.
In case the concept of public domain doesn't exist in your jurisdiction
you can also use this code under the terms of Creative Commons CC0 license,
either version 1.0 or (at your option) any later version; for details see:
http://creativecommons.org/publicdomain/zero/1.0/