text
stringlengths
1
330k
target=raw_input("what you wanna get\n")
for i in xrange(thnum):
full_path = os.path.join(root, dirs[i])
t=threading.Thread(target=finder,args=(full_path, results, done,))
share|improve this question
It could be that it really takes that much longer. For example large cache folders from mail clients like thunderbird or outlook express, and from web browsers, may make this take very long (????) Or you could be looking at cycles somehow. Can you build in code somehow to signal the existing threads that they should print out their status? –  Andre Blum Jul 10 '12 at 0:26
by comparing the result with that of my another program, it just find all the file but the thread just stop but not exit... –  from __future__ Jul 10 '12 at 0:37
Um… you're walking the filesystem and putting every file in the tree into the queue, and then for each file in the queue you're walking the entire tree again and pushing every file in that tree into the queue. All this pointless repetition is going to take a very, very long time for even a modest subtree. –  abarnert Jul 10 '12 at 1:13
Actually, hold on a sec… you're using target without ever defining it. So, unless your C: drive is completely empty, this is obviously not the code you're running, because this code will throw a NameError and quit immediately. –  abarnert Jul 10 '12 at 1:17
can you try and run in a shallower and overseeable subdirectory, instead of your hard disk's root? –  Andre Blum Jul 10 '12 at 2:09
1 Answer 1
up vote 0 down vote accepted
[ First, of course, I had to make some trivial changes to make this code 'compile']
The good news is: it just works as you think it should work. Well done. The bad news is: it doesn't work as fast as you had expected.
On my machine, running it on my home directory alone already takes approx 10 minutes:
[andre@hp ~]$ time python
what you wanna get
... results removed ...
real 9m39.083s
user 0m30.368s
sys 0m22.664s
[andre@hp ~]$
The question is whether implementing this in processes and threads is a good idea. I think not. Chances are the performance suffers from this massive multithreading.
share|improve this answer
I finally make it work with coroutine. make a connection with coroutine instead of using "done" with Queue.put, but it just 2 seconds faster:( I agree with you. it was not a good idea. thank you! –  from __future__ Jul 11 '12 at 6:23
Your Answer
Search Form
First, enter a politician or zip code
Now, choose a category
Public Statements
Floor Speech
Location: Washington, DC
Mr. WATT. I move to strike the last word.
The Acting CHAIR. The gentleman from North Carolina is recognized for 5 minutes.
Mr. WATT. Mr. Chairman, I don't come to the floor very often anymore to debate. I have kind of changed my pattern. Eighteen years ago, 19 years ago, when I saw egregious things, I would be right here in the heart of the debate, ranting and raving, some people would say.
When my colleagues and sometimes my constituents now ask me, Have you lost your passion, I tell them that there are some reasons that I don't come to the floor anymore. One is that I find that most of the time, my colleagues on the opposite side are tone deaf. They are not really listening to what anybody is saying to them. They are off on some radical right undertaking, falling off the right edge of the Earth, and they are not listening to anything I say.
They don't share my values, and they don't really care about this debate that we had, 3 hours of talking about women, infants, and children going hungry. They really don't much care about that, I say to my constituents. And, third, they just make up stuff. You know, they have this--you know, if we repeat it enough, it's got to be true, and we will convince the American people of about anything if we just keep saying it over and over again. Or they ..... have convenient memories that forget that it was President Bush----
The Acting CHAIR. The gentleman will suspend.
For what purpose does the gentleman from Nebraska rise?
Mr. FORTENBERRY. The gentleman has accused our side of the aisle of lying. Is that a cause for having his words taken down?
The Acting CHAIR. The Chair construes that as a demand that words be taken down. All Members will suspend. The gentleman will take his seat.
The Clerk will report the words.
[Time: 20:20]
Mr. WATT. Mr. Chairman, in the interest of time, some people have said that I called somebody a liar and, obviously, that would be in violation of the rules. I am aware of that. So if I did, I ask unanimous consent that those words be removed from the RECORD.
The Acting CHAIR. Is there objection to the request of the gentleman from North Carolina?
There was no objection.
The Acting CHAIR. The gentleman from North Carolina may proceed in order.
Mr. WATT. Can the Chair tell me how much time remains in my 5 minutes?
The Acting Chair. The gentleman from North Carolina has 3 minutes remaining of his 5 minutes.
Mr. WATT. All right. Well, let me try to pick up essentially where I was without offending anybody else.
There's some conveniently forgotten items that I think we need to be reminded of. Number 1, that it was President Bush who requested the government bailouts. That occurred on his watch. It was President Bush that was responsible for the tax cuts for the rich that got us out of surpluses as far as the eye could see and into this deficit spending. And it was rampant speculation and abuse of derivatives on Wall Street that resulted in a meltdown that made Dodd-Frank and the CFTC regulation that we're here debating necessary. Those are the three important things that I think we need to take note of.
It also resulted in a tremendous economic down
turn that resulted in more people needing food stamps and the benefit of the WIC program. So these two things are really not disconnected from each other, the 3 hours of debate that we had previously and the debate on whether we are going to adequately fund the CFTC, which has been given authority under the Dodd-Frank legislation to rein in the speculation that is taking place that's driving up food prices, oil prices, and if we're not careful, will result in the same kind of economic meltdown that we experienced that got us into this in the first place.
So this whole process of being in denial about this and ignoring the facts is something that I think we should not countenance on this floor. We need the CFTC to regulate derivatives and speculation. And to the extent that we cut the staff and the funding of the CFTC, we could be replicating exactly what led President Bush to say we needed a bailout in the first place.
So, that's what this debate is all about. I think it's terrible that we are cutting funds under this bill for women, infants, and children, the most vulnerable in our society. But it's even more terrible that we are going to run the risk of allowing the same kind of rampant speculation, unregulated, to get us back into another meltdown that will result in our being back here trying to figure out how to dig ourselves out of this ditch. A year from now, 18 months from now, 2 years from now we'll be right back here again.
Now, this is not rocket science. It's all just connected to each other. And my colleagues can deny it all they want. They can say that this is about drilling for oil in the United States. That's not what it's about. All of the science I've seen says there's more supply of oil now than there is demand, and if we were operating in a regular domestic market on regular economics, the price of gas would be going down.
We need to regulate the CFTC. We need to have them regulating derivatives and speculation.
Skip to top
Back to top
Phil Shaw, victim's brother
Phillip Shaw was born on January 7, 1975, in Taylor, Mississippi, the eldest of two children born to Jane and Chad Shaw. He was seven when his little brother Jerry was born.
The age difference between the boys meant Phil spent a lot of time watching over his brother. He tried to teach Jerry the importance of honesty and integrity, but as the boys got older, Jerry increasingly resisted Phil's guidance.
Their parents held Phil responsible whenever young Jerry acted out, which Phil considered unfair, especially since he couldn't find any way to get Jerry behave, no matter how much he tried.
Other than his inability to control Jerry, Phil excelled in everything he did. He made top grades and had a lot of friends.
When Phil graduated from high school, he wanted to go to college but there wasn't enough money so he got a job as a busser at Taylor Grocery & Restaurant. He put every penny he could spare in a savings account that he planned to use one day to pay for college.
In 1994, his parents went to Memphis, Tennessee for the weekend to celebrate their 20th anniversary. Tragically, they were murdered during that trip, and the case remains unsolved to this day.
Phil became Jerry's guardian and used his share of their parents' large insurance policy and sizable savings account to support the smaller, sadder version of his family and to pay for his classes at Ole Miss.
Phil invested some of the insurance money, and when he graduated, he still had a large bank account. He leveraged that nest egg to build his own tax firm, which became a very successful business.
When Jerry dropped out of high school and proceeded to squander his inheritance like the proverbial prodigal son, Phil avoided him.
After that, the only time he heard from Jerry was when he came asking for money because he'd gotten himself into yet another financial jam. Phil always refused to lend him a dime and told him to get a job if he needed money.
Phil is single and lives alone. By his own account, he and Jerry hadn't seen each other for years at the time of Jerry's death.
Subscribe to read more
Please login to comment
People in this conversation
• Phil wasn't much of a brother to Jerry. It appears that Jerry was on his own totally when he dropped out of school. He was probably 16 years old. Who knows what kind of life he had besides the gambling.
Crime Scene
3440 N 16th St, Suite #4
Phoenix, AZ 85016
Voice (623) 565-8573
Fax (602)-274-7280
Find us on Google+
Get weekly updates on the investigation.
      Click to view previous updates
Go to top
Boiler Room Safety
Large industrial and commercial facilities often have dedicated boiler rooms that house boilers, water pumps, heating, ventilating and air conditioning (HVAC) equipment, and other mechanical equipment required to run a facility. The heated water or fluid used in boilers can be used in a variety of processes or heating applications, including central heating and local power generation. As boilers have been modernized to burn natural gas or a combination of fuels that are less expensive and more flexible than coal and oil, there are significant risks of leaks occurring in the gas plumbing and from the burners at the front of a boiler. Such combustible gas leaks create the hazardous condition of a potential explosion. An additional risk is the production and leakage of Carbon Monoxide (CO), an odorless, colorless and toxic gas that results from incomplete combustion, which occurs when there is not enough oxygen mixed with the fuel. All improperly ventilated or malfunctioning boilers have the potential to produce CO in varying concentrations. Consequently, the building facility manager must ensure that the boiler room is instrumented with a comprehensive gas detection, alarm, and mitigation system to protect the facility and its personnel.
Gas Detection
Hazardous gases found in boiler rooms include:
• Combustible Gases such as Methane
• Carbon Monoxide
Combustible gas leaks rapidly disperse throughout a boiler room, creating a hazard for any worker, who can act as an ignition source, by walking into the room. Fixed point combustible gas sensor modules are used to monitor boiler fronts and associated natural gas supply lines. The gas sensor modules are connected to controllers that provide relays to enable activation of visual and audible alarms for warning conditions and for boiler shutdown at emergency levels. Typical set points are 40% lower explosion limit (LEL) for warning and 60% LEL for emergency.
In addition, fixed point toxic gas sensors are used to monitor for CO leaks in boiler rooms. If not detected, the buildup of CO can pose a threat to any worker walking into the room. The sensor modules can be connected to the same controllers used for combustible gas, creating a complete hazard detection system.
Personal gas monitors are generally not appropriate for boiler room applications because they cannot detect buildup of combustible and toxic gases in a non-occupied area.
Automation and Integration Strategies
A gas detection system usually incorporates a controller that can drive various alarming devices such as strobes and horns to indicate hazard. However, as boiler rooms tend to not be accessed frequently, facility managers often need a remote monitoring solution as well. It is common for facility managers to connect the boilers to the central Building Automation System (BAS) so they can monitor the functioning and efficiency of the boilers remotely. But it is also necessary to integrate the gas detection system in the boiler room with the BAS so that the alarms can be displayed within the central facility management console and can be acted upon as part of a facility-wide control strategy. 
Codes and Regulations
Various national and international codes pertain to the safe manufacturing and placement of boilers. In the United States, manufactured boilers and the rooms in which they reside are designed to comply with one or more of the codes written by the American Society of Mechanical Engineers (ASME). Other approval bodies, such as the Underwriters Laboratories (UL), National Fire Protection Association (NFPA), and International Code Council (ICC), could also be a regulating body.
Major codes governing boiler rooms include:
Products for Boiler Room Safety
Boiler rooms require a gas and fire detection system that includes gas and fire detection modules, a method to communicate to a controller, an ability to collect large amounts of data for subsequent analysis and flexible alarm handling with a method for communicating data to higher-level systems.