From ff9b9493059290c90c68a7cae233f1877656cbd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20Parafin=CC=81ski?= Date: Wed, 18 May 2022 14:12:24 +0200 Subject: [PATCH] remove line photo --- jupyter.ipynb | 31 +++++++++++++++---------------- line.jpeg | Bin 8303 -> 0 bytes 2 files changed, 15 insertions(+), 16 deletions(-) delete mode 100644 line.jpeg diff --git a/jupyter.ipynb b/jupyter.ipynb index c064244..eee29df 100644 --- a/jupyter.ipynb +++ b/jupyter.ipynb @@ -14,7 +14,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/var/folders/8w/3c34c7kd2n144tvm764_pdbw0000gq/T/ipykernel_2611/1657712203.py:16: DeprecationWarning: Importing display from IPython.core.display is deprecated since IPython 7.14, please import from IPython display\n", + "/var/folders/8w/3c34c7kd2n144tvm764_pdbw0000gq/T/ipykernel_3019/1657712203.py:16: DeprecationWarning: Importing display from IPython.core.display is deprecated since IPython 7.14, please import from IPython display\n", " from IPython.core.display import display, HTML\n" ] }, @@ -130,7 +130,6 @@ "gray_images = {\n", " \"cat\":rgb2gray(img_as_float(data.chelsea())),\n", " \"astro\":rgb2gray(img_as_float(data.astronaut())),\n", - " \"line\": rgb2gray(img_as_float(Image.open('line.jpeg'))),\n", " \"camera\":data.camera(),\n", " \"coin\": data.coins(),\n", " \"clock\":data.clock(),\n", @@ -397,7 +396,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -479,7 +478,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "3468cf44f3e4421296a63af940c78d21", + "model_id": "40f7f6318beb4d248fc1b3aa82096324", "version_major": 2, "version_minor": 0 }, @@ -507,7 +506,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 12, "metadata": { "pycharm": { "name": "#%%\n" @@ -517,7 +516,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "248d76e7698e4f3f90a42587e6c4a66b", + "model_id": "3ec2852728b145a0b405eb6c24ef4e9b", "version_major": 2, "version_minor": 0 }, @@ -637,12 +636,12 @@ " return (original_shape[0]*original_shape[1]*original_shape[2])//(original_shape[0] + 3*original_shape[1] + 1)\n", "\n", "\n", - "list_widget = widgets.Dropdown(options=list(color_images.keys()))\n", + "list_widget_color = widgets.Dropdown(options=list(color_images.keys()))\n", "int_slider_widget = widgets.IntSlider(min=1,max=compute_k_max_color_images('cat'))\n", "def update_k_max_color(*args):\n", - " img_name=list_widget.value\n", + " img_name=list_widget_color.value\n", " int_slider_widget.max = compute_k_max_color_images(img_name)\n", - "list_widget.observe(update_k_max_color,'value')" + "list_widget_color.observe(update_k_max_color,'value')" ] }, { @@ -668,7 +667,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "cd415e4147de4fe5bfe269eefe92062a", + "model_id": "eaba6da4395e43d4ab429b4cca24ad3f", "version_major": 2, "version_minor": 0 }, @@ -681,7 +680,7 @@ } ], "source": [ - "interact(compress_show_color_images_reshape,img_name=list_widget,k=int_slider_widget);" + "interact(compress_show_color_images_reshape,img_name=list_widget_color,k=int_slider_widget);" ] }, { @@ -759,12 +758,12 @@ " return (original_shape[0]*original_shape[1]*original_shape[2])// (3*(original_shape[0] + original_shape[1] + 1))\n", "\n", "\n", - "list_widget = widgets.Dropdown(options=list(color_images.keys()))\n", + "list_widget_color = widgets.Dropdown(options=list(color_images.keys()))\n", "int_slider_widget = widgets.IntSlider(min=1,max=compute_k_max_color_images_layers('cat'))\n", "def update_k_max_color_layers(*args):\n", - " img_name=list_widget.value\n", + " img_name=list_widget_color.value\n", " int_slider_widget.max = compute_k_max_color_images_layers(img_name)\n", - "list_widget.observe(update_k_max_color_layers,'value')" + "list_widget_color.observe(update_k_max_color_layers,'value')" ] }, { @@ -779,7 +778,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "9e15fb8aaa9e44e880a8d7fa9e7fed1d", + "model_id": "5089ca8c1cb845478b279185787ad156", "version_major": 2, "version_minor": 0 }, @@ -792,7 +791,7 @@ } ], "source": [ - "interact(compress_show_color_images_layer,img_name=list_widget,k=int_slider_widget);" + "interact(compress_show_color_images_layer,img_name=list_widget_color,k=int_slider_widget);" ] } ], diff --git a/line.jpeg b/line.jpeg deleted file mode 100644 index 44539ddf3548cd4559a4b0f33b8cf5976cb79f29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8303 zcmeHJc~DbF9Nr`(fdEA?crg^^@F>%9AacGI*h-l<@#819^fKlunD_ z)#@k(4{S$3t3s8QXAD-conZh=1d2&e6q*47<#;47+3riIC_e1*pEK`eb|=Z({r3BQ zzwfuZ@BvhTNvngyf&q&K01JHpYz39+E+%rUB7>+ZdAXO@*<%G7DoXL!t>Gk4xwKE8en7cKT*6&Ms85*oHT`n~tpiPwLy zVbkUS$6{>s&B z6_r0+zi~@mbNlBzcWdu8G~WNMN%5e$Mcw}BamSOVon3$Q_5V3AI5bR*=qOz*z%k20 zJ*_T#q>D}EfKTaSu~Sjw*jsRCE#Ntnowb=4*nx-Qc0%IiL;_mMWA_AnG+8?QAi^-WU6;Fl6~LzjzIWi0D>Qj=X z2?X}Bm@IJ^tG(ALAwIc^8H2yE(`4luLm+7PEGOQs?j2biYYl;IQyv6&@0UWr{}2LM zqF&l?!U2Ld|9S{UX6zM}>O4ngCK3J`qxHvkjPHt9O7tZgL=d<|q9sf-@Xp7(=aUOf zf3D>Z;z5`j1bvQmoyV4D8ItNHwQRJwLZXe? zBI@6HV=^|n{(cDdm0_w10|eW{t?-^x+aMsn2ykgKIFg8WjTp_yP@)-AjZUR55aeHg z;6NF!s?g()JDz7H3&PxO={06kYoIB=VrYs71UHh;K+x|Cu$TdH{|Y*lQJ6_a;z>+> z&S(BGu8tk0rQkY}hs-Zu)Ht7XPKJP65e>l{&!UBfMl)HCPFai>aA`$`F)3tH$W$Ry zg)|$fSR*2x63~XyOFTmTqCVy4_?EgBd0=CFUu90Z-$VDtr4hvsJ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