- Strength to Increase Rep
- +12
- Strength to Decrease Rep
- -3
- Upvotes Received
- 230
- Posts with Upvotes
- 198
- Upvoting Members
- 109
- Downvotes Received
- 6
- Posts with Downvotes
- 6
- Downvoting Members
- 6
Programmer since 1991 - extensive C++ experience (at Rogue Wave Software) - Java experience (Various web service companies) - recent expertise: Python (Mozilla: Socorro project) - MySql and Postgresql at the 'informed non-expert' level I also do shell…
- Interests
- Reading, contradance, music: Jazz, classical, instrumental folk, ethnic
- PC Specs
- I've always used some flavor of Unix/Linux. Currently OS/X.
I am building a crawler+parser in Python. It has to be run for, like 20 hours. How can I modify the code such that the code execution pauses (before next urllib2.urlopen) when the internet is disconnected, and AUTOMATICALLY resumes with the same variable values, when the internet connection is back … |
|
I got bored of revision last night, and decided to have another go at python! So to refresh my memory and have a bit of a practice I wrote a quick phone-book program. I'd be grateful if y'all could give me some tips and ways to improve on it/make it … |
|
I'm writing a utility that will likely be called by a script that uses `argparse`, but should be useable by any script. The engine object constructor needs a dozen or so parameters to tune its behavior. The question is: What is the best way to allow the caller to send … |
|
Hello everyone, I am working on a project, which corrects user input (reads input stream from keyboard with keyboard module hook) based on some rules. I am trying to find the fastest way to delete and write the corrected word, after a user enters a wrong one. Currently I am … |
|
Hello, I found this code in a thread from about 18 months ago in a post by 'woooee' - [CODE]def func_1(): print " func_1 test" def func_2(): print " func_2 test" def func_3(): print " func_3 test" def func_4(): print " func_4 test" ##---------------------------------------------------------------- ## dictionary = list of function … |
|
Just curious. Hehe, I was thinking about this the other day and now I'm wondering what all you fellow coders out there have done. So what's the HARDEST most complicated program you've written? It doesn't have to be efficient, heck, it can all be spaghetti code. The hardest thing I've … |
|
How to solve monkey and banana problem using best-first search algorithm? Anyone having ideas? I know we have to choose a heuristic function 'h(n)' for performing distance related calculations. But can anyone elaborate this problem ? (algorithm and complexity analysis much appreciated) |
|
Hello guys!! I really need your help, I'm starting to use python and I have to write a program that counts the letters of a sentence entered by the user. This is what I have so far, but I don't know why it is not working.. Please help, thank you … |
|
Hi, I'm looking for a simple way to let people leave comments (without even registering to the website) on my website. Any suggestions how I could do that? Thanks for your help! |
|
|
Hello, i recently learned Pig Latin and how it works (some stupid hard shakespeare language in Python lol) and in CodeAcademy it says "print Pig Latin" in pig latin which i do not know how and i need some help, here is the code i entered for the program on … |
I am writing a game in which I need to know whether or not a user preforms an action in one second or less. I can not use time() because it measures time in seconds. If the user starts the action half-way through a second it would mess with accuracy. … |
|
I'm currently reading a huge Python book. I've just written my first Python code (from this book). It's [CODE]import sys print(sys.platform) print(2 ** 100) x = 'spam!' print(x*8) [/CODE] It works fine and I get the results I want. The only problem I have right now is running it off … |
|
it says the following: Write a function that converts the time to 24hr format. Examples [CODE] >>> time24hr('12:34am') '0034hr' >>> time24hr('12:15pm') '1215hr' [/CODE] so i wrote the following: [CODE] def time24hr(tstr): a = tstr.split(':') am = {'12':'00','1':'01','2':'02','3':'03','4':'04','5':'05','6':'06', '7':'07','8':'08','9':'09','10':'10','11':'11'} pm = {'12':'12','1':'13','2':'14','3':'15','4':'16','5':'17','6':'18', '7':'19','8':'20','9':'21','10':'22','11':'23'} if 'am' in tstr: return am[a[0]] + a[1][:2] … |
|
The idea of this thread is to help the beginning Python programmer with hints and helpful code. Please feel free to contribute! If you have any questions start your own thread! The creators of Python are very active, improving the language all the time. Here is a little of the … |
|
|
Aside from the Assembly Language, what is the most powerful language? |
Yo whats up. I need help building a chat bot in python. I put together a 'special engine' (terms I found while searching the web- special and matrix engine(they translate user input)) basicly the special engine is a bunch of sentences that each have a few responses attached to them. … |
|
I could use some assistance My final project in a python class is to calculate the distance between 2 lat/long points. My code is really just managing the input & output portions, while using existing code (properly credited) in a function to do the actual calculations. I've got it working … |
|
Could someone help me with a Shell Script OR a perl script which could read the below INPUT File and print output in format listed below. The logic I am looking for is to read each block within the asterisk line, then search for "until:". If the date of "until:" … |
|
Hi All, Im new to programming and am trawling through Python as we speak. API & web services type stuff is of real interest to me but not sure how to structure my learning. I know google is my friend but any ideas on how best to structure my learning … |
|
I know there are benchmarking programs that exist, but I've decided that as an exercise, I want to try and create some sort of simple benchmark program to test schedulers of my Raspberry Pi (CFQ, noop, deadline). I have been switching the schedulers and testing some linux commands using time … |
|
i have the following scenario want to run the following script with manadory and optional arguments inside a bash script Manadory options are : filename="" port="" optional arguments type -t [A/B] balances -b bal prices -p ./test filename port -t A -b bal my code i have that won't parse … |
|
Can someone help me with the codes in C language.this is the problem: create a program that will display the factors of a given number.the input must read from a text file and consist of one or more lines,each line contains a number. Sample input from a text file: 6 … |
|
Hey guys, I am new here and have found many answers to my problems from this website so I figured it was time to join. Here's the deal: I have just started trying to learn Python through MIT's OpenCourseWare. I am currently on PS1a (Problem set 1a) and am having … |
|
I have to write a program that takes a word from the user and replaces it if it is in the text file with another word given by the user. Then takes that input and writes it to a new file. The only problem is, I have to do it … |
|
Hi, I am trying to create the most general function possible to test if an object passed into it has mutability or not. With some prior help from pytony, it seemed that the best way to do this is to try to set and attribute. If the attribute can be … |
|
I was looking for advice concerning the compatibility of computer science with mechanical engineering. I have had an interest in mechanical engineering and to me it seems totally interesting to have a degree for both fields. Is this something that is pratical at the professional level ? |
|
I'm trying to make a simple random name generator by pulling first and last names from text files. The problem I'm having is that sometimes the names are chopped off and incomplete with the output and sometimes the names are on two different lines. I would also like to be … |
|
If i not wrong, selection of methodology will decide the data modeling to use.. If i use Agile methodology, can i draw DFD as my data modeling? or I have to use UML? (DFD is much more easier for me) |
|
Hi, I am working on Protein and DNA sequences. When you have a protein sequence it can be translated in to DNA sequence in many ways. A nice way to express this is using regular expression. I would like to create this long regular expression for a protein sequence, and … |