Skip to content

Instantly share code, notes, and snippets.

View Kinjalrk2k's full-sized avatar
🥱
Bored? Code!

Kinjal Raykarmakar Kinjalrk2k

🥱
Bored? Code!
View GitHub Profile
@Kinjalrk2k
Kinjalrk2k / 3DYoga90_failed_videos.csv
Created April 6, 2026 07:07
A list of failed video downloads from 3DYoga90 alogn with the reasons
sequence_id url error_reason
1054 https://www.youtube.com/watch?v=zidmxlIy2B4 Video unavailable. This video is private
1051 https://www.youtube.com/watch?v=AVqev3Lpas8 Video unavailable
1052 https://www.youtube.com/watch?v=f2DA84gu10g Video unavailable
1061 https://www.youtube.com/watch?v=5-yUfAlTTdA Video unavailable. This video is private
1025 https://www.youtube.com/watch?v=ONtiufJuIh4 Video unavailable. This video is private
1099 https://www.youtube.com/watch?v=_dR3sD3OyuA This video is available to this channel's members on level: 정진 도반 (or any higher level). Join this channel to get access to members-only content and other exclusive perks.
1102 https://www.youtube.com/watch?v=ax0iBsXh0B4 This video is available to this channel's members on level: 정진 도반 (or any higher level). Join this channel to get access to members-only content and other exclusive perks.
1104 https://www.youtube.com/watch?v=IJMioSrBCJc Join this channel to get access to members-only content like this video and other
@Kinjalrk2k
Kinjalrk2k / generate.js
Created January 23, 2022 10:06
JsDoc to Markdown with folder structure
const jsdoc2md = require("jsdoc-to-markdown");
const fs = require("fs");
const path = require("path");
// const dirs = fs.readdirSync(path.resolve("."));
// console.log(dirs);
const glob = require("glob");
glob("**/*.js", { ignore: "node_modules/*/**" }, async (err, files) => {
@Kinjalrk2k
Kinjalrk2k / README.md
Last active September 6, 2021 09:55
My Powershell Oh-my-Posh custom theme

Powershell Customization

image

Installation

Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
@Kinjalrk2k
Kinjalrk2k / flatToNestedObject.js
Last active May 28, 2021 12:41
Convert a Flat Object to a nested Object in JavaScript
const flatToNestedObject = (obj) => {
let nestedObj = {};
for (let key in obj) {
const value = obj[key];
if (key.indexOf(".") >= 0) {
const nestedKeys = key.split(".");
const parent = nestedKeys.shift();
const child = nestedKeys.join(".");
nestedObj[parent] = { ...nestedObj[parent] };
@Kinjalrk2k
Kinjalrk2k / cleanupMongooseSchema.js
Last active May 28, 2021 11:52
Cleanup a Mongoose Model to a simple object
const cleanupMongooseSchema = (schema) => {
let cleanSchema = {};
for (const field in schema.paths) {
const { path, instance, options } = schema.paths[field];
cleanSchema[path] = { type: instance };
if (schema.paths[field].hasOwnProperty("schema")) {
console.log(schema.paths[field].schema);
const nestedSchema = schema.paths[field].schema;
@Kinjalrk2k
Kinjalrk2k / displayCV2Jupyter.py
Created August 14, 2020 04:01
Display OpenCV Image(s) in Jupyter Notebook using Matplotlib
import math
import cv2
import matplotlib.pyplot as plt
def displayImage(img, title=None, size=(10, 10)):
plt.figure(figsize=size)
plt.imshow(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
plt.title(title)
plt.axis('off')
plt.show()
clc;
clear all;
close all;
a=[1 0 1 1 0 1]
l=length(a);
amp = input('Enter the amplitude of carrier: ')
fc = input('Enter the frequency of carrier: ')
@Kinjalrk2k
Kinjalrk2k / shattak_downloader.py
Created April 12, 2020 12:17
Download PDFs from Shattak at one go!
from bs4 import BeautifulSoup
import urllib
import re
html_page = urllib.request.urlopen("https://www.shattak.com/quordenet/subject?code=APT-101&name=tapas-sir")
soup = BeautifulSoup(html_page)
links = []
for link in soup.find_all('a', href=True):
links.append(link['href'])
@Kinjalrk2k
Kinjalrk2k / 1D parity.py
Last active January 26, 2020 05:12
1D Parity Checker - Includes manual manipulation of the data to illustrate error cases
# EVEN PARITY
import functools, random
# parity = functools.reduce(lambda a, b: a ^ b, list(map(int, list(str(bin(num))[2:]))))
# print(parity)
def parityGenerator(msg):
binary_li = list(map(int, list(msg)))
parity = functools.reduce(lambda a, b: a ^ b, binary_li)
return parity
#include <stdio.h>
#include <math.h>
#define ex 0.01
double foo(double x){
return pow(x,3) - x - 4;
}
double bisection(){
int n = 1, i;