Browse Source

changed the dictionary a bit

master
nglk 2 years ago
parent
commit
db78d449bd
  1. 193
      .ipynb_checkpoints/a_tune_in-checkpoint.ipynb
  2. 193
      a_tune_in.ipynb

193
.ipynb_checkpoints/a_tune_in-checkpoint.ipynb

@ -22,7 +22,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "ranking-bottom",
"metadata": {
"scrolled": false
@ -33,53 +33,92 @@
"output_type": "stream",
"text": [
"Requirement already satisfied: tensorflow==1.15.5 in ./pocket/lib/python3.6/site-packages (1.15.5)\n",
"Requirement already satisfied: six>=1.10.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.16.0)\n",
"Requirement already satisfied: numpy<1.19.0,>=1.16.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.18.5)\n",
"Requirement already satisfied: termcolor>=1.1.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.1.0)\n",
"Requirement already satisfied: google-pasta>=0.1.6 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.2.0)\n",
"Requirement already satisfied: protobuf>=3.6.1 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (3.19.6)\n",
"Requirement already satisfied: wrapt>=1.11.1 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.14.1)\n",
"Requirement already satisfied: astor>=0.6.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.8.1)\n",
"Requirement already satisfied: h5py<=2.10.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (2.10.0)\n",
"Requirement already satisfied: grpcio>=1.8.6 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.48.2)\n",
"Requirement already satisfied: wheel>=0.26 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.37.1)\n",
"Requirement already satisfied: keras-preprocessing>=1.0.5 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.1.2)\n",
"Requirement already satisfied: protobuf>=3.6.1 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (3.19.6)\n",
"Requirement already satisfied: gast==0.2.2 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.2.2)\n",
"Requirement already satisfied: keras-applications>=1.0.8 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.0.8)\n",
"Requirement already satisfied: numpy<1.19.0,>=1.16.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.18.5)\n",
"Requirement already satisfied: six>=1.10.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.16.0)\n",
"Requirement already satisfied: tensorflow-estimator==1.15.1 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.15.1)\n",
"Requirement already satisfied: absl-py>=0.7.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.3.0)\n",
"Requirement already satisfied: google-pasta>=0.1.6 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.2.0)\n",
"Requirement already satisfied: h5py<=2.10.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (2.10.0)\n",
"Requirement already satisfied: keras-applications>=1.0.8 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.0.8)\n",
"Requirement already satisfied: gast==0.2.2 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.2.2)\n",
"Requirement already satisfied: wheel>=0.26 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.37.1)\n",
"Requirement already satisfied: grpcio>=1.8.6 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.48.2)\n",
"Requirement already satisfied: opt-einsum>=2.3.2 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (3.3.0)\n",
"Requirement already satisfied: tensorboard<1.16.0,>=1.15.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.15.0)\n",
"Requirement already satisfied: termcolor>=1.1.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.1.0)\n",
"Requirement already satisfied: astor>=0.6.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.8.1)\n",
"Requirement already satisfied: setuptools>=41.0.0 in ./pocket/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (59.6.0)\n",
"Requirement already satisfied: markdown>=2.6.8 in ./pocket/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (3.3.7)\n",
"Requirement already satisfied: werkzeug>=0.11.15 in ./pocket/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (2.0.3)\n",
"Requirement already satisfied: setuptools>=41.0.0 in ./pocket/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (59.6.0)\n",
"Requirement already satisfied: importlib-metadata>=4.4 in ./pocket/lib/python3.6/site-packages (from markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (4.8.3)\n",
"Requirement already satisfied: dataclasses in ./pocket/lib/python3.6/site-packages (from werkzeug>=0.11.15->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (0.8)\n",
"Requirement already satisfied: typing-extensions>=3.6.4 in ./pocket/lib/python3.6/site-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (4.1.1)\n",
"Requirement already satisfied: zipp>=0.5 in ./pocket/lib/python3.6/site-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (3.6.0)\n",
"Requirement already satisfied: keras==2.2.5 in ./pocket/lib/python3.6/site-packages (2.2.5)\n",
"Requirement already satisfied: scipy>=0.14 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.5.4)\n",
"Requirement already satisfied: numpy>=1.9.1 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.18.5)\n",
"Requirement already satisfied: six>=1.9.0 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.16.0)\n",
"Requirement already satisfied: keras-applications>=1.0.8 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.0.8)\n",
"Requirement already satisfied: scipy>=0.14 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.5.4)\n",
"Requirement already satisfied: keras-preprocessing>=1.1.0 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.1.2)\n",
"Requirement already satisfied: six>=1.9.0 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.16.0)\n",
"Requirement already satisfied: h5py in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (2.10.0)\n",
"Requirement already satisfied: numpy>=1.9.1 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.18.5)\n",
"Requirement already satisfied: pyyaml in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (6.0)\n",
"Requirement already satisfied: pincelate in ./pocket/lib/python3.6/site-packages (0.0.1)\n",
"Requirement already satisfied: pronouncing>=0.2.0 in ./pocket/lib/python3.6/site-packages (from pincelate) (0.2.0)\n",
"Requirement already satisfied: Keras>=2.2.0 in ./pocket/lib/python3.6/site-packages (from pincelate) (2.2.5)\n",
"Requirement already satisfied: pronouncing>=0.2.0 in ./pocket/lib/python3.6/site-packages (from pincelate) (0.2.0)\n",
"Requirement already satisfied: scikit-learn>=0.20.0 in ./pocket/lib/python3.6/site-packages (from pincelate) (0.24.2)\n",
"Requirement already satisfied: keras-applications>=1.0.8 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.0.8)\n",
"Requirement already satisfied: numpy>=1.9.1 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.18.5)\n",
"Requirement already satisfied: six>=1.9.0 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.16.0)\n",
"Requirement already satisfied: pyyaml in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (6.0)\n",
"Requirement already satisfied: h5py in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (2.10.0)\n",
"Requirement already satisfied: scipy>=0.14 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.5.4)\n",
"Requirement already satisfied: numpy>=1.9.1 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.18.5)\n",
"Requirement already satisfied: keras-preprocessing>=1.1.0 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.1.2)\n",
"Requirement already satisfied: h5py in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (2.10.0)\n",
"Requirement already satisfied: pyyaml in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (6.0)\n",
"Requirement already satisfied: keras-applications>=1.0.8 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.0.8)\n",
"Requirement already satisfied: six>=1.9.0 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.16.0)\n",
"Requirement already satisfied: cmudict>=0.4.0 in ./pocket/lib/python3.6/site-packages (from pronouncing>=0.2.0->pincelate) (1.0.2)\n",
"Requirement already satisfied: joblib>=0.11 in ./pocket/lib/python3.6/site-packages (from scikit-learn>=0.20.0->pincelate) (1.1.1)\n",
"Requirement already satisfied: threadpoolctl>=2.0.0 in ./pocket/lib/python3.6/site-packages (from scikit-learn>=0.20.0->pincelate) (3.1.0)\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Using TensorFlow backend.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:541: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:66: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:4432: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:148: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3733: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3239: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use tf.where in 2.0, which has the same broadcast rule as np.where\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:190: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:197: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:203: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:207: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:216: The name tf.is_variable_initialized is deprecated. Please use tf.compat.v1.is_variable_initialized instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:223: The name tf.variables_initializer is deprecated. Please use tf.compat.v1.variables_initializer instead.\n",
"\n"
]
}
],
"source": [
@ -136,55 +175,23 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"id": "muslim-labor",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:541: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:66: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:4432: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:148: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3733: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3239: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use tf.where in 2.0, which has the same broadcast rule as np.where\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:190: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:197: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:203: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:207: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:216: The name tf.is_variable_initialized is deprecated. Please use tf.compat.v1.is_variable_initialized instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:223: The name tf.variables_initializer is deprecated. Please use tf.compat.v1.variables_initializer instead.\n",
"\n"
]
},
{
"data": {
"text/plain": [
"'icr.ckung'"
"'arcsvtinex'"
]
},
"execution_count": 3,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pin.manipulate(\"crashing\",temperature=3)"
"pin.manipulate(\"archives\",temperature=2)"
]
},
{
@ -196,7 +203,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "61490633621a4f568b855628db6d69d8",
"model_id": "52dbe8b1e0bb4ea9b0276e6902fce2b8",
"version_major": 2,
"version_minor": 0
},
@ -240,8 +247,8 @@
},
{
"cell_type": "code",
"execution_count": null,
"id": "189c5b06",
"execution_count": 1,
"id": "2e25f0db",
"metadata": {},
"outputs": [],
"source": [
@ -249,13 +256,20 @@
"import time\n",
"import json\n",
"import wget\n",
"import os\n",
"\n",
"import os"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "189c5b06",
"metadata": {},
"outputs": [],
"source": [
"url = \"https://pad.vvvvvvaria.org/any_one_day_this_dictionary_has_died/export/txt\"\n",
"\n",
"path= \"/home/angeliki/Documents/Any_One_day_future/A_tune_in\"\n",
"\n",
"\n",
"filename = path + '/' + os.path.basename(url) # get the full path of the file\n",
"if os.path.exists(filename):\n",
" os.remove(filename) # if exist, remove it directly\n",
@ -264,51 +278,68 @@
" \n",
"with open(filename, 'r') as f:\n",
" dictionary = json.loads(f.read().replace(\"'\", '\"'))\n",
"\n",
"\n",
"\n",
"sentence = input('give me your words: ')\n",
"\n",
"\n",
"def makedemonic():\n",
" \n",
"def makeparanyms():\n",
"\tnew_sentence = sentence\n",
"\tfor word in dictionary:\n",
"\t\tif word in new_sentence:\n",
"\t\t\tnew_sentence = new_sentence.replace(word, random.choice(dictionary[word]['paranyms']))\n",
"\tprint(new_sentence)\n",
"\n",
"def makepara():\n",
"def makeparameanings():\n",
"\tnew_sentence = sentence\n",
"\tfor word in dictionary:\n",
"\t\tif word in new_sentence:\n",
"\t\t\tnew_sentence = new_sentence.replace(word, random.choice(dictionary[word]['parameanings']))\n",
"\tprint(new_sentence)\n",
"\n",
"def makepira():\n",
"def makeparadoxes():\n",
"\tnew_sentence = sentence\n",
"\tfor word in dictionary:\n",
"\t\tif word in new_sentence:\n",
"\t\t\tnew_sentence = new_sentence.replace(word, random.choice(dictionary[word]['paradoxes']))\n",
"\tprint(new_sentence)\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "b1dde66a",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"what are your words? fdkhggfe futures\n",
"choose replacing method between \"paranyms\",\"parameanings\",\"paradoxes\",\"all\": all\n",
"fdkhggfe \n",
"fdkhggfe \n",
"fdkhggfe \n"
]
}
],
"source": [
"\n",
"sentence = input('what are your words? ')\n",
"\n",
"type = input('choose replacing method between \"paranyms\",\"parameanings\",\"paradoxes\",\"all\": ')\n",
"\n",
"if type == 'paranyms':\n",
"\tmakedemonic()\n",
"\tmakeparanyms()\n",
"elif type == 'parameanings':\n",
"\tmakepara()\n",
"\tmakeparameanings()\n",
"elif type == 'paradoxes':\n",
"\tmakepira()\n",
"\tmakeparadoxes()\n",
"elif type =='all':\n",
"\tmakedemonic()\n",
"\tmakeparanyms()\n",
"\ttime.sleep(1)\n",
"\tmakepara()\n",
"\tmakeparameanings()\n",
"\ttime.sleep(1)\n",
"\tmakepira()\n",
"\tmakeparadoxes()\n",
"else:\n",
" print(\"Wrong input. Please run the code again\")\n",
"\n"
" print(\"Wrong input. Please run the code again\")"
]
},
{

193
a_tune_in.ipynb

@ -22,7 +22,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "ranking-bottom",
"metadata": {
"scrolled": false
@ -33,53 +33,92 @@
"output_type": "stream",
"text": [
"Requirement already satisfied: tensorflow==1.15.5 in ./pocket/lib/python3.6/site-packages (1.15.5)\n",
"Requirement already satisfied: six>=1.10.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.16.0)\n",
"Requirement already satisfied: numpy<1.19.0,>=1.16.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.18.5)\n",
"Requirement already satisfied: termcolor>=1.1.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.1.0)\n",
"Requirement already satisfied: google-pasta>=0.1.6 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.2.0)\n",
"Requirement already satisfied: protobuf>=3.6.1 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (3.19.6)\n",
"Requirement already satisfied: wrapt>=1.11.1 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.14.1)\n",
"Requirement already satisfied: astor>=0.6.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.8.1)\n",
"Requirement already satisfied: h5py<=2.10.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (2.10.0)\n",
"Requirement already satisfied: grpcio>=1.8.6 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.48.2)\n",
"Requirement already satisfied: wheel>=0.26 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.37.1)\n",
"Requirement already satisfied: keras-preprocessing>=1.0.5 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.1.2)\n",
"Requirement already satisfied: protobuf>=3.6.1 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (3.19.6)\n",
"Requirement already satisfied: gast==0.2.2 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.2.2)\n",
"Requirement already satisfied: keras-applications>=1.0.8 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.0.8)\n",
"Requirement already satisfied: numpy<1.19.0,>=1.16.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.18.5)\n",
"Requirement already satisfied: six>=1.10.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.16.0)\n",
"Requirement already satisfied: tensorflow-estimator==1.15.1 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.15.1)\n",
"Requirement already satisfied: absl-py>=0.7.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.3.0)\n",
"Requirement already satisfied: google-pasta>=0.1.6 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.2.0)\n",
"Requirement already satisfied: h5py<=2.10.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (2.10.0)\n",
"Requirement already satisfied: keras-applications>=1.0.8 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.0.8)\n",
"Requirement already satisfied: gast==0.2.2 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.2.2)\n",
"Requirement already satisfied: wheel>=0.26 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.37.1)\n",
"Requirement already satisfied: grpcio>=1.8.6 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.48.2)\n",
"Requirement already satisfied: opt-einsum>=2.3.2 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (3.3.0)\n",
"Requirement already satisfied: tensorboard<1.16.0,>=1.15.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.15.0)\n",
"Requirement already satisfied: termcolor>=1.1.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (1.1.0)\n",
"Requirement already satisfied: astor>=0.6.0 in ./pocket/lib/python3.6/site-packages (from tensorflow==1.15.5) (0.8.1)\n",
"Requirement already satisfied: setuptools>=41.0.0 in ./pocket/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (59.6.0)\n",
"Requirement already satisfied: markdown>=2.6.8 in ./pocket/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (3.3.7)\n",
"Requirement already satisfied: werkzeug>=0.11.15 in ./pocket/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (2.0.3)\n",
"Requirement already satisfied: setuptools>=41.0.0 in ./pocket/lib/python3.6/site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (59.6.0)\n",
"Requirement already satisfied: importlib-metadata>=4.4 in ./pocket/lib/python3.6/site-packages (from markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (4.8.3)\n",
"Requirement already satisfied: dataclasses in ./pocket/lib/python3.6/site-packages (from werkzeug>=0.11.15->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (0.8)\n",
"Requirement already satisfied: typing-extensions>=3.6.4 in ./pocket/lib/python3.6/site-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (4.1.1)\n",
"Requirement already satisfied: zipp>=0.5 in ./pocket/lib/python3.6/site-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15.5) (3.6.0)\n",
"Requirement already satisfied: keras==2.2.5 in ./pocket/lib/python3.6/site-packages (2.2.5)\n",
"Requirement already satisfied: scipy>=0.14 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.5.4)\n",
"Requirement already satisfied: numpy>=1.9.1 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.18.5)\n",
"Requirement already satisfied: six>=1.9.0 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.16.0)\n",
"Requirement already satisfied: keras-applications>=1.0.8 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.0.8)\n",
"Requirement already satisfied: scipy>=0.14 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.5.4)\n",
"Requirement already satisfied: keras-preprocessing>=1.1.0 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.1.2)\n",
"Requirement already satisfied: six>=1.9.0 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.16.0)\n",
"Requirement already satisfied: h5py in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (2.10.0)\n",
"Requirement already satisfied: numpy>=1.9.1 in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (1.18.5)\n",
"Requirement already satisfied: pyyaml in ./pocket/lib/python3.6/site-packages (from keras==2.2.5) (6.0)\n",
"Requirement already satisfied: pincelate in ./pocket/lib/python3.6/site-packages (0.0.1)\n",
"Requirement already satisfied: pronouncing>=0.2.0 in ./pocket/lib/python3.6/site-packages (from pincelate) (0.2.0)\n",
"Requirement already satisfied: Keras>=2.2.0 in ./pocket/lib/python3.6/site-packages (from pincelate) (2.2.5)\n",
"Requirement already satisfied: pronouncing>=0.2.0 in ./pocket/lib/python3.6/site-packages (from pincelate) (0.2.0)\n",
"Requirement already satisfied: scikit-learn>=0.20.0 in ./pocket/lib/python3.6/site-packages (from pincelate) (0.24.2)\n",
"Requirement already satisfied: keras-applications>=1.0.8 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.0.8)\n",
"Requirement already satisfied: numpy>=1.9.1 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.18.5)\n",
"Requirement already satisfied: six>=1.9.0 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.16.0)\n",
"Requirement already satisfied: pyyaml in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (6.0)\n",
"Requirement already satisfied: h5py in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (2.10.0)\n",
"Requirement already satisfied: scipy>=0.14 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.5.4)\n",
"Requirement already satisfied: numpy>=1.9.1 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.18.5)\n",
"Requirement already satisfied: keras-preprocessing>=1.1.0 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.1.2)\n",
"Requirement already satisfied: h5py in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (2.10.0)\n",
"Requirement already satisfied: pyyaml in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (6.0)\n",
"Requirement already satisfied: keras-applications>=1.0.8 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.0.8)\n",
"Requirement already satisfied: six>=1.9.0 in ./pocket/lib/python3.6/site-packages (from Keras>=2.2.0->pincelate) (1.16.0)\n",
"Requirement already satisfied: cmudict>=0.4.0 in ./pocket/lib/python3.6/site-packages (from pronouncing>=0.2.0->pincelate) (1.0.2)\n",
"Requirement already satisfied: joblib>=0.11 in ./pocket/lib/python3.6/site-packages (from scikit-learn>=0.20.0->pincelate) (1.1.1)\n",
"Requirement already satisfied: threadpoolctl>=2.0.0 in ./pocket/lib/python3.6/site-packages (from scikit-learn>=0.20.0->pincelate) (3.1.0)\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Using TensorFlow backend.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:541: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:66: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:4432: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:148: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3733: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3239: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use tf.where in 2.0, which has the same broadcast rule as np.where\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:190: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:197: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:203: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:207: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:216: The name tf.is_variable_initialized is deprecated. Please use tf.compat.v1.is_variable_initialized instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:223: The name tf.variables_initializer is deprecated. Please use tf.compat.v1.variables_initializer instead.\n",
"\n"
]
}
],
"source": [
@ -136,55 +175,23 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"id": "muslim-labor",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:541: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:66: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:4432: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:148: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3733: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:3239: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use tf.where in 2.0, which has the same broadcast rule as np.where\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:190: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:197: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:203: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:207: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:216: The name tf.is_variable_initialized is deprecated. Please use tf.compat.v1.is_variable_initialized instead.\n",
"\n",
"WARNING:tensorflow:From /home/angeliki/Documents/Any_One_day_future/A_tune_in/pocket/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py:223: The name tf.variables_initializer is deprecated. Please use tf.compat.v1.variables_initializer instead.\n",
"\n"
]
},
{
"data": {
"text/plain": [
"'icr.ckung'"
"'arcsvtinex'"
]
},
"execution_count": 3,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pin.manipulate(\"crashing\",temperature=3)"
"pin.manipulate(\"archives\",temperature=2)"
]
},
{
@ -196,7 +203,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "61490633621a4f568b855628db6d69d8",
"model_id": "52dbe8b1e0bb4ea9b0276e6902fce2b8",
"version_major": 2,
"version_minor": 0
},
@ -240,8 +247,8 @@
},
{
"cell_type": "code",
"execution_count": null,
"id": "189c5b06",
"execution_count": 1,
"id": "2e25f0db",
"metadata": {},
"outputs": [],
"source": [
@ -249,13 +256,20 @@
"import time\n",
"import json\n",
"import wget\n",
"import os\n",
"\n",
"import os"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "189c5b06",
"metadata": {},
"outputs": [],
"source": [
"url = \"https://pad.vvvvvvaria.org/any_one_day_this_dictionary_has_died/export/txt\"\n",
"\n",
"path= \"/home/angeliki/Documents/Any_One_day_future/A_tune_in\"\n",
"\n",
"\n",
"filename = path + '/' + os.path.basename(url) # get the full path of the file\n",
"if os.path.exists(filename):\n",
" os.remove(filename) # if exist, remove it directly\n",
@ -264,51 +278,68 @@
" \n",
"with open(filename, 'r') as f:\n",
" dictionary = json.loads(f.read().replace(\"'\", '\"'))\n",
"\n",
"\n",
"\n",
"sentence = input('give me your words: ')\n",
"\n",
"\n",
"def makedemonic():\n",
" \n",
"def makeparanyms():\n",
"\tnew_sentence = sentence\n",
"\tfor word in dictionary:\n",
"\t\tif word in new_sentence:\n",
"\t\t\tnew_sentence = new_sentence.replace(word, random.choice(dictionary[word]['paranyms']))\n",
"\tprint(new_sentence)\n",
"\n",
"def makepara():\n",
"def makeparameanings():\n",
"\tnew_sentence = sentence\n",
"\tfor word in dictionary:\n",
"\t\tif word in new_sentence:\n",
"\t\t\tnew_sentence = new_sentence.replace(word, random.choice(dictionary[word]['parameanings']))\n",
"\tprint(new_sentence)\n",
"\n",
"def makepira():\n",
"def makeparadoxes():\n",
"\tnew_sentence = sentence\n",
"\tfor word in dictionary:\n",
"\t\tif word in new_sentence:\n",
"\t\t\tnew_sentence = new_sentence.replace(word, random.choice(dictionary[word]['paradoxes']))\n",
"\tprint(new_sentence)\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "b1dde66a",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"what are your words? fdkhggfe futures\n",
"choose replacing method between \"paranyms\",\"parameanings\",\"paradoxes\",\"all\": all\n",
"fdkhggfe \n",
"fdkhggfe \n",
"fdkhggfe \n"
]
}
],
"source": [
"\n",
"sentence = input('what are your words? ')\n",
"\n",
"type = input('choose replacing method between \"paranyms\",\"parameanings\",\"paradoxes\",\"all\": ')\n",
"\n",
"if type == 'paranyms':\n",
"\tmakedemonic()\n",
"\tmakeparanyms()\n",
"elif type == 'parameanings':\n",
"\tmakepara()\n",
"\tmakeparameanings()\n",
"elif type == 'paradoxes':\n",
"\tmakepira()\n",
"\tmakeparadoxes()\n",
"elif type =='all':\n",
"\tmakedemonic()\n",
"\tmakeparanyms()\n",
"\ttime.sleep(1)\n",
"\tmakepara()\n",
"\tmakeparameanings()\n",
"\ttime.sleep(1)\n",
"\tmakepira()\n",
"\tmakeparadoxes()\n",
"else:\n",
" print(\"Wrong input. Please run the code again\")\n",
"\n"
" print(\"Wrong input. Please run the code again\")"
]
},
{

Loading…
Cancel
Save