Posts
 
Reputation
Joined
Last Seen
Ranked #138
Strength to Increase Rep
+12
Strength to Decrease Rep
-3
97% Quality Score
Upvotes Received
230
Posts with Upvotes
198
Upvoting Members
109
Downvotes Received
6
Posts with Downvotes
6
Downvoting Members
6
48 Commented Posts
4 Endorsements
Ranked #402
Ranked #83
~555.45K People Reached
About Me

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.
Favorite Tags
Member Avatar for amrutraj

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 …

Member Avatar for musawir_2
0
252
Member Avatar for Shift_

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 …

Member Avatar for TAJUL ISLAM_1
0
10K
Member Avatar for griswolf

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 …

Member Avatar for JamesCherrill
0
300
Member Avatar for ppel123

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 …

Member Avatar for griswolf
0
381
Member Avatar for tjsilver

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 …

Member Avatar for August.Garcia
0
3K
Member Avatar for samaru

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 …

Member Avatar for Fest3er
0
3K
Member Avatar for rahulrajcse

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)

Member Avatar for Adarsh_4
0
6K
Member Avatar for Fo.katia

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 …

Member Avatar for woooee
0
13K
Member Avatar for Tickon

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!

Member Avatar for Janet_4
0
344
Member Avatar for pasta

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 …

Member Avatar for Gribouillis
0
529
Member Avatar for Sudo Bash

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. …

Member Avatar for Yangang
0
4K
Member Avatar for Tenck

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 …

Member Avatar for rproffitt
0
2K
Member Avatar for pwolf

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] …

Member Avatar for Abhinav_4
0
3K
Member Avatar for vegaseat

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 …

Member Avatar for vegaseat
23
33K
Member Avatar for vjcagay
Member Avatar for frankinaround

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. …

Member Avatar for magnus.wootton
0
392
Member Avatar for mappersas

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 …

Member Avatar for Peter_21
0
6K
Member Avatar for lovebird_huby

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:" …

Member Avatar for griswolf
0
180
Member Avatar for tubs1

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 …

Member Avatar for ~s.o.s~
0
263
Member Avatar for iamsmooth

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 …

Member Avatar for griswolf
0
286
Member Avatar for nano72

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 …

Member Avatar for cfajohnson
0
733
Member Avatar for taekgo

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 …

Member Avatar for v.r.t
-4
2K
Member Avatar for Dunkler

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 …

Member Avatar for Ashley_4
0
205
Member Avatar for zeeters

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 …

Member Avatar for zeeters
0
3K
Member Avatar for hughesadam_87

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 …

Member Avatar for hughesadam_87
0
3K
Member Avatar for bigstorm

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 ?

Member Avatar for editorawais
0
240
Member Avatar for blaine.rogers.14

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 …

Member Avatar for blaine.rogers.14
0
245
Member Avatar for Baka_Kuma

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)

Member Avatar for griswolf
0
276
Member Avatar for GrimJack
Member Avatar for aint

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 …

Member Avatar for TrustyTony
0
316