- Strength to Increase Rep
- +14
- Strength to Decrease Rep
- -3
- Upvotes Received
- 264
- Posts with Upvotes
- 214
- Upvoting Members
- 81
- Downvotes Received
- 45
- Posts with Downvotes
- 17
- Downvoting Members
- 24
- Interests
- Cooking
- PC Specs
- Compaq
Re: Salmon with basil and orzo pasta, yum yum! To that I drink a nice glass of California red wine. M&Ms, candy from the Spanish Civil War, how original! | |
Re: If you want friends that match your narrow mind, I would find them at my church! | |
Re: Those who know how to win are more numerous than those who know how to make proper use of their victories. --- Polybius | |
Re: More information on Unununium Python based OS, also kindly known as UUU, can be had at: [url]http://unununium.org/introduction[/url] | |
Re: Linux sounds more and more interesting. Seems to have a lot of nice tools. | |
| Re: @sravan953 also remember that in Python2 ' /' is an integer division by default. For instance 12/15 gives you a zero. This has changed in Python3. |
Re: Why are you using the C snippets for a C++ snippet? There is a difference between the two old languages. | |
Re: You can use the canvas image as a background to your turtle drawings: ''' turtle_Tk_Canvas_Image_url.py display a GIF image obtained from an internet web page on a Tkinter canvas, then use the canvas for some turtle drawing modified Vegaseat code ''' import io import base64 import turtle try: # Python2 … | |
Re: My cat took an interest in the keyboard after I left the room for a moment. It thoroughly messed up my Internet Explorer settings and took a while to fix. | |
Re: My feet are smelling My nose is running I park in my driveway I drive on a parkway | |
Re: A typical application of what you want to achieve is this book page indexing program: [code=python]# create a page index using a word:pagenumber dictionary def do_index(keyword, pagenumber, page_index): """ if keyword exists add pagenumber to that particular list otherwise make new entry to index dictionary """ page_index.setdefault(keyword, []).append(pagenumber) return page_index … | |
| |
Re: Module subprocess, specifically subprocess.Popen(), has a wait() method. Here is a typical example: [code=python]# using module subprocess to pass arguments to and from an # external program: import subprocess # put in the corresponding strings for # "mycmd" --> external program name # "myarg" --> arg for external program # … | |
Re: A few reasons to use Python classes come to mind, one is to group functions (in a class they are called methods) that belong together. This is sort of what modules do. However, classes have a leg up on modules, they have a way to inherit other classes and establish … | |
Re: In general a hashing algorithm turns a hashable object (immutable) into an integer value that is much faster to search. | |
Re: You can use a global variable within a function by prefixing it with the word "global". Here is an example: [code]# keep track of how many times a function has been accessed # using a global variable, somewhat frowned upon def counter1(): global count # your regular code here count … | |
Re: An electronic version of an Index Card File would be interesting, like a collection of recipes for cooking. You could search quickly using a limited set of keywords/titles, or slower using the general text of each card. If you want to be fancy, you can add a feature to cook … | |
Re: I have played with Python a little and find it refreshing compared to C++. Gone is the long list of header files and references to obscure libraries in the make/batch file for the compiler. Also gone are the "gotchya" memory leaks. I have to get used to the fact that … | |
Re: The first problem could be kind of easy: [code]n = 11 for odd_number in range(1, n+1, 2): print( odd_number ) """ 1 3 5 7 9 11 """ [/code] | |
Re: There is no egg in eggplant. An alarm goes off by going on. When the stars are out, they are visible, but when the lights are out, they are invisible. | |
Re: Swell job! Are the driving skills of the software only as good as the skills of the programmer? | |
| Re: I always thought that typing := was one of the less desirable things of Pascal, now GO has picked it up. Otherwise the language has some nice new approaches, some seem to come from Python. |
Re: Data mining might be a good speciality. | |
Re: I got PyQT4 istalled and working on my Vista computer. Here is an example of my first program: [code=python]# display a bunch of random circles using PyQT4 import random import sys # pray for minimal namespace conflicts from PyQt4.QtCore import * from PyQt4.QtGui import * class DrawPoints(QWidget): def __init__(self, parent=None): … | |
Re: Very nice! Just what I was looking for. | |
Re: F = 9 * C/5 + 32 Is the same as F = (9/5) * C + 32 With Python2 / is integer division, so avoid it by using 5.0 instead of 5 |