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

TGINSIGHT SIMILAR POSTS

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

Изворен канал @pythonotes · Post #183 · 23 ное.

Python + bash Если вам часто требуется запускать shell команды из Python-кода, какой способ вы используете? Самый низкоуровневый это функция os.system(), либо os.popen(). Рекомендованный способ это subprocess.call(). Но это всё еще достаточно неудобно. Советую обратить своё внимание на очень крутую библиотеку sh. Что она умеет? 🔸 удобный синтаксис вызова команд как функций # os import os os.system("tar cvf demo.tar ~/") # subprocess import subprocess subprocess.call(['tar', 'cvf', 'demo.tar', '~/']) # sh import sh sh.tar('cvf', 'demo.tar', "~/") 🔸 простое создание функции-алиаса для длинной команды fn = sh.lsof.bake('-i', '-P', '-n') output = sh.grep(fn(), 'LISTEN') в этом примере также задействован пайпинг 🔸 удобный вызов команд от sudo with sh.contrib.sudo: print(ls("/root")) Такой запрос спросит пароль. Чтобы это работало нужно соответствующим способом настроить юзера. А вот вариант с вводом пароля через код. password = "secret" sudo = sh.sudo.bake("-S", _in=password+"\n") print(sudo.ls("/root")) Это не все фишки. Больше интересных примеров смотрите в документации. Специально для Windows💀 юзеров #libs#linux

Hashtags

Резултати

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

Пребарај: #elections2024

当前筛选 #elections2024清除筛选
Venezuelanalysis

@venanalysis · Post #1745 · 15.09.2024 г., 23:07

The Venezuelanalysis podcast returns! After a short hiatus, we're back with a new format! VA staff is set to feature more prominently and we'll publish on video as well. In this episode, host José Luis Granados Ceja and editor Ricardo Vaz break down the electoral aftermath in Venezuela. Follow this link for early access: https://www.patreon.com/posts/112126008 #Venezuela#Podcast#Elections2024

Venezuelanalysis

@venanalysis · Post #1627 · 01.07.2024 г., 15:45

Venezuelanalysis columnist Clodovaldo Hernández offers a deep dive into the complexities and uncertainties surrounding Venezuela's July 28 presidential elections. He tackles Maduro's prospects and challenges, as well as those of the US-backed opposition. Read the column: https://venezuelanalysis.com/analysis/july-28-an-equation-with-multiple-unknowns/ #Venezuela#Elections2024#Democracy

Venezuelanalysis

@venanalysis · Post #1720 · 15.08.2024 г., 23:39

The four-person UN panel said that the lack of detailed results had a “negative impact on confidence in the [electoral] outcome” announced by the CNE. The electoral body accused the UN team of violating its agreement and carrying forward a "political agenda." Read the report: https://venezuelanalysis.com/news/venezuela-electoral-authorities-reject-un-experts-report-for-political-agenda/ #Venezuela#Elections2024#UnitedNations

Venezuelanalysis

@venanalysis · Post #1703 · 31.07.2024 г., 03:18

The Venezuelanalysis team held a livestream on Tuesday evening to provide an on-the-ground update of the situation in Venezuela following Sunday's elections. Watch the video: https://venezuelanalysis.com/video/venezuelas-post-election-scene-on-the-ground-reports/ #Venezuela#Chavismo#Elections2024

Venezuelanalysis

@venanalysis · Post #1710 · 06.08.2024 г., 03:38

Chavista analyst and activist Luigino Bracci talked to computing expert Victor Theoktisto to address open questions surrounding the July 28 elections. “The opposition must challenge the results before the TSJ, not in public opinion or international media,” stated the professor. Read the article: https://venezuelanalysis.com/analysis/cybersecurity-expert-on-fraud-claims-and-voting-safeguards-in-venezuelas-presidential-election/ #Venezuela#Elections2024#cybersecurity

Venezuelanalysis

@venanalysis · Post #1709 · 04.08.2024 г., 23:46

Venezuelan President Nicolás Maduro said authorities had neutralized a “fascist outbreak” following last Sunday's elections. Check out a gallery of yesterday's rallies: https://venezuelanalysis.com/images/venezuela-government-opposition-supporters-take-to-the-streets-in-post-electoral-scene/ #Venezuela#Elections2024#Demonstration

Venezuelanalysis

@venanalysis · Post #1707 · 03.08.2024 г., 13:35

Chavismo and the US-backed opposition are mobilizing this Saturday after updated electoral results continue favoring President Maduro. Meanwhile, the Venezuelan Supreme Court demanded that candidates and the electoral body submit evidence in order to review the vote results. Read the full story: https://venezuelanalysis.com/news/venezuela-cne-ratifies-maduro-victory-supreme-court-demands-voting-records-and-hacking-evidence/ #Venezuela#SupremeCourt#Elections2024

Venezuelanalysis

@venanalysis · Post #1633 · 06.07.2024 г., 18:37

Incumbent Nicolás Maduro and opposition challenger Edmundo González saw supporters come out en masse in Caracas as the campaign officially began ahead of the July 28 presidential vote. There are 10 candidates running. Both Maduro and González have expressed confidence in victory. Report + photos: https://venezuelanalysis.com/images/venezuela-presidential-campaign-kicks-off-with-massive-rallies/ #Venezuela#Elections2024#CampaignTrail

EmbajadaRusaVen

@embajadarusaven · Post #1452 · 15.03.2024 г., 16:24

⚡️Arrancan las #elecciones presidenciales en #Rusia Por primera vez se celebran durante tres días de acuerdo con las peticiones de los ciudadanos, según informó anteriormente Ella Pamfilova, presidenta de la Comisión Electoral Central (CEC). En las actuales elecciones presidenciales se utilizará activamente el voto electrónico a distancia: según la CEC, unos 5 millones de ciudadanos rusos van a votar por Internet, por lo que se ha prestado especial atención a la ciberseguridad. ✔️ Por primera vez, los residentes de nuevas regiones del país votarán en las elecciones presidenciales. ⚡️Las primeras estadísticas estarán disponibles a partir del 17 de marzo. #Elections2024#VoteForRussia

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