Skip to content

Instantly share code, notes, and snippets.

View belushkin's full-sized avatar
🎉
Hi there!

Maksym Bielushkin belushkin

🎉
Hi there!
View GitHub Profile

Keybase proof

I hereby claim:

  • I am belushkin on github.
  • I am belushkin (https://keybase.io/belushkin) on keybase.
  • I have a public key ASCX8mu6rYqLQzrLTqwVlEx8UTabj34Eh05sL-ZIjfhFLwo

To claim this, I am signing this object:

@belushkin
belushkin / youtube_audio_2_text.py
Created September 16, 2021 13:26 — forked from acabrol/youtube_audio_2_text.py
Convert youtube video's audio to text
import tempfile
from pytube import YouTube
from pytube import helpers
from pydub import AudioSegment
from pydub.utils import make_chunks
from pydub.silence import split_on_silence
import textract
import math
import scipy.io.wavfile as wav
@belushkin
belushkin / solution.java
Created April 3, 2020 16:11
Dreamoon and Ranking Collection
import java.util.Arrays;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int p = Integer.parseInt(sc.nextLine());
for (int i = 0; i < p; i++) {
@belushkin
belushkin / solution.java
Created March 31, 2020 17:29
Exercising Walk
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.nextLine());
for (int i = 0; i < n; i++) {
String s = sc.nextLine();
String[] result = s.split(" ");
@belushkin
belushkin / solution.java
Created March 26, 2020 18:04
Divisibility Problem
import java.util.*;
public class cf {
public static void main(String[] args) {
// Use the Scanner class
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.nextLine());
for (int i = 0; i < n; i++) {
String s = sc.nextLine();
@belushkin
belushkin / solution.java
Created March 26, 2020 18:03
K-th Beautiful String
import java.util.*;
public class cf {
public static void main(String[] args) {
// Use the Scanner class
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.nextLine());
for (int i = 0; i < n; i++) {
String s = sc.nextLine();
@belushkin
belushkin / running_median.cpp
Created October 25, 2019 11:30
Heaps and running median problem, c++
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
void MaxHeapify(int a[], int heap_size, int x) {
int l = 2*x + 1;
int r = 2*x + 2;
int largest = x;
@belushkin
belushkin / merge_not_completed.cpp
Created October 9, 2019 13:55
Check this merge tomorrow and write merge, quick and counting together
#include <iostream>
#include <bits/stdc++.h>
int a[] = {9,3,1,4,5,7,7,2,2};
void merge(int a[], int left, int middle, int right) {
int n1 = middle-left+1;
int n2 = right-midlle;
int L1[n1];
int R2[n2];
@belushkin
belushkin / counting_sort.cpp
Last active October 9, 2019 13:44
counting sort impolementation not from memory
#include <iostream>
#include <bits/stdc++.h>
int a[] = {9,3,1,4,5,7,7,2,2};
void counting_sort(int a[], int n) {
int radix = *std::max_element(a, a+n);
int c[radix+1] = {};
int b[n] = {};
@belushkin
belushkin / counting_sort.cpp
Created October 8, 2019 12:47
Counting sort correct implementation but NOT from memory
#include <iostream>
#include <bits/stdc++.h>
int a[] = {9,3,1,4,5,7,7,2,2};
void counting_sort(int a[], int n) {
int radix = *std::max_element(a, a + n);
int c[radix+1] = {};
int b[n] = {};