Tagged Questions
5
votes
4answers
56 views
Number Of Matching Elements In Two Lists
I have many sets of 2 strings. I'm trying to determine the number of matching elements in these 2 strings. The rules are if the strings share a common letter, that's a point, order does matter, but ...
4
votes
0answers
45 views
Decoding custom packets with Python using Twisted
This server require fast decoding of packets from clients, as I am expecting 5000 concurrent clients that is sending packets possibly every second. This is a game server (5000 players walking send ...
2
votes
1answer
53 views
Project Euler 39: Integer right triangles
I just finished Project Euler 39:
If p is the perimeter of a right angle triangle with integral length sides, {a, b, c} … For which value of p ≤ 1000, is the number of solutions maximised?
I'm ...
2
votes
0answers
62 views
Optimize Python script for memory which opens and reads multiple times the same files
I have code that works perfectly, but it uses too much memory.
Essentially this code takes an input file (lets call it an index, that is 2 column tab-separated) that searches in a second input file ...
1
vote
3answers
199 views
How to optimize this simple Python program?
Here is a simple piece of code in Python. It is a solution to the SPOJ's JPESEL problem. Basically the problem was to calculate cross product of 2 vectors modulo 10. If there is a positive remainder, ...
1
vote
1answer
56 views
Script scraper for outputting variables and functions to a text file
I've been programming with Python 2.7 for about six months now and if possible, I'd like some critique to see what I might have done better or what I might be doing wrong.
My objective was to make a ...