Posts

Showing posts from 2025

AI

1- What is Prolog? Prolog (Programming in Logic) is a high-level programming language primarily used for artificial intelligence (AI) and computational linguistics . Unlike procedural programming languages such as C or Python, Prolog is based on logic programming , which is a form of declarative programming. In Prolog, you define facts , rules , and queries to represent knowledge, and the system derives solutions based on logical reasoning. Prolog is unique because it focuses on what is to be done, not how it is to be done. You express knowledge using logical statements, and the Prolog interpreter uses these to infer answers through its built-in reasoning engine (using backtracking and unification ). What is Artificial Intelligence (AI)? Artificial Intelligence (AI) refers to the simulation of human intelligence processes by machines, especially computer systems. It involves creating algorithms and models that enable computers to perform tasks typically requiring human-like i...

AI

1- What is Prolog? Prolog (Programming in Logic) is a high-level programming language primarily used for artificial intelligence (AI) and computational linguistics . Unlike procedural programming languages such as C or Python, Prolog is based on logic programming , which is a form of declarative programming. In Prolog, you define facts , rules , and queries to represent knowledge, and the system derives solutions based on logical reasoning. Prolog is unique because it focuses on what is to be done, not how it is to be done. You express knowledge using logical statements, and the Prolog interpreter uses these to infer answers through its built-in reasoning engine (using backtracking and unification ). What is Artificial Intelligence (AI)? Artificial Intelligence (AI) refers to the simulation of human intelligence processes by machines, especially computer systems. It involves creating algorithms and models that enable computers to perform tasks typically requiring human-like i...

CNS

 1- from Crypto.Cipher import AES from Crypto.Util.Padding import pad, unpad from Crypto.Random import get_random_bytes # Key and data key = get_random_bytes( 16 ) # 16-byte key for AES-128 data = b "Hello AES!" # Data to encrypt # Encrypt cipher = AES.new(key, AES.MODE_CBC) ct = cipher.encrypt(pad(data, 16 )) # Decrypt cipher2 = AES.new(key, AES.MODE_CBC, cipher.iv) pt = unpad(cipher2.decrypt(ct), 16 ) print ( "Original:" , data) print ( "Encrypted:" , ct) print ( "Decrypted:" , pt) 2- from Crypto.Cipher import DES from Crypto.Util.Padding import pad, unpad from Crypto.Random import get_random_bytes # Step 1: Key (8 bytes for DES) key = get_random_bytes( 8 ) # Step 2: Data to encrypt (must be padded to block size) data = b "SecretMsg" # Step 3: Encrypt cipher = DES.new(key, DES.MODE_CBC) ct = cipher.encrypt(pad(data, DES.block_size)) # Step 4: Decrypt cipher2 = DES.new(key, DES.MODE_CBC, cipher.iv) pt = ...

Automatic Exhaust System for Gas Leakage Detection and Mitigation

Image
  Automatic Exhaust System for Gas Leakage Detection and Mitigation

Cd prac

https://drive.google.com/file/d/1SR7sqoEjbNJTQ4pfUWxzMxK5kCMasSIK/view?usp=drivesdk Prac 2 text https://docs.google.com/document/d/1SRtOOCagixyGHeNuPMlVhnnxt6bTsDPB/edit?usp=drivesdk&ouid=113308361021918522270&rtpof=true&sd=true Prac 3 code https://drive.google.com/file/d/1SOa8eXp482tFrCuDZQghMiOBVwpnEmob/view?usp=drivesdk Prac 3 text  https://docs.google.com/document/d/1SKSyspYvSNx2-zfU85AbyYM4Nv-tSybc/edit?usp=drivesdk&ouid=113308361021918522270&rtpof=true&sd=true Prac 4 text https://docs.google.com/document/d/1v8e_8gFYPe1J7b22Or72b6nmOwTEG7hAuE7R1ut6gnk/edit?usp=drivesdk Prax 4 file https://docs.google.com/document/d/1LAneIhqIjNP2TDSsjINwH5PzaAnkzxII6t-MUFQ0ogA/edit?usp=drivesdk Prac 5 file  https://docs.google.com/document/d/1qHhzIEzrJ0FGrwPZKDWsmaIQlxi-bn2MtdFOsREpiMI/edit?usp=drivesdk Prac 6a text https://docs.google.com/document/d/1ef_xz5vGG0P-Zi1uqTFm4Rw2Ig6xITyAvV4TFq_jrcg/edit?usp=drivesdk Prac 6afile https://docs.google.com/document/d/1TbfqWm...