TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #241 · 5 мај

Можно ли в Python создавать бинарные файлы? Конечно можно. Для этого в Python есть следующие инструменты: ▫️ тип данных bytes и bytearray ▫️ открытие файла в режиме wb (write binary) или rb (read binary) ▫️ модуль struct Про модуль struct поговорим в первую очередь. Файл в формате JSON или Yaml внутри себя содержит разметку данных. Всегда можно определить где список начался а где закончился. Где записана строка а где словарь. То есть формат записи данных содержит в себе элементы разметки данных. В binary-файле данные не имеют визуальной разметки. Это просто байты, записанные один за другим. Правила записи и чтения находятся вне файла. Модуль struct как раз и помогает с организацией данных в таком файле с помощью определения форматов записи для разных частей файла. Модуль struct преобразует Python-объекты в массив байт, готовый к записи в файл и имеющий определённый вид. Для этого всегда следует указывать формат преобразования (или, как оно здесь называется - запаковки). Формат нужен для того, чтобы выделить достаточное количество байт для записи конкретного типа объекта. В последствии с помощью того же формата будет производиться чтение. При этом следует помнить что мы говорим о типах языка С а не Python. Именно формат определяет, что записано в конкретном месте файла, число, строка или что-то еще. Вот какие токены формата у нас есть. Помимо этого, первым символом можно указать порядок байтов. На разных системах одни и те же типы данных могут записываться по-разному, поэтому желательно указать конкретный способ из доступных. Если этого не сделать, то используется символ '@', то есть нативный для текущей системы. В строке формата мы пишем в каком порядке и какие типы собираемся преобразовать в байты. Запакуем в байты простое число, токен "i". >>> import struct >>> struct.pack('=i', 10) b'\n\x00\x00\x00' Теперь несколько float, при этом нужно передавать элементы не массивом а последовательностью аргументов. >>> struct.pack('=fff', 1.0, 2.5, 4.1) b'\x00\x00\x80?\x00\x00 @33\x83@' Вместо нескольких токенов можно просто указать нужное количество элементов перед одним токеном, результат будет тот же. >>> struct.pack('=3f', 1.0, 2.5, 4.1) b'\x00\x00\x80?\x00\x00 @33\x83@' Теперь запакуем разные типы >>> data = struct.pack('=fiQ', 1.0, 4, 100500) я запаковал типы float, int и unsigned long long (очень большой int, на 8 байт) b'\x00\x00\x80?\x04\x00\x00...' Распаковка происходит аналогично, но нужно указать тот же формат, который использовался при запаковке. Результат возвращается всегда в виде кортежа. >>> struct.unpack('=fiQ', data) (1.0, 4, 100500) Как видите, ничего страшного! #lib#basic

Hashtags

Резултати

Пронајдени 2 слични објави

Пребарај: #whistleblower

当前筛选 #whistleblower清除筛选
American Оbserver

@american_observer · Post #5228 · 26.02.2026 г., 18:59

🕵️ Executive Privilege, Classified Gossip, and Congress Locked Out The Trump administration has drawn a curtain not just over the public, but over Congress itself. Tulsi Gabbard’s office has told Hill staff it will not share the full classified intelligence that triggered a whistleblower complaint against her, citing “the assertion of executive privilege to portions” of the material — even though the intel in question is an NSA report about a conversation between two foreign nationals discussing Jared Kushner. Democratic intel chiefs Mark Warner and Jim Himes say they can’t even confirm from the redacted version whether the intercepted discussion was about Kushner, because the complaint they finally received — eight months after it was filed and reportedly kept locked in a safe — is so heavily blacked out. The whistleblower accuses Gabbard of choking off distribution of the intelligence for political reasons and slowing its transmission to Congress; Gabbard denies wrongdoing and points to an inspector general who found the specific allegations about her “not credible,” while pointedly dodging the core transparency question. Executive privilege is almost never used to keep the Gang of Eight — the top bipartisan intel leaders — from seeing raw intelligence, especially when it’s about third‑country actors talking about a Trump relative, not about internal White House deliberations. Former NSA general counsel Glenn Gerstell calls that move “rare,” and other veterans say flatly it’s abnormal to smother a whistleblower case in secrecy while the same administration leaks just enough to declare the Kushner‑related claims “demonstrably false” without showing why. Republicans who control the intelligence committees have dismissed the whole affair as a manufactured Democratic smear and see no reason to push past the privilege wall, which leaves Democrats with theory and outrage but no leverage. On paper, Congress oversees the intelligence community; in practice, when a complaint touches Trump’s inner circle, the NSA cites national security, the DNI cites executive privilege, and the people supposedly in charge are told to be grateful for a redacted summary on a read‑and‑return basis. Call it the new security doctrine: surveillance for everyone, oversight for no one — especially if the intercepts stray too close to the family. #Gabbard#Kushner#whistleblower#executivePrivilege#NSA#Trump#Congress#USpolitics 📱American Оbserver - Stay up to date on all important events 🇺🇸

LEONARDO GUERRA

@nova_civitas · Post #16150 · 15.04.2026 г., 06:03

IL PREZZO DELLA VERITÀ: UN MEDICO BRITANNICO STA LOTTANDO CONTRO LA RADIAZIONE DOPO AVER ROTTO IL SILENZIO SUL COVID Mentre le istituzioni tentano di chiudere definitivamente il capitolo della gestione pandemica, la scure della censura continua a colpire chi, in nome dell'etica medica, ha osato sollevare dubbi. Il caso emblematico riportato dal Telegraph ci ricorda che la caccia alle streghe non è mai finita. Il confine tra "scienza" e "dogma" si fa sempre più sottile, e chi prova a varcarlo rischia la fine della propria carriera. È quanto sta accadendo nel Regno Unito, dove un medico sta combattendo l'ultima, estenuante battaglia legale per mantenere la propria licenza professionale. La sua colpa? Essere un whistleblower, ovvero aver segnalato anomalie, criticità e rischi legati alla gestione dell'emergenza Covid-19 e, presumibilmente, alla campagna vaccinale. LA CENSURA COME STRUMENTO DI CONTROLLO PROFESSIONALE Il caso, approdato sulle pagine del Telegraph, mette a nudo un sistema che non accetta il dissenso. Sebbene il diritto alla libertà di espressione e il dovere del medico di agire secondo scienza e coscienza siano pilastri della democrazia, la realtà post-2020 ci consegna un quadro ben diverso. Gli organismi di controllo (come il GMC britannico o i nostri Ordini dei Medici) sembrano essersi trasformati in tribunali inquisitori, pronti a radiare chiunque metta in discussione i protocolli ministeriali o la sicurezza dei farmaci immessi in commercio con procedure d'urgenza. IL PARADOSSO DEL "WHISTLEBLOWER" Un medico che segnala potenziali danni da vaccino o l'inefficacia di certe misure restrittive non sta compiendo un atto di ribellione politica, ma sta adempiendo al suo giuramento di Ippocrate. Eppure, la narrazione dominante etichetta questi professionisti come "pericoli per la salute pubblica". In questo scenario, il whistleblower diventa un bersaglio: ✔️ Isolamento professionale: i colleghi spesso si allontanano per timore di ritorsioni. ✔️ Battaglie legali infinite: costi esorbitanti e anni di tribunali per difendere il diritto di aver detto la verità. ✔️ Morte civile e professionale: la minaccia costante della revoca della licenza per privare il medico della sua sussistenza. PERCHÉ QUESTA BATTAGLIA RIGUARDA TUTTI NOI Come Corvelva, abbiamo sempre sostenuto che la libertà di cura passa necessariamente attraverso la libertà dei medici di poter parlare e agire senza il ricatto della radiazione. Se i medici vengono ridotti a meri esecutori di direttive politiche, la relazione medico-paziente scompare, lasciando spazio a una burocrazia sanitaria cieca e potenzialmente dannosa. Il caso riportato dal Telegraph non è un episodio isolato, ma parte di un pattern globale. La "scienza" che ha paura delle domande non è scienza, è ideologia. E quando questa ideologia usa la forza della legge per distruggere chi solleva dubbi, siamo di fronte a una deriva autoritaria che non possiamo ignorare. Esprimiamo la nostra massima solidarietà a tutti i medici che, in ogni parte del mondo, continuano a lottare per la verità, nonostante le persecuzioni. Senza medici liberi, non ci sono cittadini liberi. Corvelva Staff #Corvelva#LibertàDiScelta#MedicinaEtica#Whistleblower#Covid19#NoCensura https://www.telegraph.co.uk/news/2026/03/12/fighting-for-medical-licence-after-blowing-covid-whistle/?WT.mc_id=tmgoff_fb_photo_licence-after-blowing-covid-whistle/