This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python3 | |
| from datetime import datetime | |
| import sys | |
| LOG_FILE="/var/log/snmptraps.log" | |
| # Obtener la fecha y hora del evento | |
| timestamp=datetime.now().strftime("%Y-%m-%d %H:%M:%S") | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | [Unit] | |
| Description=Gunicorn instance to serve myproject | |
| After=network.target | |
| [Service] | |
| Type=notify | |
| # the specific user that our service will run as | |
| User=django | |
| Group=django | |
| RuntimeDirectory=/home/django/myproject/venv/bin | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <VirtualHost *:80> | |
| ServerName example.com | |
| ServerAlias www.example.com | |
| DocumentRoot /path/to/your/django/project | |
| WSGIDaemonProcess example.com python-path=/path/to/your/django/project | |
| WSGIProcessGroup example.com | |
| WSGIScriptAlias / /path/to/your/django/project/wsgi.py | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Document</title> | |
| <style> | |
| h1, h2, h3 { | |
| color: red; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Cifrado César. | |
| def Cesar(key): | |
| ''' | |
| Cifrado Cesar. (Y un ejemplo de uso de cierres en Python.) | |
| ''' | |
| ckey = key # Clave de cifrado | |
| dkey = -key # Clave de descifrado (opuesta a la de cifrado) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Persona: | |
| def __init__(self, nombre, edad, dni) -> None: | |
| if nombre == "": | |
| raise ValueError("El nombre no puede estar vacío") | |
| if edad < 0: | |
| raise ValueError("La edad no puede ser negativa") | |
| if len(dni)!=9: | |
| raise ValueError("El DNI debe tener 9 caracteres") | |
| self.nombre = nombre | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class Main { | |
| public static void main(String[] args) { | |
| Persona juan = new Persona("Juan García Pérez", 23, "12345678R"); | |
| Trabajador alberto = new Trabajador("Alberto Gónzalez López", 41, "87654321M", 40, 1050); | |
| System.out.println(juan); | |
| System.out.println(alberto); | |
| } | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class Libro: | |
| def __init__(self, titulo, autor, isbn) -> None: | |
| self.titulo = titulo | |
| self.autor = autor | |
| self.set_isbn(isbn) | |
| def comprobar_isbn10(isbn) -> bool: | |
| return sum(map(lambda p: int(p[0])*p[1], zip(isbn.replace("-", ""), range(1, 11)))) % 11 == 0 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Formulario de autodiagnóstico</title> | |
| </head> | |
| <body> | |
| <h1>Formulario de autodiagnóstico</h1> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Procesamiento de formulario</title> | |
| <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> | |
| </head> | |
| <body> | 
NewerOlder