Only few very large atoms can release energy when splitting into smaller ones. Most commonly certain isotopes of uranium and plutonium.
Only few very large atoms can release energy when splitting into smaller ones. Most commonly certain isotopes of uranium and plutonium.
Theobroma cacao, the tree from which seeds chocolate is made has the highest number of insect pests of any tree species.
The average chocolate bar contains at least 6 insect legs. Bon appétit!
Proof that [::-1] works for spelling string in reverse:
s1 = "racecar"
s2 = "kayak"
print s1, s1[::-1]
print s2, s2[::-1]
:)
Yes, all the stupid laws that are passed and little by little everything is taken away. Can't smoke here, can't drink there, can't cook your burgers like that, this is the meat section and that section is for vegetarians only, your meat is rare so you need to eat outside. It's almost time for another tea party!!!
It takes government by the people for the people, not government by lobbyist for lobbyists.
McCain needs your vote!
when i say hydrogen i mean what is actually deuterium, but when you say hydrogen you mean what? a single proton?
Right, that's all the sun has to go on! Conditions have to be nasty enough to make some neutrons.
The most common universal product of fusion is actually iron.
Like to see tennis, everything else is too boring!
So what if they can swim, walk, run, jump, throw, bike, spit, row the distance of 50 meters, 100 meters, 200 meters, 500 meters, 1000 meters, 10000 meters and so on. Also, what is this thing separating the boys from the girls all the time?
Manhattan! Everything else is the boonies!
really? thats amazing but im not familiar with fusion. I would assume that for say 500 000 Hydrogen atoms there would be 250 000 He atoms? Ya that would make sense.
so Fusion consumes that much energy hey? Nice! so that would mean that the fission of the same amount of He would release en aequal amount of energy?
You are talking 2 deuterium atoms for each helium atom. The sun has mostly hydrogen available, so it takes 4 hydrogen atoms for each helium atom. Not quite sure if man could ever copy that process and conditions!
The sun produces 108,000,000,000,000,000,000 kwh of energy every second!
The typical 50 hp all electric car with very efficient battery and electric motor would spent about $0.30 per mile, if each kwh of electricity costs $0.10.
1 g of hydrogen fused to helium will give you 174,000 kilowatt-hours of energy.
Let's assume average house consumes 30 kilowatt-hours/day.
Functions sort() and sorted() reside in the core of the Python interpreter which is written in C and compiled. On Windows the Python core is for instance in the dynamic link library called python25.dll which the Python installer put into directory C:\WINDOWS\system32
Here is example of the rather slow but classic bubble sort for integer list:
import random
def make_list(num_elements):
"""
make list of num_elements random integers between 0 and 1000
"""
return [random.randint(0, 1000) for i in xrange(num_elements)]
def bubble_sort(list1):
# make true copy of list1 so there is no feedback
list1 = list(list1)
for i in xrange(len(list1) - 1, 0, -1):
for j in xrange(1, i + 1):
if list1[j - 1] > list1[j]:
temp = list1[j - 1]
list1[j - 1] = list1[j]
list1[j] = temp
return list1
list2 = make_list(100)
print list2 # unsorted
print "-"*70
list3 = bubble_sort(list2)
print list3 # now sorted
Hope that helps.
The wx.lib.filebrowsebutton.FileBrowseButton() makes it easy to select/browse one file and show or play it:
# exploring wxPython's
# wx.lib.filebrowsebutton.FileBrowseButton()
# use it to get wave sound file and play it
import wx
import wx.lib.filebrowsebutton
class MyFrame(wx.Frame):
def __init__(self, parent, mytitle):
wx.Frame.__init__(self, parent, wx.ID_ANY, mytitle, size=(500,100))
self.SetBackgroundColour("green")
panel = wx.Panel(self)
self.fbb = wx.lib.filebrowsebutton.FileBrowseButton(panel,
labelText="Selected WAVE file:", fileMask="*.wav")
play_button = wx.Button(panel, wx.ID_ANY, ">> Play")
self.Bind(wx.EVT_BUTTON, self.onPlay, play_button)
# setup the layout with sizers
hsizer = wx.BoxSizer(wx.HORIZONTAL)
hsizer.Add(self.fbb, 1, wx.ALIGN_CENTER_VERTICAL)
hsizer.Add(play_button, 0, wx.ALIGN_CENTER_VERTICAL)
# create border space
border = wx.BoxSizer(wx.VERTICAL)
border.Add(hsizer, 0, wx.EXPAND|wx.ALL, 15)
panel.SetSizer(border)
def onPlay(self, evt):
filename = self.fbb.GetValue()
self.sound = wx.Sound(filename)
# error handling ...
if self.sound.IsOk():
self.sound.Play(wx.SOUND_ASYNC)
else:
wx.MessageBox("Missing or invalid sound file", "Error")
app = wx.App(True)
# create the MyFrame instance and show the frame
caption = "wx.lib.filebrowsebutton.FileBrowseButton()"
MyFrame(None, caption).Show(True)
app.MainLoop()
I was working with patient information and came up with this list of instances that made it relatively easy to find specific information:
# creating and processing one list of class objects
import operator
class Patient(object):
"""__init__() functions as the class constructor"""
def __init__(self, fname=None, sname=None, id=None):
self.fname = fname
self.sname = sname
self.id = id
def __repr__(self):
"""
if you print the instance of the class this format will display
"""
# use the class dictionary iterator
class_dictiter = self.__dict__.iteritems()
return " ".join(["%s: %s" % (k,v) for k,v in class_dictiter])
# make list of class Patient instances
# instance --> surname, firstname, id
patientList = []
patientList.append(Patient("Elmer", "Fudd", "1234"))
patientList.append(Patient("Donald", "Duck", "1235"))
patientList.append(Patient("Mighty", "Mouse", "1236"))
patientList.append(Patient("Fargo", "Ferkel", "1237"))
print "Show/test the whole patientList via __repr__ overload:"
print patientList
print '-'*60
print "Just one instance in the list via __repr__ overload:"
print patientList[3]
print '-'*60
print "Show one particular item:"
print patientList[0].sname
print '-'*60
print "Sort the patientList in place by sname ..."
patientList.sort(key=operator.attrgetter('sname'))
print
print "... then show all patients info in one nice table:"
for patient in patientList:
print "sname: %-20s fname= %-20s id=%s" % \
(patient.sname, patient.fname, patient.id)
"""
my output -->
Show/test the whole patientList via __repr__ overload:
[sname: Fudd id: 1234 fname: Elmer, sname: Duck id: 1235 fname: Donald,
sname: Mouse id: 1236 fname: Mighty, sname: Ferkel id: 1237 fname: Fargo]
------------------------------------------------------------
Just one instance in the list via __repr__ overload:
sname: Ferkel id: 1237 fname: Fargo
------------------------------------------------------------
Show one particular item:
Fudd
------------------------------------------------------------ …
In an ugly and unhappy world even the richest man can purchase nothing but ugliness and unhappiness.
-- George Bernard Shaw
How many women does it take to screw in one light bulb?
For me it would be the "Remote Control Spitfire Mk IIB" so I could bomb some of the folks in my neighborhood, that I suspect of producing WMDs, into long lasting submission.
I wonder what alternative energy source Georgia has to equal the energy output of a coal fired power station. Maybe they could harness all that extra hot air some of their politicos send out.
I am sure that Georgia's huge agriculture and forestry consumes more corbondioxide than is produced in the state. Something these scientifically uneducated judges and environmental whiners should consider.
Congratulations Snee! God willing, I should reach this important milestone by year's end.
"No diet will remove all the fat from your body because the brain is entirely fat. Without a brain you might look good, but all you could do is run for public office."
-- Covert Bailey
Why is the fear of long words called hippopotomonstrosesquippedaliophobia?
Just consumed three perch fillets, white asparagus and some 1999 vintage red wine.
I agree, Other's avatars are pretty artistic in their own right. The en brosse styling is cool. Colour discretion could be one bit more together.
You may have to fight a battle more than once to win it.
Genius is one per cent inspiration, ninety-nine per cent perspiration.
(Thomas Alva Edison)
A 94-year-old guy was arrested in a vice sweep for soliciting a hooker.
This is what happens when Medicare covers Viagra.
Does chewing gum lose its flavor on the bed post overnight?
McCain: "Obama will raise your taxes, I won't."
Similar example of lameness.
This comes from the person who hides behind somebody elses blog?
Bangers and mash, and one really tall mug of brown ale.
The strongest might weaken and the wisest might err.
Shows you how to drag one of wxPython's widgets with the mouse pointer:
# use mouse to drag the wx.Panel() widget
# wx.Panel(parent, id, pos, size, style)
import wx
class MyFrame(wx.Frame):
def __init__(self, parent, mytitle, mysize):
wx.Frame.__init__(self, parent, wx.ID_ANY, mytitle, size=mysize)
# needed for better control
panel = wx.Panel(self)
panel.SetBackgroundColour("green")
self.drag_panel = wx.Panel(panel, size=(230, 100))
self.drag_panel.SetBackgroundColour("yellow")
text1 = "point the mouse on the yellow panel \n"
text2 = "press the left mouse button and drag it"
wx.StaticText(panel, wx.ID_ANY,
text1+text2, pos=(10, 150))
# bind mouse events to some actions
self.drag_panel.Bind(wx.EVT_LEFT_DOWN, self.on_left_down)
self.drag_panel.Bind(wx.EVT_LEFT_UP, self.on_left_up)
self.drag_panel.Bind(wx.EVT_MOTION, self.on_motion)
def on_left_down(self, event):
self.drag_panel.CaptureMouse()
x, y = self.drag_panel.ClientToScreen(event.GetPosition())
originx, originy = self.drag_panel.GetPosition()
dx = x - originx
dy = y - originy
self.mp_delta = ((dx, dy))
def on_left_up(self, event):
if self.drag_panel.HasCapture():
self.drag_panel.ReleaseMouse()
def on_motion(self, event):
if event.Dragging() and event.LeftIsDown():
x, y = self.drag_panel.ClientToScreen(event.GetPosition())
move_xy = (x - self.mp_delta[0], y - self.mp_delta[1])
self.drag_panel.Move(move_xy)
app = wx.App()
# create the MyFrame instance and show the frame
MyFrame(None, 'drag the panel with the mouse', (400, 300)).Show()
app.MainLoop()
The Pope is the closest human to God.
If at first you don't succeed, destroy all evidence that you tried.
President Bush said that after he retires he wants to write one book.
Bush said he's not sure if it will be about politics or about his personal life, but he is sure it will be great pop-up book.
It may be the cock that crows, but it is the hen that lays the eggs.
The uglier a man's legs are, the better he plays golf!
Here is the competition:
NOTICE:
PLEASE NOTICE!!!!!You may have noticed the increased amount of notices for you
to notice. And, we have noticed that some of our notices have
not been noticed. This is very noticeable. It has been noticed
that the responses to the notices have been noticeably
unnoticeable. Therefore, this notice is to remind you to notice
the notices and to respond to the notices because we do not want
the notices to go unnoticed.From the Notice Committee for Noticing Notices
When she told him he was average, was she just being mean?
"Never trust a computer you can't throw out of a window" -- Apple cofounder Steve Wozniak as published in The Reader's Digest, August 2008, p. 119.
Do you have to close Windows first before you throw the computer out?
I do not fear computers. I fear the lack of them.
(Isaac Asimov)
Kentucky Fried Chicken and coleslaw is darn good stuff.
Hard to believe that the history of Windows is that complex.
Oh sweet Jesus, I had one too many beers. I read "Global Warning" and actually looked at this! I am sorry!
Very funny Ene! Thanks for warming up this somewhat old and cold argument.
Why isn't there mouse flavored cat food?
A woman is on her deathbed, with her husband at her side. She keeps trying to tell him something, but he keeps saying, "Shhhh, don't worry now darling, just rest."
"But honey," she whispers, "I need to make a confession before I die; I slept with your brother, your best friend, and your father."
"Don't worry about it, sweety," replies her husband, as he wipes the tears from her cheek, "I know. Why do you think I poisoned you?"
http://www.redstate.com/diaries/redstate/2008/jul/24/the-chronology-of-the-surge/
http://www.weeklystandard.com/weblogs/TWSFP/2008/07/mccain_defends_statement_on_th_2.asp
http://www.redstate.com/diaries/redstate/2008/jul/24/obama-claims-the-06-elections-caused-the-anb/
http://www.qando.net/details.aspx?entry=8936
http://www.weeklystandard.com/weblogs/TWSFP/2008/07/more_on_mccain_and_the_anbar_a_1.asp
http://www.weeklystandard.com/weblogs/TWSFP/2008/03/mccain_was_right_iran_works_wi.asp
http://corner.nationalreview.com/post/?q=OWMxMDI1M2M5MjIwMTFjMDk0ZTU4NjFhNjIzZTBmYmU= :icon_razz:With a key difference being: Obama's will be downplayed and overlooked, McCain's will be amplified.
Ten questions Barack Obama will never be asked
http://www.blackfive.net/main/2008/06/what-would-have.html
http://archive.redstate.com/blogs/soren_dayton/2008/may/27/barack_obamas_ignorancehttp://www.powerlineblog.com/archives2/2008/07/021066.php
http://www.powerlineblog.com/archives2/2008/07/021092.php
http://www.realclearpolitics.com/articles/2008/07/obamas_narcissism.html
http://gatewaypundit.blogspot.com/2008/07/it-has-begun-ap-labels-mccain-as-old.html
Nice collection of silly third rate websites that specialize in Obama bashing.
McCains foreign policy seems to consist of insults and intimidations. He wants to kick the Russians out of the G8, and calls the Germans "creepy" for applauding Obama's speech in Berlin.
GW, when asked about his best moment in office:
"I would say the best moment of all was when I caught a 7 and a half pound largemouth bass in my lake."
Now that is honest humour!