Skip to content

Instantly share code, notes, and snippets.

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

Paresh Natarajan Paresh1879

🏠
Working from home
View GitHub Profile
use std::fmt::{self, Display};
use serde::{Deserialize, Serialize};
use crate::firestore_client::{ImageGenerationType, UserOverrides};
use super::{
batch_txt2img::BatchTxt2ImgRequest,
comfyui::ComfyUIRequest, img2img::Img2ImgRequest,
multiplayer::MultiplayerRequest,
import torch
import folder_paths
from PIL import Image, ImageOps, ImageSequence
import numpy as np
import base64
import hashlib
import os
import cv2
import copy
import logging
const express = require("express");
const fs = require("fs");
const app = express();
app.get("/create", (req, res) => {
let date = new Date();
let timeStamp = date.toLocaleString();
let curdate = date.getDate();
let month = +date.getMonth() + 1;
@Paresh1879
Paresh1879 / Javascript - Day -4 : What is XMLHTTPRequest?
Created March 11, 2022 12:05
Javascript - Day -4 : What is XMLHTTPRequest?
1. How to compare two JSON have the same properties without order?
var obj1 = { name: "Person 1", age:5 };
var obj2 = { age:5, name: "Person 1" };
--------------------------------------------
var obj1 = { name: "Person 1", age:5 };
var obj2 = { age:5, name: "Person 1" };
var result = obj2==obj1;
console.log(result);
@Paresh1879
Paresh1879 / Javascript - Day -2 : Request & Response cycle
Created March 4, 2022 08:28
Javascript - Day -2 : Request & Response cycle
1.List 5 difference between Browser JS(console) v Nodejs
NODE JS:
Node doesn’t have a predefined “window” object cause it doesn’t have a window to draw anything.
“location” object is related to a particular url; that means it is for page specific.
Ofcourse Node doesn’t have “document” object also, cause it never have to render anything in a page.
Node has “global”, which is a predefined global object. It contains several functions that are not available in browsers,
cause they are needed for server side works only.
@Paresh1879
Paresh1879 / Javascript : JS array & objects
Created March 4, 2022 08:12
Javascript : JS array & objects
1.For the given JSON iterate over all for loops (for, for in, for of, forEach)
FOR LOOP:
var numbers = [ 10, 20, 30, 40, 50]
for (var i=0; i < numbers.length; i++) {
console.log(numbers[i])
}
FOR IN:
1.Write a blog on Difference between HTTP1.1 vs HTTP2
A connection could be reused, which saved time and thereby Pipelining was added.
Chunked responses were also supported. Additional cache control mechanisms were introduced. Content negotiation, including language, encoding, and type, was introduced.
There are many advantages of HTTP2 over HTTP1,mainly size was reduced and efficiency was improved.
• HTTP2 is binary, instead of textual
• HTTP2 is fully multiplexed, instead of ordered and blocking
• HTTP2 can, therefore, use one connection for parallelism
• HTTP2 uses header compression to reduce overhead