Skip to content

Instantly share code, notes, and snippets.

@carlosmgv02
Last active May 30, 2024 11:27
Show Gist options
  • Save carlosmgv02/5cbde9b7d22d11590002e5b84578e1bb to your computer and use it in GitHub Desktop.
Save carlosmgv02/5cbde9b7d22d11590002e5b84578e1bb to your computer and use it in GitHub Desktop.
SD Exam preparation
import random
import sys
import tty
import termios
acronyms = [
"3PC: Three Phase Commit Protocol",
"ACID: Atomicity, Consistence, Isolation, Durability",
"ACL: Access control list",
"API: Aplication programing interface",
"BASE: Basically Avaliable, Soft state, Eventual consistency",
"BGP: Byzantine Generals Problem",
"CDN: Content Delivery Network",
"CGI: Common Gateway Interface",
"CORBA: Common Object Request Broker Architecture",
"CRUD: Create Read Update Delete",
"DAT: Distributed Atomic Transaction",
"DCOM: Distributed Component Object Model",
"DHT: Distributed Hash Table",
"DMZ: Des Militarized Zone",
"DOS: Denial of Service",
"EBS: Elastic Block Storage",
"FaaS: Function as a Service",
"FIFO: First In First Out",
"FTP: File Transfer Protocol",
"HTML: HyperText Markup Language",
"IaaS: Infraestructure as a Service",
"IC: Interactive Consistency",
"IDL: Interface Definition Lenguage",
"IMAP: Internet Message Access Protocol",
"IPC: Inter Process Communication",
"IRC: Internet Relay Chat",
"ISP: Internet Service Provider",
"JMS: Java Message Service",
"JRMP: Java Remote Method Protocol",
"JSON: Java Script Object Notation",
"KDC: Key distribution center",
"LaaS: Local Area Augmentation System",
"LAMP: Linux, Apache, MySql, PHP/Phyton",
"LDAP: Lightweight Directory Access Protocol",
"MOM: Message Oriented Middelware",
"NaDR: Naming and Design Rules",
"NSD: Name Server Daemon",
"NTP: Network time protocol",
"OMG: Object Management Group",
"PaaS: Platform as a Service",
"RBAC: Rol Base access control",
"REST: Representational State Transfer",
"RMI: Remote method invocation",
"RPC: Remote Procedure Call",
"RSS: Really Simple Sindication",
"SaaS: Software as a Service",
"SLA: Service Level Agreements",
"SMB: Server Message Block",
"SOAP: Simple Object Access Protocol",
"SPF: Single Point Failure",
"SQL: Structured Query Language",
"SSL: Secure Socket Layer",
"TSS: Task State Segment",
"TTL: Time to Live",
"WSDL: Web Services Description Language",
"WSRF: Web Services Resource Framework",
"XML: eXtensible Markup Lenguage",
"SMTP : Simple Mail Transfer Protocol"
]
print("Press any key to show the answer, CTRL+C to exit.")
def getch():
fd = sys.stdin.fileno()
old_settings = termios.tcgetattr(fd)
try:
tty.setraw(fd)
ch = sys.stdin.read(1)
finally:
termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
return ch
while True:
acronym = random.choice(acronyms)
print(acronym.split(":")[0])
key = getch()
if key == '\x03':
break
print(acronym.split(":")[1])
import random
acronyms = [
"3PC: Three Phase Commit Protocol",
"ACID: Atomicity, Consistence, Isolation, Durability",
"ACL: Access control list",
"API: Aplication programing interface",
"BASE: Basically Avaliable, Soft state, Eventual consistency",
"BGP: Byzantine Generals Problem",
"CDN: Content Delivery Network",
"CGI: Common Gateway Interface",
"CORBA: Common Object Request Broker Architecture",
"CRUD: Create Read Update Delete",
"DAT: Distributed Atomic Transaction",
"DCOM: Distributed Component Object Model",
"DHT: Distributed Hash Table",
"DMZ: Des Militarized Zone",
"DOS: Denial of Service",
"EBS: Elastic Block Storage",
"FaaS: Function as a Service",
"FIFO: First In First Out",
"FTP: File Transfer Protocol",
"HTML: HyperText Markup Language",
"IaaS: Infraestructure as a Service",
"IC: Interactive Consistency",
"IDL: Interface Definition Lenguage",
"IMAP: Internet Message Access Protocol",
"IPC: Inter Process Communication",
"IRC: Internet Relay Chat",
"ISP: Internet Service Provider",
"JMS: Java Message Service",
"JRMP: Java Remote Method Protocol",
"JSON: Java Script Object Notation",
"KDC: Key distribution center",
"LaaS: Local Area Augmentation System",
"LAMP: Linux, Apache, MySql, PHP/Phyton",
"LDAP: Lightweight Directory Access Protocol",
"MOM: Message Oriented Middelware",
"NaDR: Naming and Design Rules",
"NSD: Name Server Daemon",
"NTP: Network time protocol",
"OMG: Object Management Group",
"PaaS: Platform as a Service",
"RBAC: Rol Base access control",
"REST: Representational State Transfer",
"RMI: Remote method invocation",
"RPC: Remote Procedure Call",
"RSS: Really Simple Sindication",
"SaaS: Software as a Service",
"SLA: Service Level Agreements",
"SMB: Server Message Block",
"SOAP: Simple Object Access Protocol",
"SPF: Single Point Failure",
"SQL: Structured Query Language",
"SSL: Secure Socket Layer",
"TSS: Task State Segment",
"TTL: Time to Live",
"WSDL: Web Services Description Language",
"WSRF: Web Services Resource Framework",
"XML: eXtensible Markup Lenguage",
"SMTP : Simple Mail Transfer Protocol"
]
print("Press any key to show the answer, CTRL+C to exit.")
while True:
acronym = random.choice(acronyms)
print(acronym.split(":")[0])
import msvcrt
key = msvcrt.getch()
if key == b'\x03':
break
print(acronym.split(":")[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment