Skip to content
🤔prompts chat🧠
🔍
question:By . John Edwards . PUBLISHED: . 17:30 EST, 9 January 2014 . | . UPDATED: . 03:05 EST, 10 January 2014 . David Moyes was left ruing the one that got away after Alvaro Negredo all but booked Manchester City’s place in the Capital One Cup final with a stunning hat-trick against West Ham. While Moyes’ misfiring Manchester United side stumbled to a 2-1 semi-final first-leg defeat at Sunderland, Negredo made City’s return meeting with West Ham a formality with his second hat-trick of the season - and 15th goal in 15 home appearances this season - in a 6-0 win. Yet the prolific Spain striker could have been wearing the blue of Everton, rather than City, after former Goodison boss Moyes despatched his transfer negotiators to Seville last January, with orders to bring him back to Merseyside. VIDEO Scroll down to watch Negredo scoring with a spectacular scissor-kick in training . On-fire: Alvaro Negredo slides to celebrate scoring one of his three goals against West Ham . Missed out: David Moyes tried and failed to sign Negredo when he was in charge of Everton . All hail the deadly caveman with the touch of an artist - Read here . The deal floundered when Everton officials arrived in Spain to find the asking price had soared from around £12million to nearly £18m, and the 28-year old ended up joining City in the summer instead. Moyes also headed to Manchester, to replace Sir Alex Ferguson as manager, and was dismayed to discover United’s scouting network in southern Spain had allowed their City counterparts to outmanoeuvre them for both Negredo and lightning-quick winger Jesus Navas. Negredo revealed he was aware of Everton’s interest but insisted it was always his intention to see out the season with Sevilla before testing himself in the Barclays Premier League. Slide show: The Spaniard stretches to score his second in the hammering of West Ham at the Etihad . Home comforts: Negredo now has 15 goals in his last 15 appearances at the Etihad Stadium . Ruud Van Nistelrooy: 24Alvaro Negredo: 18Fernando Torres: 18Sergio Aguero: 17Jimmy Floyd Hasselbaink: 14Didier Drogba: 12Thierry Henry: 10 Mario Balotelli: 10 Dennis Bergkamp: 10 Robin van Persie: 5 . ‘There were some rumours, but I just wanted to finish the season with Sevilla,’ he said. ‘I wanted to wait until it got to the summer before I started looking at other options. I never really considered the possibility of moving in January.’ Known affectionately as The Beast by Etihad fans, he has terrorised opposition defences all season and is now just one goal behind Sergio Aguero in City’s scoring charts. ‘I am in a great moment, but I hope to get even better,’ he said. ‘I need to get more goals and catch Sergio up quickly, because I know that when he comes back from injury, he will score plenty. Class act: Manuel Pellegrini was impressed with what he saw from his front man on Wednesday . Spanish steps: Negredo chose to stay with Sevilla last January, rather than head to Everton . ‘But, the way I am feeling and the way my game is going, I do feel this could be my best moment so far. This could be the best season of my career. I’m feeling comfortable, I score a lot of goals and hopefully I can make some assists. This is how I want to continue for the rest of my time here. The only real target, though, is to grow, to improve as a player and become better as I go along.’ United have their work cut out to make it an all-Manchester final, with their tie balanced on a knife-edge, but Negredo is unconcerned about who City will face. ‘At the moment, we just want to be sure of booking our place,’ he said. ‘Maybe the fans are all thinking about United, but as long as we are in it, I don’t mind. I’ve never been to Wembley before, so that is all that matters.’ Uphill task: Manchester United will go into the second leg of their Capital One Cup semi-final 2-1 down after a shambolic display at Sunderland on Tuesday, for whom Fabio Borini (right) scored the winner .

answer:Alvaro Negredo's hat-trick in Manchester City's 6-0 win over West Ham in the Capital One Cup semi-final has all but secured City's place in the final. The Spanish striker, who has now scored 15 goals in 15 home appearances this season, was nearly signed by David Moyes for Everton last January. However, the deal fell through when the asking price rose from £12 million to nearly £18 million. Moyes, now at Manchester United, was disappointed to see City outmaneuver United for both Negredo and Jesus Navas. Negredo, known as The Beast, expressed his satisfaction with his current form and aims to catch up with Sergio Aguero in the scoring charts. Despite the lopsided result, the second leg of the semi-final remains to be played, and Negredo is focused on securing City's spot in the final, regardless of the opponent.

question:In one day, 200 people visit The Metropolitan Museum of Art in New York City. Half of the visitors are residents of New York City. Of the NYC residents, 30% are college students. If the cost of a college student ticket is 4, how much money does the museum get from college students that are residents of NYC?

answer:Out of the 200 visitors, half are residents of NYC, so there are 200/2 = 100 NYC residents. Out of the NYC residents, 30% are college students, so there are 100 * 0.30 = 30 college students. The museum gets 4 from each college student, so they get 30 * 4 = 120 from college students that are residents of NYC. 120 The answer is: 120

question:A British man was killed when the pilot of a light aircraft - who was banned from flying commercially - suffered an epileptic fit and crashed from 10,000ft into the Pacific Ocean. Ian Lovell, 35, had been enjoying the holiday of a lifetime with his Australian girlfriend, Samantha Hare, 32, when the tragedy struck off the Australian coast in 2008. Ms Hare had bought the breathtaking flight across picturesque Morton Bay and Stradbroke Island in Queensland as a birthday present for her boyfriend. Gift: Samantha Hare (left) had bought the flight for boyfriend Ian Lovell's (right) birthday just six days before . Killer flight: Mr Lovell was pictured here for the last time just minutes before the plane took off . What she did not know was that the pilot of the 492 flight, 60-year-old Barry Hempel, who also died in the incident, had been stripped of his commercial license after breaching a string of aviation rules in 2001. An inquest at Queensland Coroner's Court Friday heard that Hempel had continued to fly his own private aircraft despite the commercial ban. It emerged during the hearing that Hempel was known to Australian Civil Aviation Safety Authority as suffering from epileptic fits, but they allowed him to keep his private pilot's license regardless. On August 31, 2008 - six days after turning 35 - Mr Lovell climbed on board the two-seater aircraft with Hempel. Dream trip: Ian Lovell had been enjoying the holiday of a lifetime before tragedy struck . But 13 minutes into the flight Hempel suffered an epileptic fit in the cockpit and plunged the Yak-52 Warbird into the Pacific Ocean. A horrified Ms Hare watched the drama from the shoreline. Brisbane Coroner John Hutton slammed the Civil Aviation Authority and said it was 'unbelievable' that Hempel was still allowed to keep his private license. He said: 'It is unbelievable that CASA did not act. 'Queensland Ambulance Service's report ought to have put CASA on red alert as to Barry Hempel’s ability to fly. 'It is also unbelievable that when Dr Ian Maxwell was briefed to assess Barry Hempel, a copy of this report was never provided to him, nor was he advised as to the admissions as to two previous seizures. 'During the inquest it became obvious that CASA medical officers were cavalier in respect to the reports and CASA medical officers chose to disregard the observations of trained paramedics.' The court heard Hempel had not reported any problem to air traffic control but a frantic Ian could be shouting to the lifeless pilot in the last cockpit recording. In the accidentally transmitted message an extremely upset Mr Lovell can be heard saying: 'Oh my god, what are you doing? Put it up.' Medical evidence showed that Hempel died from injuries caused by the impact itself but had not braced himself before hitting the water, suggesting he was unconscious. An autopsy found there was 'gross evidence' that Hempel, a pilot of 40 years, had a prior injury and scarring which could cause seizures. As his commercial, transport and commercial helicopter licence had been cancelled this meant he was not allowed to take paying customers in the air. After the hearing, Mr Lovell's mother . Lynn, 59, said the coroner’s report had brought the family closure after . five years of campaigning. Close: Ian Lovell's family were left devastated by the crash. He is Pictured here with sister Becky . Speaking from the family home she shares with husband David, 62, in Shifnal, Shropshire, she said: 'It’s something that should never, ever have happened. Something has got to happen, this can’t happen to another family. 'Hempel had no regard for anybody. He was a maverick, a cowboy and a liar - everything you wouldn’t want to know in a person. 'Sam bought the ticket along with Ian’s friend. They thought it would be something he would like to do. 'He wasn’t a daredevil. He knew that Sam had researched the flight. He didn’t go into things lightly. 'The register is the one thing that really needs chasing up. Sam will pursue that and make sure something is being done. 'She is angry at CASA. We are angry at CASA.' Angry: Lynn and David Lovell from Shifnal in Shropshire, look at photographs of beloved son, Ian . Girlfriend Samantha - who is suing the two CASA doctors responsible for medically clearing Hempel for 955,000 - added: 'None of this brings Ian back. Recommendations can be put forward but Ian is gone. 'I’m angry really. When it comes down to it CASA is the regulatory body and they did nothing to stop Barry from flying. 'I think there needs to be a better way for people to be able to check what kind of licences pilots hold. 'What he did in flying Ian was illegal and he had had his commercial licence suspended but CASA actually gave him the freedom.' Mr Lovell had been working in Australia following his dream of combining travel with his work as a computer games animator. He had just completed his most high-profile project, working for Chrome Industries on the Star Wars computer game, before he died. A spokesman for CASA said the organisation would 'carefully be considering' the recommendations. Brotherly love: Ian Lovell (right), pictured here with sister Becky (left) and brother Carl (centre)

answer:In 2008, British man Ian Lovell, 35, died when a light aircraft crashed into the Pacific Ocean off the Australian coast. The pilot, Barry Hempel, 60, suffered an epileptic fit during the flight, causing the crash. Hempel, who had been banned from commercial flying in 2001 due to breaching aviation rules and suffering from epileptic fits, was still allowed to hold a private pilot's license by the Australian Civil Aviation Safety Authority (CASA). The inquest at Queensland Coroner's Court revealed that CASA had been aware of Hempel's condition but failed to act, leading Coroner John Hutton to criticize the authority's negligence. Hempel's medical history, including prior seizures, was not adequately considered by CASA, and he was not required to report his condition to air traffic control. The final cockpit recording captured Lovell's desperate cries to Hempel. Hempel died from the impact, and Lovell's family, including his girlfriend Samantha Hare, have been campaigning for accountability and changes in pilot licensing regulations. Hare is suing two CASA doctors for 955,000 for medically clearing Hempel. Lovell's mother, Lynn, and Hare

question:Write a function that sums all numbers in a given list. The function should ignore non-numeric values. ```python def sum_numbers(lst): return sum(i for i in lst if isinstance(i, (int, float))) ``` Can the existing implementation be optimized for better performance in any way? While it is quite straightforward, does using a generator expression here provide the best possible performance?

answer:The existing implementation using a generator expression is already quite efficient. However, for very large lists, we can optimize it slightly by using a built-in function that filters out non-numeric values more efficiently. Here's an optimized version using the `filter()` function along with a lambda function to filter numeric values: ```python def sum_numbers(lst): return sum(filter(lambda x: isinstance(x, (int, float)), lst)) ``` However, in terms of performance improvement, it's unlikely to make a significant difference unless you're dealing with extremely large lists. The original generator expression implementation is already quite efficient. One thing to note is that both the original and the optimized implementation will work well with memory usage because they both use lazy evaluation. This means they don't create an intermediate list of filtered values, but rather yield one value at a time. To squeeze out even more performance, we can use the `math.fsum()` function to sum the numbers, which is more accurate and efficient than the built-in `sum()` function for large lists of floating-point numbers: ```python import math def sum_numbers(lst): return math.fsum(i for i in lst if isinstance(i, (int, float))) ``` But again, the performance difference will likely be negligible unless you're working with very large lists.

Released under the Mit License.

has loaded