- Strength to Increase Rep
- +11
- Strength to Decrease Rep
- -2
- Upvotes Received
- 150
- Posts with Upvotes
- 122
- Upvoting Members
- 55
- Downvotes Received
- 8
- Posts with Downvotes
- 8
- Downvoting Members
- 7
407 Posted Topics
Re: Time just keeps on going! Procrestinate now and slow it down a little! | |
| |
![]() | Re: Watched "Dan in Real Life" and "Crazy, Stupid, Love" on DVD at a friend's house. Kind of romantic and funny. Will not drink cocktails with a straw after that. |
Re: You better take a look at: [url]http://www.daniweb.com/forums/post104865-4.html[/url] | |
Re: The integral from -infinity to infinity of e^(-x^2) is sqrt(pi). "Heads, she wins! Tails, you lose!" ¿umop apisdn upside down? | |
Re: Once you learn which statement blocks belong together, then indentation makes more sense. Just think about it. It's all rather logical: # Jason Edgel # Program to find max value def function_max(value1, value2): if value1 > value2: return value1 else: return value2 # get the two integer values value1 = … | |
Re: An application was for employment A program was a TV show A cursor used profanity A keyboard was a piano. Memory was something that you lost with age A CD was a bank account And if you had a 3-inch Floppy You hoped nobody found out. Compress was something you … | |
Re: Here is the modification of vegaseat's code that will work with both Python27 and Python32: # create a sound file in AU format playing a sine wave # of a given frequency, duration and volume # vegaseat code modified to work with Python27 and Python32 from struct import pack from … | |
Re: The tiny calculator is a great start of a fancier calculator. Thank you! | |
Re: A code snippet is an example of working code that brings up an interesting aspect of Python programming. An English language string is given and then tanslated into several other languages. The translated string is printed out. You could apply the concept to one of your programs. You need to … | |
Re: Just survived the "Pineapple Express" that gave large parts of California nine inches of rain. | |
Re: Sometimes you just have to clear the display screen when you work with the Python command shell. This little function does that in both Windows or Linux: [code=python]def clear_screen(): """ clear the screen in the command shell works on windows (nt, xp, Vista) or linux """ import os os.system(['clear','cls'][os.name == … | |
Re: Here is an easy one. Create a list of integers between 1 an 100 that are not divisible by 2 or 3. | |
Re: My dad has a large collection of Benny Hill shows. Sometimes when I visit him we sit down and watch some of them and laugh a lot. Benny Hill is a very funny man! I remember when he tells how he and his buddies drag the dead circus elephant upstairs … | |
Re: Select multiple items from a Tkinter list box: # a simple Tkinter Listbox example # press the shift or ctrl key to select multiple items try: # for Python2 import Tkinter as tk except ImportError: # for Python3 import tkinter as tk def get_list(): """ function to read the listbox … | |
Re: A code snippet to search a folder full of of C code files for a given keyword/searchword. Maybe add some wildcard options. | |
Re: vegaseat, this must be the commented out test version replace **#@Memoize** with **@Memoize** to get the working version | |
Re: Your code tells me that you are using Python2. Where is your start? | |
Re: New words: tup = ('ello World','uello World') print('\n'.join(chr(n)+tup[chr(n)=='Q']for n in range(66, 91))) | |
![]() | Re: Creative answering machine messages: "You have reached the CPX-2000 Voice Blackmail System. Your voice patterns are now being digitally encoded and stored for later use. Once this is done, our computers will be able to use the sound of YOUR voice for literally thousands of illegal and immoral purposes. There … |
Re: The code from james.lu.75491856 (James Lu) can easily be cracked with character frequency analysis, since the most common characters in the English language (or any other language) will still be assigned the same sub characters. | |
Re: My guess is that the folks at Sony wish they used ProtonMail. | |
Re: I gave **enki** a try, but it failed the simple `name = input("Enter your name: ")` test using it on Python34 and Windows7. | |
Re: Don't you feel important with all those emails? | |
Re: Oh wow, I didn't know about the magic dragon's demise. What a tragedy! | |
Re: A slight modification of vegaseat's original code to take care of whole words: ''' re_sub_whole words.py replace whole words in a text using Python module re and a dictionary of key_word:replace_with pairs tested with Python273 ZZ ''' import re def word_replace(text, replace_dict): ''' Replace words in a text that match … | |
Re: "If your bank uses Java applets, you should not use their online banking system at all, especially not under Windows." -- Mike How do you find out if your bank uses Java applets? | |
Re: I am not sure why science has such a bad stigma amongst US teenagers. Maybe because our only heroes are military or sports/entertainers. | |
Re: Windows 10 will have to be successful since about 90% of desktop and laptop computers worldwide use Windows. Apple iOS/OSX follows with 7% and Linux with about 2%. I doubt that many of those Windows users will switch and waste their time learning a different OS. Servers are also dominated … | |
Re: Microsoft is "too big to fail". Just like the big banks, the US taxpayer would have to bail them out. Without Windows the whole governmental bureaucracy would be in jeopardy. | |
Re: I took Lardmeister's code and made a generic wxPython templet that you can then flesh out for cases when you need the user to enter data, press a button to process the data, and then show the result in an output area: [code=python]# basic wx.Frame with panel (needed for sizers), … | |
Re: http://www.daniweb.com/software-development/python/threads/20774/starting-python/19#post2091746 For me Eclipse is woefully sluggish and bloated, since it is written in Java. Python comes in two major versions and it is nice to be able to run both versions from the same IDE. | |
Re: ''' filename_list_given_dir1.py use module glob to list all the filenames of .jpg files or any extension(s) you specify in a given directory ''' import glob import os # all files (split off file names) in a given directory directory = "C:/Temp/*.jpg" # this would give you all files #directory = … | |
Re: You might have to update/refresh self.getControl | |
Re: To get more information on **par** you can do this: # Importing support.py module import support support.print_func("Zara") # to get more insight ... import inspect print(inspect.getcallargs(support.print_func, "Zara")) ''' result ... Hello : Zara {'par': 'Zara'} ''' | |
Re: Actually using string formatting would be the most pythonic way: num1 = int(raw_input("Enter an integer")) num2 = int(raw_input("Enter a second integer")) num3 = int(raw_input("Enter a third integer")) ans = num1 + num2 + num3 print("The sum of the 3 integers entered is {}".format(ans)) | |
Re: One way would be to use the function's documentation string to do this. | |
Re: The tourist trap (the place is full of cars) of Virginia City Nevada. This homely looking place sprang up as a boomtown on top of the Comstock Lode, the first major silver deposit discovered in the United States, in 1859. It was once the major town in the wild west. … | |
Re: Don't forget PySide (QT based) http://srinikom.github.io/pyside-docs/contents.html Note: **wxPython** is a bitch to work with on Python3 not sure what those folks are thinking | |
Re: Typical example: ''' tk_toplevel_window101.py create a toplevel popup window that overlaps the root window ''' try: # Python2 import Tkinter as tk except ImportError: # Python3 import tkinter as tk def popup_window(): window2 = tk.Toplevel(root) # give window2 a position to overlap the root window window2.geometry("200x200+{}+{}".format(150, 150)) window2.title("window2") window2['bg'] = … | |
Re: From last years vacation on Lake Michigan.  | |
Re: I am somewhat confused, are you talking about a list of (r, g, b) tuples? If you don't need the high speed of numpy, go with those. | |
Re: For sheer ease of use the HP Chromebook 11 is handy. | |
Re: Sunny and warm in the Southwest (CalNevAri). Very cold and snowy in the Northeast. I heard there will be a windchill of -70 degF in Minnesota! That means your spit will freeze before it hits the ground. | |
Challenge: change the code so that only .py and .txt files of a given directory are listed. ''' filename_list_given_dir1.py use module glob to list all the filenames of .jpg files or any extension(s) you specify in a given directory ''' import glob import os # all files (split off file … | |
Re: It seems that Java is being updated just about every time I turn my Pc on. Is it really that full of bugs? | |
Re: Module math also has: math.degrees(x) converts angle x from radians to degrees. math.radians(x) converts angle x from degrees to radians. You can get a good free online book here: http://www.greenteapress.com/thinkpython/ |
The End.