This file contains hidden or 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
import socket, select | |
def broadcast_data (sock, message): | |
for socket in CONNECTION_LIST: | |
if socket != server_socket and socket != sock : | |
try : | |
socket.send(message) | |
except : | |
socket.close() | |
CONNECTION_LIST.remove(socket) | |
This file contains hidden or 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
import socket, select, string, sys | |
def prompt() : | |
sys.stdout.write('<You> ') | |
sys.stdout.flush() | |
#main function | |
if __name__ == "__main__": | |
This file contains hidden or 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
// | |
// Created by ajay on 10/16/17. | |
// | |
#include <stdio.h> | |
int datalen,divlen,res1[7],j,fin[7],net[7],dmp[1],rem[7]; | |
int comp(int i, int j) { | |
if(i == j){ | |
return 0; |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
// Time function, sockets, htons... file stat | |
#include <sys/time.h> | |
#include <time.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
#include <sys/types.h> | |
#include <sys/uio.h> |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
// Time function, sockets, htons... file stat | |
#include <sys/time.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
#include <sys/types.h> | |
#include <sys/uio.h> | |
#include <sys/stat.h> |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
// Time function, sockets, htons... file stat | |
#include <sys/time.h> | |
#include <time.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
#include <sys/types.h> | |
#include <sys/uio.h> |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
// Time function, sockets, htons... file stat | |
#include <sys/time.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
#include <sys/types.h> | |
#include <sys/uio.h> |
This file contains hidden or 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 <iostream> | |
#include <stdio.h> | |
using namespace std; | |
struct node { | |
int dist[20]; | |
int from[20]; | |
} route[10]; |
This file contains hidden or 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 <iostream> | |
#include <string> | |
#include <math.h> | |
#include <assert.h> | |
int main() { | |
// Store bit string | |
std::string input; | |
int ham[7]; |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <netdb.h> | |
#include <fcntl.h> | |
#include <time.h> |