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

TGINSIGHT SIMILAR POSTS

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

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

Один из самых удобных способов записать данные это использование готовых форматов, такие как JSON или YAML. Из плюсов такого подхода стоит отметить вот что: 🔸 готовый, повсеместно используемый и поддерживаемый формат 🔸 простой и понятный файл, удобочитаемый для человека 🔸 можно легко редактировать в любом текстовом редакторе без специальных программ и библиотек Но есть и минусы 🔹 затраты времени при записи файла (кодирование данных в нужный формат строки) 🔹 затраты времени при чтении файла (декодирование данных в Python объекты) 🔹 размер файла увеличивается из-за разметки данных (скобки, запятые, переносы, отступы...) 🔹 перед записью все данные должны быть помещены в память в полном объёме (не всегда) 🔹 при чтении необходимо считать весь файл в память и только потом декодировать данные Если нужно писать немного данных в несколько файлов, то затраты по времени не ощутимы. Обычно это файлы конфига или какие-либо метаданные. Это отличный вариант под такие задачи. Есть и другой поход к записи файлов - это бинарные файлы. Используется, когда данных достаточно много и никто их не собирается читать глазками😳. 🔸 очень быстрая запись 🔸 чтение значительно быстрей чем JSON, YAML итд 🔸 размер файла значительно меньше, так как нет разметки 🔸 можно записывать данные по мере поступления не загружая всё в память 🔸 можно извлечь любую часть данных независимо Из минусов 🔹 нужно определить свой формат записи данных (если не используете готовую спецификацию определённого формата) 🔹 не получится открыть файл и визуально понять что там записано, а для чтения файла потребуется знать его спецификацию. 🔹 не так-то просто создать такой файл без специальной библиотеки В таком виде удобно записывать большой массив любых однородных данных. Например, мониторинг валютной биржи или кэшированная анимация 3D геометрии. (Это не означает что нельзя записать данные разного типа, просто это будет не так удобно) Представьте себе JPG-картинку. По сути это немного мета-информации и большой массив пикселей. Тоже самое со звуком или видео файлом. Поэтому, если вы попробуете открыть картинку в текстовом редакторе вы увидите что-то вроде такого f15d cd29 a564 4578 ... 09e2 9bc4 a696 1253 ... 84e9 4de1 3b23 c24a ... 2534 5161 28e0 709d ... ... Это и есть записанные байтики. И для их чтения требуется определённый софт который знает что с ними делать. Под каждый тип файла. К чему это я? Читайте в следующем посте... #tricks#basic

Резултати

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

Пребарај: #arf

当前筛选 #arf清除筛选
Embassy of Russia in Singapore

@rusembsg · Post #2898 · 25.04.2024 г., 00:01

🗓 On April 23-24, the 13th ASEAN Regional Forum Open Ended Study Group on Confidence Building Measures to Reduce the Risk of Confict Stemming from the Use ofICTs (13th #ARF OESG) and the 6th ASEAN Regional Forum Inter-Sessional Meeting (#ARF ISM) on ICT Security co-chaired by Russia 🇷🇺 and Indonesia 🇮🇩 was held in Moscow in a hybrid format. 🔹️Delegations of Indonesia 🇮🇩, Singapore 🇸🇬, Thailand 🇹🇭, Cambodia 🇰🇭, the Philippines 🇵🇭, India 🇮🇳 and Bangladesh 🇧🇩 took part in the meeting in person. Chair of the United Nations Open-Ended Working Group on security of and in the use of ICTs 2021-2025, Permanent Representative of the Republic of Singapore to the UN H.E. Mr. Burhanudeen Gafoor🇸🇬 addressed the gathering with his welcoming speech. 🔹️More than 80 participants discussed future plans and cooperation within the framework of the ARF ISM on ICT Security and considered new initiatives proposed by ARF members. The meeting also exchanged views on cooperation on ICT Security-related issues within the framework of the UN and other international platforms. 🤝 On the sidelines of the events a number of bilateral meetings took place.

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #1779 · 11.07.2025 г., 07:59

⚡️Russia's Foreign Minister Sergey Lavrov takes part in the 32th Ministerial Session of the ASEAN Regional Forum (#ARF) on security. 📍 Kuala Lumpur, July 11

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #959 · 24.04.2024 г., 16:16

🗓 On April 23-24, the 13th ASEAN Regional Forum Open Ended Study Group on Confidence Building Measures to Reduce the Risk of Confict Stemming from the Use ofICTs (13th #ARF OESG) and the 6th ASEAN Regional Forum Inter-Sessional Meeting (#ARF ISM) on ICT Security co-chaired by Russia 🇷🇺 and Indonesia 🇮🇩 was held in Moscow in a hybrid format. 🔹️Delegations of Indonesia 🇮🇩, Singapore 🇸🇬, Thailand 🇹🇭, Cambodia 🇰🇭, the Philippines 🇵🇭, India 🇮🇳 and Bangladesh 🇧🇩 took part in the meeting in person. Chair of the United Nations Open-Ended Working Group on security of and in the use of ICTs 2021-2025, Permanent Representative of the Republic of Singapore to the UN H.E. Mr. Burhanudeen Gafoor🇸🇬 addressed the gathering with his welcoming speech. 🔹️More than 80 participants discussed future plans and cooperation within the framework of the ARF ISM on ICT Security and considered new initiatives proposed by ARF members. The meeting also exchanged views on cooperation on ICT Security-related issues within the framework of the UN and other international platforms. 🤝 On the sidelines of the events a number of bilateral meetings took place.

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #390 · 05.05.2023 г., 04:00

🗓 On 28 April 2023 the 5th ASEAN Regional Forum Inter-Sessional Meeting (#ARF ISM) on ICT Security co-chaired by Russia 🇷🇺, Indonesia 🇮🇩 and the Republic of Korea 🇰🇷 was held in Moscow in a hybrid format. 🔹️More than 60 participants discussed cooperation on ICT Security-related issues within the framework of the ARF, UN and other international platforms. 🔹️This is the first ARF ISM on ICT Security held in hybrid format since the beginning of the COVID-19 pandemic. On its sidelines a number of bilateral meetings took place.

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #377 · 27.04.2023 г., 13:02

🗓 On 27 April 2023 the 11th ASEAN Regional Forum Open Ended Study Group on Confidence Building Measures to Reduce the Risk of Confict Stemming from the Use of ICTs (11th #ARF OESG) co-chaired by Russia 🇷🇺, Indonesia 🇮🇩 and the Republic of Korea 🇰🇷 was held in Moscow in a hybrid format to prepare for tomorrow's ARF Inter-Sessional Meeting (ISM) on ICT Security. Delegates discussed future plans and cooperation within the framework of the ARF ISM on ICT Security and considered new initiatives proposed by ARF participants.

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #477 · 14.06.2023 г., 14:31

🗓On June 14, Deputy Minister of Foreign Affairs of the Russian Federation Andrey Rudenko 🇷🇺 participated in the ASEAN Regional Forum Senior Officials' Meeting (#ARF SOM) held online under Indonesian Chairmanship 🇮🇩. 🔹Senior officials discussed the progress achieved so far and issues related to preparation for the upcoming ARF Foreign Ministers' Meeting in July in Jakarta, Indonesia 🇮🇩. 🇷🇺 As part of the exchange of views on topical issues in the Asia-Pacific, Russian delegation voiced its approach towards the military-political risks associated with building up a network of minilateral blocs in the region and bringing NATO potential to the East Asia. ☝️ Russia reiterated its position on the maintaining and strengthening the central role of #ASEAN in regional affairs based on ASEAN-led platforms of multilateral cooperation.

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #1691 · 19.06.2025 г., 11:34

🗓 On June 10-11, Deputy Minister of Foreign Affairs of the Russian Federation Andrey Rudenko🇷🇺 participated in the East Asia Summit Senior Officials' Meeting (#EAS SOM) and ASEAN Regional Forum Senior Officials' Meeting (#ARF SOM) in Penang, Malaysia 🇲🇾. 🔹️Senior officials discussed issues related to preparation for the EAS Summit and EAS and ARF Foreign Ministers' Meetings later this year. 🇷🇺 The Russian Side emphasized the importance of continuing joint efforts in key areas of cooperation within the ARF and the EAS, including implementation of the leaders' decisions on launching Regional Mechanism of Emerging Infectious Diseases Prevention and Control and establishing interaction among the EAS Participating States on tourism. Russia introduced new initiatives as well – proposal to add issues of socio-cultural connectivity to the EAS agenda and increase of capacity building in the field of countering the use of ICT for criminal purposes within the framework of ARF. 🔹️ As part of the exchange of views on topical issues in the Asia-Pacific, Russian delegation voiced its approach towards the military-political risks associated with building up a network of minilateral blocs of high conflict potential in the region and bringing NATO potential to the East Asia. ☝️ Russia reiterated its position on the maintaining and strengthening the central role of ASEAN in regional affairs based on ASEAN-led platforms of multilateral cooperation such as EAS, ARF and ADMM-Plus as well as developing the platforms towards building an architecture of equal and indivisible security in the Asia-Pacific region. #EAS#ARF

Hashtags

Russian Mission to ASEAN

@aseanrussia · Post #1058 · 08.06.2024 г., 10:55

🗓 On June 7-8, Russia's Alternate SOM Leader, Director-General of the Department of Asian and Pacific Cooperation of the Russian MFA Mr. Alexey Ovchinnikov🇷🇺 participated in the East Asia Summit Senior Officials' Meeting (#EAS SOM) and ASEAN Regional Forum Senior Officials' Meeting (#ARF SOM) in Vientiane, Lao PDR 🇱🇦. 🔹️Senior officials discussed issues related to preparation for the EAS Summit and EAS and ARF Foreign Ministers' Meetings later this year. 🇷🇺 The Russian Side emphasized the importance of continuing joint efforts in key areas of cooperation within the ARF and the EAS including implementation of the leaders' decisions on launching Regional Mechanism of Emerging Infectious Diseases Prevention and Control as well as establishing interaction among the EAS Participating States on tourism. 🔹️As part of the exchange of views on topical issues in the Asia-Pacific, Russian delegation voiced its approach towards the military-political risks associated with building up a network of minilateral blocs of high conflict potential in the region and bringing NATO potential to the East Asia. ☝️ Russia reiterated its position on the maintaining and strengthening the central role of ASEAN in regional affairs based on ASEAN-led platforms of multilateral cooperation such as EAS, ARF and ADMM-Plus. #EAS#ARF

Hashtags

Embassy of Russia in Singapore

@rusembsg · Post #3104 · 10.06.2024 г., 04:52

🗓 On June 7-8, Russia's Alternate SOM Leader, Director-General of the Department of Asian and Pacific Cooperation of the Russian MFA Mr. Alexey Ovchinnikov🇷🇺 participated in the East Asia Summit Senior Officials' Meeting (#EAS SOM) and ASEAN Regional Forum Senior Officials' Meeting (#ARF SOM) in Vientiane, Lao PDR 🇱🇦. 🔹️Senior officials discussed issues related to preparation for the EAS Summit and EAS and ARF Foreign Ministers' Meetings later this year. 🇷🇺 The Russian Side emphasized the importance of continuing joint efforts in key areas of cooperation within the ARF and the EAS including implementation of the leaders' decisions on launching Regional Mechanism of Emerging Infectious Diseases Prevention and Control as well as establishing interaction among the EAS Participating States on tourism. 🔹️As part of the exchange of views on topical issues in the Asia-Pacific, Russian delegation voiced its approach towards the military-political risks associated with building up a network of minilateral blocs of high conflict potential in the region and bringing NATO potential to the East Asia. ☝️ Russia reiterated its position on the maintaining and strengthening the central role of ASEAN in regional affairs based on ASEAN-led platforms of multilateral cooperation such as EAS, ARF and ADMM-Plus. #EAS#ARF

Hashtags

Embassy of Russia in Singapore

@rusembsg · Post #3344 · 30.07.2024 г., 03:18

🎙 Russia's Foreign Minister Sergey Lavrov’s answers to media questions following his visit to Malaysia 📍Kuala Lumpur, July 28, 2024 ❓Question: The US has been obsessively trying to create another training ground out of countries in the southeast. Is it relevant to say that cooperation between Russia and Asia can help the region maintain its sovereignty? 💬Sergey Lavrov: Of course. I think we had a chance to see it for ourselves yesterday and the day before in Laos during the East Asia Summit (#EAS) and the ASEAN Regional Forum (#ARF). Russia is seen as a balancing and stabilising factor in the context of countering the extremely sharp-elbowed actions by the countries outside the region, led by the US, who push their military infrastructure, including strategic arms. <...> Our balanced and clear stance always comes from the need to create platforms for negotiations and to agree on the basis of a balance of interests. This stance receives respect. Certainly, in contrast to the invasive and aggressive course of the US and NATO for military development of the region, our stance is closer to our #ASEAN friends. ❓Question: Last night saw another escalation in the Middle East, namely a missile attack on a football ground in the Israeli-occupied Golan Heights in which mostly children and teenagers were killed and injured. Israel has accused Lebanon, while Lebanon has put the blame on Israel. What is the likelihood of an all-out war between Israel and Lebanon? What could be done to prevent further bloodshed? 💬Sergey Lavrov: So far, we do not see any possibility of stopping the bloodshed. In response to numerous calls for a ceasefire, Israeli Prime Minister Benjamin Netanyahu has stated that Israel will not stop until it destroys Hamas completely. I believe, and many of my colleagues share this view, that the destruction of that organisation, which has significant capabilities and enjoys broad support, including in the Muslim world, is an unrealistic task. Russia condemns all terrorist attacks committed by any group. We condemned Hamas’s terrorist attack on Israeli civilians on October 7, 2023. But Israel’s retaliatory actions have been unacceptable. They are a flagrant violation of international humanitarian law and amount to collective punishment of people, which international conventions prohibit. <...> I am sure that the main condition for a lasting solution to the Middle East crisis is the fulfilment of the UN Security Council resolution on the establishment of a Palestinian state as soon as possible. This cannot be achieved without restoring Palestinian unity so that the Palestinians themselves can determine the format of negotiations regarding their life in a sovereign state. This goal has not yet been achieved. Efforts must continue towards this end. Read in full

Russian Mission to ASEAN

@aseanrussia · Post #1204 · 29.07.2024 г., 13:51

🎙 Russia's Foreign Minister Sergey Lavrov’s answers to media questions following his visit to Malaysia 📍Kuala Lumpur, July 28, 2024 ❓Question: The US has been obsessively trying to create another training ground out of countries in the southeast. Is it relevant to say that cooperation between Russia and Asia can help the region maintain its sovereignty? 💬Sergey Lavrov: Of course. I think we had a chance to see it for ourselves yesterday and the day before in Laos during the East Asia Summit (#EAS) and the ASEAN Regional Forum (#ARF). Russia is seen as a balancing and stabilising factor in the context of countering the extremely sharp-elbowed actions by the countries outside the region, led by the US, who push their military infrastructure, including strategic arms. <...> Our balanced and clear stance always comes from the need to create platforms for negotiations and to agree on the basis of a balance of interests. This stance receives respect. Certainly, in contrast to the invasive and aggressive course of the US and NATO for military development of the region, our stance is closer to our #ASEAN friends. ❓Question: Last night saw another escalation in the Middle East, namely a missile attack on a football ground in the Israeli-occupied Golan Heights in which mostly children and teenagers were killed and injured. Israel has accused Lebanon, while Lebanon has put the blame on Israel. What is the likelihood of an all-out war between Israel and Lebanon? What could be done to prevent further bloodshed? 💬Sergey Lavrov: So far, we do not see any possibility of stopping the bloodshed. In response to numerous calls for a ceasefire, Israeli Prime Minister Benjamin Netanyahu has stated that Israel will not stop until it destroys Hamas completely. I believe, and many of my colleagues share this view, that the destruction of that organisation, which has significant capabilities and enjoys broad support, including in the Muslim world, is an unrealistic task. Russia condemns all terrorist attacks committed by any group. We condemned Hamas’s terrorist attack on Israeli civilians on October 7, 2023. But Israel’s retaliatory actions have been unacceptable. They are a flagrant violation of international humanitarian law and amount to collective punishment of people, which international conventions prohibit. <...> I am sure that the main condition for a lasting solution to the Middle East crisis is the fulfilment of the UN Security Council resolution on the establishment of a Palestinian state as soon as possible. This cannot be achieved without restoring Palestinian unity so that the Palestinians themselves can determine the format of negotiations regarding their life in a sovereign state. This goal has not yet been achieved. Efforts must continue towards this end. Read in full

ПретходнаСтраница 1 од 5Следна