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
~1.00M People Reached
About Me

student

Interests
computers biology physics chemistry poetry
PC Specs
Toshiba 655D Notebook
Favorite Tags

851 Posted Topics

Member Avatar for vegaseat
Member Avatar for Reverend Jim
15
13K
Member Avatar for Reverend Jim
Member Avatar for Reverend Jim
10
3K
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
121
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
454
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
419
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
570
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
Member Avatar for vegaseat

Here is another example of IronPython that uses the Windows .NET library (or possibly Linux Mono library) as a GUI toolkit. [code]# IronPython GUI mortgage calculator # forms and components originally created with IronPythonStudio # then modified to run as a single program file # tested with IronPython 2.6 import …

Member Avatar for vegaseat
9
45K
Member Avatar for XP78USER
Member Avatar for RobertHDD
Member Avatar for <M/>
Member Avatar for galileo812
Member Avatar for vegaseat

Sounds interesting! Can the Raspberry produce sounds? Another good video on MOSFETs: https://www.youtube.com/watch?v=Te5YYVZiOKs

Member Avatar for vegaseat
0
668
Member Avatar for RobertHDD
Member Avatar for diafol

Roses are red Violets are blue All so true As my love for you

Member Avatar for joseCRJ
1
548
Member Avatar for Lardmeister

The modern day circus extravagance called the "NFL Super Bowl XLIX" (XLIX is 49 for the many non Roman citizens) will be played on Sunday, February 1, 3:30 PM at the University of Phoenix Stadium in Glendale, Arizona. Other than a spectacular halftime show two football teams, the "New England …

Member Avatar for HiHe
0
463
Member Avatar for Niloofar24
Member Avatar for Niloofar24

A quick search of DaniWeb comes up with this: https://www.daniweb.com/software-development/python/threads/453249/setting-an-image-as-a-background#post1968311

Member Avatar for HiHe
0
50K
Member Avatar for Rohit_17
Member Avatar for Niloofar24

Simply cover both Python2 and Python3: try: # Python2 import Tkinter as tk import ttk except ImportError: # Python3 import tkinter as tk import tkinter.ttk as ttk window = tk.Tk() button = ttk.Button(window, text='hi') button.pack() window.mainloop()

Member Avatar for Gribouillis
0
12K
Member Avatar for Niloofar24

If you want the original text back, then `random` will give you a heartache. You have to look into encryption/decryption. For some basic ideas see: https://www.daniweb.com/software-development/python/threads/459789/coding-for-privacy

Member Avatar for Lardmeister
0
263
Member Avatar for vegaseat

I like the one at: https://www.daniweb.com/software-development/python/code/490225/the-ultimate-caesar-cipher-python

Member Avatar for Lardmeister
3
1K
Member Avatar for RobertHDD

If it would be that easy for the Earth to fall into the Sun it would have happened 1.267 billion years ago.

Member Avatar for RobertHDD
0
874
Member Avatar for Niloofar24
Member Avatar for Niloofar24

With jason `ValueError: Expecting property name enclosed in double quotes` is a royal pain, if you want to save string objects!

Member Avatar for snippsat
0
5K
Member Avatar for alan91
Member Avatar for aliasadullah

Your spiritual representative might be the best person to help you!

Member Avatar for Lardmeister
-1
177

The End.