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

Резултати

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

Пребарај: #unrealengine5

当前筛选 #unrealengine5清除筛选
GameDev News

@gamedevnewz · Post #16 · 09.07.2024 г., 12:31

👾Why Games on Unreal Engine 5 Are Indistinguishable from Reality 🎮 Not long ago, Unreal Engine 5 was released to the public, allowing everyone to try out the new features of the engine, the main ones being the new global illumination technology, Lumen, and the Nanite rendering system, which we will discuss now. The demos and games made on Unreal Engine 5 look truly impressive; in some cases, the graphics are indistinguishable from real life. Let's take a closer look at these technologies. Lumen is a fully dynamic global illumination and reflection system designed for use in Unreal Engine 5 on next-generation gaming consoles. By default, it is the global illumination and reflection system in UE 5. Lumen allows for diffuse interreflection with infinite bounces and indirect specular reflections in large, detailed environments that can scale from millimeters to kilometers. Nanite is a micro-polygon rendering system. With it, the PC does not render each model based on the number of its polygons. Thanks to this, images are rendered with a resolution of one polygon per pixel, meaning the higher the resolution of your monitor, the higher the number of polygons (detail of the model). Although, at the moment, the combined use of these technologies causes certain problems, for example with vegetation and other thin objects (Lumen degrades the quality of foliage rendered using Nanite). Of course, lighting and rendering alone are not enough when it comes to ultra-realistic graphics. Textures and the detail of the mesh itself play a significant role as well. #GameDevelopment#UnrealEngine5