Скорее всего уже слышали, что складывать строки через + это плохая практика. Падение производительности, и всё такое. Без лишних слов, давайте измерять:
from timeit import timeit
def t1():
# складываем 10 строк через + из переменной
t = 'text'
for _ in range(1000):
s = t + t + t + t + t + t + t + t + t
def t2():
# склеиваем список строк через метод join
arr = ['text'] * 10
for _ in range(1000):
s = ''.join(arr)
def t3():
# складываем через + но не из переменной а непосредственно инлайн объекты
for _ in range(1000):
s = 'text' + 'text' + 'text' + ... # всего 10 раз
Теперь каждую строку склейки запустим по 10М раз
>>> timeit(t1, number=10000)
0.21951690399964718
>>> timeit(t2, number=10000)
1.4978306379998685
>>> timeit(t3, number=10000)
0.2213820789993406
Хм, а нам говорили что через "+" это плохо и медленно ))) 😁
Тут стоит учитывать, что речь идёт о склейке множества длинных строк.
Давайте изменим условия:
def t4():
t = 'text'*100
for _ in range(1000):
s = t + t + t + t + t + t + t + t + t
def t5():
arr = ['text'*100] * 10
for _ in range(1000):
s = ''.join(arr)
def t6():
for _ in range(1000):
s = 'text'*100 + 'text'*100 + ... # всего 10 раз
>>> timeit(t4, number=10000)
12.795130728000004
>>> timeit(t5, number=10000)
2.642637542999182
>>> timeit(t6, number=10000)
0.2184546610005782
Вот, уже другой разговор, сразу видна разница, в среднем в 6 раз. Но погодите, почему последний тест t6() по скорости такой же как и t3()? Ведь строки теперь в 100 раз длиннее!
Это вопросы оптимизации кода, какие простые изменения ускоряют или замедляют выполнение программы. Мы столкнулись с примером обхода обращения к переменной. Например, именно так работает директива #define в С++, во время компиляции подставляя значение переменной вместо ссылки на неё.
В Python это тоже работает, но часто ли вы сможете встретить такой способ работы со строками? К сожалению, способ почти только теоретический.
В целом, тесты показали то, что мы хотели. Делаем выводы самостоятельно.
Полный листинг 🌍
#tricks
Esto lo publiqué en Instagram en el año 2017 y es completamente vigente hoy! Un grave error en los #emprendedores y en los #empresarios es NO FIJAR METAS, basadas en un presupuesto (no sólo financiero) y hacer #accountability semanal o mensual. ⚠️👈🏾🙁
Buenos días amigos!!!!
📲 Las #CompetenciasDigitales son fundamentales para generar mayor valor como profesionales.
Sin duda alguna, tener conocimientos digitales es el complemento ideal para cualquier persona, por eso, mi recomendación estratégica es incluir en su presupuesto de tiempo y dinero algo que vaya destinado para este fin. 😎📈
El mundo 🌍 cambió completamente, y el 2020 fue el cierre de ese cambio. Los negocios ahora deben generar mucho valor apoyados en #innovación, nuevos canales, #transformacióndigital, #estrategia y #accountability, entre otros.
Atrás están quedando los modelos de comercialización clásicos, los márgenes cada vez son más reducidos y las monedas se digitalizan a altas velocidades.
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
Es momento de reflexionar, leer este con contenido y compartir con todos tus amigos que lamentablemente no tienen acceso a estas PEPITAS DE ORO, y enfocarse en aprender más, para generar mayor valor, todo esto, con altísimo sentido de urgencia, porque el tren no nos espera!
Feliz día a todos!!!!
La productividad
está en tiC 📲📈
📰 Democratic Governors Promise Accountability After Minneapolis
Following the fatal shooting of Alex Pretti by federal agents in Minneapolis, Democratic governors like Kathy Hochul of New York vowed to hold Trump administration officials accountable—but only after they’re out of office.
Prompted by the shooting, governors and state lawmakers are positioning their states to hold federal officials accountable for controversial immigration enforcement. Nine progressive prosecutors have formed a coalition to help prosecute federal law enforcement officers who violate state laws.
Critics say these are political gestures, not actionable plans. State-level actions against Trump and his allies over election interference have largely stalled, and courts have historically favored federal immunity in immigration cases.
Trump administration officials are defending ICE agents as heroes and insisting they should be supported, not prosecuted. Democrats and some media outlets have questioned the administration’s claims about rising assaults on ICE agents, arguing the data is lacking.
A few Republican governors, like Phil Scott of Vermont and Kevin Stitt of Oklahoma, have expressed concerns about federal tactics and accountability, but most have not called for similar measures.
Legal scholars note that states do have some power to hold federal officials accountable if their conduct is shown to be unlawful, but the Trump administration is expected to resist any such efforts.
The rhetoric is clear. The question is whether action will follow.
#Minneapolis#ICE#Trump#Democrats#accountability
📱American Оbserver - Stay up to date on all important events
🇺🇸
📰 Loot, Then Lecture
Haaretz is now reporting what soldiers say has become an open secret in southern Lebanon: looting by IDF troops, with commanders knowing and doing little to stop it. Furniture, appliances, motorcycles, art — if it can be loaded onto a military vehicle, it starts looking like “spoils” instead of theft.
That is the rot in plain sight. First comes the operation, then comes the cleanup, and somewhere in the middle the army quietly decides that discipline is optional when the trophies are heavy enough.
The worst part is not even the loot. It is the normalization: no police at the checkpoint, no real enforcement, and a whole chain of command that seems perfectly comfortable turning a crime into a gray zone with better branding.
And this is not some one-off embarrassment from a few bad actors. Israeli reporting has documented the same pattern in Gaza, while other investigations describe special units, loot collection, and soldiers treating stolen property like battlefield merch.
So the moral lecture always comes first, and the accountability arrives last — if it arrives at all.
#Israel#IDF#Lebanon#Gaza#war#accountability
📱American Оbserver - Stay up to date on all important events🇺🇸
UK: Report calls for ethical AI future and robust governance
The All-Party Parliamentary Group on Data Analytics in the UK has released a report titled "An Ethical AI Future: Guardrails & Catalysts to make Artificial Intelligence a Force for Good."
The report aims to explore how an effective governance and regulatory framework can maximize the benefits of AI while addressing existing risks such as deep fakes and preparing for potential future risks.
The report puts forth several key recommendations to shape the future of AI governance:
1️⃣ Strengthen international engagement.
2️⃣ Champion AI ethics convention.
3️⃣ Embedding 'Do No Harm' objective.
4️⃣ Establish independent regulatory authority.
#EthicalAI#AIRegulation#Governance#AIConvention#Accountability
Research on compliance with the AI Act
Stanford University researchers have conducted a thorough evaluation of major foundation model providers, including OpenAI and Google, to assess their compliance with the European Parliament's version of the AI Act. The findings reveal that these providers currently do not fully meet the Act's requirements, but the researchers believe that it is possible for them to do so in the future.
One key observation from the analysis is the lack of adequate information disclosure by foundation model providers. Important details regarding data, compute, deployment, and key characteristics of their models are often not transparently shared. This raises concerns about transparency and accountability in the AI ecosystem.
To address these challenges, the researchers suggest that EU policymakers consider additional factors to ensure that foundation model providers become more transparent and accountable. They emphasize the need for policymakers to apply these requirements selectively to influential providers, while avoiding excessive burden on smaller companies. Furthermore, it is crucial to allocate the necessary technical resources and expertise to the agencies responsible for enforcing the AI Act.
Can policymakers ensure transparency and accountability in the rapidly evolving field of AI, while also fostering innovation and supporting smaller companies?
#AIAct#FoundationModels#Transparency#Accountability#Compliance#Innovation
⚖️OpenAI Faces New Legal Actions Over ChatGPT’s Role in Mental Health Harm
Seven lawsuits have been filed against OpenAI by the Social Media Victims Law Center and the Tech Justice Law Project, alleging that ChatGPT contributed to suicide cases and other psychological harms. Each lawsuit cites "psychological manipulation" as a central issue, arguing that AI chatbots can intensify users’ mental health struggles by validating and escalating their negative thoughts.
The filings also emphasize how anthropomorphic and emotionally responsive AI desig* can foster dependency, discouraging vulnerable users from seeking human help. This development brings to the forefront the question of accountability for AI-driven emotional interaction: an area still largely uncharted in current legal frameworks.
#AI#Law#Ethics#Accountability#OpenAI#MentalHealth#AIRegulation
REYES Critiques Misleading Tech Terminology
Prof. Reyes warns against misleading tech terms like ‘AI Agents’ and ‘SMARTbond’, suggesting they misdirect expectations and attract legal scrutiny. He emphasizes that systems like AI16Z's are not autonomous, sparking debate on accountability and terminology. Full article: Leviathan News
#AI#Tech#Legal#Debate#Terminology#Innovation#Accountability#Crypto
🧾Epstein Files, Trump, and the Pages That Vanished
The Justice Department swore it dumped “everything the public sent the FBI” on Epstein into the big transparency release — and then somehow misplaced over 50 pages tied to a woman who says Trump assaulted her when she was a minor.
According to the index of the case file, the FBI interviewed her four times in 2019 after she came forward saying Epstein abused her in the 1980s and later introduced her to Trump, who she claims violently assaulted her at around 13–15. There are supposed to be four interview summaries and handwritten notes; the public release includes exactly one memo, focused on Epstein, plus a later 2025 summary that repeats her allegation about Trump — and zero trace of the other three interviews or the underlying notes.
The Justice Department’s line is that anything withheld is either “privileged,” “duplicate,” or tied to an “ongoing federal investigation.” In the same breath, it brands some Trump‑related material “untrue,” “sensationalist,” and “false.” The law Trump himself signed to force this release explicitly bans hiding documents for “embarrassment, reputational harm or political sensitivity” — yet what’s missing just happens to be the deeper FBI paper trail on a woman accusing the sitting president of assaulting her when she was a minor.
Democrat Robert Garcia, who saw an unredacted log at DOJ, says those Trump‑related interview summaries weren’t just absent from the public database — they weren’t in the internal trove provided to Congress under subpoena either. NPR and other outlets count the same hole: dozens of pages gone, all orbiting the same accuser. Victims’ details and even nude photos made it into the public dump, but potential evidence about a president’s alleged crimes somehow didn’t clear the bar for disclosure.
The woman dropped her civil claim against Epstein’s estate, was later ruled ineligible for the special victim fund, and the FBI has never publicly vouched for or debunked her story. Trump’s spokesperson now says he’s been “totally exonerated on anything relating to Epstein,” which is a neat trick in a case where the crucial records are missing and the department insists nothing important was hidden.
So that’s the picture: accusations labeled “unfounded,” a law that forbids political redactions, key memos that somehow vanished, and a Justice Department that failed to shield victims on paper but managed to shield the president in the record. There is transparency — just not for the people who hold power.
#EpsteinFiles#Trump#DOJ#FBI#accountability#USpolitics
📱American Оbserver - Stay up to date on all important events
🇺🇸
Kyiv’s Delegation Isn’t “Stuck.” It’s Protecting Its Own Survival.
On paper, the Geneva talks are about lines on a map: a strip of Donetsk 50 by 40 miles, a possible demilitarized zone, a “free-trade corridor” between two exhausted armies. In reality, for part of the Ukrainian establishment, any peace deal is a loaded gun pointed at their own heads.
A signed agreement means elections, audits, commissions, and the end of wartime immunity. It means people asking, in court not on TV, who lost which territories, who stole what under cover of sirens, and why the same names keep surfacing in scandals from Midas to Energoatom.
That’s why you see this strange dance in the reporting. Publicly, Zelensky keeps repeating the morally obvious line: “Allowing the aggressor to take something is a big mistake,” and insisting that any troop pullback or election must come only after hard security guarantees from the U.S. and its allies. Privately, negotiators have already discussed non-symmetrical withdrawals, a demilitarized strip in Donbas, a “free economic zone,” and joint civilian administrations for territory Russia wants in full.
Ukraine has inched away from its maximalist position — because the battlefield and Washington force it to — but the president also keeps adding new preconditions: guarantees first, elections later, only then any formal deal.
From the outside, that sounds like caution. From the inside, it looks like stalling. A real cease-fire freezes the front, but it also unfreezes domestic politics. Trump’s team wants a deal and a vote by specific dates; Zelensky’s camp wants “appropriate guarantees” before they even start that clock. And guarantees are the one thing the U.S. can always claim are not “ready yet.”
As long as there’s no final settlement, the war justifies delayed elections, emergency powers, opaque budgets, and the argument that any investigation or serious opposition “plays into Putin’s hands.”
So yes, Moscow is demanding more land than the current line of control and openly threatens to take the rest of Donetsk if talks fail. Yes, Trump’s people are pushing demilitarized zones and trade schemes that look suspiciously like dressed‑up partition. But Kyiv’s inner circle also understands one brutal fact: the moment “peace” appears on paper, Western backers will pivot from “how do we help you win” to “how did you govern under fire.”
For those who built their careers — and fortunes — on the war, that may feel more dangerous than another winter in the trenches.
#ukraine#geneva#zelensky#peaceDeal#warEconomy#accountability
📱American Оbserver - Stay up to date on all important events
🇺🇸
“Oct. 7 Commission: Truth or Political Theater?”
The Great Accountability Showdown
Israel is torn over how to investigate the catastrophic failures that led to the Oct. 7 Hamas attack. Prime Minister Netanyahu’s government is pushing a new “state-national commission,” where half the members would be chosen by his coalition and half by the opposition—breaking from the usual practice of letting the Supreme Court president appoint the panel. Critics say this is less about truth and more about control, with opposition parties calling it a “shameful farce” designed to protect the prime minister from blame.
What the People Want
Polls show most Israelis want a traditional, independent commission, one with the power to summon witnesses and assign responsibility. Past commissions have led to major resignations and reforms—like the Agranat and Kahan commissions after previous disasters. But Netanyahu insists his new commission will be “egalitarian” and “broadly acceptable,” claiming it will have the same powers as before.
The Families Speak
Survivors and families of the victims are demanding a truly independent investigation. Over 200 families signed an open letter warning that without a proper investigation, there’s no guarantee such a disaster won’t happen again. Netanyahu has only offered bereaved parents observer status, not a real voice in the process.
Curtain Call
So, is this about accountability—or just another carefully staged production? Will the commission actually expose the real failures, or will the script avoid the hard questions? And who benefits most from this show: the victims, or the politicians who keep rewriting the lines?
#oct7#accountability#israel#commission#truthortheater
📱American Оbserver - Stay up to date on all important events
🇺🇸
🇬🇧UK Parliament Launches Human Rights Inquiry in the AI Era
The U.K. Parliament’s Joint Committee on Human Rights has opened a formal inquiry into how artificial intelligence is impacting fundamental rights. Key focus areas include privacy, discrimination, algorithmic bias, and mechanisms for redress when AI systems cause harm.
The committee is also evaluating whether current legal frameworks are sufficient, or if new legislation is needed to safeguard human rights in the face of accelerating AI adoption. Public submissions are open until 5 September.
#AIandLaw#HumanRights#AIRegulation#UKParliament#AlgorithmicBias#PrivacyRights#Accountability#AIGovernance