Skip to content

Instantly share code, notes, and snippets.

View sumn2u's full-sized avatar
🌎

Suman Kunwar sumn2u

🌎
  • Baltimore
  • 00:02 (UTC -04:00)
View GitHub Profile
@sumn2u
sumn2u / intl_en.arb
Created September 14, 2025 11:15
Translations of DWaste App
{
"@@locale": "en",
"appTitle": "DWaste",
"letsRecycle": "Let's recycle",
"selectLanguage": "Select Language",
"ok": "Ok",
"loading": "Loading",
"noCategoriesFound": "No Categories found",
"points": "{count, plural, =0{No points} =1{1 point} other{{count} points}}",
"@points": {
@sumn2u
sumn2u / auto.csv
Created January 9, 2024 20:19
car price dataset
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 26 columns, instead of 10 in line 8.
3,?,alfa-romero,gas,std,two,convertible,rwd,front,88.6,168.8,64.1,48.8,2548,dohc,four,130,mpfi,3.47,2.68,9.0,111,5000,21,27,13495
3,?,alfa-romero,gas,std,two,convertible,rwd,front,88.6,168.8,64.1,48.8,2548,dohc,four,130,mpfi,3.47,2.68,9.0,111,5000,21,27,16500
1,?,alfa-romero,gas,std,two,hatchback,rwd,front,94.5,171.2,65.5,52.4,2823,ohcv,six,152,mpfi,2.68,3.47,9.0,154,5000,19,26,16500
2,164,audi,gas,std,four,sedan,fwd,front,99.8,176.6,66.2,54.3,2337,ohc,four,109,mpfi,3.19,3.40,10.0,102,5500,24,30,13950
2,164,audi,gas,std,four,sedan,4wd,front,99.4,176.6,66.4,54.3,2824,ohc,five,136,mpfi,3.19,3.40,8.0,115,5500,18,22,17450
2,?,audi,gas,std,two,sedan,fwd,front,99.8,177.3,66.3,53.1,2507,ohc,five,136,mpfi,3.19,3.40,8.5,110,5500,19,25,15250
1,158,audi,gas,std,four,sedan,fwd,front,105.8,192.7,71.4,55.7,2844,ohc,five,136,mpfi,3.19,3.40,8.5,110,5500,19,25,17710
1,?,audi,gas,std,four,wagon,fwd,front,105.8,192.7,71.4,55.7,2954,ohc,five,136,mpfi,3.19,3.40,8.5,110,5500,19,25,18920
1,158,audi,gas,turbo,four,sedan,fwd,front,10
@sumn2u
sumn2u / Nepal-Population-Density-Map.R
Last active January 5, 2024 02:47
Population density map of Nepal (3D)
install.packages("sf",dependencies=TRUE)
install.packages("tmap",dependencies=TRUE)
install.packages("mapview",dependencies=TRUE)
install.packages("stars",dependencies=TRUE)
install.packages("rayshader",dependencies=TRUE)
install.packages("MetBrewer",dependencies=TRUE)
install.packages("rayrender")
install.packages("extrafont",dependencies=TRUE)
install.packages("magick",dependencies=TRUE)
@sumn2u
sumn2u / Slovenia.R
Created January 2, 2024 19:06
Slovenia Forest Map
#############################################
Slovenia
#############################################
# 1. PACKAGES
# require(remotes)
# install_version("rayshader", version = "0.35.7", repos = "http://cran.us.r-project.org")
libs <- c(
@sumn2u
sumn2u / launch.json
Created April 6, 2023 14:52
Launch configurations for debugging jest test spec and application
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:8080",
"webRoot": "${workspaceRoot}/src",
"sourceMaps": true
@sumn2u
sumn2u / interval.hook.ts
Created November 8, 2022 14:31 — forked from Danziger/interval.hook.ts
✨ Declarative useTimeout (setTimeout), useInterval (setInterval) and useThrottledCallback (useCallback combined with setTimeout) hooks for React (in Typescript)
import React, { useEffect, useRef } from 'react';
/**
* Use setInterval with Hooks in a declarative way.
*
* @see https://stackoverflow.com/a/59274004/3723993
* @see https://overreacted.io/making-setinterval-declarative-with-react-hooks/
*/
export function useInterval(
callback: React.EffectCallback,
@sumn2u
sumn2u / db.json
Created October 4, 2022 13:49
JSON file example for hai-server
{
"posts":[
{
"id":1,
"title":"hai-server",
"author":"sumn2u"
}
],
"comments":[
{
@sumn2u
sumn2u / example.json
Created October 4, 2022 13:47
JSON example for restricting API through hai-server
{
"secretKey":"123456789",
"expiresIn":"1h",
"users":[
{
"id":1,
"name":"bruno",
"email":"[email protected]",
"password":"bruno"
},
@sumn2u
sumn2u / 404.html
Last active June 1, 2022 18:48
An example of 404 using Yuno Design Kit
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>CodePen - Yuno 404</title>
<link rel='stylesheet' href='https://unpkg.com/[email protected]/build/style.1.1.8.css'>
</head>
<body>
<!-- partial:index.partial.html -->
<body class="background background--light background--dark container">
@sumn2u
sumn2u / index.html
Created May 31, 2022 15:43
Yuno 404
<body class="background background--light background--dark container">
<section class="page_404 text-center">
<div class="row">
<div class="col-sm-12 ">
<div class="col-sm-10 col-sm-offset-1">
<div class="four_zero_four_bg">
<img src='https://cdn.dribbble.com/users/285475/screenshots/2083086/dribbble_1.gif' class='four_zero_four_bg_img' height="40%" />
</div>
<div class="contant_box_404">
<h3 class="h2">