This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Server Sent Event</title> | |
</head> | |
<body> | |
<div class="event-data" id="data"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CHANNEL_LAYERS = { | |
"default": { | |
"BACKEND": "asgi_redis.RedisChannelLayer", | |
"ROUTING": "widget.routing.channel_routing", | |
"CONFIG": { | |
"hosts": [("redis://:[email protected]:6379/0")], | |
}, | |
}, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
struct node { | |
int data{}; | |
node* left = nullptr; | |
node* right = nullptr; | |
node* parent = nullptr; | |
string color; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
struct node { | |
int data{}; | |
node* left = nullptr; | |
node* right = nullptr; | |
node* parent = nullptr; | |
int height; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
struct node { | |
int data{}; | |
node* left = nullptr; | |
node* right = nullptr; | |
}; | |
class BinarySearchTree{ |