Personal computing discussed
Moderators: renee, farmpuma, just brew it!
BIF wrote:It is heated by the sun, and that would be the problem. 95-100+ F during summertime months.
just brew it! wrote:Just found an excuse to turn up another node for Frankie for the final week. Took on a little water in the basement after some thunderstorms today; there's a patch of carpet that's damp...
farmpuma wrote:My limited experience with the 6.23 SMP client and the A3 work units with bonus points was rock solid stable. I gave up when the majority of work units resulted in 20MB upload files even though the client was configured for nothing over 5MBs. The 20MB files took about four hours to upload and the server often timed out before the upload was complete. I still have my passkey and SMP folding will resume when real internet makes it to my house.
#!/usr/bin/python
import socket
import select
import threading
import SocketServer
import time
global upCount
global downCount
upCount = 0
downCount = 0
class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):
def handle(self):
global upCount
global downCount
cur_thread = threading.currentThread()
name = cur_thread.getName()
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('127.0.0.1', 80))
clientDone = False
serverDone = False
while not (clientDone and serverDone):
idle = True
readers, writers, err = select.select([self.request, sock], [], [], 0)
if self.request in readers:
idle = False
data = self.request.recv(4096)
if len(data) == 0:
if clientDone:
break
clientDone = True
else:
upCount += len(data)
while upCount > 0:
time.sleep(0.05)
sock.send(data)
if sock in readers:
idle = False
response = sock.recv(4096)
downCount += len(response)
if len(response) == 0:
if serverDone:
break
serverDone = True
clientDone = True
else:
while downCount > 0:
time.sleep(0.05)
self.request.send(response)
if idle:
time.sleep(0.05)
sock.close()
class ThreadedTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer):
pass
def client(ip, port, message):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((ip, port))
sock.send(message)
response = sock.recv(32768)
sock.close()
if __name__ == "__main__":
# Port 0 means to select an arbitrary unused port
HOST, PORT = "0.0.0.0", 12080
server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler)
ip, port = server.server_address
# Start a thread with the server -- that thread will then start one
# more thread for each request
server_thread = threading.Thread(target=server.serve_forever)
# Exit the server thread when the main thread terminates
server_thread.setDaemon(True)
server_thread.start()
while 1:
time.sleep(0.05)
if upCount > 0:
upCount -= 2000
if downCount > 0:
downCount -= 5000
BIF wrote:How do you have a hard cider mishap? In the basement?
just brew it! wrote:That will still need some increase in production. I am pretty much maxed out now. So nothing more to give. We will need may be ~50K ppd more in order to 4 million. I say we will be lucky if we achieve that.Looks like 4 million is in reach? Yeah, down a little from last year. Oh well.
just brew it! wrote:Didn't realize the script I used to start the client on the 9550 had the -oneunit option set. So of course it was idling when I got up this morning. D'oh! (Fixed now...)
BIF wrote:just brew it! wrote:Didn't realize the script I used to start the client on the 9550 had the -oneunit option set. So of course it was idling when I got up this morning. D'oh! (Fixed now...)
Whoops! I'm curious, how many PPD can the 9550 produce?
BIF wrote:Fascinating! I like the idea of having the current stats all rolled up into one page.