{"action":"created","comment":{"url":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/comments/52100720","id":52100720,"diff_hunk":"@@ -0,0 +1,61 @@\n+#!/usr/bin/env python\n+# *-* coding: UTF-8 *-*\n+\n+\"\"\"\n+Organizaţia Internaţională a Aviaţiei Civile propune un alfabet în care\n+fiecărei litere îi este asignat un cuvânt pentru a evita problemele în\n+înțelegerea mesajelor critice.\n+Pentru a se păstra un istoric al conversațiilor s-a decis transcrierea lor\n+conform următoarelor reguli:\n+    - fiecare cuvânt este scris pe o singură linie\n+    - literele din alfabet sunt separate de o virgulă\n+Următoarea sarcină ți-a fost asignată:\n+    Scrie un program care să primească un fișier ce conține mesajul\n+    brut (scris folosind alfabetul ICAO) și generează un fișier\n+    numit icao_intrare ce va conține mesajul inițial.\n+Mai jos găsiți un dicționar ce conține o versiune a alfabetului ICAO:\n+\"\"\"\n+from __future__ import print_function\n+\n+ICAO = {\n+    'a': 'alfa', 'b': 'bravo', 'c': 'charlie', 'd': 'delta', 'e': 'echo',\n+    'f': 'foxtrot', 'g': 'golf', 'h': 'hotel', 'i': 'india', 'j': 'juliett',\n+    'k': 'kilo', 'l': 'lima', 'm': 'mike', 'n': 'november', 'o': 'oscar',\n+    'p': 'papa', 'q': 'quebec', 'r': 'romeo', 's': 'sierra', 't': 'tango',\n+    'u': 'uniform', 'v': 'victor', 'w': 'whiskey', 'x': 'x-ray', 'y': 'yankee',\n+    'z': 'zulu'\n+}\n+\n+\n+def decripteaza(mesaj, fisier):\n+    \"\"\"\n+    functia cauta cuvantul in dictionar si pentru 'value '\n+    corespunzatoare returneaza cheia\n+    \"\"\"\n+    for cuvant in mesaj.split():\n+        for key, value in ICAO.items():\n+            if cuvant == value:\n+                fisier.write(key)\n+\n+\n+def din_icao(fisier_intrare):\n+    \"\"\"\n+    Funcția va primi calea către fișierul ce conține mesajul brut și\n+    va genera un fișier numit icao_intrare ce va conține mesajul inițial.\n+    \"\"\"\n+    try:\n+        fisier = open(fisier_intrare, \"r\")\n+        mesaje = fisier.read()\n+        fisier.close()\n+    except IOError:\n+        print(\"Nu am putut obtine mesajele.\")\n+        return\n+    fisier = open(\"icao_intrare\", \"w+\")","path":"solutii/anda_e/from_icao.py","position":53,"original_position":53,"commit_id":"8b12912005e826dd23fe7b9f9a7cf2623771bed0","original_commit_id":"8b12912005e826dd23fe7b9f9a7cf2623771bed0","user":{"login":"alexandrucoman","id":5760107,"avatar_url":"https://avatars.githubusercontent.com/u/5760107?v=3","gravatar_id":"","url":"https://api.github.com/users/alexandrucoman","html_url":"https://github.com/alexandrucoman","followers_url":"https://api.github.com/users/alexandrucoman/followers","following_url":"https://api.github.com/users/alexandrucoman/following{/other_user}","gists_url":"https://api.github.com/users/alexandrucoman/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandrucoman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandrucoman/subscriptions","organizations_url":"https://api.github.com/users/alexandrucoman/orgs","repos_url":"https://api.github.com/users/alexandrucoman/repos","events_url":"https://api.github.com/users/alexandrucoman/events{/privacy}","received_events_url":"https://api.github.com/users/alexandrucoman/received_events","type":"User","site_admin":false},"body":"De ce \"w+\" ?","created_at":"2016-02-06T10:47:57Z","updated_at":"2016-02-06T10:47:57Z","html_url":"https://github.com/alexandrucoman/python-lab/pull/34#discussion_r52100720","pull_request_url":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/comments/52100720"},"html":{"href":"https://github.com/alexandrucoman/python-lab/pull/34#discussion_r52100720"},"pull_request":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/34","id":58516681,"html_url":"https://github.com/alexandrucoman/python-lab/pull/34","diff_url":"https://github.com/alexandrucoman/python-lab/pull/34.diff","patch_url":"https://github.com/alexandrucoman/python-lab/pull/34.patch","issue_url":"https://api.github.com/repos/alexandrucoman/python-lab/issues/34","number":34,"state":"open","locked":false,"title":"Solutie Icao","user":{"login":"andaElena","id":17002141,"avatar_url":"https://avatars.githubusercontent.com/u/17002141?v=3","gravatar_id":"","url":"https://api.github.com/users/andaElena","html_url":"https://github.com/andaElena","followers_url":"https://api.github.com/users/andaElena/followers","following_url":"https://api.github.com/users/andaElena/following{/other_user}","gists_url":"https://api.github.com/users/andaElena/gists{/gist_id}","starred_url":"https://api.github.com/users/andaElena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andaElena/subscriptions","organizations_url":"https://api.github.com/users/andaElena/orgs","repos_url":"https://api.github.com/users/andaElena/repos","events_url":"https://api.github.com/users/andaElena/events{/privacy}","received_events_url":"https://api.github.com/users/andaElena/received_events","type":"User","site_admin":false},"body":"from_icao.py si to_icao.py","created_at":"2016-02-06T09:41:55Z","updated_at":"2016-02-06T10:47:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5230187ac08be5e8d79bfa857814b4b16517e597","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/34/commits","review_comments_url":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/34/comments","review_comment_url":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alexandrucoman/python-lab/issues/34/comments","statuses_url":"https://api.github.com/repos/alexandrucoman/python-lab/statuses/8b12912005e826dd23fe7b9f9a7cf2623771bed0","head":{"label":"andaElena:icao","ref":"icao","sha":"8b12912005e826dd23fe7b9f9a7cf2623771bed0","user":{"login":"andaElena","id":17002141,"avatar_url":"https://avatars.githubusercontent.com/u/17002141?v=3","gravatar_id":"","url":"https://api.github.com/users/andaElena","html_url":"https://github.com/andaElena","followers_url":"https://api.github.com/users/andaElena/followers","following_url":"https://api.github.com/users/andaElena/following{/other_user}","gists_url":"https://api.github.com/users/andaElena/gists{/gist_id}","starred_url":"https://api.github.com/users/andaElena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andaElena/subscriptions","organizations_url":"https://api.github.com/users/andaElena/orgs","repos_url":"https://api.github.com/users/andaElena/repos","events_url":"https://api.github.com/users/andaElena/events{/privacy}","received_events_url":"https://api.github.com/users/andaElena/received_events","type":"User","site_admin":false},"repo":{"id":50915171,"name":"python-lab","full_name":"andaElena/python-lab","owner":{"login":"andaElena","id":17002141,"avatar_url":"https://avatars.githubusercontent.com/u/17002141?v=3","gravatar_id":"","url":"https://api.github.com/users/andaElena","html_url":"https://github.com/andaElena","followers_url":"https://api.github.com/users/andaElena/followers","following_url":"https://api.github.com/users/andaElena/following{/other_user}","gists_url":"https://api.github.com/users/andaElena/gists{/gist_id}","starred_url":"https://api.github.com/users/andaElena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andaElena/subscriptions","organizations_url":"https://api.github.com/users/andaElena/orgs","repos_url":"https://api.github.com/users/andaElena/repos","events_url":"https://api.github.com/users/andaElena/events{/privacy}","received_events_url":"https://api.github.com/users/andaElena/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andaElena/python-lab","description":"","fork":true,"url":"https://api.github.com/repos/andaElena/python-lab","forks_url":"https://api.github.com/repos/andaElena/python-lab/forks","keys_url":"https://api.github.com/repos/andaElena/python-lab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andaElena/python-lab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andaElena/python-lab/teams","hooks_url":"https://api.github.com/repos/andaElena/python-lab/hooks","issue_events_url":"https://api.github.com/repos/andaElena/python-lab/issues/events{/number}","events_url":"https://api.github.com/repos/andaElena/python-lab/events","assignees_url":"https://api.github.com/repos/andaElena/python-lab/assignees{/user}","branches_url":"https://api.github.com/repos/andaElena/python-lab/branches{/branch}","tags_url":"https://api.github.com/repos/andaElena/python-lab/tags","blobs_url":"https://api.github.com/repos/andaElena/python-lab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andaElena/python-lab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andaElena/python-lab/git/refs{/sha}","trees_url":"https://api.github.com/repos/andaElena/python-lab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andaElena/python-lab/statuses/{sha}","languages_url":"https://api.github.com/repos/andaElena/python-lab/languages","stargazers_url":"https://api.github.com/repos/andaElena/python-lab/stargazers","contributors_url":"https://api.github.com/repos/andaElena/python-lab/contributors","subscribers_url":"https://api.github.com/repos/andaElena/python-lab/subscribers","subscription_url":"https://api.github.com/repos/andaElena/python-lab/subscription","commits_url":"https://api.github.com/repos/andaElena/python-lab/commits{/sha}","git_commits_url":"https://api.github.com/repos/andaElena/python-lab/git/commits{/sha}","comments_url":"https://api.github.com/repos/andaElena/python-lab/comments{/number}","issue_comment_url":"https://api.github.com/repos/andaElena/python-lab/issues/comments{/number}","contents_url":"https://api.github.com/repos/andaElena/python-lab/contents/{+path}","compare_url":"https://api.github.com/repos/andaElena/python-lab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andaElena/python-lab/merges","archive_url":"https://api.github.com/repos/andaElena/python-lab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andaElena/python-lab/downloads","issues_url":"https://api.github.com/repos/andaElena/python-lab/issues{/number}","pulls_url":"https://api.github.com/repos/andaElena/python-lab/pulls{/number}","milestones_url":"https://api.github.com/repos/andaElena/python-lab/milestones{/number}","notifications_url":"https://api.github.com/repos/andaElena/python-lab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andaElena/python-lab/labels{/name}","releases_url":"https://api.github.com/repos/andaElena/python-lab/releases{/id}","deployments_url":"https://api.github.com/repos/andaElena/python-lab/deployments","created_at":"2016-02-02T11:13:05Z","updated_at":"2016-02-02T11:13:06Z","pushed_at":"2016-02-06T10:43:26Z","git_url":"git://github.com/andaElena/python-lab.git","ssh_url":"git@github.com:andaElena/python-lab.git","clone_url":"https://github.com/andaElena/python-lab.git","svn_url":"https://github.com/andaElena/python-lab","homepage":null,"size":332,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"alexandrucoman:master","ref":"master","sha":"0a70b323e55ab485874029ee3d8e31074916690c","user":{"login":"alexandrucoman","id":5760107,"avatar_url":"https://avatars.githubusercontent.com/u/5760107?v=3","gravatar_id":"","url":"https://api.github.com/users/alexandrucoman","html_url":"https://github.com/alexandrucoman","followers_url":"https://api.github.com/users/alexandrucoman/followers","following_url":"https://api.github.com/users/alexandrucoman/following{/other_user}","gists_url":"https://api.github.com/users/alexandrucoman/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandrucoman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandrucoman/subscriptions","organizations_url":"https://api.github.com/users/alexandrucoman/orgs","repos_url":"https://api.github.com/users/alexandrucoman/repos","events_url":"https://api.github.com/users/alexandrucoman/events{/privacy}","received_events_url":"https://api.github.com/users/alexandrucoman/received_events","type":"User","site_admin":false},"repo":{"id":42095096,"name":"python-lab","full_name":"alexandrucoman/python-lab","owner":{"login":"alexandrucoman","id":5760107,"avatar_url":"https://avatars.githubusercontent.com/u/5760107?v=3","gravatar_id":"","url":"https://api.github.com/users/alexandrucoman","html_url":"https://github.com/alexandrucoman","followers_url":"https://api.github.com/users/alexandrucoman/followers","following_url":"https://api.github.com/users/alexandrucoman/following{/other_user}","gists_url":"https://api.github.com/users/alexandrucoman/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandrucoman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandrucoman/subscriptions","organizations_url":"https://api.github.com/users/alexandrucoman/orgs","repos_url":"https://api.github.com/users/alexandrucoman/repos","events_url":"https://api.github.com/users/alexandrucoman/events{/privacy}","received_events_url":"https://api.github.com/users/alexandrucoman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexandrucoman/python-lab","description":"","fork":false,"url":"https://api.github.com/repos/alexandrucoman/python-lab","forks_url":"https://api.github.com/repos/alexandrucoman/python-lab/forks","keys_url":"https://api.github.com/repos/alexandrucoman/python-lab/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexandrucoman/python-lab/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexandrucoman/python-lab/teams","hooks_url":"https://api.github.com/repos/alexandrucoman/python-lab/hooks","issue_events_url":"https://api.github.com/repos/alexandrucoman/python-lab/issues/events{/number}","events_url":"https://api.github.com/repos/alexandrucoman/python-lab/events","assignees_url":"https://api.github.com/repos/alexandrucoman/python-lab/assignees{/user}","branches_url":"https://api.github.com/repos/alexandrucoman/python-lab/branches{/branch}","tags_url":"https://api.github.com/repos/alexandrucoman/python-lab/tags","blobs_url":"https://api.github.com/repos/alexandrucoman/python-lab/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexandrucoman/python-lab/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexandrucoman/python-lab/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexandrucoman/python-lab/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexandrucoman/python-lab/statuses/{sha}","languages_url":"https://api.github.com/repos/alexandrucoman/python-lab/languages","stargazers_url":"https://api.github.com/repos/alexandrucoman/python-lab/stargazers","contributors_url":"https://api.github.com/repos/alexandrucoman/python-lab/contributors","subscribers_url":"https://api.github.com/repos/alexandrucoman/python-lab/subscribers","subscription_url":"https://api.github.com/repos/alexandrucoman/python-lab/subscription","commits_url":"https://api.github.com/repos/alexandrucoman/python-lab/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexandrucoman/python-lab/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexandrucoman/python-lab/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexandrucoman/python-lab/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexandrucoman/python-lab/contents/{+path}","compare_url":"https://api.github.com/repos/alexandrucoman/python-lab/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexandrucoman/python-lab/merges","archive_url":"https://api.github.com/repos/alexandrucoman/python-lab/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexandrucoman/python-lab/downloads","issues_url":"https://api.github.com/repos/alexandrucoman/python-lab/issues{/number}","pulls_url":"https://api.github.com/repos/alexandrucoman/python-lab/pulls{/number}","milestones_url":"https://api.github.com/repos/alexandrucoman/python-lab/milestones{/number}","notifications_url":"https://api.github.com/repos/alexandrucoman/python-lab/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexandrucoman/python-lab/labels{/name}","releases_url":"https://api.github.com/repos/alexandrucoman/python-lab/releases{/id}","deployments_url":"https://api.github.com/repos/alexandrucoman/python-lab/deployments","created_at":"2015-09-08T06:49:55Z","updated_at":"2016-02-02T14:56:39Z","pushed_at":"2016-02-06T10:43:27Z","git_url":"git://github.com/alexandrucoman/python-lab.git","ssh_url":"git@github.com:alexandrucoman/python-lab.git","clone_url":"https://github.com/alexandrucoman/python-lab.git","svn_url":"https://github.com/alexandrucoman/python-lab","homepage":null,"size":710,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":17,"forks":14,"open_issues":17,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/34"},"html":{"href":"https://github.com/alexandrucoman/python-lab/pull/34"},"issue":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/issues/34"},"comments":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/alexandrucoman/python-lab/statuses/8b12912005e826dd23fe7b9f9a7cf2623771bed0"}}}}