« first day (626 days earlier)      last day (1562 days later) » 

12:31 AM
0
Q: PyQt5 validator for decimal numbers

SebastianThis class is similar to QDoubleValidator, but it improves slightly on the editing comfort. The comments mention "comma" but it's actually the decimal point of your locale (comma for me). class DecimalValidator(QDoubleValidator): def __init__(self, *args): QDoubleValidator.__init__(s...

 
 
1 hour later…
1:38 AM
0
Q: PyQt5 validator for decimal numbers (V2)

SebastianThis class is similar to QDoubleValidator, but it improves slightly on the editing comfort. Are there any corner- or special cases of inputs I didn't consider, which would lead to bad behaviour? Is it wrong to assume the last inserted character is left of the cursor (for the case that I'm sure ...

 
2:12 AM
0
Q: Python 3 Linked List Cycle Floyd Method

akbswdef findCycleBeg(self): if self.head == None or self.head.next == None: return False slow = self.head fast = self.head.next while (slow is not fast): slow = slow.next try: fast = fast.next.next except ...

 
 
2 hours later…
3:55 AM
0
Q: My own twist on the classic "Guessing Game" script in Python

Branden M. ArdeleanThis is a (letter, or whatever the user decides to change it to) guessing game I wrote which implements both a mechanic to randomly change the order of elements in a list, as well as limit the number of attempts you get to complete the game. There's not much else to say about it. I'm just looking...

0
Q: Auto-complete using Tries in Python with OOP

aamir23I am working on a problem to develop auto-complete functionality to practice different applications of Tries. The auto-complete function will return all the possible words in the wordlist given a prefix. I came up with the following solution which returns the result as expected. I need some help ...

 
4:21 AM
Hello
 
4:35 AM
0
Q: Visualize the runtimes of list algorithms

Thunder ShiviahI wrote a small script to visualize the runtimes of list algorithms. The script works by creating a list of lists with sampled lengths from 1 to max_size. Next, I map the given algorithm over each list element and replaced the list with the resulting runtime. The runtimes of each list are plott...

 
 
6 hours later…
10:47 AM
0
Q: Query on list output

johndoe12345Simple question for ye. I have a file with 1 word on each line and i want to put those words into a list #!/usr/bin/python file = raw_input("Enter path to filename :") text_file= open(file,'r') data=text_file.read() def first2(): lines = [] for x in data: lines.append(data) ret...

 
 
1 hour later…
12:17 PM
1
Q: Implementation of Longest Common Subsequence

RatulSo I implemented the LCS algorithm once using a 2-D matrix to store values while the other one used a python dictionary. I found the dictionary implementation was easier to implement and was a more natural and intuitive way of solving the problem. I just wanted to make sure if it's a correct way...

 
1:12 PM
0
Q: Programs for different language learning - Python

Lost BamI've created a program for my own purposes in three different languages, Perl, Python, and Ruby. Each program will be posted in with their own tag but I will add links to them through on each post. The program itself is very simple, all it does is ask the user about three different languages whic...

 
1:39 PM
Novice in everything expert in nothing?
1 message moved from SO Close Vote Reviewers
 
 
2 hours later…
4:13 PM
1
Q: Small "Grid Battle" console game

acollection_This is my first attempt to make a game on my own. I just want to see if anyone has any comments. Am I doing things, at least, sort of alright? Is there a better way I could deal with the input? import sys, platform, os import time, random, math class Entity(object): '''Basic entity object ...

 
5:00 PM
-1
Q: how can i improve on windows 7 admin hack from non admin account?

ATAII have a simple script in cmd batch (very slow) that processes 10 passwords a second and i wonder weather the script could be replicated in advanced language to increase speed of the brute force process The script was educational only and was used to recover a 4 letter password in "reasonable tim...

 
 
7 hours later…
11:31 PM
0
Q: Working with dictionaries

LegatoFor the sake of practice I implemented a simple dictionary and an interface to assign, replace, look up, and redefine its terms. It's simple, but I'd still like to know any way I could make this cleaner and more pythonic. def print_dict(dictionary): for key in dictionary: print("{} : {}"...

 

« first day (626 days earlier)      last day (1562 days later) »