Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Need help Multiprocessing with BeautifulSoup
Post: RE: Need help Multiprocessing with BeautifulSoup
|
ka06059 |
Web Scraping & Web Development |
4 |
5,940 |
Jun-06-2018, 06:04 AM |
|
|
Thread: Python- Help with try: input() except ValueError: Loop code to start of sequence
Post: RE: Python- Help with try: input() except ValueErr...
this should give you the idea on how to loop a code when error occured
while True:
try:
variable = int(input())
break
except:
print("try again") |
|
ka06059 |
General Coding Help |
2 |
6,195 |
Mar-08-2018, 03:12 AM |
|
|
Thread: Multiplication Recursive Solution - What's Going On Inside the Code?
Post: RE: Multiplication Recursive Solution - What's Goi...
code obviously no multiplication(*) involved, only addition (+)and substraction (-). below is how i described step by step whats happening inside the code, hope u get the point
'''
mult(3, 4) = 3 + m... |
|
ka06059 |
General Coding Help |
1 |
2,592 |
Mar-04-2018, 07:11 AM |
|
|
Thread: Savitzky-Golay Filter
Post: RE: Savitzky-Golay Filter
code failed to read & extract infos from text file correctly thats all
assume frequency and amplitude is 1st & 2nd column respectively in data.txt. try replace line 18 to 23 with
filz=open(di... |
|
ka06059 |
Data Science |
3 |
5,352 |
Mar-02-2018, 11:15 AM |
|
|
Thread: Savitzky-Golay Filter
Post: RE: Savitzky-Golay Filter
1st, change line 22&23 to
frequency.append(data[0])
amplitude.append(data[1])does TypeError persist? |
|
ka06059 |
Data Science |
3 |
5,352 |
Mar-02-2018, 02:04 AM |
|
|
Thread: List 3 dimensions reference does not work
Post: RE: List 3 dimensions reference does not work
try
print("Total=", zip(meanHeatFluxValue[0][0:5])[0])
print("Total2=",meanHeatFluxValue[0]) |
|
ka06059 |
General Coding Help |
1 |
2,622 |
Mar-02-2018, 12:35 AM |
|
|
Thread: testing if a character in a string is an intended one
Post: RE: testing if a character in a string is an inten...
did u mean bool(word[:1]) and word[:1] in 'wxyz'? else empty string is returned if word is an empty string.i'll say word[:1] in ('w','x','y','z') better in term of efficiency... less keyword/function ... |
|
ka06059 |
General Coding Help |
2 |
2,622 |
Feb-26-2018, 08:01 AM |
|
|
Thread: Brute Force Pad Lock Guesser
Post: RE: Brute Force Pad Lock Guesser
your while loop wont print out After 1080 guesses... with that !=, try other comparison operator instead? |
|
ka06059 |
General Coding Help |
4 |
3,882 |
Feb-26-2018, 06:48 AM |
|
|
Thread: Why won't this user created function work?
Post: RE: Why won't this user created function work?
your strip() function wont modify the argument, shouldve printed the return value instead |
|
ka06059 |
General Coding Help |
5 |
3,060 |
Feb-26-2018, 06:18 AM |
|
|
Thread: need to alter static picture to video file
Post: RE: need to alter static picture to video file
hi,
what happen if u replace '{0}Start.png' (line17) to '{0}Myvideo2.mp4'? |
|
ka06059 |
General Coding Help |
1 |
2,711 |
Feb-23-2018, 02:11 PM |
|
|
Thread: Thank you from a rookie with a question
Post: RE: Thank you from a rookie with a question
since char is the main instance , i think its more convenient/less confuse to make collection of instances from planet class (not inherited) , then add/append them into char's {} later. did i answer y... |
|
ka06059 |
General Coding Help |
7 |
3,870 |
Feb-19-2018, 12:48 PM |
|
|
Thread: invalid syntax eror
Post: RE: invalid syntax eror
try call OUTPUT method in lowercase... GPIO.output().. any differences? |
|
ka06059 |
General Coding Help |
3 |
3,980 |
Feb-18-2018, 05:41 PM |
|
|
Thread: Thank you from a rookie with a question
Post: RE: Thank you from a rookie with a question
ok,think i'll just stick to your plan... just make sure the planetID attribute on your class is a compound type(list,tuple,dict etc) ... simple isnt? lack of code samples to look at so cud hardly sug... |
|
ka06059 |
General Coding Help |
7 |
3,870 |
Feb-18-2018, 05:09 PM |
|
|
Thread: printing list of random generated rectangles
Post: RE: printing list of random generated rectangles
with __repr__() added like what buran said, all we need to do is to print each item in myList, not the nested list myList itself. |
|
ka06059 |
Homework |
8 |
7,282 |
Feb-18-2018, 02:34 AM |
|
|
Thread: Integer object error
Post: RE: Integer object error
typos in line 12 and 44 ? |
|
ka06059 |
Homework |
2 |
3,690 |
Feb-18-2018, 02:08 AM |
|
|
Thread: Thank you from a rookie with a question
Post: RE: Thank you from a rookie with a question
hi,
1st of all, what is items{} ? did u mean a dictionary variable?
2nd, it seems self.planets[row].planetID is an integer type... correct me if im wrong |
|
ka06059 |
General Coding Help |
7 |
3,870 |
Feb-17-2018, 02:49 PM |
|
|
Thread: printing list of random generated rectangles
Post: RE: printing list of random generated rectangles
1) hint for number of rects...len(myList)
2) loop myList & call methods on each item to print out height and width
print [item.get_width(),item.get_height()] |
|
ka06059 |
Homework |
8 |
7,282 |
Feb-17-2018, 05:29 AM |
|
|
Thread: I give up...Please help.
Post: RE: I give up...Please help.
question asked & answered like 5 years ago...
https://stackoverflow.com/questions/1491...-statement |
|
ka06059 |
Homework |
4 |
3,176 |
Feb-17-2018, 04:05 AM |
|
|
Thread: create function let_to_num()
Post: RE: create function let_to_num()
lets assume no semantic error....
phone_letters = [' ', '', 'ABC', 'DEF', 'GHI', 'JKL', 'MNO', 'PQRS', 'TUV', 'WXYZ']
def let_to_num(): #letter argument removed, input() will do the job
letter=in... |
|
ka06059 |
Homework |
1 |
5,974 |
Feb-15-2018, 04:04 AM |
|
|
Thread: Is This Code Ok? How Can I Avoid Using Global Variables?
Post: RE: Is This Code Ok? How Can I Avoid Using Global ...
thx, will keep in mind on that variabe name
if preserving id is the reason im using global variable...
OP uses global variable , yet the list id changed , same goes to my_list = test()
so either wa... |
|
ka06059 |
General Coding Help |
9 |
5,740 |
Feb-14-2018, 01:47 PM |