Grid View
List View
Flow View
Dal 24 al 27 giugno Milano ospita 'World Tech Conference 2026', futuro tecnologie esponenziali
Al centro dellâedizione 2026 ci saranno i grandi temi che stanno ridefinendo la competitivitĂ industriale e tecnologica globale
https://www.adnkronos.com/economia/dal-24-al-27-giugno-milano-ospita-world-tech-conference-2026-futuro-tecnologie-esponenziali_37MdvlLgrA4uYKuCGbq5GL
Allarme Cybersicurezza: la nuova frontiera dei Deepfake vocali
Durante i recenti forum sulla sicurezza digitale, gli esperti hanno evidenziato come il focus del contrasto ai deepfake si stia spostando rapidamente dai video alla clonazione vocale via IA, utilizzata in modo sempre piĂš massiccio per truffe e attacchi di ingegneria sociale. Parallelamente, si stanno sviluppando contromisure basate su intelligenze artificiali "sentinella" per intercettare le alterazioni audio in tempo reale
https://www.dire.it/19-06-2026/1249639-tg-mondo-hi-tech-ledizione-del-19-giugno-2026/
I CEO dell'Intelligenza Artificiale al G7: Scontro sulla sovranitĂ dei modelli
I leader di spicco dell'IA (tra cui Sam Altman di OpenAI, Dario Amodei di Anthropic e Demis Hassabis di Google DeepMind) hanno incontrato i capi di governo al G7 per spingere verso una coalizione sull'IA a guida statunitense, volta a creare standard comuni ed escludere la Cina dai modelli di frontiera. Tuttavia, l'Europa sta frenando, rivendicando fermamente la propria autonomia e la necessitĂ di una regolamentazione indipendente e di una sovranitĂ digitale interna.
https://www.tomshw.it/business/g7-evian-altman-amodei-hassabis-coalizione-ai-sovranita-2026
Quoting from Confuciusâs The Analects
Confucius influenced the development of Japan in many ways, namely in the structure of Japanâs early political system and in the idea of ie, or house. Ie became the foundation of Tokugawa Japanâs social organization. In Tokugawa Japan, the house, another name for family, formed the smallest economic, political, and spiritual unit. To keep the organization simple: samurai families stood at the top, followed by farming families, artisan families, and then merchant families and outcast families. Family members were expected to show filial piety to parents and grandparents, and families had to show loyalty to their local lord, who was framed as a parental figure for all families in the area. The local lord, then, held loyalty to the Tokugawa family in a similar way. And everyone in Japan held loyalty to the emperor and his family. Confucian principles tied this system together, especially with its emphasis on filial piety, social position, and social order. Confuciusâs later disciple, Mencius, underpinned what we would later call Bushido. Iâll briefly focus on quotes from Confucius (and not the usual old meme quotes). Dozens of Olympic swimming pools of ink have been expended over the centuries to explain and expand Confuciusâs ideas. Many books have been written about how his ideas influenced Japan. Because of this, I decided to read The Analects a few times. This book collects conversations among Confucius and 22 of his disciples. The collection was compiled during the Warring States Period of China and includes what appears to be genuine off-the-cuff comments. Sadly, Iâm not well-versed in Chinese history outside the broad strokes Iâve read in various books, so The Analects proved difficult at times. I lacked the context to piece together the significance of events referenced or of the people Confucius often lampooned. Confucius concerned himself with harmony and compassion toward others, and his sense of humor comes through the text. Confucius seemed to be a little obsessive compulsive. One of his students observed: âIf his mat was not straight, he did not sit on it.â The Analects spends much of its time discussing a mix of topics from military to how a virtuous person should live. Sometimes Confucius responds to questions with a snarkiness that made me think of responses Iâve read in Zen philosophy: âHow the flowers of the aspen-plum flutter and turn! Do I not think of you? But your house is distant.â The Master said, âIt is the want of thought about it. How is it distant?â Instead of discussing The Analects, I will have Confucius speak for himself. Hereâs a collection of quotes that jumped out at me as I read. I tried to pull quotes that remain clear without their surrounding context, but all quotes are suspect when pulled from their frame. Confucius spoke often of the superior man and how his (and her in a modern context) behavior and thinking should be. Confucius focused on social rank and the idea of everyone having a role and a place that they needed to stick to. Society was organized from the top down based on abilities and this social rank, and everyone had a duty to keep to their place. This background will provide some context to some of his quotes. Because of the nature of Chinese, translations and meanings of the sections can be disputed; centuries of commentary surrounds what Confucius wrote. English translations lose the nuance of Chinese and flattens meanings. Likewise, areas can be translated both ways: âDonât do to othersâ and âDo to others.â While similar, these different phrases require differing approaches: passivity versus action. Chinese characters compress meanings and layers, which makes translating and reading difficult. For those of us who canât read Chinese, we can only rely on differing translations and commentaries. So, these statements need to be read with all of this in mind. Fine words and an insinuating appearance are seldom associated with true virtue. I will not be afflicted at menâs not knowing me; I will be afflicted that I do not know men. If the people be led by laws and, uniformity sought to be given them by punishments, they will try to avoid the punishment, but have no sense of shame. If they be led by virtue, and uniformity sought to be given them by the rules of propriety, they will have the sense of shame, and moreover will become good. If a man keeps cherishing is old knowledge, so as continually to be acquiring new, he may be a teacher of others. The accomplished scholar is not a utensil. Learning without thought is labor lost; thought without learning is perilous. The cautious seldom err. The superior man wishes to be slow in his speech and earnest in his conduct. Virtue is not left to stand alone. He who practices it will have neighbors. The superior man thinks of virtue; the small man thinks of comfort. The superior man thinks of the sanctions of law; the small man thinks of favors which he may receive. The superior man is satisfied and composed; the mean man is always full of distress. The wise are free from perplexities; the virtuous from anxiety; and the bold from fear. The superior man seeks to perfect the admirable qualities of men, and does not seek to perfect their bad qualities. The mean man does the opposite of this. When a princeâs personal conduct is correct, his government is effective without the issuing of orders. If his personal conduct is not correct, he may issue orders, but they will not be followed. To lead an uninstructed people to war is to throw them away. To be poor without murmuring is difficult. To be rich without being proud is easy. I will not be concerned at menâs not knowing me; I will be concerned at my own want of ability. If a man take no thought about what is distant, he will find sorrow near at hand. What the superior man seeks, is in himself. What the mean man seeks, is in others. Should you read The Analects? Yes, if you want to understand one of the most important influences on China, Korea, and Japan through history. Confucius wouldnât become influential until after his own lifetime. Youâll see many of his principles tucked into anime, much like youâll see Biblical references in Western media. The Analects is a part of the cultural background. References Legge, James trans. (1861) The Chinese Classics: Volume 1. Confucian Analects.
đđď¸đš
Addio Google e Microsoft? Un francese su due sarebbe disposto a pagare di piĂš per unâalternativa nazionale
Per anni, la âsovranitĂ digitaleâ è stata il filo conduttore dei discorsi a Bruxelles. Ora i fatti confermano le parole: quasi un francese su due si dichiara disposto a pagare un poâ di piĂš per avvicinarsi ad essa.
Il rapporto Eurobarometro Digital Decade 2026 delinea un quadro chiaro: lâ83% dei francesi ritiene che lâUE dovrebbe ridurre la sua dipendenza digitale dai paesi terzi (in realtĂ , il mercato globale del cloud rimane ampiamente dominato da attori americani: AWS, Microsoft Azure e Google Cloud in testa). Il 72% ritiene che la politica digitale debba essere una prioritĂ alta o molto alta per lâUnione.
https://www.01net.com/actualites/adieu-google-et-microsoft-un-francais-sur-deux-serait-pret-a-payer-plus-cher-pour-une-alternative-souveraine.html
Grazie ad Al Kath per la segnalazione
Buon appetito đĽ°
Bit of plans -- by Arisotura
As far as melonDS is concerned, my last work was all about CPU timings... and I couldn't yet find an elegant way to handle them. I had some kind of caching in mind, but it's still less than ideal. Code fetch timings could be cached, but data fetch timings aren't really predictable, and there are other mechanics coming into play. What I had in mind was a sort of graph system, but I don't know how well it would work in practice.
This will be for later though.
I didn't foresee how much time and energy starting this job would take me. Things are starting to even out now. Same story for my psyche, things are falling into place, but there's still work...
Anyway.
Plans.
I will try to finish the work I was doing with the new OpenGL renderer. It was mostly dealing with things like VRAM streaming, and adding a "Golden Sun hack".
I could also try and see if I can build something for 2D layer filtering, but I might postpone that.
When I'm satisfied with what I have, I'll release melonDS 1.2.
Sound good?
Buongiornoooo âđ
Quizzino della domenica: gufi
Qual è la probabilità che i due gufi si guardino l'un l'altro?
MAO 12 (Bishounen Foe #ă˘ăăĄMAO)
<p>MAO 12 Review SPOILER Summary/Synopsis At a temple in a large body of water, a bishounen sorcerer named Shiranui kills two of his Shikigami with a naginata for losing their objective. Nine-hundred years in the past, the head of the Goko Clan (Shishou) and Mao observe the water onmyoji. The most powerful is a female […]</p>
<p>The post <a href="https://anime.astronerdboy.com/2026/06/mao-12.html">MAO 12 (Bishounen Foe #ă˘ăăĄMAO)</a> appeared first on <a href="https://anime.astronerdboy.com">AstroNerdBoy's Anime and Manga Blog</a>.</p>
Bezos, il male, e l'Horror vaqui.
Col senno di poi, posso dire a cosa corrispondesse questa sensazione. Ma, come sto imparando, le nostre âsensazioniâ, le nostre âeuristicheâ, sono cosĂŹ difficili da spiegare perchĂŠ spesso non riusciamo a risalire alla causa.
https://keinpfusch.net/bezos-il-male-e-lhorror-vaqui
L'intelligenza artificiale sta rovinando le nostre competenze? I primi risultati sono arrivati ââe non sono incoraggianti.
Gli studi dimostrano che la dipendenza dagli strumenti di #IntelligenzaArtificiale compromette le capacitĂ di medici e ingegneri informatici.
https://www.nature.com/articles/d41586-026-01947-1
Sogni d'oro đ
Frigibax
Bulbapedia description: Frigibax is a stout, grey, bipedal reptilian PokĂŠmon. Its head and facial features are large compared to the rest of its body, with large eyes containing yellow sclerae and black pupils (no iris), a bulbous light grey snout with two nostrils, and a large mouth. On the left side below its lip is [âŚ]
Un archivio dei miei strumenti visivi AuDHD
Un archivio gratuito e in continua evoluzione di strumenti visivi AuDHD per organizzare la quotidianitĂ e ridurre il carico mentale.
L'articolo Un archivio dei miei strumenti visivi AuDHD proviene da Ayako Satomi.
Uccidere meglio e di piÚ con la AI⌠sbagliata?
Lâallineamento etico di una macchina non è una questione di reputazione, ma di sicurezza fisica, e lo abbiamo capito solo dopo aver consegnato il grilletto al modello sbagliato.
https://mgpf.it/2026/06/20/grok-maven.html
L'Ucraina apre ai suoi partner l'accesso alle tecnologie militari russe attraverso la piattaforma TrophyLab. Il nuovo portale consente l'accesso alle analisi tecniche delle armi nemiche sequestrate, accelerando lo sviluppo di contromisure e la collaborazione internazionale
L'Ucraina lancia TrophyLab, una piattaforma ad accesso aperto per le tecnologie belliche russe, destinata ai partner di tutto il mondo, con l'obiettivo di potenziare le capacitĂ di difesa e accelerare le contromisure.
Secondo quanto affermato dal ministro della Difesa Mykhailo Fedorov, la piattaforma Telegram fornirĂ agli utenti verificati l'accesso a informazioni sulle moderne armi russe e ai relativi dati.
PerchÊ è una novità : di solito queste informazioni non venivano mai condivise con questo livello di dettaglio
https://www.ukrinform.ua/rubric-ato/4135551-ukraina-vidkrivae-dla-partneriv-dostup-do-vijskovih-tehnologij-rf-cerez-platformu-trophylab.html
FRITZ!Repeater 1700: le gioie del Wi-Fi 7
Fritz! negli anni ha abituato lâutenza a prodotti che, si è disposti a spendere qualcosina in piĂš rispetto agli entry-level della concorrenza â ma in realtĂ nemmeno sempre, visto che il catalogo è spesso in sconto â ripagano negli anni con una praticitĂ dâuso incredibile, anni di aggiornamenti garantiti e prestazioni che difficilmente fanno pentire [âŚ]
L'articolo FRITZ!Repeater 1700: le gioie del Wi-Fi 7 proviene da I Love Videogames â Notizie sui giochi per PC, Console e Mobile.
Buongiornoooo â
La matematica in tasca (libro)
Un veloce ripasso del perchĂŠ a scuola si studiano certi temi matematici
Fist of the North Star: Hokuto no Ken 13 (2026)(Shounen Posturing #FistOfTheNorthStar)
<p>Fist of the North Star: Hokuto no Ken 13 (2026) ĺćăŽćł -FIST OF THE NORTH STAR- 13 Hokuto no Ken -Fist of the North Star- SPOILER Summary/Synopsis: The shocked Ken calls out to his sister, Airi. She does not recognize his voice and thinks he is her new master. Ken tries to stop Rei, but […]</p>
<p>The post <a href="https://anime.astronerdboy.com/2026/06/fist-of-the-north-star-hokuto-no-ken-13-2026.html">Fist of the North Star: Hokuto no Ken 13 (2026)(Shounen Posturing #FistOfTheNorthStar)</a> appeared first on <a href="https://anime.astronerdboy.com">AstroNerdBoy's Anime and Manga Blog</a>.</p>
Buonanotte đ
Buon appetito đĽ°
LLM Quantization Part 1: What Even is an LLM?
In part 1 of our 3-part LLM quantization series, we build the foundation you'll need to understand why running a 70 billion parameter model without a trust fund requires some creative problem solving.
Hasan Piker On The Next Big Internet Battle
+ Inside tea on Peter Thielâs secret society, doom trolling, Edikted, Streamer U mania, dopamine sites, Whoa Vicky's literary era, GR00T, Footy Addicts, and a Polymarket podcast
WordPress.com Changelog: Sharper Image Editing and a New Way to Multitask
The latest WordPress.com updates enhance image editing, introduce Desktop Mode for multitasking, and expand AI capabilities for design and plugin management, alongside various reliability fixes.
Automatically Clean Scanned Documents: Remove Borders and Noise with a Script
I have a Brother printer. Each time I scan a document, it produces this black and whitish pattern, that looks like a barcode.
However, this is really annoying if while compiling your Italian tax declaration youâd scan 60 documents and each of them has a very long area with this pattern.
Iâve asked to LLM to produce a script that given a reference pattern, it deletes for each image and clean the images.
First, we need to isolate the pattern, therefore we make a copy of any picture, isolate the pattern and save it with a name like pattern.png
Then, we install the required dependencies:
sudo apt update
sudo apt install python3 python3-opencv
We then save into a file named subtract_pattern.py this script:
#!/usr/bin/env python3
from pathlib import Path
import cv2
import numpy as np
import sys
EXTS = {".jpg", ".jpeg", ".png", ".tif", ".tiff", ".bmp"}
def resize_to(img, shape):
return cv2.resize(img, (shape[1], shape[0]), interpolation=cv2.INTER_AREA)
def find_crop_from_pattern(img, pattern, diff_thr=18, min_run=8):
if img.shape != pattern.shape:
pattern = resize_to(pattern, img.shape)
diff = cv2.absdiff(img, pattern)
diff = cv2.GaussianBlur(diff, (5, 5), 0)
# Collassa in valori per riga/colonna
row_score = diff.mean(axis=1)
col_score = diff.mean(axis=0)
# Cerca la zona "diversa dal pattern"
row_mask = row_score > diff_thr
col_mask = col_score > diff_thr
def interval_from_mask(mask):
idx = np.where(mask)[0]
if len(idx) == 0:
return None
# unisci regioni vicine
runs = []
s = idx[0]
prev = idx[0]
for i in idx[1:]:
if i - prev > 1:
runs.append((s, prev))
s = i
prev = i
runs.append((s, prev))
# scegli intervallo principale
runs = [r for r in runs if (r[1] - r[0] + 1) >= min_run]
if not runs:
return None
return max(runs, key=lambda t: t[1] - t[0])
y_int = interval_from_mask(row_mask)
x_int = interval_from_mask(col_mask)
if y_int is None or x_int is None:
return None
y1, y2 = y_int[0], y_int[1] + 1
x1, x2 = x_int[0], x_int[1] + 1
return x1, y1, x2, y2
def main():
if len(sys.argv) < 3:
print("Uso: python3 crop_by_pattern.py <pattern_ref> <input_dir>")
sys.exit(1)
pattern_path = Path(sys.argv[1])
input_dir = Path(sys.argv[2])
out_dir = Path("output_crop")
out_dir.mkdir(exist_ok=True)
pattern = cv2.imread(str(pattern_path), cv2.IMREAD_GRAYSCALE)
if pattern is None:
print("Impossibile leggere il pattern.")
sys.exit(1)
files = sorted([p for p in input_dir.iterdir() if p.suffix.lower() in EXTS])
if not files:
print("Nessuna immagine trovata.")
sys.exit(1)
for p in files:
img = cv2.imread(str(p), cv2.IMREAD_GRAYSCALE)
if img is None:
continue
bbox = find_crop_from_pattern(img, pattern)
if bbox is None:
print(f"{p.name}: crop non trovato, salto")
continue
x1, y1, x2, y2 = bbox
cropped = img[y1:y2, x1:x2]
cv2.imwrite(str(out_dir / p.name), cropped)
print(f"{p.name}: crop {x1},{y1} -> {x2},{y2}")
if __name__ == "__main__":
main()
Finally we can run it:
python3 subtract_pattern.py pattern.png .
# assuming that script is in the same directory and pattern is named pattern.png
And⌠voilà ! In the output_crop folder we have all of our documents without the ugly area!~
Hereâs what a document looks like:
Dal 24 al 27 giugno Milano ospita 'World Tech Conference 2026', futuro tecnologie esponenziali
Al centro dellâedizione 2026 ci saranno i grandi temi che stanno ridefinendo la competitivitĂ industriale e tecnologica globale
https://www.adnkronos.com/economia/dal-24-al-27-giugno-milano-ospita-world-tech-conference-2026-futuro-tecnologie-esponenziali_37MdvlLgrA4uYKuCGbq5GL
Allarme Cybersicurezza: la nuova frontiera dei Deepfake vocali
Durante i recenti forum sulla sicurezza digitale, gli esperti hanno evidenziato come il focus del contrasto ai deepfake si stia spostando rapidamente dai video alla clonazione vocale via IA, utilizzata in modo sempre piĂš massiccio per truffe e attacchi di ingegneria sociale. Parallelamente, si stanno sviluppando contromisure basate su intelligenze artificiali "sentinella" per intercettare le alterazioni audio in tempo reale
https://www.dire.it/19-06-2026/1249639-tg-mondo-hi-tech-ledizione-del-19-giugno-2026/
I CEO dell'Intelligenza Artificiale al G7: Scontro sulla sovranitĂ dei modelli
I leader di spicco dell'IA (tra cui Sam Altman di OpenAI, Dario Amodei di Anthropic e Demis Hassabis di Google DeepMind) hanno incontrato i capi di governo al G7 per spingere verso una coalizione sull'IA a guida statunitense, volta a creare standard comuni ed escludere la Cina dai modelli di frontiera. Tuttavia, l'Europa sta frenando, rivendicando fermamente la propria autonomia e la necessitĂ di una regolamentazione indipendente e di una sovranitĂ digitale interna.
https://www.tomshw.it/business/g7-evian-altman-amodei-hassabis-coalizione-ai-sovranita-2026
Quoting from Confuciusâs The Analects
Confucius influenced the development of Japan in many ways, namely in the structure of Japanâs early political system and in the idea of ie, or house. Ie became the foundation of Tokugawa Japanâs social organization. In Tokugawa Japan, the house, another name for family, formed the smallest economic, political, and spiritual unit. To keep the organization simple: samurai families stood at the top, followed by farming families, artisan families, and then merchant families and outcast families. Family members were expected to show filial piety to parents and grandparents, and families had to show loyalty to their local lord, who was framed as a parental figure for all families in the area. The local lord, then, held loyalty to the Tokugawa family in a similar way. And everyone in Japan held loyalty to the emperor and his family. Confucian principles tied this system together, especially with its emphasis on filial piety, social position, and social order. Confuciusâs later disciple, Mencius, underpinned what we would later call Bushido. Iâll briefly focus on quotes from Confucius (and not the usual old meme quotes). Dozens of Olympic swimming pools of ink have been expended over the centuries to explain and expand Confuciusâs ideas. Many books have been written about how his ideas influenced Japan. Because of this, I decided to read The Analects a few times. This book collects conversations among Confucius and 22 of his disciples. The collection was compiled during the Warring States Period of China and includes what appears to be genuine off-the-cuff comments. Sadly, Iâm not well-versed in Chinese history outside the broad strokes Iâve read in various books, so The Analects proved difficult at times. I lacked the context to piece together the significance of events referenced or of the people Confucius often lampooned. Confucius concerned himself with harmony and compassion toward others, and his sense of humor comes through the text. Confucius seemed to be a little obsessive compulsive. One of his students observed: âIf his mat was not straight, he did not sit on it.â The Analects spends much of its time discussing a mix of topics from military to how a virtuous person should live. Sometimes Confucius responds to questions with a snarkiness that made me think of responses Iâve read in Zen philosophy: âHow the flowers of the aspen-plum flutter and turn! Do I not think of you? But your house is distant.â The Master said, âIt is the want of thought about it. How is it distant?â Instead of discussing The Analects, I will have Confucius speak for himself. Hereâs a collection of quotes that jumped out at me as I read. I tried to pull quotes that remain clear without their surrounding context, but all quotes are suspect when pulled from their frame. Confucius spoke often of the superior man and how his (and her in a modern context) behavior and thinking should be. Confucius focused on social rank and the idea of everyone having a role and a place that they needed to stick to. Society was organized from the top down based on abilities and this social rank, and everyone had a duty to keep to their place. This background will provide some context to some of his quotes. Because of the nature of Chinese, translations and meanings of the sections can be disputed; centuries of commentary surrounds what Confucius wrote. English translations lose the nuance of Chinese and flattens meanings. Likewise, areas can be translated both ways: âDonât do to othersâ and âDo to others.â While similar, these different phrases require differing approaches: passivity versus action. Chinese characters compress meanings and layers, which makes translating and reading difficult. For those of us who canât read Chinese, we can only rely on differing translations and commentaries. So, these statements need to be read with all of this in mind. Fine words and an insinuating appearance are seldom associated with true virtue. I will not be afflicted at menâs not knowing me; I will be afflicted that I do not know men. If the people be led by laws and, uniformity sought to be given them by punishments, they will try to avoid the punishment, but have no sense of shame. If they be led by virtue, and uniformity sought to be given them by the rules of propriety, they will have the sense of shame, and moreover will become good. If a man keeps cherishing is old knowledge, so as continually to be acquiring new, he may be a teacher of others. The accomplished scholar is not a utensil. Learning without thought is labor lost; thought without learning is perilous. The cautious seldom err. The superior man wishes to be slow in his speech and earnest in his conduct. Virtue is not left to stand alone. He who practices it will have neighbors. The superior man thinks of virtue; the small man thinks of comfort. The superior man thinks of the sanctions of law; the small man thinks of favors which he may receive. The superior man is satisfied and composed; the mean man is always full of distress. The wise are free from perplexities; the virtuous from anxiety; and the bold from fear. The superior man seeks to perfect the admirable qualities of men, and does not seek to perfect their bad qualities. The mean man does the opposite of this. When a princeâs personal conduct is correct, his government is effective without the issuing of orders. If his personal conduct is not correct, he may issue orders, but they will not be followed. To lead an uninstructed people to war is to throw them away. To be poor without murmuring is difficult. To be rich without being proud is easy. I will not be concerned at menâs not knowing me; I will be concerned at my own want of ability. If a man take no thought about what is distant, he will find sorrow near at hand. What the superior man seeks, is in himself. What the mean man seeks, is in others. Should you read The Analects? Yes, if you want to understand one of the most important influences on China, Korea, and Japan through history. Confucius wouldnât become influential until after his own lifetime. Youâll see many of his principles tucked into anime, much like youâll see Biblical references in Western media. The Analects is a part of the cultural background. References Legge, James trans. (1861) The Chinese Classics: Volume 1. Confucian Analects.
đđď¸đš
Addio Google e Microsoft? Un francese su due sarebbe disposto a pagare di piĂš per unâalternativa nazionale
Per anni, la âsovranitĂ digitaleâ è stata il filo conduttore dei discorsi a Bruxelles. Ora i fatti confermano le parole: quasi un francese su due si dichiara disposto a pagare un poâ di piĂš per avvicinarsi ad essa.
Il rapporto Eurobarometro Digital Decade 2026 delinea un quadro chiaro: lâ83% dei francesi ritiene che lâUE dovrebbe ridurre la sua dipendenza digitale dai paesi terzi (in realtĂ , il mercato globale del cloud rimane ampiamente dominato da attori americani: AWS, Microsoft Azure e Google Cloud in testa). Il 72% ritiene che la politica digitale debba essere una prioritĂ alta o molto alta per lâUnione.
https://www.01net.com/actualites/adieu-google-et-microsoft-un-francais-sur-deux-serait-pret-a-payer-plus-cher-pour-une-alternative-souveraine.html
Grazie ad Al Kath per la segnalazione
Buon appetito đĽ°
Bit of plans -- by Arisotura
As far as melonDS is concerned, my last work was all about CPU timings... and I couldn't yet find an elegant way to handle them. I had some kind of caching in mind, but it's still less than ideal. Code fetch timings could be cached, but data fetch timings aren't really predictable, and there are other mechanics coming into play. What I had in mind was a sort of graph system, but I don't know how well it would work in practice.
This will be for later though.
I didn't foresee how much time and energy starting this job would take me. Things are starting to even out now. Same story for my psyche, things are falling into place, but there's still work...
Anyway.
Plans.
I will try to finish the work I was doing with the new OpenGL renderer. It was mostly dealing with things like VRAM streaming, and adding a "Golden Sun hack".
I could also try and see if I can build something for 2D layer filtering, but I might postpone that.
When I'm satisfied with what I have, I'll release melonDS 1.2.
Sound good?
Buongiornoooo âđ
Quizzino della domenica: gufi
Qual è la probabilità che i due gufi si guardino l'un l'altro?
MAO 12 (Bishounen Foe #ă˘ăăĄMAO)
<p>MAO 12 Review SPOILER Summary/Synopsis At a temple in a large body of water, a bishounen sorcerer named Shiranui kills two of his Shikigami with a naginata for losing their objective. Nine-hundred years in the past, the head of the Goko Clan (Shishou) and Mao observe the water onmyoji. The most powerful is a female […]</p>
<p>The post <a href="https://anime.astronerdboy.com/2026/06/mao-12.html">MAO 12 (Bishounen Foe #ă˘ăăĄMAO)</a> appeared first on <a href="https://anime.astronerdboy.com">AstroNerdBoy's Anime and Manga Blog</a>.</p>
Bezos, il male, e l'Horror vaqui.
Col senno di poi, posso dire a cosa corrispondesse questa sensazione. Ma, come sto imparando, le nostre âsensazioniâ, le nostre âeuristicheâ, sono cosĂŹ difficili da spiegare perchĂŠ spesso non riusciamo a risalire alla causa.
https://keinpfusch.net/bezos-il-male-e-lhorror-vaqui
L'intelligenza artificiale sta rovinando le nostre competenze? I primi risultati sono arrivati ââe non sono incoraggianti.
Gli studi dimostrano che la dipendenza dagli strumenti di #IntelligenzaArtificiale compromette le capacitĂ di medici e ingegneri informatici.
https://www.nature.com/articles/d41586-026-01947-1
Sogni d'oro đ
Frigibax
Bulbapedia description: Frigibax is a stout, grey, bipedal reptilian PokĂŠmon. Its head and facial features are large compared to the rest of its body, with large eyes containing yellow sclerae and black pupils (no iris), a bulbous light grey snout with two nostrils, and a large mouth. On the left side below its lip is [âŚ]
Un archivio dei miei strumenti visivi AuDHD
Un archivio gratuito e in continua evoluzione di strumenti visivi AuDHD per organizzare la quotidianitĂ e ridurre il carico mentale.
L'articolo Un archivio dei miei strumenti visivi AuDHD proviene da Ayako Satomi.
Uccidere meglio e di piÚ con la AI⌠sbagliata?
Lâallineamento etico di una macchina non è una questione di reputazione, ma di sicurezza fisica, e lo abbiamo capito solo dopo aver consegnato il grilletto al modello sbagliato.
https://mgpf.it/2026/06/20/grok-maven.html
L'Ucraina apre ai suoi partner l'accesso alle tecnologie militari russe attraverso la piattaforma TrophyLab. Il nuovo portale consente l'accesso alle analisi tecniche delle armi nemiche sequestrate, accelerando lo sviluppo di contromisure e la collaborazione internazionale
L'Ucraina lancia TrophyLab, una piattaforma ad accesso aperto per le tecnologie belliche russe, destinata ai partner di tutto il mondo, con l'obiettivo di potenziare le capacitĂ di difesa e accelerare le contromisure.
Secondo quanto affermato dal ministro della Difesa Mykhailo Fedorov, la piattaforma Telegram fornirĂ agli utenti verificati l'accesso a informazioni sulle moderne armi russe e ai relativi dati.
PerchÊ è una novità : di solito queste informazioni non venivano mai condivise con questo livello di dettaglio
https://www.ukrinform.ua/rubric-ato/4135551-ukraina-vidkrivae-dla-partneriv-dostup-do-vijskovih-tehnologij-rf-cerez-platformu-trophylab.html
FRITZ!Repeater 1700: le gioie del Wi-Fi 7
Fritz! negli anni ha abituato lâutenza a prodotti che, si è disposti a spendere qualcosina in piĂš rispetto agli entry-level della concorrenza â ma in realtĂ nemmeno sempre, visto che il catalogo è spesso in sconto â ripagano negli anni con una praticitĂ dâuso incredibile, anni di aggiornamenti garantiti e prestazioni che difficilmente fanno pentire [âŚ]
L'articolo FRITZ!Repeater 1700: le gioie del Wi-Fi 7 proviene da I Love Videogames â Notizie sui giochi per PC, Console e Mobile.
Buongiornoooo â
La matematica in tasca (libro)
Un veloce ripasso del perchĂŠ a scuola si studiano certi temi matematici
Fist of the North Star: Hokuto no Ken 13 (2026)(Shounen Posturing #FistOfTheNorthStar)
<p>Fist of the North Star: Hokuto no Ken 13 (2026) ĺćăŽćł -FIST OF THE NORTH STAR- 13 Hokuto no Ken -Fist of the North Star- SPOILER Summary/Synopsis: The shocked Ken calls out to his sister, Airi. She does not recognize his voice and thinks he is her new master. Ken tries to stop Rei, but […]</p>
<p>The post <a href="https://anime.astronerdboy.com/2026/06/fist-of-the-north-star-hokuto-no-ken-13-2026.html">Fist of the North Star: Hokuto no Ken 13 (2026)(Shounen Posturing #FistOfTheNorthStar)</a> appeared first on <a href="https://anime.astronerdboy.com">AstroNerdBoy's Anime and Manga Blog</a>.</p>
Buonanotte đ
Buon appetito đĽ°
LLM Quantization Part 1: What Even is an LLM?
In part 1 of our 3-part LLM quantization series, we build the foundation you'll need to understand why running a 70 billion parameter model without a trust fund requires some creative problem solving.
Hasan Piker On The Next Big Internet Battle
+ Inside tea on Peter Thielâs secret society, doom trolling, Edikted, Streamer U mania, dopamine sites, Whoa Vicky's literary era, GR00T, Footy Addicts, and a Polymarket podcast
WordPress.com Changelog: Sharper Image Editing and a New Way to Multitask
The latest WordPress.com updates enhance image editing, introduce Desktop Mode for multitasking, and expand AI capabilities for design and plugin management, alongside various reliability fixes.
Automatically Clean Scanned Documents: Remove Borders and Noise with a Script
I have a Brother printer. Each time I scan a document, it produces this black and whitish pattern, that looks like a barcode.
However, this is really annoying if while compiling your Italian tax declaration youâd scan 60 documents and each of them has a very long area with this pattern.
Iâve asked to LLM to produce a script that given a reference pattern, it deletes for each image and clean the images.
First, we need to isolate the pattern, therefore we make a copy of any picture, isolate the pattern and save it with a name like pattern.png
Then, we install the required dependencies:
sudo apt update
sudo apt install python3 python3-opencv
We then save into a file named subtract_pattern.py this script:
#!/usr/bin/env python3
from pathlib import Path
import cv2
import numpy as np
import sys
EXTS = {".jpg", ".jpeg", ".png", ".tif", ".tiff", ".bmp"}
def resize_to(img, shape):
return cv2.resize(img, (shape[1], shape[0]), interpolation=cv2.INTER_AREA)
def find_crop_from_pattern(img, pattern, diff_thr=18, min_run=8):
if img.shape != pattern.shape:
pattern = resize_to(pattern, img.shape)
diff = cv2.absdiff(img, pattern)
diff = cv2.GaussianBlur(diff, (5, 5), 0)
# Collassa in valori per riga/colonna
row_score = diff.mean(axis=1)
col_score = diff.mean(axis=0)
# Cerca la zona "diversa dal pattern"
row_mask = row_score > diff_thr
col_mask = col_score > diff_thr
def interval_from_mask(mask):
idx = np.where(mask)[0]
if len(idx) == 0:
return None
# unisci regioni vicine
runs = []
s = idx[0]
prev = idx[0]
for i in idx[1:]:
if i - prev > 1:
runs.append((s, prev))
s = i
prev = i
runs.append((s, prev))
# scegli intervallo principale
runs = [r for r in runs if (r[1] - r[0] + 1) >= min_run]
if not runs:
return None
return max(runs, key=lambda t: t[1] - t[0])
y_int = interval_from_mask(row_mask)
x_int = interval_from_mask(col_mask)
if y_int is None or x_int is None:
return None
y1, y2 = y_int[0], y_int[1] + 1
x1, x2 = x_int[0], x_int[1] + 1
return x1, y1, x2, y2
def main():
if len(sys.argv) < 3:
print("Uso: python3 crop_by_pattern.py <pattern_ref> <input_dir>")
sys.exit(1)
pattern_path = Path(sys.argv[1])
input_dir = Path(sys.argv[2])
out_dir = Path("output_crop")
out_dir.mkdir(exist_ok=True)
pattern = cv2.imread(str(pattern_path), cv2.IMREAD_GRAYSCALE)
if pattern is None:
print("Impossibile leggere il pattern.")
sys.exit(1)
files = sorted([p for p in input_dir.iterdir() if p.suffix.lower() in EXTS])
if not files:
print("Nessuna immagine trovata.")
sys.exit(1)
for p in files:
img = cv2.imread(str(p), cv2.IMREAD_GRAYSCALE)
if img is None:
continue
bbox = find_crop_from_pattern(img, pattern)
if bbox is None:
print(f"{p.name}: crop non trovato, salto")
continue
x1, y1, x2, y2 = bbox
cropped = img[y1:y2, x1:x2]
cv2.imwrite(str(out_dir / p.name), cropped)
print(f"{p.name}: crop {x1},{y1} -> {x2},{y2}")
if __name__ == "__main__":
main()
Finally we can run it:
python3 subtract_pattern.py pattern.png .
# assuming that script is in the same directory and pattern is named pattern.png
And⌠voilà ! In the output_crop folder we have all of our documents without the ugly area!~
Hereâs what a document looks like:
Dal 24 al 27 giugno Milano ospita 'World Tech Conference 2026', futuro tecnologie esponenziali
Al centro dellâedizione 2026 ci saranno i grandi temi che stanno ridefinendo la competitivitĂ industriale e tecnologica globale
https://www.adnkronos.com/economia/dal-24-al-27-giugno-milano-ospita-world-tech-conference-2026-futuro-tecnologie-esponenziali_37MdvlLgrA4uYKuCGbq5GL
Allarme Cybersicurezza: la nuova frontiera dei Deepfake vocali
Durante i recenti forum sulla sicurezza digitale, gli esperti hanno evidenziato come il focus del contrasto ai deepfake si stia spostando rapidamente dai video alla clonazione vocale via IA, utilizzata in modo sempre piĂš massiccio per truffe e attacchi di ingegneria sociale. Parallelamente, si stanno sviluppando contromisure basate su intelligenze artificiali "sentinella" per intercettare le alterazioni audio in tempo reale
https://www.dire.it/19-06-2026/1249639-tg-mondo-hi-tech-ledizione-del-19-giugno-2026/
I CEO dell'Intelligenza Artificiale al G7: Scontro sulla sovranitĂ dei modelli
I leader di spicco dell'IA (tra cui Sam Altman di OpenAI, Dario Amodei di Anthropic e Demis Hassabis di Google DeepMind) hanno incontrato i capi di governo al G7 per spingere verso una coalizione sull'IA a guida statunitense, volta a creare standard comuni ed escludere la Cina dai modelli di frontiera. Tuttavia, l'Europa sta frenando, rivendicando fermamente la propria autonomia e la necessitĂ di una regolamentazione indipendente e di una sovranitĂ digitale interna.
https://www.tomshw.it/business/g7-evian-altman-amodei-hassabis-coalizione-ai-sovranita-2026
Quoting from Confuciusâs The Analects
Confucius influenced the development of Japan in many ways, namely in the structure of Japanâs early political system and in the idea of ie, or house. Ie became the foundation of Tokugawa Japanâs social organization. In Tokugawa Japan, the house, another name for family, formed the smallest economic, political, and spiritual unit. To keep the organization simple: samurai families stood at the top, followed by farming families, artisan families, and then merchant families and outcast families. Family members were expected to show filial piety to parents and grandparents, and families had to show loyalty to their local lord, who was framed as a parental figure for all families in the area. The local lord, then, held loyalty to the Tokugawa family in a similar way. And everyone in Japan held loyalty to the emperor and his family. Confucian principles tied this system together, especially with its emphasis on filial piety, social position, and social order. Confuciusâs later disciple, Mencius, underpinned what we would later call Bushido. Iâll briefly focus on quotes from Confucius (and not the usual old meme quotes). Dozens of Olympic swimming pools of ink have been expended over the centuries to explain and expand Confuciusâs ideas. Many books have been written about how his ideas influenced Japan. Because of this, I decided to read The Analects a few times. This book collects conversations among Confucius and 22 of his disciples. The collection was compiled during the Warring States Period of China and includes what appears to be genuine off-the-cuff comments. Sadly, Iâm not well-versed in Chinese history outside the broad strokes Iâve read in various books, so The Analects proved difficult at times. I lacked the context to piece together the significance of events referenced or of the people Confucius often lampooned. Confucius concerned himself with harmony and compassion toward others, and his sense of humor comes through the text. Confucius seemed to be a little obsessive compulsive. One of his students observed: âIf his mat was not straight, he did not sit on it.â The Analects spends much of its time discussing a mix of topics from military to how a virtuous person should live. Sometimes Confucius responds to questions with a snarkiness that made me think of responses Iâve read in Zen philosophy: âHow the flowers of the aspen-plum flutter and turn! Do I not think of you? But your house is distant.â The Master said, âIt is the want of thought about it. How is it distant?â Instead of discussing The Analects, I will have Confucius speak for himself. Hereâs a collection of quotes that jumped out at me as I read. I tried to pull quotes that remain clear without their surrounding context, but all quotes are suspect when pulled from their frame. Confucius spoke often of the superior man and how his (and her in a modern context) behavior and thinking should be. Confucius focused on social rank and the idea of everyone having a role and a place that they needed to stick to. Society was organized from the top down based on abilities and this social rank, and everyone had a duty to keep to their place. This background will provide some context to some of his quotes. Because of the nature of Chinese, translations and meanings of the sections can be disputed; centuries of commentary surrounds what Confucius wrote. English translations lose the nuance of Chinese and flattens meanings. Likewise, areas can be translated both ways: âDonât do to othersâ and âDo to others.â While similar, these different phrases require differing approaches: passivity versus action. Chinese characters compress meanings and layers, which makes translating and reading difficult. For those of us who canât read Chinese, we can only rely on differing translations and commentaries. So, these statements need to be read with all of this in mind. Fine words and an insinuating appearance are seldom associated with true virtue. I will not be afflicted at menâs not knowing me; I will be afflicted that I do not know men. If the people be led by laws and, uniformity sought to be given them by punishments, they will try to avoid the punishment, but have no sense of shame. If they be led by virtue, and uniformity sought to be given them by the rules of propriety, they will have the sense of shame, and moreover will become good. If a man keeps cherishing is old knowledge, so as continually to be acquiring new, he may be a teacher of others. The accomplished scholar is not a utensil. Learning without thought is labor lost; thought without learning is perilous. The cautious seldom err. The superior man wishes to be slow in his speech and earnest in his conduct. Virtue is not left to stand alone. He who practices it will have neighbors. The superior man thinks of virtue; the small man thinks of comfort. The superior man thinks of the sanctions of law; the small man thinks of favors which he may receive. The superior man is satisfied and composed; the mean man is always full of distress. The wise are free from perplexities; the virtuous from anxiety; and the bold from fear. The superior man seeks to perfect the admirable qualities of men, and does not seek to perfect their bad qualities. The mean man does the opposite of this. When a princeâs personal conduct is correct, his government is effective without the issuing of orders. If his personal conduct is not correct, he may issue orders, but they will not be followed. To lead an uninstructed people to war is to throw them away. To be poor without murmuring is difficult. To be rich without being proud is easy. I will not be concerned at menâs not knowing me; I will be concerned at my own want of ability. If a man take no thought about what is distant, he will find sorrow near at hand. What the superior man seeks, is in himself. What the mean man seeks, is in others. Should you read The Analects? Yes, if you want to understand one of the most important influences on China, Korea, and Japan through history. Confucius wouldnât become influential until after his own lifetime. Youâll see many of his principles tucked into anime, much like youâll see Biblical references in Western media. The Analects is a part of the cultural background. References Legge, James trans. (1861) The Chinese Classics: Volume 1. Confucian Analects.
đđď¸đš
Addio Google e Microsoft? Un francese su due sarebbe disposto a pagare di piĂš per unâalternativa nazionale
Per anni, la âsovranitĂ digitaleâ è stata il filo conduttore dei discorsi a Bruxelles. Ora i fatti confermano le parole: quasi un francese su due si dichiara disposto a pagare un poâ di piĂš per avvicinarsi ad essa.
Il rapporto Eurobarometro Digital Decade 2026 delinea un quadro chiaro: lâ83% dei francesi ritiene che lâUE dovrebbe ridurre la sua dipendenza digitale dai paesi terzi (in realtĂ , il mercato globale del cloud rimane ampiamente dominato da attori americani: AWS, Microsoft Azure e Google Cloud in testa). Il 72% ritiene che la politica digitale debba essere una prioritĂ alta o molto alta per lâUnione.
https://www.01net.com/actualites/adieu-google-et-microsoft-un-francais-sur-deux-serait-pret-a-payer-plus-cher-pour-une-alternative-souveraine.html
Grazie ad Al Kath per la segnalazione
Buon appetito đĽ°
Bit of plans -- by Arisotura
As far as melonDS is concerned, my last work was all about CPU timings... and I couldn't yet find an elegant way to handle them. I had some kind of caching in mind, but it's still less than ideal. Code fetch timings could be cached, but data fetch timings aren't really predictable, and there are other mechanics coming into play. What I had in mind was a sort of graph system, but I don't know how well it would work in practice.
This will be for later though.
I didn't foresee how much time and energy starting this job would take me. Things are starting to even out now. Same story for my psyche, things are falling into place, but there's still work...
Anyway.
Plans.
I will try to finish the work I was doing with the new OpenGL renderer. It was mostly dealing with things like VRAM streaming, and adding a "Golden Sun hack".
I could also try and see if I can build something for 2D layer filtering, but I might postpone that.
When I'm satisfied with what I have, I'll release melonDS 1.2.
Sound good?
Buongiornoooo âđ
Quizzino della domenica: gufi
Qual è la probabilità che i due gufi si guardino l'un l'altro?
MAO 12 (Bishounen Foe #ă˘ăăĄMAO)
<p>MAO 12 Review SPOILER Summary/Synopsis At a temple in a large body of water, a bishounen sorcerer named Shiranui kills two of his Shikigami with a naginata for losing their objective. Nine-hundred years in the past, the head of the Goko Clan (Shishou) and Mao observe the water onmyoji. The most powerful is a female […]</p>
<p>The post <a href="https://anime.astronerdboy.com/2026/06/mao-12.html">MAO 12 (Bishounen Foe #ă˘ăăĄMAO)</a> appeared first on <a href="https://anime.astronerdboy.com">AstroNerdBoy's Anime and Manga Blog</a>.</p>
Bezos, il male, e l'Horror vaqui.
Col senno di poi, posso dire a cosa corrispondesse questa sensazione. Ma, come sto imparando, le nostre âsensazioniâ, le nostre âeuristicheâ, sono cosĂŹ difficili da spiegare perchĂŠ spesso non riusciamo a risalire alla causa.
https://keinpfusch.net/bezos-il-male-e-lhorror-vaqui
L'intelligenza artificiale sta rovinando le nostre competenze? I primi risultati sono arrivati ââe non sono incoraggianti.
Gli studi dimostrano che la dipendenza dagli strumenti di #IntelligenzaArtificiale compromette le capacitĂ di medici e ingegneri informatici.
https://www.nature.com/articles/d41586-026-01947-1
Sogni d'oro đ
Frigibax
Bulbapedia description: Frigibax is a stout, grey, bipedal reptilian PokĂŠmon. Its head and facial features are large compared to the rest of its body, with large eyes containing yellow sclerae and black pupils (no iris), a bulbous light grey snout with two nostrils, and a large mouth. On the left side below its lip is [âŚ]
Un archivio dei miei strumenti visivi AuDHD
Un archivio gratuito e in continua evoluzione di strumenti visivi AuDHD per organizzare la quotidianitĂ e ridurre il carico mentale.
L'articolo Un archivio dei miei strumenti visivi AuDHD proviene da Ayako Satomi.
Uccidere meglio e di piÚ con la AI⌠sbagliata?
Lâallineamento etico di una macchina non è una questione di reputazione, ma di sicurezza fisica, e lo abbiamo capito solo dopo aver consegnato il grilletto al modello sbagliato.
https://mgpf.it/2026/06/20/grok-maven.html
L'Ucraina apre ai suoi partner l'accesso alle tecnologie militari russe attraverso la piattaforma TrophyLab. Il nuovo portale consente l'accesso alle analisi tecniche delle armi nemiche sequestrate, accelerando lo sviluppo di contromisure e la collaborazione internazionale
L'Ucraina lancia TrophyLab, una piattaforma ad accesso aperto per le tecnologie belliche russe, destinata ai partner di tutto il mondo, con l'obiettivo di potenziare le capacitĂ di difesa e accelerare le contromisure.
Secondo quanto affermato dal ministro della Difesa Mykhailo Fedorov, la piattaforma Telegram fornirĂ agli utenti verificati l'accesso a informazioni sulle moderne armi russe e ai relativi dati.
PerchÊ è una novità : di solito queste informazioni non venivano mai condivise con questo livello di dettaglio
https://www.ukrinform.ua/rubric-ato/4135551-ukraina-vidkrivae-dla-partneriv-dostup-do-vijskovih-tehnologij-rf-cerez-platformu-trophylab.html
FRITZ!Repeater 1700: le gioie del Wi-Fi 7
Fritz! negli anni ha abituato lâutenza a prodotti che, si è disposti a spendere qualcosina in piĂš rispetto agli entry-level della concorrenza â ma in realtĂ nemmeno sempre, visto che il catalogo è spesso in sconto â ripagano negli anni con una praticitĂ dâuso incredibile, anni di aggiornamenti garantiti e prestazioni che difficilmente fanno pentire [âŚ]
L'articolo FRITZ!Repeater 1700: le gioie del Wi-Fi 7 proviene da I Love Videogames â Notizie sui giochi per PC, Console e Mobile.
Buongiornoooo â
La matematica in tasca (libro)
Un veloce ripasso del perchĂŠ a scuola si studiano certi temi matematici
Fist of the North Star: Hokuto no Ken 13 (2026)(Shounen Posturing #FistOfTheNorthStar)
<p>Fist of the North Star: Hokuto no Ken 13 (2026) ĺćăŽćł -FIST OF THE NORTH STAR- 13 Hokuto no Ken -Fist of the North Star- SPOILER Summary/Synopsis: The shocked Ken calls out to his sister, Airi. She does not recognize his voice and thinks he is her new master. Ken tries to stop Rei, but […]</p>
<p>The post <a href="https://anime.astronerdboy.com/2026/06/fist-of-the-north-star-hokuto-no-ken-13-2026.html">Fist of the North Star: Hokuto no Ken 13 (2026)(Shounen Posturing #FistOfTheNorthStar)</a> appeared first on <a href="https://anime.astronerdboy.com">AstroNerdBoy's Anime and Manga Blog</a>.</p>
Buonanotte đ
Buon appetito đĽ°
LLM Quantization Part 1: What Even is an LLM?
In part 1 of our 3-part LLM quantization series, we build the foundation you'll need to understand why running a 70 billion parameter model without a trust fund requires some creative problem solving.
Hasan Piker On The Next Big Internet Battle
+ Inside tea on Peter Thielâs secret society, doom trolling, Edikted, Streamer U mania, dopamine sites, Whoa Vicky's literary era, GR00T, Footy Addicts, and a Polymarket podcast
WordPress.com Changelog: Sharper Image Editing and a New Way to Multitask
The latest WordPress.com updates enhance image editing, introduce Desktop Mode for multitasking, and expand AI capabilities for design and plugin management, alongside various reliability fixes.
Automatically Clean Scanned Documents: Remove Borders and Noise with a Script
I have a Brother printer. Each time I scan a document, it produces this black and whitish pattern, that looks like a barcode.
However, this is really annoying if while compiling your Italian tax declaration youâd scan 60 documents and each of them has a very long area with this pattern.
Iâve asked to LLM to produce a script that given a reference pattern, it deletes for each image and clean the images.
First, we need to isolate the pattern, therefore we make a copy of any picture, isolate the pattern and save it with a name like pattern.png
Then, we install the required dependencies:
sudo apt update
sudo apt install python3 python3-opencv
We then save into a file named subtract_pattern.py this script:
#!/usr/bin/env python3
from pathlib import Path
import cv2
import numpy as np
import sys
EXTS = {".jpg", ".jpeg", ".png", ".tif", ".tiff", ".bmp"}
def resize_to(img, shape):
return cv2.resize(img, (shape[1], shape[0]), interpolation=cv2.INTER_AREA)
def find_crop_from_pattern(img, pattern, diff_thr=18, min_run=8):
if img.shape != pattern.shape:
pattern = resize_to(pattern, img.shape)
diff = cv2.absdiff(img, pattern)
diff = cv2.GaussianBlur(diff, (5, 5), 0)
# Collassa in valori per riga/colonna
row_score = diff.mean(axis=1)
col_score = diff.mean(axis=0)
# Cerca la zona "diversa dal pattern"
row_mask = row_score > diff_thr
col_mask = col_score > diff_thr
def interval_from_mask(mask):
idx = np.where(mask)[0]
if len(idx) == 0:
return None
# unisci regioni vicine
runs = []
s = idx[0]
prev = idx[0]
for i in idx[1:]:
if i - prev > 1:
runs.append((s, prev))
s = i
prev = i
runs.append((s, prev))
# scegli intervallo principale
runs = [r for r in runs if (r[1] - r[0] + 1) >= min_run]
if not runs:
return None
return max(runs, key=lambda t: t[1] - t[0])
y_int = interval_from_mask(row_mask)
x_int = interval_from_mask(col_mask)
if y_int is None or x_int is None:
return None
y1, y2 = y_int[0], y_int[1] + 1
x1, x2 = x_int[0], x_int[1] + 1
return x1, y1, x2, y2
def main():
if len(sys.argv) < 3:
print("Uso: python3 crop_by_pattern.py <pattern_ref> <input_dir>")
sys.exit(1)
pattern_path = Path(sys.argv[1])
input_dir = Path(sys.argv[2])
out_dir = Path("output_crop")
out_dir.mkdir(exist_ok=True)
pattern = cv2.imread(str(pattern_path), cv2.IMREAD_GRAYSCALE)
if pattern is None:
print("Impossibile leggere il pattern.")
sys.exit(1)
files = sorted([p for p in input_dir.iterdir() if p.suffix.lower() in EXTS])
if not files:
print("Nessuna immagine trovata.")
sys.exit(1)
for p in files:
img = cv2.imread(str(p), cv2.IMREAD_GRAYSCALE)
if img is None:
continue
bbox = find_crop_from_pattern(img, pattern)
if bbox is None:
print(f"{p.name}: crop non trovato, salto")
continue
x1, y1, x2, y2 = bbox
cropped = img[y1:y2, x1:x2]
cv2.imwrite(str(out_dir / p.name), cropped)
print(f"{p.name}: crop {x1},{y1} -> {x2},{y2}")
if __name__ == "__main__":
main()
Finally we can run it:
python3 subtract_pattern.py pattern.png .
# assuming that script is in the same directory and pattern is named pattern.png
And⌠voilà ! In the output_crop folder we have all of our documents without the ugly area!~
Hereâs what a document looks like: