Skip to content

Instantly share code, notes, and snippets.

View ahmadmustafaanis's full-sized avatar

Ahmad Mustafa Anis ahmadmustafaanis

View GitHub Profile
#include "BST.h"
node* BST::search(int x)
{
if (x == root->data)
{
return root;
}
node* temp = root;
while (temp)
#include <iostream>
using namespace std;
struct node {
int data;
node* next;
node* back;
};
class LinkedList {
#include <iostream>
#include <string>
#include <stack>
using namespace std;
class InduvivualWordsReverser {
private:
string h1;
stack < char > s1;
import socket
class receveingSocket:
def __init__(self, port=8080):
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)#ipv4 and tcp
self.sock.connect((socket.gethostname(), port)) #connects to local computer and port 8080
def send_lower_to_server(self):
# Socket Programming by Ahmad Mustafa Anis
import socket
class ServerSocket:
def __init__(self, type=socket.AF_INET, family=socket.SOCK_STREAM, port = 8080):
self.type = type
self.family = family
self.mySock = socket.socket(self.type, self.family) #Ipv4 and TCP Socket
self.mySock.bind((socket.gethostname(), port)) #Binded to local computer ip and 8080 port