@fight4f · Post #8750 · 24.09.2024 г., 12:28
中國是否社會主義 ? (社運日記討論) 最近一些共同參與巴勒斯坦社運的洋人和中亞人討論了中國的問題, 討論了一些中國社會的制度問題, 有一些有意思的認知問題, 當中關係很多不同的流派問題及探討, 這幾天會抽空寫一些東西。 #Socialism
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #22 · 19 јан.
Заметка начинающим, которые часто сталкиваются с подобной непоняткой. Ситуация следующая, есть список файлов: names = [ 'image.bmp', 'second.txt.bkp', 'data.db', '.config.cfg', 'file.ext.bkp' ] И мы хотим убрать у них окончание ".bkp". Не знаю зачем, пример довольно надуманный) Но суть он показывает, а это главное. Те, кто еще не очень знаком с библиотекой os.path или pathlib, вероятно решат обработать имена как строки. И тут вполне подойдет метод строки strip(). Что делает этот метод? Он отрезает указанные символы по обеим сторонам строки. Если ничего не указать, то убирает невидимые символы (пробелы, табуляции и переносы строк). В нашем случае будет выглядеть вот так: >>> name.strip('.bkp') То есть просим удалить строку '.bkp' по краям имени файла, если таковая есть. Можно применить аналогичный метод rstrip(), чтобы отрезать только справа, но для этого примера используем обычный. >>> for name in names: >>> print(name.strip('.bkp')) image.bm second.txt data.d config.cfg file.ext Хм, что-то не то с нашими именами! Что случилось??? Видим нежелательное переименование в именах, где и близко не было указанной строки '.bkp' А дело всё в том, что данный метод ищет не указанную строку, а указанные символы, и не важно в каком порядке. Для метода strip() строка '.bkp' это не паттерн для поискаа список символов. Потому он отрезал симовол 'p' от '.bmp' и удалил точку из файла '.config.cfg'. Как тогда правильно заменить именно паттерн? Для начинающего можно посоветовать метод строки replace(), который как раз использует для замены указанную строку целиком. В нашем примере заменим её на пустую строку. >>> for name in names: >>> print(name.replace('.bkp', '')) image.bmp second.txt data.db .config.cfg file.ext Уже лучше, но помните, это лишь пример про strip(). Для работы с именами файлов есть способы и более "правильные", дающие однозначно верный результат. Я взял файлы только в качестве примера. Даже replase() тут может сделать не то что ожидаем. Просто впредь будьте внимательны с этим strip(). #basic
Hashtags
Пребарај: #socialism
@fight4f · Post #8750 · 24.09.2024 г., 12:28
中國是否社會主義 ? (社運日記討論) 最近一些共同參與巴勒斯坦社運的洋人和中亞人討論了中國的問題, 討論了一些中國社會的制度問題, 有一些有意思的認知問題, 當中關係很多不同的流派問題及探討, 這幾天會抽空寫一些東西。 #Socialism
Hashtags
@venanalysis · Post #2056 · 07.08.2025 г., 14:58
🎙🔊 PODCAST | The latest Venezuelanalysis episode discusses the role of communes in socialist construction and anti-imperialist struggles. Communes foster communal exchange over commodities and address racial and patriarchal oppression. Their impact, however, depends on integration into a broader anti-imperialist strategy in the global fight against imperialism, states guest Chris Gilbert. 👉 Watch the full episode here: https://www.youtube.com/watch?v=u0RyfxgQgfc&t=2s #Communes#Socialism
Hashtags
@venanalysis · Post #1594 · 08.06.2024 г., 20:56
Seasoned communard Ángel Prado takes over the Ministry of Communes as the Maduro government bets on funding local projects chosen by communities. Prado replaces Guy Vernáez and pledged to take on the challenge with "great commitment." https://venezuelanalysis.com/news/venezuela-maduro-appoints-el-maizals-angel-prado-minister-of-communes/ #Venezuela#Communes#Socialism
Hashtags
@venanalysis · Post #1547 · 29.04.2024 г., 01:50
"Independence, commune and socialism." This is the slogan of a Venezuelan organization that aims to bring together popular power collectives: the Communard Union. Find out all about this initiative that wants to push the construction of socialism as envisioned by revolutionary leader Hugo Chávez. Watch the video here: https://venezuelanalysis.com/video/venezuelas-communard-union-in-a-nutshell/ #Venezuela#Socialism#Communes
Hashtags
@venanalysis · Post #1755 · 25.09.2024 г., 22:52
Burning Questions Put to Shaman Rufino of Venezuela Venezuelan shaman Rufino, a Huottüja leader, reflects on the recent elections and the future of the Bolivarian Revolution, urging for equal distribution of resources across communities. “We, the Huottüja people, live in socialism, sharing and caring for the territory.” Read the full article here 👉🏼https://shorturl.at/h61oM #IndigenousPeoples#PresidentialElections2024#Socialism
@venanalysis · Post #2045 · 28.07.2025 г., 23:34
🗓️ MILESTONE | On July 28, we remember the birth of Hugo Chávez, born in 1954 in Sabaneta, Venezuela. A revolutionary leader who reshaped the nation’s political landscape, Chávez remains a defining figure in Latin American history and a lasting influence on global struggles for socialism, sovereignty, and social justice. 👉 Find out about his legacy in this infographic: https://venezuelanalysis.com/infographics/15574/ #HugoChavez#Socialism#Venezuela#LatinAmerica
@Pincongessence · Post #2504 · 17.11.2021 г., 03:45
看到这楼的时候在想:“这大概不只是美国人才有的问题吧”。我自己经历过的教育似乎也对其他“主义”非常排斥。 如果可以理解偏见的成因,我们会有办法改善现状吗? #reddit#socialism#education#bias 来源:reddit
Hashtags
@mib_messageinabottle · Post #7065 · 08.08.2024 г., 21:37
What #Britain is witnessing is the beginning of Dark #Blairism. This is the final stage in the collapse of the country. 🇬🇧🪦🧵 The first iteration of Blairism was a happy-go-lucky affair. #Blair and co were #Marxists of a variety, but happy Marxists who rejected state #socialism and embraced #cultural radicalism - a new, freer society where different groups would live in harmony. ☘🌈❤️ But society rejected this vision. 😭 People had “biases” - a false consciousness of sorts, mostly amongst the uneducated #gammons and chuds. 🤮 They couldn’t get into #Oxbridge to study with Tony, so the state needed to be used to educate them..... 👏 Read More: https://threadreaderapp.com/thread/1821450407979167748.html