Skip to content

Instantly share code, notes, and snippets.

View iamparthaonline's full-sized avatar

Partha iamparthaonline

  • Fasal - Grow more, grow better™
  • Bangalore
View GitHub Profile
import onnxruntime as ort
import numpy as np
import cv2
import os
import time
from datetime import datetime
import requests
import json
# === Configuration ===
// utils.js
export async function getUserData() {
const res = await fetch('https://jsonplaceholder.typicode.com/users/1')
return res.json()
}
// UserComponent.jsx
import { use } from 'react'
import { getUserData } from './utils'
// redux/api.js
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'
export const api = createApi({
reducerPath: 'api',
baseQuery: fetchBaseQuery({ baseUrl: '/api' }),
tagTypes: ['Post'],
endpoints: (builder) => ({
getPosts: builder.query({
query: () => 'posts',
name: CI for Node Apps
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
/* add in you package json build script like this -
"build": "vite build && node bundle.js",
*/
import fs from "fs";
import archiver from "archiver";
import { DateTime } from "luxon";
var output = fs.createWriteStream("dist.zip");
var archive = archiver("zip");
import React, { useState } from "react";
import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd";
const listArray = {
Earth: [
{
label: "Iron Man",
id: 1001,
},
{
{
"name": "react-learning",
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.27.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1"
import React from "react";
import axios from "axios";
class RegisterForm extends React.Component {
constructor() {
super();
this.state = {
name: "",
age: 0,
password: "",
/**
* Handling Forms and different events
* Conditional rendering
* Looping in react
*/
// import "./style.css";
import { useState, createRef } from "react";
const RenderResult = (props) => {
const { showResult, firstName, removeHandler } = props;
const arrayOfCharacters = firstName.split("");
import { useState } from "react";
import { Link } from "react-router-dom";
const dogsListAPI = "https://dog.ceo/api/breeds/list/all";
const DogsComponent = () => {
const [breeds, setBreeds] = useState([]);
const [image, setImage] = useState();
const [currentBreed, setCurrentBreed] = useState("");
const getBreedsList = () => {