« first day (804 days earlier)      last day (1384 days later) » 

2:01 AM
0
Q: Python Solitaire Encryption Code Is Not Returning Output

RaphCI'm having issues running my program. The idea is to decipher a message using a sample deck of cards but the program itself is not returning a deciphered message. What is the issue with my functions? The instrucions can be found at this link:http://www.cdf.toronto.edu/~csc108h/fall/assignments/a...

 
 
2 hours later…
4:03 AM
0
Q: Choosing Between Ruby and Python for a FS Microservice Backend in Node App

Taylor AckleyI have been working on a application that up until now has been pure Node. However I am concerned about performance and overhead since the application performs a lot of file system operations (Copy directory, file writes, Remove Directory, zip....) Everything works like a charm, but I am thinki...

 
 
5 hours later…
9:27 AM
0
Q: Transparent wrapper class for data structure in Python

ivy_lynxI needed a deque who's maxlen can be set again after it has been initialized. So, since new-style classes in Python are treated as types, I decided to create a new class borrowing from deque to accomplish this. My approach is to have an internal deque as an attribute and when maxlen is set, it re...

 
9:52 AM
0
Q: Hi, i have to create a code using list.append method. The user must enter the information and then be given the option to see all the information

Shaneimport msvcrt as m studentList = "" studentName = ["studName"] studentNum = ["studentNumber"] studentTest1 = ["Test1"] studentTest2 = ["Test2"] def wait(): m.getch() def menu(): print("1: Add new Student") print("2: View all students") print("3: Quit") ans = int(input("Sele...

 
10:28 AM
0
Q: 3n+1 problem rejected by uva judge: time limit exceeded

user1476075I am trying to get into the habit of solving programming puzzles in my spare time but am stuck on the first one(which I know can be for a large number of reasons hence my posting for help). Shown below is my code that is meant to solve the 3n+1 Challenge: from sys import stdin def main(): c...

 
 
3 hours later…
1:11 PM
0
Q: Trouble understanding Tower of Hanoi code in Python 2-7

PhilosophSteinAs I mentioned in other posts, I am learning programming mainly for my hobbies. A month or so ago, I decided to stop where I was at learning C and Java and to start learning from the ground up so to speak. So I found some online courseware that teaches programming using Python 2-7. So far, the co...

 
1:29 PM
-2
Q: Can someone go into more detail about how this music representation/classification system works?

RichI was reading through the comments and stumbled upon this, by reddit user /u/gindc: "I actually do a couple of steps. I read the first minute of music and make it a mono 22 kHz wav file (using ffmpeg). I read that into numpy. That's 1,323,000 data points." "I reduce this dataset down to 3000 fl...

 
 
3 hours later…
4:35 PM
0
Q: Django query filter on count in one to many relation

Nobe4I have the following models: Donation Charge - donation = models.ForeignKey(Donation) - error = models.CharField() # contains the error, can be null/blank And I have a complex query that should do one of the following: Get all donations or all donations which has at least one failed charg...

 
4:46 PM
0
Q: My C++ code is 5 times slower than my equivalent Python code

DualinityI was thinking to rewrite my Python code to C++ since it contains quite a lot of simple loops. I was stunned to find out that this critical part of code (the code below) is about 5 times slower than the Python code, and I'm hoping you could help me figure out why. The context is some kind of gam...

0
Q: Hangman from a beginner

HuserOzI'm trying to learn programming with python by myself and I've made a hangman game for exercise purposes. import random words = ['egypt', 'automobile', 'world', 'python', 'miniority', 'treehouse', 'friend', 'program' , 'people'] def start(): print "Hello! Welcome to a tiny hangman game tha...

 
 
2 hours later…
7:18 PM
0
Q: Remove duplicates from a list

jackI'm trying to remove the duplicate from the list and count the list after removing the duplicates seq = [(1,2,3), (1,2,3), (2,3,4), (4,5,6)] new_seq = [(1,2,3), (2,3,4), (4,5,6)] count = 3 My code takes around 23 seconds for around 66,00 tuples in a list How can I make my code faster? def...

 
 
2 hours later…
9:46 PM
0
Q: Python Tk Textpad Finding and Highliting Words

Starwarsfan2099I have written a PyDBG powered Tk debugging tool. I finished all the debugging aspects and thought it looked a little dull. I pipe all of my output to a text pad as the main source of information and output. After trying several things (and researching on Stack Overflow) I found just what I neede...

 
10:07 PM
0
Q: In what way does programming help towards cyber security

A. ManI've been studying the cyber security field with great interest. I understand how networking can help cyber security but I am not sure how advanced programming knowledge can help fight cyber crime or why certain cyber security experts need programming knowledge. In my experience so far with pene...

 

« first day (804 days earlier)      last day (1384 days later) »