Skip to content

Commit

Permalink
Colab Integrador
Browse files Browse the repository at this point in the history
  • Loading branch information
facundocarballo committed Jul 5, 2023
1 parent de7127d commit 2891d44
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions TP1/Integrador/M5.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/facundocarballo/ProgramacionConcurrente/blob/main/TP1/IntegradorM5.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
"<a href=\"https://colab.research.google.com/github/facundocarballo/ProgramacionConcurrente/blob/main/TP1/Integrador/M5.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
Expand Down Expand Up @@ -277,7 +277,7 @@
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "6a6b2bfe-d925-4ee1-b8c9-61bd484ff88a"
"outputId": "24ad08f9-7d33-48ec-dd94-81bdaed87991"
},
"outputs": [
{
Expand Down Expand Up @@ -391,6 +391,7 @@
" sys.exit(0)\n",
"\n",
"signal.signal(signal.SIGUSR1, close_server)\n",
"signal.signal(signal.SIGINT, close_server)\n",
"\n",
"# Encrypt and Decrypt Functions\n",
"def encrypt_file(key, path, spaces):\n",
Expand Down Expand Up @@ -566,6 +567,10 @@
" fifo_write(\"To decrypt you have to send a cipher file.\")\n",
" return\n",
"\n",
" if path != CIPHER_PATH:\n",
" fifo_write(\"The file has to be 'cipher.enc'.\")\n",
" return\n",
"\n",
" main_decrypt()\n",
" fifo_write(\"Decryption done.\")\n",
" return\n",
Expand Down Expand Up @@ -806,11 +811,13 @@
" FIFO_A = os.open(FIFO_A_PATH, os.O_WRONLY | os.O_NONBLOCK)\n",
" except OSError as error:\n",
" print(\"Error opening the FIFO_A: \", error)\n",
" return\n",
"\n",
" try:\n",
" FIFO_B = os.open(FIFO_B_PATH, os.O_RDONLY)\n",
" except OSError as error:\n",
" print(\"Error opening the FIFO_B: \", error)\n",
" return\n",
"\n",
" obj = Info(module, path, key)\n",
"\n",
Expand Down Expand Up @@ -838,7 +845,7 @@
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "d6058273-8fff-4ed5-864f-f24ef27b4ee5"
"outputId": "65930680-dab2-4e2b-b873-d94700989d7d"
},
"execution_count": null,
"outputs": [
Expand Down

0 comments on commit 2891d44

Please sign in to comment.