diff --git a/_sources/index_en.rst b/_sources/index_en.rst index 07582b56c2..5d9affd01f 100644 --- a/_sources/index_en.rst +++ b/_sources/index_en.rst @@ -34,6 +34,7 @@ Contents: lectures/TWP58/toctree_en lectures/TWP60/toctree_en lectures/TWP65/toctree_en + lectures/TWP66/toctree_en quiz/Quiz1_en.rst quiz/Quiz2_en.rst quiz/Quiz3_en.rst diff --git a/_sources/index_es.rst b/_sources/index_es.rst index ecf1551c24..4bb0dbc9c4 100644 --- a/_sources/index_es.rst +++ b/_sources/index_es.rst @@ -34,6 +34,7 @@ Contenidos: lectures/TWP58/toctree lectures/TWP60/toctree lectures/TWP65/toctree + lectures/TWP66/toctree quiz/Quiz1.rst quiz/Quiz2.rst quiz/Quiz3.rst diff --git a/_sources/lectures/TWP66/TWP66_1.rst b/_sources/lectures/TWP66/TWP66_1.rst new file mode 100644 index 0000000000..90b74e6e76 --- /dev/null +++ b/_sources/lectures/TWP66/TWP66_1.rst @@ -0,0 +1,107 @@ +==================== +Introducción a NumPy +==================== + +.. image:: ../img/TWP66_001.png + :align: center + :alt: + +Introducción +------------ +Esta conferencia integral se centra en dominar NumPy, una de las bibliotecas más populares en Python para cálculos numéricos. Exploraremos varias funcionalidades de NumPy, entendiendo cómo crear y manipular arreglos para realizar operaciones numéricas de manera efectiva. + +Parte 1: Entendiendo los Conceptos Básicos de NumPy +--------------------------------------------------- + +.. contents:: + :local: + +Visión General +~~~~~~~~~~~~~~ +NumPy es una poderosa biblioteca para cálculos numéricos en Python. Proporciona soporte para grandes arreglos y matrices multidimensionales, junto con una colección de funciones matemáticas para operar sobre estos arreglos. + +Instalando NumPy +~~~~~~~~~~~~~~~~ +Instala NumPy usando pip:: + + pip install numpy + +Importando NumPy +~~~~~~~~~~~~~~~~ +Importa NumPy en tu script de Python:: + + import numpy as np + +Creando Arreglos +~~~~~~~~~~~~~~~~ +**Arreglo 1D**:: + + import numpy as np + + # Crear un arreglo 1D + arr = np.array([1, 2, 3, 4, 5]) + print("Arreglo 1D:", arr) + +**Arreglo 2D**:: + + import numpy as np + + # Crear un arreglo 2D + arr_2d = np.array([[1, 2, 3], [4, 5, 6]]) + print("Arreglo 2D:", arr_2d) + +Operaciones con Arreglos +~~~~~~~~~~~~~~~~~~~~~~~~ +**Operaciones Básicas**:: + + import numpy as np + + # Crear un arreglo + arr = np.array([1, 2, 3, 4, 5]) + + # Realizar operaciones básicas + print("Suma:", np.sum(arr)) + print("Media:", np.mean(arr)) + +**Operaciones Elemento a Elemento**:: + + import numpy as np + + # Crear arreglos + arr1 = np.array([1, 2, 3]) + arr2 = np.array([4, 5, 6]) + + # Suma elemento a elemento + print("Suma Elemento a Elemento:", arr1 + arr2) + + # Multiplicación elemento a elemento + print("Multiplicación Elemento a Elemento:", arr1 * arr2) + +Manipulación de la Forma +~~~~~~~~~~~~~~~~~~~~~~~~ +**Cambio de Forma de Arreglos**:: + + import numpy as np + + # Crear un arreglo 1D + arr = np.array([1, 2, 3, 4, 5, 6]) + + # Cambiar la forma del arreglo a 2x3 + arr_reshaped = np.reshape(arr, (2, 3)) + print("Arreglo con Forma Cambiada:", arr_reshaped) + +**Aplanamiento de Arreglos**:: + + import numpy as np + + # Crear un arreglo 2D + arr_2d = np.array([[1, 2, 3], [4, 5, 6]]) + + # Aplanar el arreglo + arr_flat = arr_2d.flatten() + print("Arreglo Aplanado:", arr_flat) + +Cuestionario +------------ +.. raw:: html + :file: ../_static/TWP66/TWP66_1.html diff --git a/_sources/lectures/TWP66/TWP66_1_en.rst b/_sources/lectures/TWP66/TWP66_1_en.rst new file mode 100644 index 0000000000..0e67489417 --- /dev/null +++ b/_sources/lectures/TWP66/TWP66_1_en.rst @@ -0,0 +1,107 @@ +===================== +Introduction to NumPy +===================== + +.. image:: ../img/TWP66_001.png + :align: center + :alt: + +Introduction +------------ +This comprehensive lecture focuses on mastering NumPy, one of the most popular libraries in Python for numerical computations. We will explore various functionalities of NumPy, understanding how to create and manipulate arrays to effectively perform numerical operations. + +Part 1: Understanding NumPy Basics +---------------------------------- + +.. contents:: + :local: + +Overview +~~~~~~~~ +NumPy is a powerful library for numerical computations in Python. It provides support for large multi-dimensional arrays and matrices, along with a collection of mathematical functions to operate on these arrays. + +Installing NumPy +~~~~~~~~~~~~~~~~ +Install NumPy using pip:: + + pip install numpy + +Importing NumPy +~~~~~~~~~~~~~~~ +Import NumPy in your Python script:: + + import numpy as np + +Creating Arrays +~~~~~~~~~~~~~~~ +**1D Array**:: + + import numpy as np + + # Create a 1D array + arr = np.array([1, 2, 3, 4, 5]) + print("1D Array:", arr) + +**2D Array**:: + + import numpy as np + + # Create a 2D array + arr_2d = np.array([[1, 2, 3], [4, 5, 6]]) + print("2D Array:", arr_2d) + +Array Operations +~~~~~~~~~~~~~~~~ +**Basic Operations**:: + + import numpy as np + + # Create an array + arr = np.array([1, 2, 3, 4, 5]) + + # Perform basic operations + print("Sum:", np.sum(arr)) + print("Mean:", np.mean(arr)) + +**Element-wise Operations**:: + + import numpy as np + + # Create arrays + arr1 = np.array([1, 2, 3]) + arr2 = np.array([4, 5, 6]) + + # Element-wise addition + print("Element-wise Addition:", arr1 + arr2) + + # Element-wise multiplication + print("Element-wise Multiplication:", arr1 * arr2) + +Shape Manipulation +~~~~~~~~~~~~~~~~~~ +**Reshaping Arrays**:: + + import numpy as np + + # Create a 1D array + arr = np.array([1, 2, 3, 4, 5, 6]) + + # Reshape the array to 2x3 + reshaped_arr = np.reshape(arr, (2, 3)) + print("Reshaped Array:", reshaped_arr) + +**Flattening Arrays**:: + + import numpy as np + + # Create a 2D array + arr_2d = np.array([[1, 2, 3], [4, 5, 6]]) + + # Flatten the array + flat_arr = arr_2d.flatten() + print("Flattened Array:", flat_arr) + +Quiz +---- +.. raw:: html + :file: ../_static/TWP66/TWP66_1_en.html \ No newline at end of file diff --git a/_sources/lectures/TWP66/TWP66_2.rst b/_sources/lectures/TWP66/TWP66_2.rst new file mode 100644 index 0000000000..00a505edfd --- /dev/null +++ b/_sources/lectures/TWP66/TWP66_2.rst @@ -0,0 +1,136 @@ +===================== +Introducción a Pandas +===================== + +.. image:: ../img/TWP66_002.png + :align: center + :alt: + + +Introducción +------------ +Esta lección se centra en Pandas, una poderosa biblioteca de Python para la manipulación y el análisis de datos. Exploraremos sus capacidades para manejar datos estructurados de manera efectiva. + +Comprendiendo los conceptos básicos de Pandas +--------------------------------------------- +Pandas proporciona estructuras de datos como Series y DataFrame. Está construido sobre NumPy, lo que facilita el trabajo con datos estructurados. + +.. code-block:: python + :caption: Importando Pandas y Cargando Datos Simulados + + import pandas as pd + + # Datos simulados + data = { + 'Name': ['John', 'Anna', 'Peter', 'Linda', 'Jack'], + 'Age': [28, 23, 25, 24, 30], + 'City': ['Nueva York', 'París', 'Berlín', 'Londres', 'Tokio'] + } + + # Creando un DataFrame + df = pd.DataFrame(data) + + # Mostrando el DataFrame + print(df) + +Análisis Exploratorio de Datos (EDA) con Pandas +----------------------------------------------- +Verifica las dimensiones de los datos y examina su estructura: + +.. code-block:: python + :caption: Verificando Dimensiones e Información de los Datos + + # Forma del DataFrame + print(df.shape) + + # Información sobre el DataFrame + print(df.info()) + +Limpieza y Transformación de Datos +---------------------------------- +Renombrar columnas: + +.. code-block:: python + :caption: Limpiando y Transformando Datos + + # Renombrar columnas + df.rename(columns={'Name': 'Nombre Completo', 'City': 'Ubicación'}, inplace=True) + + +Manipulación y Agregación de Datos +---------------------------------- +Selecciona, filtra, agrupa y agrega datos: + +.. code-block:: python + :caption: Manipulación y Agregación de Datos + + # Seleccionando columnas + print(df[['Nombre', 'Edad']]) + + # Filtrando datos + datos_filtrados = df[df['Edad'] > 25] + print(datos_filtrados) + + # Agrupando y agregando datos + estadisticas_por_edad = df.groupby('Edad').size() + print(estadisticas_por_edad) + +Visualización de Datos con Pandas y Matplotlib +---------------------------------------------- +Utiliza Matplotlib para las visualizaciones: + +.. code-block:: python + :caption: Visualización de Datos + + import matplotlib.pyplot as plt + + # Ejemplo de gráfico + df['Edad'].plot(kind='hist', bins=5) + plt.title('Distribución de Edad') + plt.xlabel('Edad') + plt.ylabel('Frecuencia') + display(plt, "plot_area") # Reemplazar con plt.show() si se ejecuta localmente + +.. note:: + Estamos utilizando PyScript para ejecutar NumPy y Matplotlib en el navegador. + Usa `plt.show()` en lugar de `display(plt, "plot_area")` para mostrar los gráficos si ejecutas el código localmente. + +Ejemplo Interactivo +-------------------- +Aquí tienes un ejemplo interactivo donde puedes filtrar el DataFrame en función de la edad y visualizar los resultados: + +.. activecode:: ac_l66_2_1 + :nocodelens: + :language: python3 + :python3_interpreter: pyscript + + import pandas as pd + import matplotlib.pyplot as plt + + # Datos simulados + data = { + 'Name': ['John', 'Anna', 'Peter', 'Linda', 'Jack'], + 'Age': [28, 23, 25, 24, 30], + 'City': ['Nueva York', 'París', 'Berlín', 'Londres', 'Tokio'] + } + + # Crear DataFrame + df = pd.DataFrame(data) + + # Filtrar DataFrame por edad + df_filtrado = df[df['Edad'] > 25] + + # Graficando datos filtrados + df_filtrado.plot(kind='bar', x='Nombre', y='Edad', color='skyblue') + plt.title('Distribución de Edad para Personas Mayores de 25 Años') + plt.xlabel('Nombre') + plt.ylabel('Edad') + print("El gráfico se muestra abajo en el campo:") + display(plt, "plot_area") # Reemplazar con plt.show() si se ejecuta localmente + +.. note:: + Asegúrate de ejecutar todos los bloques de código proporcionados para ver los resultados completos y comprender las funcionalidades demostradas. + +Ejercicio +--------- +Escribe un código para calcular la edad promedio de las personas en el DataFrame. diff --git a/_sources/lectures/TWP66/TWP66_2_en.rst b/_sources/lectures/TWP66/TWP66_2_en.rst new file mode 100644 index 0000000000..a0d67532fd --- /dev/null +++ b/_sources/lectures/TWP66/TWP66_2_en.rst @@ -0,0 +1,136 @@ +====================== +Introduction to Pandas +====================== + +.. image:: ../img/TWP66_002.png + :align: center + :alt: + + +Introduction +------------ +This lecture focuses on Pandas, a powerful Python library for data manipulation and analysis. We'll explore its capabilities in handling structured data effectively. + +Understanding Pandas Basics +--------------------------- +Pandas provides data structures like Series and DataFrame. It is built on top of NumPy, making it easy to work with structured data. + +.. code-block:: python + :caption: Importing Pandas and Loading Dummy Data + + import pandas as pd + + # Dummy data + data = { + 'Name': ['John', 'Anna', 'Peter', 'Linda', 'Jack'], + 'Age': [28, 23, 25, 24, 30], + 'City': ['New York', 'Paris', 'Berlin', 'London', 'Tokyo'] + } + + # Creating a DataFrame + df = pd.DataFrame(data) + + # Displaying the DataFrame + print(df) + +Exploratory Data Analysis (EDA) with Pandas +------------------------------------------- +Check data dimensions and examine its structure: + +.. code-block:: python + :caption: Checking Data Dimensions and Info + + # Shape of the DataFrame + print(df.shape) + + # Information about the DataFrame + print(df.info()) + +Data Cleaning and Transformation +-------------------------------- +Rename columns: + +.. code-block:: python + :caption: Cleaning and Transforming Data + + # Rename columns + df.rename(columns={'Name': 'Full Name', 'City': 'Location'}, inplace=True) + + +Data Manipulation and Aggregation +--------------------------------- +Select, filter, group, and aggregate data: + +.. code-block:: python + :caption: Data Manipulation and Aggregation + + # Selecting columns + print(df[['Name', 'Age']]) + + # Filtering data + filtered_data = df[df['Age'] > 25] + print(filtered_data) + + # Grouping and aggregating data + age_group_stats = df.groupby('Age').size() + print(age_group_stats) + +Data Visualization with Pandas and Matplotlib +---------------------------------------------- +Utilize Matplotlib for visualizations: + +.. code-block:: python + :caption: Data Visualization + + import matplotlib.pyplot as plt + + # Plotting example + df['Age'].plot(kind='hist', bins=5) + plt.title('Age Distribution') + plt.xlabel('Age') + plt.ylabel('Frequency') + display(plt, "plot_area") # Replace with plt.show() if running locally + +.. note:: + We are using PyScript to run NumPy and Matplotlib in the browser. + Use `plt.show()` instead of `display(plt, "plot_area")` to show the plots if you are running code locally. + +Interactive Example +-------------------- +Here's an interactive example where you can filter the DataFrame based on age and visualize the results: + +.. activecode:: ac_l66_2_en_1 + :nocodelens: + :language: python3 + :python3_interpreter: pyscript + + import pandas as pd + import matplotlib.pyplot as plt + + # Dummy data + data = { + 'Name': ['John', 'Anna', 'Peter', 'Linda', 'Jack'], + 'Age': [28, 23, 25, 24, 30], + 'City': ['New York', 'Paris', 'Berlin', 'London', 'Tokyo'] + } + + # Create DataFrame + df = pd.DataFrame(data) + + # Filter DataFrame by age + filtered_df = df[df['Age'] > 25] + + # Plotting filtered data + filtered_df.plot(kind='bar', x='Name', y='Age', color='skyblue') + plt.title('Age Distribution for Individuals Older than 25') + plt.xlabel('Name') + plt.ylabel('Age') + print("The plot is displayed below in the field:") + display(plt, "plot_area") # Replace with plt.show() if running locally + +.. note:: + Ensure you run all the code blocks provided to see the complete results and understand the functionalities demonstrated. + +Exercise +-------- +Write code to calculate the average age of the individuals in the DataFrame. \ No newline at end of file diff --git a/_sources/lectures/TWP66/TWP66_3.rst b/_sources/lectures/TWP66/TWP66_3.rst new file mode 100644 index 0000000000..a7a33831c6 --- /dev/null +++ b/_sources/lectures/TWP66/TWP66_3.rst @@ -0,0 +1,74 @@ +=============================== +Operaciones Avanzadas con NumPy +=============================== + +Introducción +------------ +En este ejercicio, utilizaremos Python para explorar el uso de las bibliotecas NumPy y Matplotlib. + +Ejemplo de Código +----------------- +Usaremos la biblioteca NumPy para definir el dominio y el rango de una función, y Matplotlib para graficar los resultados. + +**Definir el Dominio y el Rango** + +.. code-block:: python + + import numpy as np + + # Definir el DOMINIO de una FUNCIÓN + N = 55 + X = np.linspace(-5, 5, N) # -5 límite inferior, 5 límite superior, N número de puntos a generar + # Mostrar los valores + print(X) + + # Calcular el RANGO de una FUNCIÓN + Y = np.sin(X) + # Mostrar los valores calculados + print(Y) + +**Graficar los Valores** + +.. code-block:: python + + from matplotlib import pyplot as plt + + # Graficar los valores de X y Y con círculos rojos + plt.plot(X, Y, 'ro') + plt.grid(True) + + # Graficar los valores de X y Y con líneas azules + plt.plot(X, Y, 'b-') + plt.grid(True) + + # Mostrar el gráfico + display(plt, "plot_area") # Reemplazar con plt.show() si se ejecuta localmente + +.. note:: + Usa `plt.show()` en lugar de `display(plt, "plot_area")` si lo recreas en una máquina local. + +**Editor de Código Interactivo** + +Para experimentar con el código de forma interactiva, utiliza los bloques de código interactivos proporcionados a continuación. Ejecuta todos los bloques de código para ver los resultados y explorar diferentes funcionalidades. + +.. activecode:: ac_l66_3_1 + :nocodelens: + :language: python3 + :python3_interpreter: pyscript + + import numpy as np + import matplotlib.pyplot as plt + + # Definir el dominio + N = 55 + X = np.linspace(-5, 5, N) + Y = np.sin(X) + + # Graficar los valores + plt.plot(X, Y, 'b-') + plt.grid(True) + print("El gráfico se muestra abajo en el campo:") + display(plt, "plot_area") # Reemplazar con plt.show() si se ejecuta localmente + +.. note:: + Asegúrate de ejecutar todos los bloques de código proporcionados para ver los resultados completos y comprender las funcionalidades demostradas. diff --git a/_sources/lectures/TWP66/TWP66_3_en.rst b/_sources/lectures/TWP66/TWP66_3_en.rst new file mode 100644 index 0000000000..d3a3acd802 --- /dev/null +++ b/_sources/lectures/TWP66/TWP66_3_en.rst @@ -0,0 +1,74 @@ +========================= +Advanced NumPy Operations +========================= + +Introduction +------------ +In this exercise, we will use Python to explore the use of the NumPy and Matplotlib libraries. + +Code Example +------------ +We will use the NumPy library to define the domain and range of a function, and Matplotlib to plot the results. + +**Define the Domain and Range** + +.. code-block:: python + + import numpy as np + + # Define the DOMAIN of a FUNCTION + N = 55 + X = np.linspace(-5, 5, N) # -5 lower limit, 5 upper limit, N number of points to generate + # Display the values + print(X) + + # Calculate the RANGE of a FUNCTION + Y = np.sin(X) + # Display the calculated values + print(Y) + +**Plot the Values** + +.. code-block:: python + + from matplotlib import pyplot as plt + + # Plot the values of X and Y with red circles + plt.plot(X, Y, 'ro') + plt.grid(True) + + # Plot the values of X and Y with blue lines + plt.plot(X, Y, 'b-') + plt.grid(True) + + # Display the plot + diplay(plt, "plot_area") # Replace with plt.show() if running locally + +.. note:: + use `plt.show()` instead of `display(plt, "plot_area")` if recreating on local machine. + +**Interactive Code Editor** + +To experiment with the code interactively, use the provided interactive code blocks below. Run all the code blocks to see the results and explore different functionalities. + +.. activecode:: ac_l66_3_en_1 + :nocodelens: + :language: python3 + :python3_interpreter: pyscript + + import numpy as np + import matplotlib.pyplot as plt + + # Define the domain + N = 55 + X = np.linspace(-5, 5, N) + Y = np.sin(X) + + # Plotting the values + plt.plot(X, Y, 'b-') + plt.grid(True) + print("The plot is displayed below in the field:") + display(plt, "plot_area") # Replace with plt.show() if running locally + +.. note:: + Ensure you run all the code blocks provided to see the complete results and understand the functionalities demonstrated. \ No newline at end of file diff --git a/_sources/lectures/TWP66/TWP66_4.rst b/_sources/lectures/TWP66/TWP66_4.rst new file mode 100644 index 0000000000..535454a42e --- /dev/null +++ b/_sources/lectures/TWP66/TWP66_4.rst @@ -0,0 +1,91 @@ +==================================== +Explorando Más Bibliotecas de Python +==================================== + +Introducción +------------ +En esta sección, profundizaremos en el uso de bibliotecas de Python, enfocándonos específicamente en operaciones avanzadas con NumPy y visualizaciones utilizando Matplotlib. + +**Trabajando con Funciones** + +Comenzaremos definiendo el dominio de una función y calculando su rango correspondiente, seguido de la representación gráfica de estos valores. + +.. code-block:: python + + import numpy as np + + # Definir el DOMINIO de una FUNCIÓN + N = 35 + X = np.linspace(-5, 5, N) # -5 límite inferior, 5 límite superior, N número de puntos a generar + # Mostrar los valores + print(X) + + # Calcular el CO-DOMINIO de una FUNCIÓN + Y = np.sin(X) / X + # Mostrar los valores calculados + print(Y) + +**Graficando Funciones Complejas** + +Vamos a graficar los valores calculados y explorar técnicas de representación gráfica más avanzadas. + +.. code-block:: python + + from matplotlib import pyplot as plt + + # Graficar los valores de X y Y con círculos rojos + plt.plot(X, Y, 'ro') + plt.grid(True) + + # Graficar los valores de X y Y con círculos cian + plt.plot(X, Y, 'co') + plt.grid(True) + + # Graficar los valores de X y Y con líneas azules + plt.plot(X, Y, 'b-') + plt.grid(True) + display(plt, "plot_area") # Reemplazar con plt.show() si se ejecuta localmente + +**Explorando y Componiendo Funciones** + +También podemos explorar y componer funciones utilizando NumPy y Matplotlib. + +.. code-block:: python + + Z = (np.sin(X)) ** 2 + plt.plot(X, Z, '.-') + plt.grid(True) + display(plt, "plot_area") # Reemplazar con plt.show() si se ejecuta localmente + +**Editor de Código Interactivo** + +Para experimentar con el código de forma interactiva, utiliza los bloques de código interactivos proporcionados a continuación. Ejecuta todos los bloques de código para ver los resultados y explorar diferentes funcionalidades. + +.. activecode:: ac_l66_4_1 + :nocodelens: + :language: python3 + :python3_interpreter: pyscript + + import numpy as np + import matplotlib.pyplot as plt + + # Definir el dominio + N = 35 + X = np.linspace(-5, 5, N) + Y = np.sin(X) / X + + # Graficar los valores + plt.plot(X, Y, 'b-') + plt.grid(True) + display(plt) + + # Explorando la composición de funciones + Z = (np.sin(X)) ** 2 + plt.plot(X, Z, '.-') + plt.grid(True) + print("El gráfico se muestra abajo en el campo:") + display(plt, "plot_area") # Reemplazar con plt.show() si se ejecuta localmente + + +.. note:: + Usa `plt.show()` en lugar de `display(plt, "plot_area")` si lo recreas en una máquina local. diff --git a/_sources/lectures/TWP66/TWP66_4_en.rst b/_sources/lectures/TWP66/TWP66_4_en.rst new file mode 100644 index 0000000000..1b3469844a --- /dev/null +++ b/_sources/lectures/TWP66/TWP66_4_en.rst @@ -0,0 +1,90 @@ +================================== +Exploring Python Libraries Further +================================== + +Introduction +------------ +In this section, we will delve deeper into the use of Python libraries, specifically focusing on advanced operations with NumPy and visualizations using Matplotlib. + +**Working with Functions** + +We'll start by defining the domain of a function and calculating its corresponding range, followed by plotting these values. + +.. code-block:: python + + import numpy as np + + # Define the DOMAIN of a FUNCTION + N = 35 + X = np.linspace(-5, 5, N) # -5 lower limit, 5 upper limit, N number of points to generate + # Display the values + print(X) + + # Calculate the CO-DOMAIN of a FUNCTION + Y = np.sin(X) / X + # Display the calculated values + print(Y) + +**Plotting Complex Functions** + +Let's plot the calculated values and explore more advanced plotting techniques. + +.. code-block:: python + + from matplotlib import pyplot as plt + + # Plot the values of X and Y with red circles + plt.plot(X, Y, 'ro') + plt.grid(True) + + # Plot the values of X and Y with cyan circles + plt.plot(X, Y, 'co') + plt.grid(True) + + # Plot the values of X and Y with blue lines + plt.plot(X, Y, 'b-') + plt.grid(True) + display(plt, "plot_area") # Replace with plt.show() if running locally + +**Exploring and Composing Functions** + +We can also explore and compose functions using NumPy and Matplotlib. + +.. code-block:: python + + Z = (np.sin(X)) ** 2 + plt.plot(X, Z, '.-') + plt.grid(True) + display(plt, "plot_area") # Replace with plt.show() if running locally + +**Interactive Code Editor** + +To experiment with the code interactively, use the provided interactive code blocks below. Run all the code blocks to see the results and explore different functionalities. + +.. activecode:: ac_l66_4_en_1 + :nocodelens: + :language: python3 + :python3_interpreter: pyscript + + import numpy as np + import matplotlib.pyplot as plt + + # Define the domain + N = 35 + X = np.linspace(-5, 5, N) + Y = np.sin(X) / X + + # Plotting the values + plt.plot(X, Y, 'b-') + plt.grid(True) + display(plt) + + # Exploring function composition + Z = (np.sin(X)) ** 2 + plt.plot(X, Z, '.-') + plt.grid(True) + print("The plot is displayed below in the field:") + display(plt, "plot_area") # Replace with plt.show() if running locally + +.. note:: + use `plt.show()` instead of `display(plt, "plot_area")` if recreating on local machine. \ No newline at end of file diff --git a/_sources/lectures/TWP66/TWP66_5.rst b/_sources/lectures/TWP66/TWP66_5.rst new file mode 100644 index 0000000000..725fd3fcd9 --- /dev/null +++ b/_sources/lectures/TWP66/TWP66_5.rst @@ -0,0 +1,165 @@ +================== +SymPy con Gráficas +================== + +Introducción +------------ +En este ejercicio, utilizaremos la biblioteca SymPy de Python para crear y visualizar expresiones matemáticas usando gráficos tanto en 2D como en 3D. + +Ejemplo de Código: Gráficas en 2D +---------------------------------- +Usaremos la biblioteca SymPy para definir expresiones simbólicas y visualizarlas mediante gráficos en 2D. + +**Definir la Variable Simbólica** + +.. code-block:: python + + from sympy import Symbol + from sympy.plotting import plot + + # Definir la variable simbólica + x = Symbol('x') + + # Mostrar la variable simbólica + print(x) + +**Graficar las Expresiones** + +.. code-block:: python + + # Graficar la función cuadrática x^2 con un color personalizado + plot(x**2, line_color='fuchsia') + + # Graficar la función cuadrática x^2 con un código de color diferente + plot(x**2, line_color='#e30052') + + # Graficar la función cuadrática x^2 con el color predeterminado + plot(x**2) + + # Graficar las funciones seno y coseno en un intervalo específico + plot(sin(x), cos(x), (x, -pi, pi)) + + # Graficar múltiples funciones con diferentes intervalos y un título personalizado + plot((sin(x), (x, -2*pi, 2*pi)), (cos(x), (x, -pi, pi)), + line_color='green', title='Ejemplo de Gráfico con SymPy') + +.. note:: + Utiliza estos gráficos para explorar el comportamiento de las funciones dentro de los intervalos especificados. + +**Convertir Gráficas a PNG** + +En algunos casos, especialmente cuando se trabaja en un entorno web como este editor de código interactivo, necesitamos convertir los gráficos en imágenes (como PNG) para que se puedan mostrar. Esto se debe a que el editor puede no soportar la representación directa de gráficos SymPy en su formato nativo. Al convertir los gráficos en imágenes y codificarlos como base64, podemos incrustarlos en HTML para visualizarlos dentro del cuaderno o en una página web. + +Alternativamente, si estás trabajando localmente en tu propia máquina, puedes mostrar los gráficos directamente sin convertirlos en imágenes utilizando el método `show()` proporcionado por el módulo de gráficos de SymPy. Este método renderizará el gráfico en una nueva ventana o dentro de tu Jupyter Notebook si estás utilizando uno. + +.. code-block:: python + + # Graficar la expresión directamente sin conversión cuando se trabaja localmente + plot(sin(x), cos(x), (x, -pi, pi), show=True) + +Ejemplo de Código: Gráficas en 3D +---------------------------------- +También podemos crear gráficos de superficie en 3D utilizando SymPy. + +**Gráfico de Superficie en 3D** + +.. code-block:: python + + from sympy.plotting import plot3d + from sympy import Symbol + + # Definir variables simbólicas para la representación 3D + x = Symbol('x') + y = Symbol('y') + + # Mostrar las variables simbólicas + print(x, y) + + # Graficar una superficie 3D para la expresión x * y + plot3d(x * y, (x, -10, 10), (y, -10, 10)) + + # Graficar múltiples superficies 3D + plot3d(x * y, x / y, (x, -5, 5), (y, -5, 5)) + + # Graficar superficies con expresiones más complejas + plot3d((x**2 + y**2, (x, -5, 5), (y, -5, 5)), + (x * y, (x, -3, 3), (y, -3, 3))) + +**Gráficas Paramétricas en 3D** + +.. code-block:: python + + from sympy.plotting import plot3d_parametric_line + from sympy import cos, sin + + # Graficar una línea paramétrica 3D + plot3d_parametric_line(cos(x), sin(x), x, (x, -5, 5)) + + # Graficar una superficie paramétrica 3D + from sympy.plotting import plot3d_parametric_surface + u, v = symbols('u v') + plot3d_parametric_surface(cos(u + v), sin(u - v), u - v, + (u, -5, 5), (v, -5, 5)) + +**Gráficas Implícitas** + +.. code-block:: python + + from sympy import plot_implicit, Eq, And + from sympy import symbols + + # Definir las variables simbólicas + x, y = symbols('x y') + + # Graficar una ecuación implícita + p1 = plot_implicit(Eq(x**2 + y**2, 5), + (x, -5, 5), (y, -2, 2), + adaptive=False, points=400) + + # Graficar una región definida por una desigualdad + p2 = plot_implicit(y > x**2) + + # Graficar usando conjunciones booleanas + p3 = plot_implicit(And(y > x, y > -x)) + +.. note:: + Experimenta con estos gráficos para entender cómo SymPy maneja la matemática simbólica y la visualización. + +Editor de Código Interactivo +----------------------------- +Para experimentar con el código de forma interactiva, utiliza los bloques de código interactivos proporcionados a continuación. Ejecuta todos los bloques de código para ver los resultados y explorar diferentes funcionalidades. + +.. activecode:: ac_l66_5_1 + :nocodelens: + :language: python3 + :python3_interpreter: pyscript + + from sympy import Symbol, sin, cos, pi + from sympy.plotting import plot + from io import BytesIO + import base64 + + x = Symbol('x') + p = plot(sin(x), cos(x), (x, -pi, pi), show=False) + + # Puedes mostrar directamente el gráfico usando plot() cuando trabajas localmente + + # Convertir gráfico a PNG + buffer = BytesIO() + p.save(buffer) + buffer.seek(0) + img = buffer.getvalue() + + # Codificar a base64 + img_base64 = base64.b64encode(img).decode('utf-8') + + # Crear etiqueta HTML de imagen + img_tag = f'' + + # Mostrar usando la clase HTML de PyScript + from pyscript import HTML + print("El gráfico se muestra abajo en el campo:") + display(plt, "plot_area") # Reemplazar con plt.show() si se ejecuta localmente + +.. note:: + Asegúrate de ejecutar todos los bloques de código proporcionados para ver los resultados completos y entender las funcionalidades demostradas. diff --git a/_sources/lectures/TWP66/TWP66_5_en.rst b/_sources/lectures/TWP66/TWP66_5_en.rst new file mode 100644 index 0000000000..98750747c9 --- /dev/null +++ b/_sources/lectures/TWP66/TWP66_5_en.rst @@ -0,0 +1,165 @@ +================= +SymPy with Graphs +================= + +Introduction +------------ +In this exercise, we will use Python's SymPy library to create and visualize mathematical expressions using both 2D and 3D plots. + +Code Example: 2D Plots +----------------------- +We will use the SymPy library to define symbolic expressions and visualize them using 2D plots. + +**Define the Symbolic Variable** + +.. code-block:: python + + from sympy import Symbol + from sympy.plotting import plot + + # Define the symbolic variable + x = Symbol('x') + + # Display the symbolic variable + print(x) + +**Plot the Expressions** + +.. code-block:: python + + # Plot the quadratic function x^2 with a custom color + plot(x**2, line_color='fuchsia') + + # Plot the quadratic function x^2 with a different color code + plot(x**2, line_color='#e30052') + + # Plot the quadratic function x^2 with the default color + plot(x**2) + + # Plot the sine and cosine functions over a specific interval + plot(sin(x), cos(x), (x, -pi, pi)) + + # Plot multiple functions with different intervals and a custom title + plot((sin(x), (x, -2*pi, 2*pi)), (cos(x), (x, -pi, pi)), + line_color='green', title='Graph Example with SymPy') + +.. note:: + Use these plots to explore the behavior of functions within specified intervals. + +**Converting Plots to PNG** + +In some cases, especially when working in a web environment like this interactive code editor, we need to convert plots into images (such as PNG) for them to be displayed. This is because the editor may not support direct rendering of SymPy plots in their native format. By converting the plots into images and encoding them as base64, we can embed them into HTML for visualization within the notebook or a web page. + +Alternatively, if you're working locally on your own machine, you can directly display plots without converting them to images by using the `show()` method provided by SymPy's plotting module. This method will render the plot in a new window or within your Jupyter Notebook if you're using one. + +.. code-block:: python + + # Directly plot the expression without conversion when working locally + plot(sin(x), cos(x), (x, -pi, pi), show=True) + +Code Example: 3D Plots +----------------------- +We can also create 3D surface plots using SymPy. + +**3D Surface Plot** + +.. code-block:: python + + from sympy.plotting import plot3d + from sympy import Symbol + + # Define symbolic variables for 3D plotting + x = Symbol('x') + y = Symbol('y') + + # Display the symbolic variables + print(x, y) + + # Plot a 3D surface for the expression x * y + plot3d(x * y, (x, -10, 10), (y, -10, 10)) + + # Plot multiple 3D surfaces + plot3d(x * y, x / y, (x, -5, 5), (y, -5, 5)) + + # Plot surfaces with more complex expressions + plot3d((x**2 + y**2, (x, -5, 5), (y, -5, 5)), + (x * y, (x, -3, 3), (y, -3, 3))) + +**3D Parametric Plots** + +.. code-block:: python + + from sympy.plotting import plot3d_parametric_line + from sympy import cos, sin + + # Plot a 3D parametric line + plot3d_parametric_line(cos(x), sin(x), x, (x, -5, 5)) + + # Plot a 3D parametric surface + from sympy.plotting import plot3d_parametric_surface + u, v = symbols('u v') + plot3d_parametric_surface(cos(u + v), sin(u - v), u - v, + (u, -5, 5), (v, -5, 5)) + +**Implicit Plots** + +.. code-block:: python + + from sympy import plot_implicit, Eq, And + from sympy import symbols + + # Define the symbolic variables + x, y = symbols('x y') + + # Plot an implicit equation + p1 = plot_implicit(Eq(x**2 + y**2, 5), + (x, -5, 5), (y, -2, 2), + adaptive=False, points=400) + + # Plot a region defined by an inequality + p2 = plot_implicit(y > x**2) + + # Plot using boolean conjunctions + p3 = plot_implicit(And(y > x, y > -x)) + +.. note:: + Experiment with these plots to understand how SymPy handles symbolic math and visualization. + +Interactive Code Editor +----------------------- +To experiment with the code interactively, use the provided interactive code blocks below. Run all the code blocks to see the results and explore different functionalities. + +.. activecode:: ac_l66_5_en_1 + :nocodelens: + :language: python3 + :python3_interpreter: pyscript + + from sympy import Symbol, sin, cos, pi + from sympy.plotting import plot + from io import BytesIO + import base64 + + x = Symbol('x') + p = plot(sin(x), cos(x), (x, -pi, pi), show=False) + + # You can directly display the plot using plot() when working locally + + # Convert plot to PNG + buffer = BytesIO() + p.save(buffer) + buffer.seek(0) + img = buffer.getvalue() + + # Encode to base64 + img_base64 = base64.b64encode(img).decode('utf-8') + + # Create HTML img tag + img_tag = f'' + + # Display using PyScript's HTML class + from pyscript import HTML + print("The plot is displayed below in the field:") + display(plt, "plot_area") # Replace with plt.show() if running locally + +.. note:: + Ensure you run all the code blocks provided to see the complete results and understand the functionalities demonstrated. diff --git a/_sources/lectures/TWP66/TWP66_6.rst b/_sources/lectures/TWP66/TWP66_6.rst new file mode 100644 index 0000000000..b774bace3b --- /dev/null +++ b/_sources/lectures/TWP66/TWP66_6.rst @@ -0,0 +1,152 @@ +============================================= +Visualización de Datos Interactiva con Python +============================================= + +En esta lección, exploraremos el uso de bibliotecas de Python para crear visualizaciones de datos interactivas. Aprenderás a generar varios tipos de gráficos, incluidos gráficos de líneas, gráficos de barras y gráficos circulares. También cubriremos cómo interactuar con estos gráficos de manera dinámica. Al final de esta lección, tendrás una comprensión sólida de cómo crear y manipular representaciones visuales de datos en Python. + +.. contents:: Tabla de Contenidos + :depth: 2 + :local: + +.. note:: + Asegúrate de tener instaladas todas las bibliotecas de Python necesarias. Esta lección asume que ya estás familiarizado con NumPy y Matplotlib. + +Gráficos de Líneas +------------------ + +Comencemos con un gráfico de líneas simple para comparar las temperaturas medias en Argentina entre los años 1991 y 2020. + +.. code-block:: python + + import matplotlib.pyplot as plt + + temp_1991 = [20.5, 20.0, 18.9, 14.8, 11.9, 8.2, 7.3, 8.9, 12.4, 13.8, 17.3, 18.6] + temp_2020 = [21.5, 20.1, 20.0, 14.9, 11.0, 8.3, 6.4, 9.7, 12.5, 15.5, 19.0, 20.3] + + plt.plot(temp_1991, linewidth=3, label='1991') + plt.plot(temp_2020, linestyle='dashed', linewidth=3, label='2020') + + plt.ylabel('Temperaturas') + plt.title('Comparativa de 1991 y 2020') + plt.xlabel('Mes') + plt.legend() + plt.grid(True) + display(plt, "plot_area") # Reemplaza con plt.show() si ejecutas localmente + +.. note:: + Reemplaza `display(plt)` con `plt.show()` si ejecutas el código localmente. + +Ahora, etiquetemos los meses en el eje x: + +.. code-block:: python + + meses = ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', + 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'] + + plt.plot(meses, temp_1991, linewidth=3, label='1991') + plt.plot(meses, temp_2020, linestyle='dashed', linewidth=3, label='2020') + + plt.ylabel('Temperaturas') + plt.title('Comparativa de 1991 y 2020') + plt.xlabel('Mes') + plt.legend() + plt.grid(True) + display(plt, "plot_area") # Reemplaza con plt.show() si ejecutas localmente + +Gráficos de Barras +------------------ + +Compararemos las temperaturas usando un gráfico de barras: + +.. code-block:: python + + import numpy as np + + ancho = 0.35 + x = np.arange(len(temp_1991)) + fig, ax = plt.subplots() + rects1 = ax.bar(x - ancho/2, temp_1991, ancho, color='b', label='1991') + rects2 = ax.bar(x + ancho/2, temp_2020, ancho, color='g', label='2020') + + ax.set_ylabel('Temperaturas') + ax.set_title('Comparativa') + ax.set_xticks(x) + ax.set_xticklabels(meses) + ax.legend() + + display(plt, "plot_area") # Reemplaza con plt.show() si ejecutas localmente + +Gráficos Circulares +------------------- + +Visualiza la distribución de estudiantes mujeres en diferentes áreas de estudio en 2018 usando un gráfico circular: + +.. code-block:: python + + est_mujeres = [10512, 4774, 16232, 22904, 36700] + etiquetas = ['Ciencias Aplicadas', 'Ciencias Básicas', + 'Ciencias de la Salud', 'Ciencias Humanas', + 'Ciencias Sociales'] + + fig1, ax = plt.subplots() + ax.set_title('Estudiantes 2018 según área de estudio') + ax.axis('equal') + ax.pie(est_mujeres, labels=etiquetas, autopct='%1.2f%%') + + display(plt, "plot_area") # Reemplaza con plt.show() si ejecutas localmente + +Interactúa con tus Widgets +--------------------------- + +Prueba cambiar el grado de un polinomio: + +.. code-block:: python + + import numpy as np + import matplotlib.pyplot as plt + + def plot_function(degree=3, num_points=5): + # Generar valores de x + x = np.linspace(-10, 10, num_points) + # Calcular valores de y basados en el grado del polinomio + y = x**degree + + # Crear una nueva figura con tamaño especificado + plt.figure(figsize=(12, 8)) + # Graficar los valores de x e y con círculos rojos y una línea + plt.plot(x, y, 'ro-') + # Agregar líneas de cuadrícula al gráfico + plt.grid(True) + # Mostrar el gráfico + display(plt, "plot_area") # Reemplaza con plt.show() si ejecutas localmente + + # Uso de ejemplo + degree = 3 # Establece el grado del polinomio + num_points = 5 # Establece el número de puntos a graficar + plot_function(degree, num_points) + +Ejercicio: Crea tu propia Visualización +--------------------------------------- + +**Tarea:** Crea un gráfico de barras que compare las temperaturas medias en Argentina a lo largo de tres años diferentes: 1991, 2000 y 2020. + +**Pista:** Puedes usar los datos para el año 2000 de la siguiente manera: + +.. code-block:: python + + temp_2000 = [21.2, 19.4, 17.0, 14.5, 10.1, 8.1, 5.6, 8.9, 10.8, 14.9, 16.3, 19.6] + +Sigue los pasos de los ejemplos anteriores para crear y mostrar tu gráfico. + +Editor Interactivo +------------------ + +.. note:: + Usa este editor para ejecutar los códigos, practicar y hacer ejercicios para ver los resultados. + +.. activecode:: ac_l66_6_1 + :language: python3 + :python3_interpreter: pyscript + + # Puedes comenzar a practicar aquí copiando y pegando los ejemplos de código anteriores, + # o escribiendo tu propio código para explorar diferentes visualizaciones. \ No newline at end of file diff --git a/_sources/lectures/TWP66/TWP66_6_en.rst b/_sources/lectures/TWP66/TWP66_6_en.rst new file mode 100644 index 0000000000..1b1f303c93 --- /dev/null +++ b/_sources/lectures/TWP66/TWP66_6_en.rst @@ -0,0 +1,154 @@ +========================================== +Interactive Data Visualization with Python +========================================== + +In this lesson, we will explore the use of Python libraries for creating interactive data visualizations. You will learn how to generate various types of plots, including line plots, bar charts, and pie charts. We will also cover how to interact with these plots dynamically. By the end of this lesson, you'll have a solid understanding of how to create and manipulate visual data representations in Python. + +.. contents:: Table of Contents + :depth: 2 + :local: + +.. note:: + Ensure you have all the necessary Python libraries installed. This lesson assumes you are already familiar with NumPy and Matplotlib. + +Line Plots +---------- + +Let's start with a simple line plot to compare the average temperatures in Argentina between the years 1991 and 2020. + +.. code-block:: python + + import matplotlib.pyplot as plt + + temp_1991 = [20.5, 20.0, 18.9, 14.8, 11.9, 8.2, 7.3, 8.9, 12.4, 13.8, 17.3, 18.6] + temp_2020 = [21.5, 20.1, 20.0, 14.9, 11.0, 8.3, 6.4, 9.7, 12.5, 15.5, 19.0, 20.3] + + plt.plot(temp_1991, linewidth=3, label='1991') + plt.plot(temp_2020, linestyle='dashed', linewidth=3, label='2020') + + plt.ylabel('Temperaturas') + plt.title('Comparativa de 1991 y 2020') + plt.xlabel('Mes') + plt.legend() + plt.grid(True) + display(plt, "plot_area") # Replace plt.show() if running locally + +.. note:: + Replace `display(plt)` with `plt.show()` if running the code locally. + +Now, let's label the months on the x-axis: + +.. code-block:: python + + meses = ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', + 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'] + + plt.plot(meses, temp_1991, linewidth=3, label='1991') + plt.plot(meses, temp_2020, linestyle='dashed', linewidth=3, label='2020') + + plt.ylabel('Temperaturas') + plt.title('Comparativa de 1991 y 2020') + plt.xlabel('Mes') + plt.legend() + plt.grid(True) + display(plt, "plot_area") # Replace plt.show() if running locally + +Bar Charts +---------- + +Let's compare the temperatures using a bar chart: + +.. code-block:: python + + import numpy as np + + ancho = 0.35 + x = np.arange(len(temp_1991)) + fig, ax = plt.subplots() + rects1 = ax.bar(x - ancho/2, temp_1991, ancho, color='b', label='1991') + rects2 = ax.bar(x + ancho/2, temp_2020, ancho, color='g', label='2020') + + ax.set_ylabel('Temperaturas') + ax.set_title('Comparativa') + ax.set_xticks(x) + ax.set_xticklabels(meses) + ax.legend() + + display(plt, "plot_area") # Replace plt.show() if running locally + +Pie Charts +---------- + +Visualize the distribution of female students across different study areas in 2018 using a pie chart: + +.. code-block:: python + + est_mujeres = [10512, 4774, 16232, 22904, 36700] + etiquetas = ['Ciencias Aplicadas', 'Ciencias Básicas', + 'Ciencias de la Salud', 'Ciencias Humanas', + 'Ciencias Sociales'] + + fig1, ax = plt.subplots() + ax.set_title('Estudiantes 2018 según área de estudio') + ax.axis('equal') + ax.pie(est_mujeres, labels=etiquetas, autopct='%1.2f%%') + + display(plt, "plot_area") # Replace plt.show() if running locally + +Interact with your Widgets +-------------------------- + +Try changing the degree of a polynomial: + +.. code-block:: python + + import numpy as np + import matplotlib.pyplot as plt + + def plot_function(degree=3, num_points=5): + # Generate x values + x = np.linspace(-10, 10, num_points) + # Compute y values based on the polynomial degree + y = x**degree + + # Create a new figure with specified size + plt.figure(figsize=(12, 8)) + # Plot the x and y values with red circles and a line + plt.plot(x, y, 'ro-') + # Add grid lines to the plot + plt.grid(True) + # Show the plot + display(plt, "plot_area") # Replace plt.show() if running locally + + # Example usage + degree = 3 # Set the degree of the polynomial + num_points = 5 # Set the number of points to plot + plot_function(degree, num_points) + + +Exercise: Create Your Own Visualization +--------------------------------------- + +**Task:** Create a bar chart that compares the average temperatures in Argentina across three different years: 1991, 2000, and 2020. + +**Hint:** You can use the data for 2000 as follows: + +.. code-block:: python + + temp_2000 = [21.2, 19.4, 17.0, 14.5, 10.1, 8.1, 5.6, 8.9, 10.8, 14.9, 16.3, 19.6] + +Follow the steps from the previous examples to create and display your chart. + +Interactive Editor +------------------ + +.. note:: + Use this editor to run the codes, practice, and do exercises to see the results. + +.. activecode:: ac_l66_6_en_1 + :nocodelens: + :language: python3 + :python3_interpreter: pyscript + + # You can start practicing here by copying and pasting the code examples from above, + # or by writing your own code to explore different visualizations. \ No newline at end of file diff --git a/_sources/lectures/TWP66/toctree.rst b/_sources/lectures/TWP66/toctree.rst new file mode 100644 index 0000000000..dca7a478a8 --- /dev/null +++ b/_sources/lectures/TWP66/toctree.rst @@ -0,0 +1,22 @@ +===================== +Manipulación de Datos +===================== + + +.. image:: ../img/TWP10_001.jpeg + :height: 14.832cm + :width: 9.2cm + :align: center + :alt: + +.. toctree:: + :caption: Contenido + :maxdepth: 1 + :numbered: + + TWP66_1.rst + TWP66_2.rst + TWP66_3.rst + TWP66_4.rst + TWP66_5.rst + TWP66_6.rst diff --git a/_sources/lectures/TWP66/toctree_en.rst b/_sources/lectures/TWP66/toctree_en.rst new file mode 100644 index 0000000000..bdd28cb630 --- /dev/null +++ b/_sources/lectures/TWP66/toctree_en.rst @@ -0,0 +1,22 @@ +================= +Data Manipulation +================= + + +.. image:: ../img/TWP10_001.jpeg + :height: 14.832cm + :width: 9.2cm + :align: center + :alt: + +.. toctree:: + :caption: Contenido + :maxdepth: 1 + :numbered: + + TWP66_1_en.rst + TWP66_2_en.rst + TWP66_3_en.rst + TWP66_4_en.rst + TWP66_5_en.rst + TWP66_6_en.rst diff --git a/_sources/lectures/_static/TWP66/TWP66_1.html b/_sources/lectures/_static/TWP66/TWP66_1.html new file mode 100644 index 0000000000..3cb316ba1f --- /dev/null +++ b/_sources/lectures/_static/TWP66/TWP66_1.html @@ -0,0 +1,70 @@ + + + + + + Examen de NumPy + + +

Quiz: Pon a prueba tu conocimiento

+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+ +
+ +

+ + + + diff --git a/_sources/lectures/_static/TWP66/TWP66_1_en.html b/_sources/lectures/_static/TWP66/TWP66_1_en.html new file mode 100644 index 0000000000..fd4e09545a --- /dev/null +++ b/_sources/lectures/_static/TWP66/TWP66_1_en.html @@ -0,0 +1,70 @@ + + + + + + NumPy Quiz + + +

Quiz: Test Your Knowledge

+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+ +
+ +

+ + + + diff --git a/_sources/lectures/img/TWP66_001.png b/_sources/lectures/img/TWP66_001.png new file mode 100644 index 0000000000..25600bfc24 Binary files /dev/null and b/_sources/lectures/img/TWP66_001.png differ diff --git a/_sources/lectures/img/TWP66_002.png b/_sources/lectures/img/TWP66_002.png new file mode 100644 index 0000000000..4842acfdb2 Binary files /dev/null and b/_sources/lectures/img/TWP66_002.png differ diff --git a/requirements.txt b/requirements.txt index 9b9937c296..c391e193e5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -git+https://github.com/PyAr/RunestoneComponents.git@master#runestone +git+https://github.com/abadoni5/RunestoneComponents.git@sympy#runestone pytest==6.2.4 playwright==1.18.0 pytest-playwright==0.1.1