Skip to content

Instantly share code, notes, and snippets.

View zeerorg's full-sized avatar
💻
Fixing 🔄 Breaking

Rishabh Gupta zeerorg

💻
Fixing 🔄 Breaking
View GitHub Profile
@zeerorg
zeerorg / play_down.py
Last active August 1, 2016 06:24
Uninterrupted youtube playlist download
import subprocess
import os
output_file = '%(playlist_index)s - %(title)s.%(ext)s' # do not change this
link = '' # replace with url of playlist
start_playlist = 1
number = 1
files = [ f for f in os.listdir(".") ]
for f in files:
@zeerorg
zeerorg / sort_files.py
Created August 1, 2016 06:21
Sort files with extensions
import os
import sys
import shutil
def join_path(*arg):
return os.path.join(current_path, *arg)
current_path = os.getcwd()
files = [ f for f in os.listdir(current_path) if\
os.path.isfile(os.path.join(current_path, f)) and f != "sort_files.py" ]
#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
class strtype
{
private:
char* str;
@zeerorg
zeerorg / heapSort.c
Last active November 29, 2023 06:16
Heap sort in c
#include<stdio.h>
void swapArr(int A[100], int n, int m)
{
int temp = A[n];
A[n] = A[m];
A[m] = temp;
}
void heapify(int A[100], int n, int i)

#ToImTo Android app for all your movie thirst. Reviews, ratings, upcoming movies, popular picks all at one place..

Process.h

#include <iostream>
#define MAX 100

using namespace std;

struct Process {
    int pid;
    int arrival;
@zeerorg
zeerorg / cg_file.md
Last active September 13, 2017 14:18
CG File

Practical 1

Aim

To write a program which draws line using the provided function.

Description of aim and related theory

Communicating with graphics hardware and display is a daunting task. To tackle this operating systems provide graphics library which have a simple API which provide different functions for common tasks (like drawing pixel, line, triangles etc.).
In this practical we are using a standard graphics api (graphics.h or opengl) to understand how a graphics library works and helps us in writing graphics programs.

role client(
A, B : agent, H, PRF, KeyGen: hash_func, V: text,
Ka,Ks, KaikA,Kca: public_key,
%% Ks is the public key of a T3P (ie. CA)
SND, RCV: channel (dy)
)
played_by A
def=
local Na, Nb, Sid, Pa, Nw: text,
State: nat,
  1. title
  2. body
  3. uid
  4. imageList ( no need for single image )
  5. fileList
  6. timestamp
  7. previousPost ( for linking )

    Won't be having:
    authorImage since it should be fetched from specific author repo
#!/bin/bash
# setup download folder
mkdir -p ~/Downloads/Debs
# update and upgrade system
sudo apt update && sudo apt upgrade -y
# general first installs
sudo apt install git build-essential -y