Posts
 
Reputation
Joined
Last Seen
Ranked #287
Strength to Increase Rep
+9
Strength to Decrease Rep
-2
97% Quality Score
Upvotes Received
44
Posts with Upvotes
36
Upvoting Members
22
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
19 Commented Posts
5 Endorsements
Ranked #340
Ranked #284
~188.49K People Reached
Favorite Forums
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
261
Member Avatar for aaron.breen.50

Alright i am totaly new to python and could really use some help. I need a program that will run and starting at "2:00" count down all the way to "0:00". The left side being minutes and the right side being seconds. so 120 seconds total. I have no idea …

Member Avatar for rproffitt
0
8K
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
34K
Member Avatar for Shaji_1

I am trying to change the first character of each word in a list to upper case using Python 2.7. I am able to change the entire list to lower case, but I am not getting what I want - i.e the first character of each word to be upper …

Member Avatar for TrustyTony
0
304
Member Avatar for Miyuki

I want to use Python to make something similar to the fc command found in MS-DOS and Windows. How would I handle opening 2+ files and reading them a byte at a time for comparing?

Member Avatar for Jack_9
0
497
Member Avatar for iuessele

I am a total newbie to programming. I was hoping to learn how to write a program that prints out a string representation of a random card from a deck of playing cards. The programs should use either “A”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “10”, “J”, “Q”, …

Member Avatar for alexander.selin.7
0
13K
Member Avatar for akerman

Hello, So I have been trying to produce an algorithm for unsymmetric matrices which finds the smallest magnitude eigen value. I have found this: ![cfafcf24b5563ebb8aad4395c3c90ff0](/attachments/large/2/cfafcf24b5563ebb8aad4395c3c90ff0.png "cfafcf24b5563ebb8aad4395c3c90ff0") ![cfafcf24b5563ebb8aad4395c3c90ff0](/attachments/small/2/cfafcf24b5563ebb8aad4395c3c90ff0.png) However, I still don't know how to implement it in python. Can someone help out or provide psudocode/code ?

Member Avatar for BearofNH
0
161
Member Avatar for MrNoobieCoder

import random guessesTaken = 0 my_name = input("Hello, What is your name? ") difficulty = input("Well, "+ my_name + ". What dificulty would you like ? easy medium or hard? " if difficulty == easy number = random.randint (1,20) print ("Okay, " + my_name + ". I am thinking of …

Member Avatar for Kai_Chang
0
6K
Member Avatar for bnn678

a1 = 1 a2 = 2 a3 = 3 ....... a10000 = 10000 So, I want to create a function that will autoassign names to numbers. In the the code above, for x in range (desired range): a(quantity of x) = x how do i get my code to call …

Member Avatar for Gribouillis
0
208
Member Avatar for tony75

Hi I have simple python script that open a TCP socket,connect to the SMTP servert and issue a VRFY command. When I run the script I got error,I wonder How can I fix error? #!/usr/bin/python import socket import sys if len(sys.argv) != 2: print "Usage: vrfy.py <username>" sys.exit(0) # Create …

Member Avatar for tony75
0
1K
Member Avatar for marium.aslam.18

“Guess the number” game One of the simplest two-player games is “Guess the number”. The first player thinks of a secret number in some known range while the second player attempts to guess the number. After each guess, the first player answers either “Higher”, “Lower” or “Correct!” depending on whether …

Member Avatar for BearofNH
0
278
Member Avatar for SumTingWong59

I am having difficulty with a program in my CS class right now and I am wondering if you guys could help. Basically, I need to find the length/width (should be equal) of the 4 corners(I'll call this variable 'x') of a piece of cardboard, to cut them out to …

Member Avatar for SumTingWong59
0
144
Member Avatar for Guillermo_1

import xlrd import re workbook=xlrd.open_workbook('planningSpreadSheet_20140120T124023_20140203-20140209.xls') sh=workbook.sheet_by_index(0) palabras=str(sh) for col in range(sh.ncols): for i in range(sh.nrows): caca=sh.row_values(i) print(caca) Hi , i try to do a seeker, read an xls file ,and find a word,(input()),and show all the content of the row

Member Avatar for BearofNH
0
183
Member Avatar for speen

Hello there? I am extremely new to python, and am trying to attend the lectures about hashing. Please cd you ceck the following code and error, and just tell me how to make it work. Please I am not that advanced user of python. I am very basic. def create(smallest, …

Member Avatar for speen
0
232
Member Avatar for turbo22

Ok, i've gotten pretty far on a code but keep getting an error. I know it's something simple but i just can't put my finger on it please help. import os import pickle class Student(object): def _init_(self): self._students = {} def addStudent(self, name): self._students[name] = [0, 0, 0] def editStuData(self): …

Member Avatar for BearofNH
0
1K
Member Avatar for johnny_disco

Hi All, I am trying to scrape a piece of HTML similar to the below where I want beautiful soup to return something like: List Price, £28,410 Body Style, Open Car etc etc. I thought if I did this: soup = BeautifulSoup(html_doc) tag = soup.find_all('tr') tag_td = tag[0].find('td') tag_b = …

Member Avatar for BearofNH
0
224
Member Avatar for robert99x

Programming Python 3rd Edition by Mark Lutz has example code (below) where a variable seems to be assigned with options ("or") but what the criteria for selecting the options is not clear. The explanation is almost non-existent but I think this is to do with feeding in a variable number …

Member Avatar for robert99x
0
289
Member Avatar for John_47

Hello, i'm currently trying to write some code to find the integral of exp(-x*x). I have been given code for one trapezium rule (trap0) which is imperfect, and a second set of code for a new trapezium rule (trap1), which uses the old code and some new conditions to 'perfect' …

Member Avatar for John_47
0
213
Member Avatar for HiHe
Member Avatar for glez_b

I have a long list of data structured in the following way Date , Time, Temperature, Moisture, Accumulated precipitation 1/01/2011, 00:00, 23, 50, 2, 1/01/2011, 00:15, 22, 45, 1, 1/01/2011, 00:30, 20, 39, 0, 1/01/2011, 01:00, 25, 34, 0, 1/01/2011, 01:15, 23, 50, 0, . . . . 1/01/2011, 23:45, …

Member Avatar for glez_b
0
3K
Member Avatar for matthew.s.thomas.14

Implement function ion() that takes a string as input and returns True if the entered string ends in 'ion' and false otherwise. ion('congratulation') True ion('marathon') False How can I start this off and Finish it?

Member Avatar for TrustyTony
0
127
Member Avatar for matthew.s.thomas.14

I am looking for help in how to implement function avg() that takes as input a list that contains lists of numbers. Each number list represents the grades a particular student received for a course. List for a class of four students. ([95,92,86,87],[66,54,],[89,72,100],[33,0,0]) the function avg should print one per …

Member Avatar for BearofNH
0
381
Member Avatar for Subhradeep

I am using Debian Linux and Python 2.7 with PIL. I want to capture an image from a webcam and store it in a file. What are the ways in which this can be done? Also,I want to covert the captured image for modification using Scipy. What is the procedure.for …

Member Avatar for Gribouillis
0
2K
Member Avatar for bright.silva

i am a beginner in python and still got a whole lot to learn.i have this exercise that seem too difficult to crack. check it out and see if you can help. here is a simple data set1=["01","34","29","16"] set2=["45","88","19","17"] set3=["56","21","57","20"] set4=["29","42","89","08"] set5=["19","45","56","20"] set6=["85","56","33","78"] using the data above, write this program …

Member Avatar for bright.silva
0
263
Member Avatar for hmx7

A GPA, or Grade point Average, is calculated by summing the grade points earned in a student’s courses and then dividing by the total units. The grade points for an individual course are calculated by multiplying the units for that course by the appropriate factor depending upon the grade received: …

Member Avatar for hmx7
0
784
Member Avatar for vegaseat
Member Avatar for vegaseat
2
668
Member Avatar for farmwife

Here is a plan for a (relatively) random numeric dictionary I've put together. I'm hoping that people can help me refine the plan so that I can start incremental coding: #! usr/bin/env python # creates a random dictionary from random import randint # user inputs maximum length of dictionary # …

Member Avatar for vegaseat
0
214
Member Avatar for Jacklittle01

I saw this code on stack overflow def writeProfile(profileName, profileData): """ pickle user profile data """ os.chdir(PROFILE_DIR) fileName = profileName + ".dat" f = open(fileName, "wb") pickle.dump(profileData, f) f.close() os.chdir("..") It is for saving progress under the pickle module. I don't see a way to save variables. How would I …

Member Avatar for Gribouillis
0
242
Member Avatar for vegaseat
Member Avatar for حسن_3

Hi to all I'm newbie in the python and this is my first program in it. I have created a board that it LEDs can on/off like the checkbox. and a Timeline that has 20 Frames for controlling the animation (Frames are like the RadioButton). Can you help me : …

Member Avatar for حسن_3
0
312