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

Резултати

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

Пребарај: #facadedesign

当前筛选 #facadedesign清除筛选

Ørsted Gardens. Ørsted Gardens transformed a dilapidated building (see third image) into a new social space with semi-private decks for the individual residents. Ørsted Gardens by Tegnestuen Lokal – "If we want to achieve a sustainable future, we cannot rely on only building sustainable buildings going forward. We need to have a visionary method of transforming and adapting existing buildings to meet our changing needs. Ørsted Gardens is an example of a project that brings a generic renovation to a new level, improving the visual and social environment for residents and visitors alike." #arch_shovel#architecture#archdaily#facadedesign

3XN Architect’s proposal for SRPJ in Tokyo. The design for The Shibuya Upper West project, 𝗧𝗵𝗲 𝗪𝗮𝘃𝗲𝘀, began from the inside out – understanding the target user groups, identifying key project aspirations for this new ecosystem nestled within Shibuya and Tokyo, and ensuring a clear, uncomplicated method of articulation that amplifies the spatial qualities within, without compromising the functionality and efficiency of a retail development. Taking cues from nature as a means of creating balance between the more hard edge, urban environment of Shibuya, the simple massing articulation, or gesture mimics the pattern of waves and their undulating movement, with imagery that also evokes the contemplative and soothing gestures of raked brush strokes seen in tranquil rock gardens, evoking a sense of calm and excitement, easily recognisable and yet able to stand apart from the surrounding context. Huge congratulations to Snohetta for their winning design! #3xnarchitects#tokyo#facadedesign #facade#arch_shovel

‘Where’s House Warehouse’ by pbm Architects defies typical warehouse stereotypes with an ethereal design in Bangkok. The architects crafted a multi-use space blending office and storage functions. Its facade, made of glass cuboids, breaks the monotony of industrial contexts. The concept evolved from merging living, working, and storage areas seamlessly, fostering interaction and fluidity. Architecture: PBM Architects Images: Spaceshift Studio 📍Bangkok, Thailand . #facadedesign#glassarchitecture#thaiarchitecture#industrialarchitecture#arch_shovel

Facades for the OPPO Super Flagship Store. Bamboo inspired the facade design for the OPPO Super Flagship Store in the city of Guangzhou. An important source of food, clothing, housing, and transportation for people in Guangzhou in ancient times, the design adds a contemporary twist to the vernacular architecture of the city. Photos: CreatAR images Architecture: UnStudio #unstudio#benvanberkel#materialmonth#architecture#facadedesign#arch_shovel

Do you know how many silver spheres are on the facade of the Hanjie Wanda Square in Wuhan, China? 42,333. While they all may look identical, their specific positions involving each other recreate the effect of movement and reflection in water or the sensuous folds of silk fabric. Photos: Edmon Leong / UNStudio #unstudio#facades#facadedesign#architecture#retaildesign#lightingdesign#arch_shovel

Can you guess what inspired Unstudio architecture’s design for the facade elements of the Shenzhen Maritime Museum? Comment your answer below! #unstudio#ceramicdesign#facadedesign#worldmuseums#museumsoftheworld#museumdesign#architecture#architecturaldesign#arch_shovel