diff --git a/backend/batch_prompts.jsonl b/backend/batch_prompts.jsonl deleted file mode 100644 index 976744a3..00000000 --- a/backend/batch_prompts.jsonl +++ /dev/null @@ -1 +0,0 @@ -{"custom_id": "request_0", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-4o-mini", "messages": [{"role": "system", "content": "\n You are a Singaporean student studying for your A Levels. You are curating examples to supplement and bolster your arguments in your General Paper essays.\n Given an article, you should provide relevant examples that can be used to support or refute arguments in a General Paper essay.\n Given the article, you should also generate 2-3 GCE A Level General Paper essay questions that can potentially be answered using the events you have provided.\n You should provide at most 3 example events. If there are no relevant events, you should provide an empty list. You do not have to always provide 3 examples.\n\n For each event, your title should be specific enough so that I can guess your example without looking at the paragraph.\n For each event, you should categorize your examples into the following categories:\n [Arts & Humanities, Science & Tech, Politics, Media, Environment, Education, Sports, Gender & Equality, Religion, Society & Culture, Economic]\n Important Note: Only categorize an event if the connection to a category is direct, significant, and not merely tangential. Do NOT categorize an event if the connection is speculative or minor.\n\n For each event, you should give an analysis of how the event can be used in the context of its respective category i.e. the categories that you have chosen for this event.\n The analysis should be specific to the category of the event and should be tailored to the context of General Paper essays. Provide coherent arguments and insights. Be sure to give a detailed analysis of 3-4 sentences.\n In your analysis, you should not mention \"General Paper\" or \"A Levels\".\n For the analysis, remember that this is in the context of General Paper which emphasises critical thinking and the ability to construct coherent arguments.\n If needed, you can think about the questions you have generated and how the event can be used to write about points for/against the argument in the question.\n\n For each event, you should also indicate if the event happened in Singapore. If there is no indication in the article, you should assume that the event did not happen in Singapore.\n For each event, you should also give a rating from 1 to 5 on how useful the event is as an example for a General Paper essay.\n You should give me your examples in the following json format:\n\n { \n \"examples\": [\n { \n \"event_title\": \"Title of the event\",\n \"description\": \"The example that supports or refutes the argument\",\n \"questions\": [\"Question 1\", \"Question 2\", \"Question 3\"],\n \"category\": \"Array of categories for this event. For example ['Arts & Humanities', 'Science & Tech'], \n \"analysis_list\": [\n {\n \"category\": \"The category of the event for example 'Arts & Humanities'\",\n \"analysis\": \"The analysis of how the example can be used in a General Paper essay for Arts & Humanities\"\n },\n {\n \"category\": \"The category of the event for example 'Science & Tech'\",\n \"analysis\": \"The analysis of how the example can be used in a General Paper essay for Science & Tech\"\n }\n ],\n \"in_singapore\": \"Boolean value to indicate if the event happened in Singapore\",\n \"rating\": \"The rating of how useful the event is as an example for a General Paper essay\"\n }\n ]\n }\n\n The article:\n\n"}, {"role": "user", "content": "More on Group of Eight In its submission to the inquiry, the union said while it welcomed the reform, many other students are forced to forgo their regular income while undergoing placements. \u201cIf student placement poverty is to be addressed in any substantial form, then the prac payment should be expanded to include all fields of study requiring professional placement,\u201d the union said. We are also concerned that the rate of payment is not sufficient and that the delay in its introduction is disadvantaging current students. The Group of Eight, which represents Australia\u2019s largest universities, has also expressed concern over the placement payments. Ahead of the inquiry, the organisation said universities would not be equipped to make the payments to students. Under the proposed legislation, universities would be required to make the payment for its students, while the Education Department would cover the expense for those doing placements in the selected industries in TAFE courses. - Australian Associated Press More to come in the next post. University funding model a \u2018disaster\u2019: Group of Eight A coalition-era change to university funding has been an \u201call around disaster\u201d and needs to be fixed sooner rather than later, Australia\u2019s largest universities say. Group of Eight deputy chief executive Dr Matthew Brown told a parliamentary inquiry hearing on Tuesday, universities had experienced the \u201cdestructive influence\u201d of the 2020 Job Ready Graduates package. Particularly hitting humanities, arts and social sciences students the hardest, he said. \u201cAll around it\u2019s been a disaster. We\u2019ve called from the start ... for it to be removed and replaced,\u201d Brown said. Now that\u2019s no small undertaking to redesign the system to repair what\u2019s happened. But it\u2019s something that needs to be done nonetheless, and sooner rather than later. Under the package, funding arrangements were altered in a bid to re-direct students into particular courses by changing fee-contributions. University and student bodies are also facing questions on plans to pay students almost $320 a week to cover living expenses while they are doing placements in fields such as nursing, social work, midwifery and teaching. The National Tertiary Education Union said the payments should be extended to all students required to do placements as part of their degree. - Australian Associated Press More to come in the next blog post. The foreign affairs minister, Penny Wong, has spoken out against the Taliban\u2019s \u201cattempted erasure of women from public life\u201d in Afghanistan. Speaking earlier today in New York \u2013 where she is attending a series of UN-related events \u2013 Wong said she had joined a high-level meeting in relation to women\u2019s rights in Afghanistan. Wong told reporters: We are deeply concerned by the Taliban\u2019s attempted erasure of women from public life. I heard today \u2013 with many others \u2013 from brave Afghan women. We expressed Australia\u2019s solidarity with the women of Afghanistan, and I made the point in that discussion that there is no peace in Afghanistan without the full participation of Afghan women. I thank those women from Afghanistan and beyond who took the opportunity to share their stories with us. Their courage was deeply inspiring. GPs call for My Health Record overhaul with survey showing practitioners rarely use it The peak body for the nation\u2019s general practitioners is calling on the government to overhaul My Health Record after a survey found 31% of GPs rarely or never use it. The early findings from the Royal Australian College of GPs annual Health of the Nation survey come after a productivity commission report found the My Health Record is \u201cplagued by incomplete records and poor usability.\u201d The college\u2019s president, Dr Nicole Higgins, said: It\u2019s a big job to improve our flagship national health data system, and we recognise that the Australian government and the Australian Digital health agency are taking steps to this end. However, this work must continue to be prioritised because it will have significant benefits for Australians and our health system. It will also make our health system more efficient and generate significant savings for the health budget \u2013 the productivity commission also estimated better use of electronic medical records systems can save up to $5.4bn each year by reducing the time patients spend in hospital, and $355m in duplicated tests in public hospitals. The potential savings in general practice and other health settings would also be substantial. This money could then be reinvested back into reducing out-of-pocket costs for patients to help in the current high cost-of-living climate. We\u2019re calling for the federal government to overhaul My Health Record to improve its useability for Australians, GPs and other health professionals. At the beginning of 2023, the government said the underutilised and much-maligned My Health Record would be at the centre of a push to modernise primary healthcare: China\u2019s central bank tries to rekindle growth, lifting some Aussie assets in the process Many Australians will no doubt have an eye on the Reserve Bank later today with its regular interest rate decision landing at 2.30pm Aest. (The bank is expected to stay put for a seventh consecutive meeting, as we preview here.) As it happens, another central bank of importance for Australia has been active today. The People\u2019s Bank of China has unleashed what Bloomberg News dubs \u201ca blitz of policy support\u201d to revive the flagging fortunes of the world\u2019s second-biggest economy (and Australia\u2019s largest export market by far). There\u2019s a bunch of cuts, such as for the amount of cash Chinese banks have to hold in reserve, a move that should release about 1tn yuan (A$200bn) of liquidity. Other rate cuts are coming, such as for mortgage holders. As we reported here a week or so back, China\u2019s economy looks to be in a funk that will be hard to shake off. What\u2019s needed is a shift of consumer sentiment given prices of real estate \u2013 most households\u2019 largest asset \u2013 remain in a tailspin. Cutting interest rates in the past year or so haven\u2019t had much of an impact so perhaps more government aid will be needed. Let\u2019s see. In the meantime, though, the China news was enough to propel the share price of big Australian miners \u2013 BHP, Rio and Fortescue \u2013 about 2% higher. The Australian dollar, too, strengthened to about 68.5US cents before giving up some of the advance. China\u2019s sagging growth, with this year\u2019s target of 5% looking increasingly challenging, is not without its positives. Weakening oil demand has helped push retail petrol prices in Australia towards two-year lows of about $1.74 a litre. That\u2019s something else the RBA will probably note at its two-day meeting that wraps up in a couple of hours. More from NSW Police on the fatal stabbing in Marrickville, Sydney, last night. A witness and CCTV footage \u201cdepict a person that we believe may be able to assist our inquiries run down Silver Street,\u201d police said in a press conference. Police could not confirm that the weapon was a knife: I know it was a sharp instrument, given the injuries. I can\u2019t say with any certainty what weapon used was. The incident occurred at 7:40pm \u2013 \u201cpeak dinner time on Marrickville Road,\u201d police said. [There are\u2019] lots of restaurants, lots of businesses, licenced premises in the area. To have it happen on Marrickville Road or anywhere is unacceptable. Knife crime is unacceptable. New South Wales police will continue to work tirelessly to target knife crime and hold offenders to account. Matthew Guy offered to move a motion to expel Moira Deeming, court hears Victoria\u2019s former opposition leader, Matthew Guy, offered to move a motion to expel Moira Deeming from the Victorian Liberal party after she spoke at a \u201cLet Women Speak\u201d rally that was gatecrashed by neo-Nazis, the federal court has heard. Deeming was initially suspended from the party\u2019s parliamentary team in the days after the rally before later being expelled. The motion was moved by opposition leader John Pesutto. Deeming is suing Pesutto for allegedly falsely portraying her as a Nazi sympathiser after she spoke at the \u201cLet Women Speak\u201d rally held on 18 March that was gatecrashed by neo-Nazis. Pesutto rejects this allegation. The federal court has been shown text messages between Pesutto, Guy and David Southwick, the party\u2019s deputy leader, on the evening of 18 March 2023. \u201cJust letting you know that if you want an expulsion moved in [sic] Deeming and no one else will do it, I will\u201d Guy texted Southwick and Pesutto at about 9.15pm. Guy said the pair had \u201cthis solution in your back pocket if you want it.\u201d Anthony Albanese has condemned the Greens on its RBA policy, and the Coalition\u2019s nuclear energy plan, saying both push \u201cpopulist rhetoric\u201d. He says the Greens\u2019 RBA policy \u201cwould have a negative impact on economic growth\u201d ahead of the Reserve Bank\u2019s interest rate announcement coming today. The Greens\u2019 policy, quite frankly, would have a negative impact on economic growth and the way that we conduct economic policy. Central banks are independent of government. That occurs in just about every major economy in the world. What the Greens do is engage in populism, often in conjunction with their partners in the No-alition \u2013 the Liberal party and the National party \u2013 to Just Say No to everything, or to put up populist policies like breaking up supermarkets without having any plan for who would purchase those supermarkets. Albanese uses this comparison to take a sledge to opposition leader Peter Dutton\u2019s plan on shifting to nuclear energy: Like Peter Dutton\u2019s nuclear plan, which yesterday he gave a speech on and which had no costings, no detail. Peter Dutton will be here in the west, I understand, later this week. I wonder if he visits Collie to have a look at the site there at Collie, where you have a battery being built that will store enough energy to power 860,000 homes. What we need in this country is serious policies that take us forward, not just populist rhetoric, which is what we see from the Greens and from the coalition. Australians in Lebanon urged to return home Prime minister Anthony Albanese is urging Australians in Lebanon to \u201clisten to the warnings that we have been saying for months\u201d and return to Australia on commercial flights while they are available: We have been saying that for many months. The fact that some people have continued to go from Australia to Lebanon in recent months is not a commonsense thing to do. The government issues these warnings for a reason. And the advice is that people should take the opportunity to come home on commercial aircraft while it is available. Prime minister Anthony Albanese is speaking live to press. He says supermarket giants Coles and Woolworths\u2019 alleged use of \u201cillusory\u201d discounts on common products is \u201cnot the Australian way\u201d: Australians are rightly outraged at what has been going on in these major supermarkets. You have, between them, almost 500 [alleged] incidents \u2026 will be prosecuted through the courts by the ACCC. When shoppers go to their checkout, they expect in a supermarket where they see the sign of \u201cspecials\u201d for it to actually be cheaper. But what is alleged here is that supermarkets have increased their price by a dollar, for example, then decreased by 50 cents, so it\u2019s 50 cents more expensive than it was just a short period earlier, and yet they\u2019re pretending that somehow customers are getting a bargain. Now, that\u2019s not the Australian way. It\u2019s not honest, it\u2019s not fair dinkum, and that\u2019s why the ACCC are taking this strong action. Marles to meet with international counterparts to discuss Aukus The minister for defence, Richard Marles, will meet his counterparts in London later this week to discuss progress on Aukus. Marles will join the UK secretary of state for defence, John Healey, and the US secretary of defense, Lloyd J. Austin III, \u201cto reaffirm their shared commitment to promote a prosperous, stable and secure Indo-Pacific through the AUKUS partnership\u201d, according to a media release from his department. He will also visit Norway, following the Australian government\u2019s announcement with Kongsberg including an $850m contract to manufacture and service missiles in Newcastle, as well as an announcement of a $142m contract to deliver the joint strike missile for use by the Australian defence force. More potential sites for homes identified in land audit An audit of government-owned land has found several sites where more than 1,000 new homes could be built in NSW. Surplus land owned by the state government is being assessed for development, with the audit identifying another nine sites in Sydney and one in Newcastle. Sites at Woolloomooloo in Sydney\u2019s inner city, in the city\u2019s west at Sydney Olympic Park, and in the south at Hurstville will be transferred to Homes NSW, with hopes almost 600 homes could be built, with more than 50% to be social housing. \u201cGetting more homes built for families in well-located areas is top priority for our government and releasing surplus land for housing is a key part of our plan to make this a reality,\u201d the premier, Chris Minns, said on Tuesday. How many homes and what type, as well as who will build them, will be decided in the coming months. The state\u2019s lands and property minister, Steve Kamper, said the land audit conducted around the state had never been done before in NSW. \u201cThe property audit is working across departments and agencies to activate surplus government land to deliver the homes our communities need,\u201d he said. - Australian Associated Press Marathon paramedic pay dispute hit Victorian community, says union Union officials have acknowledged the impact a marathon pay dispute between ambos and the Victorian government had on paramedics and the broader community. The Victorian Ambulance Union on Monday reached an in-principle agreement with Ambulance Victoria and the government for better pay and conditions. The pay dispute has been dragging on since March 2023. Ambulance Victoria\u2019s acting chief executive, Danielle North, the Victorian Ambulance Union\u2019s secretary, Danny Hill, and United Workers Union\u2019s Fiona Scalon welcomed the deal. \u201cWe acknowledge that negotiations have taken longer than anyone had hoped, and recognise the impact this had on everyone at AV, along with our partners and community,\u201d they said in a joint statement: We are hopeful this in-principle agreement creates a new and stronger foundation for collaboration, building of trust and cementing our position as a world-leading ambulance service. The wage increases range from 16.98% to 33% over the next four years, including more than 20% for experienced paramedics. - Australian Associated Press Victoria\u2019s opposition leader, John Pesutto, is expected to testify today in the defamation trial brought against him by ousted Liberal MP Moira Deeming. The ex-Liberal MP is suing Pesutto for allegedly falsely portraying her as a Nazi sympathiser after she spoke at the March 2023 \u201cLet Women Speak\u201d rally that was gatecrashed by neo-Nazis. Pesutto rejects this allegation. Last week, the court heard a secretly recorded meeting between Deming and members of the Liberal party\u2019s leadership team, held the day after the rally. In the recording, Deeming tells Pesutto and his colleagues she is \u201cobviously not a Nazi.\u201d Pesutto is heard telling Deeming her attendance at the rally would be \u201ctoxic\u201d for the Victorian Liberal party as they tried to win the 2026 election. Deeming was initially suspended and later expelled from the parliamentary party. The trial, which began last week, is expected to run for three weeks. Staying with that ABC Perth interview, Albanese was again scathing of allegations against Coles and Woolworths, levelled by the ACCC yesterday, about advertised discounts. He called the claims \u201cred-hot\u201d, and the alleged conduct \u201can outrage\u201d. \u201cAustralians who go to the supermarket have been concerned for some time, you would have heard anecdotally, people telling stories about this,\u201d Albanese said. The PM said the supermarket giants may face \u201cmore than a slap on the wrist\u201d. \u201cI think the implications for their brand has been damaged by this, because it confirms what many shoppers think and what they\u2019ve been saying to me, which is why we have determined to take strong action,\u201d he said: When shoppers go to the supermarket, they expect to get goods at a fair price. I understand supermarkets have got to make a profit. They\u2019ve got to make a profit so they can employ people, but what they shouldn\u2019t do is abuse that power. PM questions if gambling ad ban would solve problem gambling issues Prime minister Anthony Albanese has admitted sports betting ads on TV were \u201cannoying\u201d, but again downplayed the prospects of his government legislating a total ban on the advertising \u2013 questioning whether such a move would solve problem gambling issues. The PM is back in Perth for what seems like a biweekly trip at this point in the election cycle, where he joined ABC radio. Asked about the long-awaited reforms to sports betting ads, Albanese said a complete ban on them \u201chas been an option\u201d \u2013 which sounded very much like a past-tense proposition, as in an idea the government wasn\u2019t really entertaining any more. \u201cWhat we want to do is to reduce the impact that gambling advertising is causing, and we\u2019re taking action to do that ... whether the complete banning has been an option, whether that will solve the problem,\u201d he said: The problem here, of course, is that sport gambling represents under 5% of the problem gambling issue. Overwhelmingly, it\u2019s about poker machines, then it\u2019s followed by lotteries and lotto tickets and those issues as well. So I know that as much as anything else, it can be annoying, the breaking up of beds, but we\u2019re looking at a range of options. Asked about a story in the ABC today, about how a Sydney man was able to get around the government\u2019s BetStop self-exclusion register by giving a new name and email address, Albanese said \u201cwe\u2019ll examine it\u201d: When someone tries to get around a regulation, what you do is you make sure you tighten it in a way in order to shut that down. And that certainly is what the authorities will do. But whenever you have some form of regulation, it is the case that people will try and get around it. The PM didn\u2019t go into how the government might \u201ctighten\u201d those regulations. Greens reiterate calls to expel Israeli ambassador after strikes on Lebanon The deputy leader of the Greens, Mehreen Faruqi, has reiterated calls to sanction Israel and expel the Israeli ambassador after a recent wave of Israeli strikes in Lebanon. In a video posted to Instagram, Faruqi said: First, 42,000 Palestinians massacred in Gaza, then the West Bank, and now hundreds more murdered in Lebanon. And all the Australian Labor government and the Australian foreign minister can do is express grave concerns. Well that is unacceptable and it is disgraceful. The Greens will keep fighting for justice. We will keep calling for sanctions on Israel. And for the Israeli ambassador to be expelled from this country. Red Cross says push for declaration on aid workers \u2018can only be a good thing\u2019 but wants to see practical steps An Australian Red Cross spokesperson is speaking to ABC News Mornings about foreign minister Penny Wong announcing a push for a new declaration on the protection of humanitarian personnel. They say: Any initiative that states choose to help that will help reinforce and remind people of their obligations under international humanitarian law can only be a good thing. The Australian Red Cross hopes to see practical steps follow the announcement: Something that expands the whole sphere of how we can put together an ecosystem that protects humanitarian workers, not just when they land in a conflict zone. Training of militaries, of aid workers themselves, declarations such as these and diplomatic efforts that states can take to remind each other and themselves of the responsibilities and obligations that they\u2019ve signed up to. Wong reiterates calls for ceasefire Asked about reports of \u201csenior Biden administration officials \u2026 essentially given up hope on getting to a ceasefire before the US election,\u201d Wong said: The UN security council has unanimously, or without opposition, adopted a position in relation to ceasefire, that is what the international community seek. We support that call. We need to see a ceasefire. We need to see the release of hostages. We need to see aid delivered. We need to see an end to the humanitarian catastrophe we see in Gaza. Asked about her concerns for Australians, foreign affairs minister Penny Wong says the numbers of Australians in Lebanon are \u201cbeyond the capacity of the government to provide assistance to all\u201d. There are very large numbers of Australians in Lebanon, which is why we again say to any Australian who is in Lebanon, what we\u2019ve been saying for months, which is you should return home as soon as you are able to, whilst commercial options are still available, if they are.\u201d Wong was also asked: \u201chow can you avoid pinning some blame for Israel when it\u2019s ramping up hostilities?\u201d She said: We are deeply concerned by this escalation and the losses, loss of civilian lives. Wong on Israeli strikes on Lebanon: \u2018we wish to see deescalation\u2019 The foreign minister, Penny Wong, has been asked about the recent wave of Israeli strikes in Lebanon. She says: We are deeply concerned. We\u2019re alarmed by the escalation and the loss of civilian life, both in Lebanon and also the attacks into Israel. We have consistently said we wish to see deescalation. We believe a wider regional conflict is not in the interests of any of the peoples of the region. More from the foreign minister, Penny Wong, speaking from New York: This group of ministers and governments represented have determined to pursue a new declaration on the protection of humanitarian personnel, a declaration which we will prepare and develop over the coming months, in which will seek to demonstrate the unity of the international community\u2019s commitment to protect humanitarian personnel and to channel that commitment into action in all current and future conflicts. All countries will be invited to join the declaration. Penny Wong speaks live from New York Foreign minister Penny Wong is speaking live from New York. A ministerial group has been formed for the protection of humanitarian personnel, \u201cdedicated to upholding and championing international humanitarian law and driving action to protect aid workers in conflict zones,\u201d she has announced. Switzerland, Jordan, Indonesia, Sierra Leone, the United Kingdom, Japan, Brazil, Colombia, the International Committee of the Red Cross and the UN were part of discussions. Read more from foreign affairs and defence correspondent Daniel Hurst, here: Investigation underway after fatal stabbing in Marrickville More details on the earlier reported stabbing death in Sydney. A man was fatally stabbed in Sydney\u2019s inner west last night, according to NSW police. Emergency services responded to reports of a man being stabbed on Marrickville Rd, Marrickville, at around 7:40pm. Officers located an unconscious 32-year-old man on the footpath. NSW Ambulance paramedics treated him, but he died at the scene. Strike Force Nogales has been established to investigate circumstances surrounding the death. Detectives from State Crime Command\u2019s homicide squad are assisting. Police will address the media today at 10am as the investigation is underway. Anyone with information, CCTV footage, dashcam vision or mobile phone footage are urged to contact Marrickville police station or Crime Stoppers on 1800 333 000. Rallies across NSW as nurses and midwives strike for better pay The NSW Nurses and Midwives Association action started at 7am in the union\u2019s second major stop-work action since Labor came to power in March 2023. The strike is part of a union push for a 15%, one-year pay rise, a demand the premier, Chris Minns, has said is unaffordable. \u201cI just can\u2019t agree to [it],\u201d Minns said yesterday: As a result of the nurses claim and demands at the last election for ratios, or safe-staffing levels, in NSW hospitals, which the government agreed to, we\u2019ve had to recruit 2,000 nurses. Other workers would be lining up for pay rises too if the nurses got the 15% they sought, he said. All NSW public sector workers, including nurses, have been offered a three-year 10.5% pay increase factoring in a mandatory rise in superannuation payments. The opposition leader, Mark Speakman, said the government needed to make sure the strike did not compromise patient safety. \u201cIt\u2019s also incumbent from the nurses union to cooperate to the same extent,\u201d he said. Public rallies are planned outside Parliament House in Sydney as well as in Tweed Heads and Albury near the Queensland and Victorian borders, two states the union says nurses are moving to in order to secure better pay. Minimal, life-preserving staff levels will remain in public hospitals and health services during the strike, the union said. - Australian Associated Press More on NSW nurses rallying for improved pay offer The 24-hour stop-work action by nurses and midwives today is not expected to impact support for life-saving care, but will affect elective surgery and cause delays for some patients. The government had not made a genuine attempt to negotiate on pay and conditions, the general secretary of NSW Nurses and Midwives, Shaye Candish, said. \u201cThe state government could have stopped this industrial action from occurring by coming to the table with an improved offer, but it has chosen to ignore us repeatedly,\u201d Candish said in a statement today. Nurses and midwives are outraged by the government\u2019s unwillingness to negotiate beyond its insulting 3% offer, especially since we found the savings to fund the pay rise. The Industrial Relations Commission\u2019s president, Ingmar Taylor, had not yet examined the union\u2019s argument for pay rises, but recommended an interim deal and four weeks of \u201cintensive discussions\u201d in a bid to broker a deal. The health minister, Ryan Park, said officials had sought to contact patients with surgery scheduled to make alternative arrangements due to the industrial action. \u201cI acknowledge the dispute between the government and the association has a way to go,\u201d he said on Monday. - Australian Associated Press More to come. Alleged copper thief caught red handed Three men were caught red handed allegedly stealing copper in Kilsyth after a call to police from a passerby, Victoria police said. A good Samaritan called about the suspicious behaviour of three men on Mount Dandenong Road around midday yesterday, according to a statement. The men appeared to be working in a cordorned-off telecommuncations pit, wearing hi vis vests. They were allegedly using their vehicles to extract copper wiring out of the pit. When the police arrived, two of them allegedly fled in a dark-coloured SUV with a trailer attached, east of Canterbury Road. One man was detained and resisted arrest and officers \u201cwere forced to deploy OC spray,\u201d the statement said. The 44-year-old Watsonia North man has been charged with theft, resist emergency worker, possess drug of dependence, drive whilse disqualified and use fraudulent registration label. He has been bailed to appear at Ringwood magistrates court on 11 December. The other two men have not yet been located. Police ask anyone with information to contact Crime Stoppers on 1800 333 000 or make a report at www.crimestoppersvic.com.au. Tony Armstrong is leaving ABC News Breakfast for a new show screening in 2025. He told viewers this morning: I just want to thank Brekky and the broader ABC News team for welcoming me in with open arms and helping me grow over the past few years. I love live TV and those moments that are unplanned and unpredictable where anything can happen. I\u2019ve been so lucky to be surrounded by an incredible team and it\u2019s those friendships that I\u2019m going to cherish the most. The Gold logie nominee has been ABC News Breakfast\u2019s full-time sports presenter. He is leaving to host a new ABC show to be announced later this year. ABC News Breakfast\u2019s host, Bridget Brennan, said: How blessed we\u2019ve been to have Tone on our screens every morning, bringing the sparkle, joy and heart that only Tony can! Tony is a wonderful friend and everyone at News Breakfast is going to miss his infectious and caring nature. I know it\u2019s meant so much to me and to thousands upon thousands of First Nations viewers waking up to see Tony representing us on the daily. Can\u2019t wait to see what you do next, Tone! Maybe sleep?! Incidentally, did you know Armstrong is a huge drum nerd? Firearms allegedly brandished during robbery at Sydney hotel Two men armed with a shotgun and a pistol fled a robbery in Canterbury, Sydney, this morning, NSW police said in a statement. Police responded to reports of an armed robbery at a hotel on the corner of Canterbury Rd and Toncombe St around 1:02am this morning. Two men wearing dark clothing, face coverings and gloves allegedly entered the hotel and threatened staff and patrons, Police were told. One man was armed with a shotgun, and the other with a pistol. Police say cash was stolen from the premises before the men fled east on foot. A 38-year-old security guard suffered minor injuries during the incident. A crime scene was established and examined by specialist police. Shortly before, a vehicle was seen driving the wrong way down Tinconbe St before stopping in Minter St. Detectives urge anyone who may have information, or who were in the area at the time with available dashcam or phone footage, to contact Burwood police station or Crime Stoppers on 1800 333 000. Good morning! I\u2019ll be rolling the live blog through today\u2019s breaking news. If there is anything you don\u2019t want us to miss, send it my way on Twitter @At_Raf_ Brittany Higgins has been forced to lower the asking price for the home in France that she and David Sharaz put on the market to help pay their mounting legal fees. The house near Bergerac, east of Bordeaux in south-west France. was initially listed for \u20ac420,000 (A$690,000). The 160 sq metre three-bedroom house on more than an acre of land includes a swimming pool and the agents describe it as \u201cfull of charm\u201d. Photos back up the claim \u2013 it looks delightful. However overnight on Monday the asking price fell to \u20ac404,000 ($660,000), suggesting the Bergerac property market is not exactly bubbling. Higgins is waiting on judgment in a defamation suit brought against her by her former boss, Senator Linda Reynolds, whose lawyers have asked for a payout in the region of half a million dollars \u2013 plus costs. The federal government will put $23m toward a new early intervention trial for young men and boys against domestic violence, asking organisations nationwide to create new programs for those at risk of committing violence. Aimed at boys aged 12 to 18 with adverse childhood experiences or at risk of using violence, the program is meant to assist in recovery, help them avoid committing violence, and build evidence bases on how to deal with young men. The social services minister, Amanda Rishworth, said this morning it would include counselling, mentoring, safety plans and case management. Supporting children and young people as victim-survivors in their own right and addressing the impacts of developmental trauma to help healing and recovery will help break future cycles of violence. There are currently only limited and inconsistent services available across Australia that specifically support children and young people who have experienced violence and are themselves using or at risk of using violence and this trial will help address this gap. The 12 sites include a mix of city, regional and remote locations, including Newcastle, Shepparton, Ipswich, Rockhampton, Broome, Hobart and Launceston, with each to cater for up to 160 boys each year. Some services say their plans will include 45-minute support sessions each week for up to 12 months, while others may offer cultural camps, therapeutic counselling or mentoring. The services are expected to begin rollout from early 2025. The plan is based on studies showing people who use violence can often start using it at a young age, and the links between people experiencing violence then later using it themselves. \u201cEarly intervention is a key area of focus under the National Plan to End Violence against Women 2022-2032,\u201d Rishworth said. Man stabbed to death in Sydney A man was stabbed to death in Sydney\u2019s inner west on Monday evening, NSW police say. At about 7.40pm, emergency services responded to reports of a stabbing on Marrickville Rd. The man died at the scene and a crime scene was established. Police said some streets had been closed and motorists were advised to avoid the area. In a much anticipated speech in Sydney yesterday, Peter Dutton continued to refuse to release costings for the Coalition\u2019s plan to build seven nuclear plants, saying he would announce details \u201cin due course\u201d before the next election. He tried to shift the terms of the debate to the cost of Labor\u2019s renewables policy but, as our political editor writes today, he \u201crelied on warm, fuzzy assurances\u201d rather than \u201ccold, hard facts\u201d. Read her column here: Victorian paramedics reach pay deal with state government Victorian paramedics are set to receive double-digit pay rises under a deal to end a long-running dispute with the state government, Australian Associated Press reports. The Victorian Ambulance Union reached an in-principle agreement with Ambulance Victoria and the premier, Jacinta Allan, yesterday for improved pay and conditions. The wage increases will range from 16.98% to 33% over the next four years, including more than 20% for experienced paramedics. An additional $12,500 relativity uplift for highly skilled Mobile Intensive Care Ambulance (Mica) paramedics would deliver overall increases of up to 33%. There will also be $5 an hour availability allowances for rural ambulance officers who volunteer to respond in remote areas. The Victorian Ambulance Union\u2019s secretary, Danny Hill, said the deal means the paramedics will be among the best-paid in Australia. \u201cThis deal rewards longer serving ambos, it makes our elite Mica paramedics the highest-paid in Australia, it rewards community officers for the time they contribute to their community and most of all it will help our members finish their shift on time and get home to their families,\u201d he said. Improvements to clinical instructor allowances, unsociable shift allowances, on call allowances, reserve/flexibility allowances and travel allowances are also part of the deal. Paramedics will also no longer be sent to lower acuity cases in the last hour of a shift and will taken out of service once their hours are up. Instead, they will only be contacted for confirmed life-threatening emergencies. A pay dispute between NSW nurses and the state government will escalate when thousands of union members walk off the job at public hospitals in day-long industrial action, the AAP report. The stop-work action by nurses and midwives today will affect elective surgery and cause delays for some patients, while support for life-saving care will not be impacted. The NSW health minister, Ryan Park, said officials had sought to contact patients with surgery scheduled to make alternative arrangements due to the industrial action. \u201cI acknowledge the dispute between the government and the association has a way to go,\u201d he said in a statement on Monday. The NSW Nurses and Midwives Association action will start at 7am in the union\u2019s second major stop-work action since Labor came to power in March 2023. The strike is part of a union push for a 15% one-year pay hike for members, a demand that the premier, Chris Minns, has said is unaffordable. All NSW public sector workers, including nurses, have been offered a three-year 10.5% pay increase factoring in a mandatory rise in superannuation payments. The union says Labor has failed to express a willingness to move its position after months of talks, prompting the strike. The industrial relations commission\u2019s president, Ingmar Taylor, has not yet examined the union\u2019s argument for pay rises but recommended an interim deal and four weeks of \u201cintensive discussions\u201d in a bid to broker a deal. The interim offer involved a 3% wage increase with back-pay if nurses agreed to halt industrial action. Good morning and welcome to our rolling new coverage. Before today\u2019s regular blogger comes along, this is Martin Farrer with the best of the overnight stories to get you started. The Reserve Bank is expected to keep its key rate unchanged for a seventh meeting in a row today, according to a survey of 45 economists by Reuters, prolonging the agony for Australia\u2019s leveraged households. The bank lifted the rate 13 times between May 2022 and last November. But despite soft growth and lower inflation, the RBA\u2019s governor, Michele Bullock, and the board are tipped to keep the rate steady. We\u2019ll have the announcement at 2.30 and plenty of reaction. Nurses in New South Wales are due to walk out for another 24-hour strike this morning. It comes as the Victorian government agreed to wage increases for ambulance workers that will range from 16.98% to 33% over the next four years, including more than 20% for experienced paramedics. More on this in a few minutes. Our latest Essential poll shows more than twice as many voters support parliament passing the federal government\u2019s two stranded housing bills as want them blocked, including a majority of Greens voters. The survey found 48% polled believe the Greens and Coalition should pass the Labor government\u2019s Help to Buy and Build to Rent legislation and argue for their own policies at the next federal election. Overall support for blocking the bills was at 22%, with 30% unsure and a margin of error of about 2%."}], "max_tokens": 1000}} diff --git a/backend/batch_result.jsonl b/backend/batch_result.jsonl deleted file mode 100644 index 1bbdcac6..00000000 --- a/backend/batch_result.jsonl +++ /dev/null @@ -1 +0,0 @@ -{"id": "batch_req_66f17c182c008190923e63ed19f462df", "custom_id": "request_0", "response": {"status_code": 200, "request_id": "54bbfb6f16ed15573aadd91da626d42f", "body": {"id": "chatcmpl-AAeOX7EDy1fRWTVgbEvooHha7GOOV", "object": "chat.completion", "created": 1727101921, "model": "gpt-4o-mini-2024-07-18", "choices": [{"index": 0, "message": {"role": "assistant", "content": "{\n \"examples\": [\n {\n \"event_title\": \"Assassination Attempt on Donald Trump\",\n \"description\": \"Ryan Wesley Routh's planned assassination attempt on former President Donald Trump serves as a significant incident highlighting the impacts of political extremism and violence.\",\n \"questions\": [\n \"To what extent does political discourse contribute to extremism in contemporary society?\",\n \"How effective are governments in ensuring the safety of political figures?\",\n \"What measures can be taken to prevent politically motivated violence?\"\n ],\n \"category\": [\"Politics\", \"Society & Culture\"],\n \"analysis_list\": [\n {\n \"category\": \"Politics\",\n \"analysis\": \"The assassination attempt on Donald Trump sheds light on the growing issue of political violence and extremism in contemporary politics. It raises critical questions about the responsibility of political leaders to denounce such actions and the broader implications of divisive rhetoric. In discussions about political safety and the protection of democracy, this example serves as a stark reminder of the potential consequences of unchecked political polarization.\"\n },\n {\n \"category\": \"Society & Culture\",\n \"analysis\": \"This event illustrates the societal factors that can lead to extreme actions from individuals influenced by political ideologies. Addressing this incident within a cultural context allows for an exploration of how societal attitudes toward political figures can breed contempt and incitement to violence. It raises discussions about the moral responsibilities citizens hold in engaging with political discourse and the impact of social media in amplifying radical viewpoints, providing a platform for critical reflection on societal values and norms related to conflict resolution.\"\n }\n ],\n \"in_singapore\": false,\n \"rating\": \"5\"\n }\n ]\n}", "refusal": null}, "logprobs": null, "finish_reason": "stop"}], "usage": {"prompt_tokens": 1852, "completion_tokens": 346, "total_tokens": 2198, "completion_tokens_details": {"reasoning_tokens": 0}}, "system_fingerprint": "fp_1bb46167f9"}}, "error": null} diff --git a/backend/src/cron/fetch_articles.py b/backend/src/cron/fetch_articles.py new file mode 100644 index 00000000..054990a8 --- /dev/null +++ b/backend/src/cron/fetch_articles.py @@ -0,0 +1,106 @@ +from datetime import datetime +import httpx + +from src.common.constants import GUARDIAN_API_KEY +from sqlalchemy import select +from src.events.models import Article, ArticleSource +from src.common.database import engine +from sqlalchemy.orm import Session +from src.scrapers.guardian.process import GuardianArticle, GuardianArticleFields + + +def query_page(page: int, date): + response = httpx.get( + "https://content.guardianapis.com/search", + params={ + "api-key": GUARDIAN_API_KEY, + "page-size": 50, + "page": page, + "lang": "en", + "show-fields": ["all"], + "from-date": date, + }, + ) + response_json = response.json() + data = response_json["response"] + if data["status"] != "ok": + print("something went wrong with page:", page) + return [] + return data["results"] + + +def get_today_articles(): + result = [] + cur_date = datetime.now().date() + for i in range(1, 11): + new_batch = query_page(i, cur_date) + if len(new_batch) < 50: + print(f"On page {i}, only got {len(new_batch)} articles. Stopping.") + result += new_batch + break + print(f"On page {i}, got {len(new_batch)} articles") + result += new_batch + + return result + + +def form_guardian_artilcle_obj(article: dict): + article_obj = GuardianArticle( + fields=GuardianArticleFields( + bodyText=article["fields"]["bodyText"], + trailText=article["fields"]["trailText"], + thumbnail=article["fields"]["thumbnail"], + ), + webUrl=article["webUrl"], + webTitle=article["webTitle"], + webPublicationDate=article["webPublicationDate"], + ) + return article_obj + + +def add_daily_articles_to_db(article: GuardianArticle): + with Session(engine) as session: + query_article = session.scalars( + select(Article).where( + Article.title == article.webTitle, + Article.source == ArticleSource.GUARDIAN, + Article.date == article.webPublicationDate, + Article.url == article.webUrl, + ) + ).first() + + if query_article: + print(f"Article {article.webTitle} already exists in database") + return False + + try: + article_orm = Article( + title=article.webTitle, + summary=article.fields.trailText if article.fields.trailText else "", + url=article.webUrl, + source=ArticleSource.GUARDIAN, + body=article.fields.bodyText, + date=article.webPublicationDate, + image_url=article.fields.thumbnail or "", + ) + session.add(article_orm) + session.commit() + print( + f"Added {article.webTitle} to database at {article.webPublicationDate}" + ) + except Exception as e: + print(f"Something went wrong with article {article.webTitle}") + print(e) + return False + + +def populate_daily_articles(): + articles = get_today_articles() + articles = articles[:1] + for article in articles: + article_obj = form_guardian_artilcle_obj(article) + add_daily_articles_to_db(article_obj) + + +if __name__ == "__main__": + populate_daily_articles() diff --git a/backend/src/scrapers/guardian/process.py b/backend/src/scrapers/guardian/process.py index e6be8a71..9a68886b 100644 --- a/backend/src/scrapers/guardian/process.py +++ b/backend/src/scrapers/guardian/process.py @@ -27,19 +27,20 @@ class GuardianArticle(BaseModel): webPublicationDate: str -with open(args.input) as f: - data = json.load(f) - for row in data: - article = GuardianArticle.model_validate(row) - article_orm = Article( - title=article.webTitle, - summary=article.fields.trailText if article.fields.trailText else "", - url=article.webUrl, - source=ArticleSource.GUARDIAN, - body=article.fields.bodyText, - date=article.webPublicationDate, - image_url=article.fields.thumbnail or "", - ) - with Session(engine) as session: - session.add(article_orm) - session.commit() +def populate_existing_articles(): + with open(args.input) as f: + data = json.load(f) + for row in data: + article = GuardianArticle.model_validate(row) + article_orm = Article( + title=article.webTitle, + summary=article.fields.trailText if article.fields.trailText else "", + url=article.webUrl, + source=ArticleSource.GUARDIAN, + body=article.fields.bodyText, + date=article.webPublicationDate, + image_url=article.fields.thumbnail or "", + ) + with Session(engine) as session: + session.add(article_orm) + session.commit()