Skip to content

Instantly share code, notes, and snippets.

View priteshgudge's full-sized avatar

Pritesh Gudge priteshgudge

View GitHub Profile
@priteshgudge
priteshgudge / App.js
Created October 6, 2019 19:20
React Main Class
import React, {Component} from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
@priteshgudge
priteshgudge / question.txt
Created July 15, 2019 09:18
Bank Branch Simulation Assignment
In this assignment we are going to build a simulation model of a bank branch.
We have to model the bank cashiers and the customers.
A cashier can be in two states, Occupied & Not Occupied.
If a cashier is not occupied, the cashier takes the next customer from a queue.
If the cashier is processing a customer the status is Occupied.
It takes 'n' seconds for a bank cashier to process one customer.
Customers are labelled in increasing numberical order 1,2,3.
All cashiers are operating in parallel and independent of each other.
@priteshgudge
priteshgudge / constants.py
Created July 11, 2019 13:45
Card Game Trump
SPADES = "SPADES"
DIAMONDS = "DIAMONDS"
HEARTS = "HEARTS"
CLUBS = "CLUBS"
CARD_SUITES_SET = [SPADES,DIAMONDS,HEARTS,CLUBS]
CARD_FACES_MAP = {
14:"ACE",
@priteshgudge
priteshgudge / rest_api_assignment.md
Last active July 15, 2019 07:25
Simple Read Write Rest API
@priteshgudge
priteshgudge / assignment1.md
Created June 12, 2019 22:16
ReadJsonAndGenerateOutputAssignment
@priteshgudge
priteshgudge / count.py
Created May 21, 2019 14:00
Clever tap event count api
import requests
import json
headers = {
'X-CleverTap-Account-Id': 'PPPPPPPP',
'X-CleverTap-Passcode': 'DDDDDDDD',
'Content-Type': 'application/json',
}
@priteshgudge
priteshgudge / BankBranchModel3.txt
Last active April 9, 2019 08:15
Golang Test - Bank Branch Simulation
In this assignment we are going to build a simulation model of a bank branch.
We have to model the bank cashiers and the customers.
A cashier can be in two states, Occupied & Not Occupied.
If a cashier is not occupied, the cashier takes the next customer from a queue.
If the cashier is processing a customer the status is Occupied.
It takes 'n' seconds for a bank cashier to process one customer.
Customers are labelled in increasing numberical order 1,2,3.
All cashiers are operating in parallel independent of each other.
@priteshgudge
priteshgudge / build_app.sh
Last active February 16, 2019 18:51
build_and_push
sh build.sh
docker build --target app -f Dockerfile -t asia.gcr.io/pritesh-sample-1/testapplication:dev_0.0.1 .
docker push asia.gcr.io/pritesh-sample-1/testapplication:dev_0.0.1
docker run -p 8080:8080 asia.gcr.io/pritesh-sample-1/testapplication:dev_0.0.1
http://localhost:8080/ping/
#Kubernetes
# gcloud container clusters get-credentials test-cluster --zone=asia-south1-a
# gcloud compute firewall-rules create my-rule --allow=tcp:8011
@priteshgudge
priteshgudge / assignment_golang_mongo_2.txt
Created February 6, 2019 16:29
Assignment Golang Mongo
Assignment:
Fork the repo to your github account:
https://github.com/priteshgudge/gohttpexamples/
Part 1)
Implement the PUT method of http handlers and connect related inmemory repository code.
https://github.com/priteshgudge/gohttpexamples/tree/master/sample4
Part 2)
#https://lombardo-chcg.github.io/tools/2017/12/20/kafka-log-compaction.html
kafka-topics --zookeeper 35.185.129.xxx:2181 \
--create --topic order_object_test \
--config "cleanup.policy=compact" \
--config "delete.retention.ms=100" \
--config "segment.ms=100" \
--config "min.cleanable.dirty.ratio=0.01" \
--partitions 3 \
--replication-factor 1