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
import sys | |
len1 = sys.stdin.readline() | |
len1 = len1.split('\n')[0] | |
len1 = int(len1) | |
print "Len of first msg is "+ str(len1) + "\n" | |
msg1 = sys.stdin.read(len1) | |
print "FROM CLIENT: "+msg1 |
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
#!/usr/bin/env python | |
# Copyright (c) Twisted Matrix Laboratories. | |
# See LICENSE for details. | |
from twisted.internet import protocol | |
from twisted.internet import reactor | |
import re | |
from time import sleep | |
import sys |
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
from twisted.internet import protocol | |
from twisted.internet import reactor | |
import re | |
class MyPP(protocol.ProcessProtocol): | |
def __init__(self, verses): | |
self.verses = verses | |
self.data = "" | |
def connectionMade(self): | |
print "connectionMade!" |
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
import sys | |
print "HELLO WORLD !!!" | |
for line in sys.stdin: | |
print line | |
print "ADD 1 2" | |
for line in sys.stdin: | |
print "RESULT IS " + line |
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
#!/usr/bin/env python | |
# Copyright (c) Twisted Matrix Laboratories. | |
# See LICENSE for details. | |
from twisted.internet import protocol | |
from twisted.internet import reactor | |
import re | |
from time import sleep |
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
#!/usr/bin/env python | |
# Copyright (c) Twisted Matrix Laboratories. | |
# See LICENSE for details. | |
from twisted.internet import protocol | |
from twisted.internet import reactor | |
import re | |
class MyPP(protocol.ProcessProtocol): |
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
import sys | |
print "HELLO WORLD !!!" | |
for line in sys.stdin: | |
print line | |
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
from __future__ import print_function, division | |
from sympy import Rational | |
from fractions import gcd | |
from random import randint | |
def egypt(rat,choice): | |
def egypt_greedy(): | |
""" |
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
def |