Skip to content

Instantly share code, notes, and snippets.

View SubCoder1's full-sized avatar
🏠
Working from home

Souma Kanti Ghosh SubCoder1

🏠
Working from home
  • Bangalore, India
  • 03:57 (UTC +05:30)
View GitHub Profile
@SubCoder1
SubCoder1 / index.html
Created February 1, 2023 15:57
Server Side Event in Go using Gin
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Server Sent Event</title>
</head>
<body>
<div class="event-data" id="data"></div>
@SubCoder1
SubCoder1 / avl_tree.py
Created January 12, 2020 22:03
AVL Tree implementation in Python3
class Node:
def __init__(self, val=0):
self.left = self.right = self.parent = None
self.height = 0
self.val = val
class AVL:
def __init__(self):
self.root = None
@SubCoder1
SubCoder1 / channel_layers_settings.json
Created October 2, 2019 05:42
Django-channels CHANNEL_LAYERS settings for password-protected Redis-server
CHANNEL_LAYERS = {
"default": {
"BACKEND": "asgi_redis.RedisChannelLayer",
"ROUTING": "widget.routing.channel_routing",
"CONFIG": {
"hosts": [("redis://:mypassword@127.0.0.1:6379/0")],
},
},
}
@SubCoder1
SubCoder1 / bashcommand.txt
Last active May 21, 2019 17:50
An HTTP/HTTPS stress testing with POST data using Siege
siege -c 12 -r 1 --content-type "application/json" 'http://127.0.0.1:8000/ POST input_field_id_1=data, input_field_id_2=data'
concurrent user sending requests - 12 {-c}
requests sent from a single user - 1 {-r}
@SubCoder1
SubCoder1 / RB-Tree.cpp
Created August 22, 2018 17:26
Red Black Tree implementation in C++
#include <bits/stdc++.h>
using namespace std;
struct node {
int data{};
node* left = nullptr;
node* right = nullptr;
node* parent = nullptr;
string color;
};
@SubCoder1
SubCoder1 / AVL.cpp
Last active June 12, 2022 02:23
AVL Tree Implementation in C++
#include <bits/stdc++.h>
using namespace std;
struct node {
int data{};
node* left = nullptr;
node* right = nullptr;
node* parent = nullptr;
int height;
};
@SubCoder1
SubCoder1 / BinarySearchTree.cpp
Last active June 12, 2022 02:23
Simple Implementation of a Binary Search Tree(C++)
#include <bits/stdc++.h>
using namespace std;
struct node {
int data{};
node* left = nullptr;
node* right = nullptr;
};
class BinarySearchTree{