diff --git a/data_processing/notebooks/hero_image.ipynb b/data_processing/notebooks/hero_image.ipynb deleted file mode 100644 index 204f3a1..0000000 --- a/data_processing/notebooks/hero_image.ipynb +++ /dev/null @@ -1,111 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "import sys\n", - "from PIL import Image\n", - "import numpy as np" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [], - "source": [ - "input_path = '..\\images\\persons'\n", - "output_path = '..\\images'\n", - "\n", - "images = [Image.open(x).convert(\"RGBA\") for x in [input_path + \"\\peep(\" + str(x+1) + \").png\" for x in range(18)]]\n", - "widths, heights = zip(*(i.size for i in images))\n", - "\n", - "total_width = sum(widths)\n", - "max_height = max(heights)\n", - "\n", - "new_im = Image.new('RGBA', (total_width, max_height))\n", - "\n", - "x_offset = 0\n", - "for im in images:\n", - " new_im.paste(im, (x_offset,0))\n", - " x_offset += im.size[0]\n", - "\n", - "new_im.save('hero.png')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "[x for x in range(10)]" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[[0. 1. 0. 1. 0. 0. 1.]\n", - " [0. 1. 1. 1. 1. 1. 1.]\n", - " [1. 1. 0. 0. 1. 1. 1.]\n", - " [0. 1. 1. 1. 1. 1. 1.]\n", - " [1. 1. 0. 0. 1. 1. 1.]\n", - " [1. 1. 1. 1. 0. 1. 1.]\n", - " [1. 1. 1. 1. 1. 0. 0.]\n", - " [1. 1. 1. 1. 0. 1. 1.]\n", - " [1. 1. 0. 1. 1. 0. 1.]\n", - " [1. 0. 1. 1. 1. 1. 1.]\n", - " [1. 1. 0. 1. 0. 1. 1.]\n", - " [0. 0. 1. 1. 1. 0. 1.]\n", - " [0. 1. 0. 1. 0. 0. 0.]\n", - " [0. 0. 0. 1. 1. 1. 0.]\n", - " [1. 1. 0. 0. 1. 1. 0.]]\n" - ] - } - ], - "source": [ - "inds = np.array([1, 3, 6, 8, 9, 10, 11, 12, 13, 14,\n", - " 15, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29,\n", - " 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44,\n", - " 45, 46, 49, 50, 51, 52, 54, 55, 56, 57, 59,\n", - " 60, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73,\n", - " 75, 76, 79, 80, 81, 83, 85, 87,\n", - " 94, 95, 96, 98, 99, 102, 103])\n", - "inds_bool = np.zeros(15*7)\n", - "inds_bool[inds] = True\n", - "vect2 = np.reshape(inds_bool, (-1, 7))\n", - "print(vect2)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "bio411", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -}