Posts
 
Reputation
Joined
Last Seen
Ranked #98
Strength to Increase Rep
+13
Strength to Decrease Rep
-3
85% Quality Score
Upvotes Received
227
Posts with Upvotes
180
Upvoting Members
85
Downvotes Received
37
Posts with Downvotes
31
Downvoting Members
20
102 Commented Posts
~998.74K People Reached
About Me

student

Interests
computers biology physics chemistry poetry
PC Specs
Toshiba 655D Notebook
Favorite Tags
python x 348
c x 20
gui x 16
c# x 10
Member Avatar for vegaseat
Member Avatar for Reverend Jim
15
13K
Member Avatar for Reverend Jim
Member Avatar for Duki

Baked chicken with corn bread, beans and mashers. Love those mashed potatoes! Too young to drink ethanol! O.J. will do.

Member Avatar for Dani
22
17K
Member Avatar for Lardmeister

What kind of places or situations to you find the people to be best friends with? Is there a good reason why one place works better than others? A small poll of suggestion is attached. I should have added Sports, the Internet and Travel to the poll.

Member Avatar for Dani
0
120
Member Avatar for LastMitch
Member Avatar for LoanHensley
6
6K
Member Avatar for jopeto

[QUOTE=lukescp;1104415]I tried what you have above; it seems the vars() statement in line 3 requires quotes around 'food': [code] vars()['food'] = 123 [/code] Otherwise works perfect.[/QUOTE] That is fine if you want to do this: [code]vars()['food'] = 123 print food # --> 123 [/code]The original code wanted to print bread …

Member Avatar for Rayalacheruvu
1
102K
Member Avatar for tony75

The GUI toolkit Pyside is a package and should be in folder side_packages. It is a "third party" package that needs to be installed by you.

Member Avatar for Andreas_7
0
22K
Member Avatar for sravan953

Assuming you are using Python2, you could do it like this: [code=python]print("Enter zero for the value you are looking for:") s = d = t = 0 while True: s = input("Speed (miles/hour): ") d = input("Distance (miles): ") t = input("Time (hours): ") if s == 0: s = …

Member Avatar for Smartfitness33
1
14K
Member Avatar for Reverend Jim

Over the past 20 years in Switzerland, health costs have grown 80 percent and insurance premiums 125 percent. However voters this Sunday overwhelmingly voted down a switch from private insurance to a mandatory government run insurance program. Swiss net salary is 4,950 Swiss francs (4,100 euros, $5,268), health premiums are …

Member Avatar for John_smith
10
21K
Member Avatar for vegaseat

gmorcan, using Python module timeit and a rather small prime number like 999979, your function is 2700 times slower than vegaseat's function.

Member Avatar for amir_19
3
24K
Member Avatar for vegaseat

I downloaded the encode picture from above and applied this little code: ''' PIL_HideText_decode.py get the hidden text back from an encoded image ''' from PIL import Image def decode_image(img): """ check the red portion of an image (r, g, b) tuple for hidden message characters (ASCII values) """ width, …

Member Avatar for JamesCherrill
5
10K
Member Avatar for HiHe

Vegaseat's code more elegant: ''' tk_button_toggle6.py using itertools.cycle() to create a Tkinter toggle button ''' import itertools try: # Python2 import Tkinter as tk except ImportError: # Python3 import tkinter as tk def toggle(icycle=itertools.cycle([False, True])): state = next(icycle) t_btn['text'] = str(state) root = tk.Tk() t_btn = tk.Button(text="True", width=12, command=toggle) t_btn.pack(pady=5) …

Member Avatar for martineau
1
21K
Member Avatar for vegaseat
Member Avatar for woooee
4
25K
Member Avatar for Ancient Dragon

The biggest loser at our weight-loss club was an old lady. We asked her how she did it. "Easy," she said. "Every night I take my teeth out three hours earlier."

Member Avatar for jkon
4
4K
Member Avatar for bharathsharma

To get this to go without the GUI freezing up in some loop you have to use threading. See: http://wiki.wxpython.org/LongRunningTasks?highlight=%28start%29|%28stop%29

Member Avatar for gdtraveller
0
448
Member Avatar for inkcoder

Don't forget this great sticky: http://www.daniweb.com/software-development/python/threads/32007/projects-for-the-beginner

Member Avatar for Gabriel_9
1
49K
Member Avatar for vegaseat

Why bother with a class? from datetime import datetime as dt # make this work with Python2 or Python3 try: input = raw_input except: pass # start the count start = dt.now() # test the counter with a key board response time # or put your own code you want …

Member Avatar for Viresh_2
0
9K
Member Avatar for vegaseat
Member Avatar for pyguy25

Sounds interesting, so i put it all together: [code]message = "just a simple test!" key = 11 coded_message = "" for ch in message: code_val = ord(ch) + key if ch.isalpha(): if code_val > ord('z'): code_val -= ord('z') - ord('a') coded_message = coded_message + chr(code_val) else: coded_message = coded_message + …

Member Avatar for FaZeSkwlSh00ter
0
7K
Member Avatar for zachattack05
Member Avatar for Philip_5

Generally: import wx class MyEvents(object): """separate events into this class""" def __init__(self, parent): self = parent def button1Click(self, event): self.label.SetLabel("Button1 left clicked") def button2Click(self, event): self.label.SetLabel("Button2 left clicked!!!") class MyFrame(wx.Frame, MyEvents): """MyFrame inherits wx.Frame and MyEvents""" def __init__(self, parent, mytitle, mysize): wx.Frame.__init__(self, parent, wx.ID_ANY, mytitle, size=mysize) # create buttons and …

Member Avatar for Lardmeister
0
415
Member Avatar for Bhavesh Nariya
Member Avatar for vegaseat

New York city is expecting up to 2 feet of snow on Monday. That's tough on a big city and all the commuters.

Member Avatar for ddanbe
3
569
Member Avatar for vegaseat

I think open source implies that Swift will be developed by and for the Linux community.

Member Avatar for Lardmeister
2
509
Member Avatar for vegaseat

An interesting play with iterators and generators: [code]it = iter(range(9)) # note iterator it depletes within zip() mylist = list(zip(it, it, it)) print(mylist) '''my output --> [(0, 1, 2), (3, 4, 5), (6, 7, 8)] ''' [/code]I tested this with Python26.

Member Avatar for vegaseat
23
34K
Member Avatar for vegaseat

If you are interested in mathematics, there is a large number of projects you can participate in at: [URL]http://www.projecteuler.net/[/URL] You can use any language, but Python seems to be popular. Girls, don't be scared, mathematics is not just for the guys!

Member Avatar for vegaseat
20
18K
Member Avatar for vegaseat

Interesting this Python code. I highlighted the code and pasted it into IDLE editor and it runs fine. I am using Python 2.5.

Member Avatar for vegaseat
2
3K
Member Avatar for vegaseat
Member Avatar for JamesCherrill

Some good project ideas are here: http://www.daniweb.com/software-development/python/threads/32007/projects-for-the-beginner

Member Avatar for Alok_5
20
3K
Member Avatar for tobyITguy