Skip to content

Instantly share code, notes, and snippets.

View aashish-chaubey's full-sized avatar
💻
Furiously Coding

Aashish Chaubey aashish-chaubey

💻
Furiously Coding
View GitHub Profile
/**
* @author: Aashish
* Date: 13-07-2019
*/
import java.util.*;
class Solution {
static class Graph {
@aashish-chaubey
aashish-chaubey / Todo.js
Created July 11, 2019 06:07
Making use of `useReducer` React hook for managing the state of the functional component
import React, { useReducer } from 'react';
const reducer = (state, action) => {
switch(action.type) {
case 'add': {
return [
...state,
{
id: Date.now(),
text: '',
@aashish-chaubey
aashish-chaubey / sample_threading.py
Last active December 9, 2018 14:17
Creating threads in python using threading module
from threading import Thread
import time
def job(name):
# Create a process heavy job
time.sleep(2)
print("The name is: %s" % name)
def main():
print("Program starts!")