Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: ') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <malloc.h> | |
int main(int argc, char const *argv[]) | |
{ | |
int n, *len_list, **twoD_arr, *oneD_arr; | |
printf("Enter n: "); | |
scanf("%d", &n); | |
len_list = (int *)calloc(n, sizeof(int)); |
NewerOlder