-
Replied To a Post in IDE
For testing and tweaking python code the IPython Notebook works well. It is however not the worlds best editor. Exploring import numpy as np import matplotlib.pyplot as plt is a … -
Replied To a Post in An example of a threading background decorator (Python)
I tested some of the multiprocessing examples in the above article. On a Windows machine they only work if you use the commandline option to run it. In other words … -
Replied To a Post in What are you eating/drinking right now?
Hot chocolate an a piece of lemon cake. -
Replied To a Post in Science
Count the number of sleeping students. If it's more than 50% your teaching is boring. -
Replied To a Post in Windows 10 Tech Preview
My suggestion would be to go with the coming year, so it would be Windows2015. -
Replied To a Post in examples of if statement in python
Python allows conditional expression if y == 1: x = 5 else: x = 3 can written as x = 5 if y == 1 else 3 -
Replied To a Post in Mouse position Tkinter
Double click on the source code and it will highlight. Then copy and paste without the line numbers. -
Replied To a Post in IDE
I installed the WinPython-64bit-3.4.1.1 package on my Windows7 computer and it has several IDE/Editors available: IDLE (Python GUI).exe Spyder.exe SciTE.exe -
Replied To a Post in An example of a threading background decorator (Python)
You can also check: http://pymotw.com/2/multiprocessing/basics.html#importable-target-functions -
Replied To a Post in Convert string to binary
Interesting problem. You might want to test your functions one by one. ''' str_8bits.py represent a string in bytes of 8 bits ''' def string2bits(s): ''' convert a string of … -
Replied To a Post in Reading date from DB issue
Is this part of the Millennium bug? -
Created iPython Notebook
Does anybody have some experience with the iPython notebook? How do you get started? -
Replied To a Post in Random Facts
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 … -
Replied To a Post in examples of if statement in python
In case you don't like multiple if/elif/else statements: ''' switch_case.py a switch/case like statement to replace multiple if/elif/else statements ''' # make input() work with Python2 and 3 try: input … -
Replied To a Post in IDE
WinPython for Python 3.4 is at: http://sourceforge.net/projects/stonebig.u/files/Winpython_3.4/ -
Replied To a Post in Convert decimal number to Hexacedimal
Don't forget that the hexadecimal representation of an integer is a string. -
Replied To a Post in Why do I need headers at all?
A header file makes sense if you take into account future changes to the language. -
Stopped Watching C Program to swap two numbers without using third variable
// Program to show swap of two no’s without using third variable #include<stdio.h> #include<conio.h> void main() { int a, b; printf("\nEnter value for num1 & num2 : "); scanf("%d %d", … -
Began Watching C Program to swap two numbers without using third variable
// Program to show swap of two no’s without using third variable #include<stdio.h> #include<conio.h> void main() { int a, b; printf("\nEnter value for num1 & num2 : "); scanf("%d %d", … -
Replied To a Post in C Program to swap two numbers without using third variable
`a=a+b-(a=b); //Swaping` works for floats -
Replied To a Post in examples of if statement in python
I like this one: w, x, y, z = 1, 2, 3, 4 if w < x < y < z: print("w={} x={} y={} z={}".format(w, x, y, z)) -
Replied To a Post in Hide Private Message in an Image (Python)
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): … -
Replied To a Post in Things I hate about TV shows
According to the many TV crime shows it doesn't pay to be a criminal. -
Replied To a Post in Percentage of loss
As I understand this: purchase_price = 50 selling_price = 100 - 10 gain = 40 -
Replied To a Post in Count seconds in the background (Python)
For higher precision one could use time.perf_counter() which is new in Python 3.3 Oh I see, you may want to peek. -
Replied To a Post in Functors in Python
Here is a typical example: class Accumulator(object): ''' remembers self.n __call__() allows the class instance to be called as a function ''' def __init__(self, n=0): self.n = n def __call__(self, … -
Replied To a Post in Count seconds in the background (Python)
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 … -
Replied To a Post in how to read dictionary names from a text file and display in a text widget
Please post your code as code. -
Replied To a Post in Memorable Quotations
Only when a mosquito's testicles alights you do you realize that violence is not necessarily the solution to every problem. - Lu Tsao "You can make any public figure sound … -
Replied To a Post in The easiest programming language???
Real programmers learn C. It's fast, free, clean code, and easy to learn. http://www.tutorialspoint.com/cprogramming/cprogramming_pdf_version.htm Tool to use: http://www.codeblocks.org/ -
Replied To a Post in As a beginner, what IDE should I use?
I am using the IDLE IDE that comes with Python 3.4 and it works well for my student needs. -
Replied To a Post in Starting Python
Check out this nice Python site: http://getpython3.com/ -
Replied To a Post in What are you eating/drinking right now?
Three stale Christmas cookies from Aunt Edna and a glass of Florida orange juice. -
Replied To a Post in Lets share some awesome programming quotes that keeps you interesting
Eve had an Apple. -
Replied To a Post in Lets share some awesome programming quotes that keeps you interesting
Computer analyst to programmer: "You start coding. I'll go find out what they want."
The End.