Skip to content

Instantly share code, notes, and snippets.

View deepakkashyap3013's full-sized avatar
🎯
Focusing

Deepak Kashyap deepakkashyap3013

🎯
Focusing
View GitHub Profile

Interview Questions

Node.js

Q1: What do you mean by Asynchronous API? ☆☆

Answer: All APIs of Node.js library are aynchronous that is non-blocking. It essentially means a Node.js based server never waits for a API to return data. Server moves to next API after calling it and a notification mechanism of Events of Node.js helps server to get response from the previous API call.

Source: tutorialspoint.com

@deepakkashyap3013
deepakkashyap3013 / main.py
Created May 29, 2025 15:16
GraphRag with Neo4j + Pinecone vector DB (Hybrid solution)
import os
import csv
import logging
import uuid
import json
from typing import Dict, List, Tuple, Any
from retry import retry
from dotenv import load_dotenv
from neo4j import GraphDatabase
import pandas as pd
@deepakkashyap3013
deepakkashyap3013 / cryptoZombies.md
Created January 25, 2024 16:46 — forked from oilsinwater/cryptoZombies.md
CryptoZombies Notes

CryptoZombies.io Notes

Contracts

Solidty's code is encapsulated in contracts. A contract is the fundamental building block of Ethereum applications -- i.e. all variables and functions belong to a contract, and are the starting point of your project. Below is an example of an empty contract called HelloWorld.

import React, { useEffect, useState } from "react";
import axios from "axios";
export const withEditableUser = (Component, userId) => {
return (props) => {
const [OriginalUser, setOriginalUser] = useState(null);
const [user, setUser] = useState(null);
useEffect(() => {
(async () => {
import React from "react";
import { withEditableUser } from "./withEditableUser";
// component to be passed as argument to HOC
const FormComponent = ({ user, onChangeUser, onSaveUser, onResetUser }) => {
const { name, age, hairColor } = user || {};
return user ? (
<>
<label>
import { editableForm } from "./editableForm";
function App() {
// do something for getting userId (parent component has controll to pass the userId after getting some)
const UserInfoForm = editableForm("345");
return (
<>
<UserInfoForm />
</>
import React from "react";
export const UserInfo = ({ user }) => {
const { name, age, hairColor, hobbies } = user || {};
return (
<>
<h3>{name}</h3>
<p>Age: {age}</p>
<p>Haircolor: {hairColor}</p>
import React from "react";
import { GenericUser } from "./user/GenericUser";
function App() {
return (
<>
<GenericUser userId="234"/>
</>
);
}
import React from "react";
import { GenericUserLoader } from "../loaders/GenericUserLoader";
import { UserInfo } from "./UserInfo";
export const GenericUser = ({ userId }) => {
return (
<GenericUserLoader userId={userId}>
<UserInfo />
</GenericUserLoader>
);