<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 🦄 Maris Botero✨</title>
    <description>The latest articles on DEV Community by 🦄 Maris Botero✨ (@marisbotero).</description>
    <link>https://dev.to/marisbotero</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F383379%2F614f3a86-f1f2-4ff3-bb8d-842f32a5c890.jpg</url>
      <title>DEV Community: 🦄 Maris Botero✨</title>
      <link>https://dev.to/marisbotero</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/marisbotero"/>
    <language>en</language>
    <item>
      <title>✨ Cuando los circuitos no funcionaban (y lo que me enseñaron sobre la inteligencia artificial)</title>
      <dc:creator>🦄 Maris Botero✨</dc:creator>
      <pubDate>Fri, 10 Apr 2026 01:02:06 +0000</pubDate>
      <link>https://dev.to/marisbotero/cuando-los-circuitos-no-funcionaban-y-lo-que-me-ensenaron-sobre-la-inteligencia-artificial-4bag</link>
      <guid>https://dev.to/marisbotero/cuando-los-circuitos-no-funcionaban-y-lo-que-me-ensenaron-sobre-la-inteligencia-artificial-4bag</guid>
      <description>&lt;p&gt;Cuando estaba en la universidad estudiando ingeniería electrónica, había algo que me desconcertaba mucho.&lt;br&gt;
Habían circuitos que simplemente… no funcionaban.&lt;br&gt;
Yo revisaba todo: los cables, las resistencias, el diseño.&lt;br&gt;
Todo parecía correcto.&lt;br&gt;
Y aún así, nada.&lt;br&gt;
Pero luego pasaba algo extraño.&lt;br&gt;
Sin cambiar nada importante, sin rediseñar nada…&lt;br&gt;
de repente el circuito funcionaba.&lt;br&gt;
Y yo pensaba:&lt;br&gt;
¿Qué acaba de pasar?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔌 El misterio del circuito que “decide” funcionar&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Con el tiempo entendí que no era magia (aunque lo parecía).&lt;br&gt;
Eran cosas pequeñas:&lt;br&gt;
un contacto flojo&lt;br&gt;
ruido eléctrico&lt;br&gt;
una variación mínima en el voltaje&lt;br&gt;
temperatura&lt;br&gt;
estados internos que yo no veía&lt;br&gt;
Pequeñas cosas invisibles… que cambiaban todo.&lt;br&gt;
Y ahí aprendí algo sin darme cuenta:&lt;br&gt;
Los sistemas complejos no siempre son completamente predecibles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🤖 Años después: los LLMs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mucho tiempo después, trabajando con modelos de inteligencia artificial, volví a sentir esa misma sensación.&lt;br&gt;
Le escribes un prompt a un modelo…&lt;br&gt;
y responde increíble.&lt;br&gt;
Le cambias una palabra…&lt;br&gt;
y responde algo totalmente distinto.&lt;br&gt;
A veces brillante.&lt;br&gt;
A veces extraño.&lt;br&gt;
A veces completamente fuera de lugar.&lt;br&gt;
Y otra vez aparece la misma pregunta:&lt;br&gt;
¿Qué acaba de pasar?&lt;br&gt;
🧠 No es un error… es la naturaleza del sistema&lt;br&gt;
Así como los circuitos:&lt;br&gt;
los LLMs también son sistemas sensibles.&lt;br&gt;
Cambios pequeños → resultados grandes&lt;br&gt;
Condiciones iniciales → importan mucho&lt;br&gt;
Estados internos → invisibles&lt;br&gt;
Comportamiento → no siempre determinista&lt;br&gt;
No es que estén “mal hechos”.&lt;br&gt;
Es que están vivos en su complejidad.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🌫️ Lo invisible también cuenta&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;En un circuito, no ves:&lt;br&gt;
el ruido&lt;br&gt;
la micro variación de voltaje&lt;br&gt;
la calidad del contacto&lt;br&gt;
En un modelo, no ves:&lt;br&gt;
los pesos internos&lt;br&gt;
las probabilidades&lt;br&gt;
el proceso de decisión palabra por palabra&lt;br&gt;
Pero todo eso está ahí, influyendo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔄 El pasado siempre importa&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Algo que también comparten:&lt;br&gt;
👉 el contexto cambia el resultado&lt;br&gt;
En circuitos:&lt;br&gt;
la carga previa de un capacitor cambia el comportamiento&lt;br&gt;
En LLMs:&lt;br&gt;
las palabras anteriores cambian completamente la respuesta&lt;br&gt;
Nada empieza desde cero.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✨ La lección que me llevo&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hoy entiendo esos momentos de la universidad con más cariño.&lt;br&gt;
No eran errores frustrantes.&lt;br&gt;
Eran una invitación a entender algo más profundo:&lt;br&gt;
Que no todo sistema está hecho para ser perfectamente predecible.&lt;br&gt;
Y que aprender a trabajar con eso… también es ingeniería.&lt;/p&gt;

&lt;p&gt;A veces siento que no he cambiado tanto de mundo.&lt;br&gt;
Antes trabajaba con cables, voltajes y señales.&lt;br&gt;
Ahora trabajo con palabras, prompts y modelos.&lt;br&gt;
Pero en el fondo…&lt;br&gt;
sigo hablando con sistemas sensibles,&lt;br&gt;
complejos,&lt;br&gt;
y un poco misteriosos.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>computerscience</category>
      <category>learning</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Docker for Data People: Simplifying Development with Containers</title>
      <dc:creator>🦄 Maris Botero✨</dc:creator>
      <pubDate>Thu, 18 Sep 2025 01:07:24 +0000</pubDate>
      <link>https://dev.to/marisbotero/docker-for-data-people-simplifying-development-with-containers-173g</link>
      <guid>https://dev.to/marisbotero/docker-for-data-people-simplifying-development-with-containers-173g</guid>
      <description>&lt;p&gt;Have you ever worked on a data project that worked perfectly on your laptop… but broke as soon as you shared it with someone else? That’s where &lt;strong&gt;Docker&lt;/strong&gt; shines.&lt;/p&gt;

&lt;p&gt;In this article, we’ll explore what Docker is, why it matters for data analysts and developers, and how to containerize a simple data project with one command.&lt;/p&gt;




&lt;h2&gt;
  
  
  🐳 What is Docker?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Docker&lt;/strong&gt;  is a platform built on open-source technology that lets you package your code, dependencies, and environment into a &lt;strong&gt;container&lt;/strong&gt; — a lightweight, standalone unit that runs anywhere.&lt;/p&gt;

&lt;p&gt;Think of it like a magical box that holds everything your project needs to run, no matter where you open it.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 Why Should Data Analysts Care?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reproducibility:&lt;/strong&gt; Ensure your analysis runs the same on any machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolation:&lt;/strong&gt; Avoid dependency conflicts between projects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Portability:&lt;/strong&gt; Easily share your code with coworkers or deploy to the cloud.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed:&lt;/strong&gt; Run tools like Jupyter, PostgreSQL, or Python scripts in seconds.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📦 Basic Docker Concepts
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concept&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Image&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The recipe for your container (like a blueprint).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Container&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A running instance of that image.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Dockerfile&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A file that tells Docker how to build the image.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🧪 Example: Containerizing a Python Script
&lt;/h2&gt;

&lt;p&gt;Let’s say you have a Python script called &lt;code&gt;analyze.py&lt;/code&gt; that reads a CSV and outputs a summary.&lt;/p&gt;

&lt;h3&gt;
  
  
  🗂️ Your project folder:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-analysis/
├── analyze.py
├── requirements.txt
└── Dockerfile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🐍 &lt;code&gt;analyze.py&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;

&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;data.csv&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  📋 &lt;code&gt;requirements.txt&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pandas
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🐳 &lt;code&gt;Dockerfile&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; python:3.10-slim&lt;/span&gt;

&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="s"&gt; /app&lt;/span&gt;

&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . .&lt;/span&gt;

&lt;span class="k"&gt;RUN &lt;/span&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt

&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="s"&gt; ["python", "analyze.py"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🚀 Build and Run the Container
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Build the Docker image&lt;/span&gt;
docker build &lt;span class="nt"&gt;-t&lt;/span&gt; my-analysis &lt;span class="nb"&gt;.&lt;/span&gt;

&lt;span class="c"&gt;# Run the container&lt;/span&gt;
docker run &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;/data.csv:/app/data.csv my-analysis
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now your script runs inside a container with everything it needs — and it will work on any machine with Docker installed.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔒 Bonus: Running Jupyter in Docker
&lt;/h2&gt;

&lt;p&gt;Want to run a Jupyter Notebook inside a container?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-p&lt;/span&gt; 8888:8888 jupyter/base-notebook
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then go to &lt;code&gt;http://localhost:8888&lt;/code&gt; in your browser — your notebooks, inside a container!&lt;/p&gt;




&lt;h2&gt;
  
  
  🧽 Conclusion
&lt;/h2&gt;

&lt;p&gt;Docker is like a magic backpack for your data projects. Whether you're working with Python, SQL, or machine learning models, Docker helps you keep your environment clean, consistent, and ready to scale.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start small&lt;/strong&gt; — containerize one script or notebook. You’ll be amazed at how much smoother your workflow becomes.&lt;/p&gt;

</description>
      <category>containers</category>
      <category>datascience</category>
      <category>docker</category>
    </item>
    <item>
      <title>✨Corre tu propio ChatGPT local con Docker y sin complicaciones ✨</title>
      <dc:creator>🦄 Maris Botero✨</dc:creator>
      <pubDate>Sat, 21 Jun 2025 18:20:46 +0000</pubDate>
      <link>https://dev.to/marisbotero/corre-tu-propio-chatgpt-local-con-docker-y-sin-complicaciones-49in</link>
      <guid>https://dev.to/marisbotero/corre-tu-propio-chatgpt-local-con-docker-y-sin-complicaciones-49in</guid>
      <description>&lt;h2&gt;
  
  
  ✨ Introducción
&lt;/h2&gt;

&lt;p&gt;¿Te imaginas tener una IA que entienda lenguaje natural funcionando completamente local en tu computador, sin conexión a internet ni claves de API?&lt;br&gt;
En este artículo te guiaré paso a paso para que lo logres usando Docker Model Runner y Open WebUI, dos herramientas que hacen que la inteligencia artificial sea accesible para todos.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmed7g8zik7beato7d36m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmed7g8zik7beato7d36m.png" alt=" " width="662" height="828"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  ⚙️ ¿Qué tecnología estamos usando?
&lt;/h2&gt;

&lt;p&gt;Antes de comenzar, vamos a entender qué hace cada parte:&lt;/p&gt;
&lt;h2&gt;
  
  
  🐳 Docker
&lt;/h2&gt;

&lt;p&gt;Es una plataforma que te permite crear, correr y compartir aplicaciones dentro de contenedores. En este caso, nos permite ejecutar un modelo de lenguaje sin necesidad de instalar librerías complicadas.&lt;/p&gt;
&lt;h2&gt;
  
  
  🧠 Docker Model Runner
&lt;/h2&gt;

&lt;p&gt;Es una funcionalidad reciente de Docker que automatiza la descarga, ejecución y exposición de modelos de IA como servicios, usando un archivo docker-compose.yaml.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpigcukbpaa22tf0ch0s8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpigcukbpaa22tf0ch0s8.png" alt=" " width="612" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Piensa en esto como tener una pequeña fábrica de modelos: tú le dices cuál quieres usar y Docker se encarga de traerlo y ponerlo a trabajar.&lt;/p&gt;
&lt;h2&gt;
  
  
  🖥️ Open WebUI
&lt;/h2&gt;

&lt;p&gt;Es una interfaz gráfica amigable (como un mini ChatGPT) que se conecta al modelo que corre dentro del contenedor. Te permite escribirle al modelo y recibir respuestas sin tener que tocar código.&lt;/p&gt;
&lt;h2&gt;
  
  
  🧰 ¿Qué necesitas?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Docker Desktop (versión 4.40 o superior)&lt;/li&gt;
&lt;li&gt;Un computador con al menos 8 GB de RAM (preferiblemente con GPU)&lt;/li&gt;
&lt;li&gt;Conexión a internet solo para descargar el modelo&lt;/li&gt;
&lt;li&gt;Ganas de experimentar 🌟&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔧 Paso 1: Activa Docker Model Runner&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker desktop enable model-runner --no-tcp

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📦 Paso 2: Descarga tu primer modelo de lenguaje
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker model pull ai/gemma3-qat:1B-Q4_K_M

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🧬 Paso 3: Crea tu archivo docker-compose.yaml
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    ports:
      - "3000:8080"
    environment:
      - OPENAI_API_BASE_URL=http://model-runner.docker.internal:80/engines/llama.cpp/v1
      - OPENAI_API_KEY=na
    volumes:
      - open-webui-data:/app/backend/data
    depends_on:
      - ai-runner

  ai-runner:
    provider:
      type: model
      options:
        model: ai/gemma3-qat:1B-Q4_K_M

volumes:
  open-webui-data:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;▶️ Paso 4: Levanta el entorno▶️ Paso 4: Levanta el entorno&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker compose up

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verás que Docker descarga y prepara todo. Cuando veas el mensaje:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Model loaded in Xs
Listening on 0.0.0.0:8080

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;¡Todo está listo!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2x9blbqucx4iiyo6xtuu.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2x9blbqucx4iiyo6xtuu.jpeg" alt=" " width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🌐 Paso 5: Abre tu interfaz mágica
&lt;/h2&gt;

&lt;p&gt;Abre tu navegador en:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; Crea un usuario&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jeghzpuu9kga1aoj2vq.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1jeghzpuu9kga1aoj2vq.jpeg" alt=" " width="800" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; Selecciona el modelo&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmw022dx7t6hqeejs0owt.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmw022dx7t6hqeejs0owt.jpeg" alt=" " width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.&lt;/strong&gt; ¡Pregunta lo que quieras! 🎉&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi5e5qw2wye36lor1dpuf.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi5e5qw2wye36lor1dpuf.jpeg" alt=" " width="800" height="169"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  📚 Recursos útiles
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🐳 Docker
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.docker.com/ai/model-runner/" rel="noopener noreferrer"&gt;Documentación oficial de Docker Model Runner&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=3p2uWjFyI1U" rel="noopener noreferrer"&gt;Cómo usar Model Runner con Open WebUI (tutorial de Bret Fisher)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://hub.docker.com/u/ai" rel="noopener noreferrer"&gt;Repositorio de modelos en Docker Hub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  💻 Repositorio del taller
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🔗 &lt;a href="https://github.com/marisbotero/pycon" rel="noopener noreferrer"&gt;Repositorio en GitHub con todo el paso a paso&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
    </item>
    <item>
      <title>Supercharge Your Data Analysis with BigQuery ML</title>
      <dc:creator>🦄 Maris Botero✨</dc:creator>
      <pubDate>Fri, 28 Mar 2025 14:23:00 +0000</pubDate>
      <link>https://dev.to/marisbotero/supercharge-your-data-analysis-with-bigquery-ml-2932</link>
      <guid>https://dev.to/marisbotero/supercharge-your-data-analysis-with-bigquery-ml-2932</guid>
      <description>&lt;p&gt;Have you ever wanted to build machine learning models without leaving your data warehouse? With &lt;strong&gt;BigQuery ML (BQML)&lt;/strong&gt;, you can create, train, and deploy machine learning models directly using SQL — no need to export data or become a Python expert.&lt;/p&gt;

&lt;p&gt;In this article, we’ll explore what BigQuery ML is, why it matters, and walk through a practical example so you can get started right away.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔍 What is BigQuery ML?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;BigQuery ML&lt;/strong&gt; is a feature in Google BigQuery that allows users to &lt;strong&gt;build and operationalize machine learning models using standard SQL queries&lt;/strong&gt;. It brings the power of machine learning closer to analysts and BI professionals by enabling model training and prediction directly inside BigQuery.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚡ Why Use BigQuery ML?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No data movement:&lt;/strong&gt; Models are built and run on your existing BigQuery tables.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability:&lt;/strong&gt; Built on top of Google’s infrastructure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Familiar syntax:&lt;/strong&gt; If you know SQL, you can start using ML.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration:&lt;/strong&gt; Works seamlessly with Looker, Data Studio, and other GCP tools.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧠 What Kind of Models Can You Build?
&lt;/h2&gt;

&lt;p&gt;BigQuery ML supports several model types, including:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model Type&lt;/th&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;linear_reg&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Predicting numeric values (e.g. prices)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;logistic_reg&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Binary classification (e.g. churn)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kmeans&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Clustering&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;time_series&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Forecasting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;xgboost&lt;/code&gt;, &lt;code&gt;dnn&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Advanced classification &amp;amp; regression&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  🧪 Hands-on Example: Predicting Customer Churn
&lt;/h2&gt;

&lt;p&gt;Let’s build a &lt;strong&gt;logistic regression model&lt;/strong&gt; to predict customer churn using public data.&lt;/p&gt;

&lt;h3&gt;
  
  
  📦 Step 1: Prepare the Dataset
&lt;/h3&gt;

&lt;p&gt;We’ll use a mock dataset of customers with basic features like age, tenure, and contract type.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Preview the data&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="nv"&gt;`your_project.your_dataset.customers`&lt;/span&gt; &lt;span class="k"&gt;LIMIT&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🏗️ Step 2: Create the Model
&lt;/h3&gt;

&lt;p&gt;We’ll split the data into training and evaluation using a column called &lt;code&gt;data_split&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;OR&lt;/span&gt; &lt;span class="k"&gt;REPLACE&lt;/span&gt; &lt;span class="n"&gt;MODEL&lt;/span&gt; &lt;span class="nv"&gt;`your_project.your_dataset.churn_model`&lt;/span&gt;
&lt;span class="k"&gt;OPTIONS&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'logistic_reg'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt;
  &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;tenure&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;contract_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;monthly_charges&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;churned&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt;
  &lt;span class="nv"&gt;`your_project.your_dataset.customers`&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;data_split&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'train'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  📊 Step 3: Evaluate the Model
&lt;/h3&gt;

&lt;p&gt;Use built-in evaluation metrics to understand the model’s performance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;ML&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;EVALUATE&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MODEL&lt;/span&gt; &lt;span class="nv"&gt;`your_project.your_dataset.churn_model`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
                    &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="n"&gt;tenure&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="n"&gt;contract_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="n"&gt;monthly_charges&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="n"&gt;churned&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;
                  &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="nv"&gt;`your_project.your_dataset.customers`&lt;/span&gt;
                  &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;data_split&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'eval'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🔮 Step 4: Make Predictions
&lt;/h3&gt;

&lt;p&gt;Now use the model to predict the likelihood of churn for new users.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
  &lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;predicted_label&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;predicted_probability&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;ML&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;PREDICT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MODEL&lt;/span&gt; &lt;span class="nv"&gt;`your_project.your_dataset.churn_model`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt;
                   &lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="n"&gt;tenure&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="n"&gt;contract_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                   &lt;span class="n"&gt;monthly_charges&lt;/span&gt;
                 &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="nv"&gt;`your_project.your_dataset.customers`&lt;/span&gt;
                 &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;data_split&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'test'&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  💡 Tips and Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Clean and normalize your data beforehand.&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;ML.FEATURE_INFO()&lt;/code&gt; to explore feature importance.&lt;/li&gt;
&lt;li&gt;Try other model types like &lt;code&gt;boosted_tree_classifier&lt;/code&gt; for more complex tasks.&lt;/li&gt;
&lt;li&gt;Store model metadata in a tracking table.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧽 Conclusion
&lt;/h2&gt;

&lt;p&gt;BigQuery ML opens the doors to machine learning for data analysts. By leveraging SQL and your existing BigQuery environment, you can explore predictive analytics faster and more efficiently than ever before.&lt;/p&gt;

&lt;p&gt;So why wait? Start experimenting today and turn your data into actionable insights with just a few lines of SQL.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Simplify Your Development with DevContainers in Docker and VS Code</title>
      <dc:creator>🦄 Maris Botero✨</dc:creator>
      <pubDate>Thu, 16 Jan 2025 20:21:10 +0000</pubDate>
      <link>https://dev.to/marisbotero/transform-your-workflow-with-devcontainers-using-docker-and-vs-code-1fgj</link>
      <guid>https://dev.to/marisbotero/transform-your-workflow-with-devcontainers-using-docker-and-vs-code-1fgj</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Modern development environments often require consistent setups to ensure smooth collaboration and efficient workflows. However, achieving this can be a daunting task when dealing with diverse operating systems, dependencies, and tools. Enter &lt;strong&gt;DevContainers&lt;/strong&gt;, a powerful feature of Docker and Visual Studio Code (VS Code) that simplifies and streamlines the development process.&lt;/p&gt;

&lt;p&gt;In this guide, we’ll explore how DevContainers can revolutionize your workflow, making development faster, more consistent, and easier to manage.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Are DevContainers?
&lt;/h2&gt;

&lt;p&gt;DevContainers, short for Development Containers, are a feature that allows you to run your development environment inside a Docker container. This means you can define a consistent environment, complete with all dependencies, configurations, and tools, in a version-controlled file. VS Code seamlessly integrates with Docker to spin up these environments, ensuring you and your team work in identical setups regardless of the host machine.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Use DevContainers?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Key Benefits
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Consistency Across Environments&lt;/strong&gt;: Say goodbye to the dreaded "it works on my machine" issue. DevContainers ensure that every developer works in an identical environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Simplified Onboarding&lt;/strong&gt;: New team members can get started quickly without spending hours installing dependencies or troubleshooting environment issues. All they need is Docker, VS Code, and your repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Isolation&lt;/strong&gt;: Keep your development environment isolated from your host machine to avoid conflicts between project dependencies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Version Control for Environments&lt;/strong&gt;: Your DevContainer configuration file (&lt;code&gt;devcontainer.json&lt;/code&gt;) lives in your repository, making your development setup version-controlled and reproducible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Portability&lt;/strong&gt;: Work on your project from any machine with Docker and VS Code installed, regardless of the underlying operating system.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Setting Up a DevContainer
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Install &lt;a href="https://www.docker.com/get-started" rel="noopener noreferrer"&gt;Docker&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Install &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;Visual Studio Code&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Install the &lt;strong&gt;Remote - Containers&lt;/strong&gt; extension in VS Code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step-by-Step Guide
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Adding DevContainer Support
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Open your project in VS Code.&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;Ctrl+Shift+P&lt;/code&gt; (or &lt;code&gt;Cmd+Shift+P&lt;/code&gt; on macOS) and type &lt;code&gt;Add Development Container Configuration Files&lt;/code&gt;. Select the appropriate configuration for your project. For Node.js, choose "Node.js."&lt;/li&gt;
&lt;li&gt;This will create a &lt;code&gt;.devcontainer&lt;/code&gt; folder in your project, containing:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;devcontainer.json&lt;/code&gt;: The configuration file for your container.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;Dockerfile&lt;/code&gt; (optional): Defines the container’s base image and setup.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Customizing the DevContainer
&lt;/h4&gt;

&lt;p&gt;Modify the &lt;code&gt;devcontainer.json&lt;/code&gt; file to include additional settings, dependencies, or extensions. Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Node.js DevContainer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"image"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"mcr.microsoft.com/vscode/devcontainers/javascript-node:latest"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"settings"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"terminal.integrated.defaultProfile.linux"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bash"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"extensions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"dbaeumer.vscode-eslint"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"esbenp.prettier-vscode"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"postCreateCommand"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"npm install"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;




&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Starting the DevContainer
&lt;/h3&gt;

&lt;p&gt;Open the Command Palette (Ctrl+Shift+P) and type Reopen in Container.&lt;/p&gt;

&lt;p&gt;VS Code will build and open your project inside the DevContainer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Working Inside a DevContainer
&lt;/h3&gt;

&lt;p&gt;Once the container is up and running, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Access the terminal inside the container.&lt;/li&gt;
&lt;li&gt;Use extensions installed via devcontainer.json.&lt;/li&gt;
&lt;li&gt;Debug and run your application as if you were on your host machine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;VS Code seamlessly connects to the container, making it feel like a local development environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;DevContainers combine the power of Docker and VS Code to create a robust, consistent, and flexible development environment. Whether you’re working solo or as part of a team, they simplify setup, reduce errors, and enhance productivity. By leveraging DevContainers, you’ll spend less time configuring environments and more time building great software.&lt;/p&gt;

&lt;p&gt;Ready to transform your workflow? Start using DevContainers today and experience the difference they make!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>programming</category>
    </item>
    <item>
      <title>🍲 Enchanted Recipe for a Machine Learning Model on Google Cloud 🍲</title>
      <dc:creator>🦄 Maris Botero✨</dc:creator>
      <pubDate>Thu, 14 Nov 2024 18:26:13 +0000</pubDate>
      <link>https://dev.to/marisbotero/enchanted-recipe-for-a-machine-learning-model-on-google-cloud-1988</link>
      <guid>https://dev.to/marisbotero/enchanted-recipe-for-a-machine-learning-model-on-google-cloud-1988</guid>
      <description>&lt;h2&gt;
  
  
  Ingredients:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;1 cup of Clean Data&lt;/strong&gt;
(extracted and transformed in BigQuery)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2 tablespoons of Data Visualization&lt;/strong&gt;
(prepared in Data Studio)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3 teaspoons of Preprocessing&lt;/strong&gt;
(normalization, standardization, and feature selection in AI Platform Notebooks)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A pinch of Adjusted Hyperparameters&lt;/strong&gt;
(slow-cooked in Vertex AI)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A touch of Evaluation and Testing&lt;/strong&gt;
(for that “final seasoning”)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Magic Preparation Instructions:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Gathering Ingredients in BigQuery 🥄
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Extract and transform your data&lt;/strong&gt; in BigQuery. This is the first step to ensure fresh, clean data.&lt;/li&gt;
&lt;li&gt;Use SQL queries to &lt;strong&gt;filter and clean&lt;/strong&gt; your data, just like selecting the best fruits from the market.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 2: Visual Preparation in Data Studio 🍉
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Bring your data into Data Studio to &lt;strong&gt;visualize&lt;/strong&gt; and better understand its shape and content.&lt;/li&gt;
&lt;li&gt;Create charts and tables to uncover hidden patterns, as if your ingredients are whispering to you about how to combine them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 3: Mise en Place in AI Platform Notebooks 🍴
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Preprocess the data in AI Platform Notebooks, where the ingredients are carefully portioned and prepared.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Normalize and standardize&lt;/strong&gt; the data, and select the finest features as though picking the perfect spices to flavor the final dish.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 4: Hyperparameter Cooking in Vertex AI 🍲
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Transfer your data into Vertex AI and start mixing! Adjust hyperparameters with precision, like calculating the exact cooking time.&lt;/li&gt;
&lt;li&gt;Let the model cook patiently, training until it reaches its best version.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 5: Seasoning Test (Evaluation and Testing) 🌶️
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Serve the model on a validation dataset to test its "flavor" (performance).&lt;/li&gt;
&lt;li&gt;Adjust and evaluate metrics like precision and recall, aiming for a perfect balance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 6: Serving the Dish in Cloud Run 🍛
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Deploy the model in AI Platform Prediction or Cloud Run, creating an endpoint so every customer can enjoy it.&lt;/li&gt;
&lt;li&gt;Set up &lt;strong&gt;API authentication&lt;/strong&gt; so only authorized tasters get a sample.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Garnish ✨
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Monitor and optimize&lt;/strong&gt; the model in production with Cloud Monitoring, ensuring every prediction is well “seasoned.”&lt;/li&gt;
&lt;li&gt;Scale and adjust so every customer, in real-time or batch, receives the best service.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  And Voilà! 🎩
&lt;/h2&gt;

&lt;p&gt;Your &lt;strong&gt;Machine Learning model on Google Cloud&lt;/strong&gt; is ready and waiting to be enjoyed.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Exploring Generative Art with JavaScript</title>
      <dc:creator>🦄 Maris Botero✨</dc:creator>
      <pubDate>Tue, 24 Sep 2024 19:54:34 +0000</pubDate>
      <link>https://dev.to/marisbotero/exploring-generative-art-with-javascript-3dp</link>
      <guid>https://dev.to/marisbotero/exploring-generative-art-with-javascript-3dp</guid>
      <description>&lt;p&gt;Generative art is a technique where the artist creates systems, usually in the form of algorithms, that autonomously generate artworks. These systems can produce infinite results from an initial set of rules, making the process fascinating and full of possibilities. In this article, we will delve into the world of generative art using JavaScript and, more specifically, the popular library &lt;a href="https://p5js.org/" rel="noopener noreferrer"&gt;p5.js&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Generative Art?
&lt;/h2&gt;

&lt;p&gt;Generative art relies on creating systems that can generate an infinite number of variations of a work of art. These systems can be controlled by specific rules, mathematical algorithms, or even randomness. With each execution of the system, a new, unique, and visually interesting artwork can be produced.&lt;/p&gt;

&lt;p&gt;This form of art is deeply connected to programming, as the rules and code define how the visual results are created. Generative artists use algorithms to define patterns, colors, shapes, and movement, making every work a process of discovery.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why JavaScript?
&lt;/h2&gt;

&lt;p&gt;JavaScript is a versatile and accessible language that runs directly in web browsers, allowing immediate visualization of generative art results. Moreover, thanks to libraries like p5.js, it’s possible to create complex graphics with just a few lines of code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;p5.js&lt;/strong&gt; is a JavaScript library specifically designed for creating interactive and visual graphics. Its simplicity makes it an ideal tool to start exploring generative art.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started with p5.js
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Setting up the Environment
&lt;/h3&gt;

&lt;p&gt;To start creating generative art with JavaScript, all you need is a browser and a code editor. You can use the &lt;a href="https://editor.p5js.org/" rel="noopener noreferrer"&gt;p5.js web editor&lt;/a&gt; or download the library and add it to your project.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Basic Skeleton of a p5.js Sketch
&lt;/h3&gt;

&lt;p&gt;Every p5.js sketch is structured into two main functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;setup()&lt;/code&gt;&lt;/strong&gt;: This function runs once at the beginning. It's where we set up the canvas, colors, and any initial parameters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;draw()&lt;/code&gt;&lt;/strong&gt;: This function runs repeatedly in a loop. Here, we place the instructions to draw and create the visual elements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here’s a basic example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;createCanvas&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;800&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;800&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Create an 800x800 pixel canvas&lt;/span&gt;
  &lt;span class="nf"&gt;background&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// White background&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;noLoop&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Prevent the draw function from looping&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Random colors with transparency&lt;/span&gt;
    &lt;span class="nf"&gt;noStroke&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nf"&gt;ellipse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// Draw random circles&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this basic sketch, we create a blank canvas and draw 100 circles with random colors, each positioned randomly. The beauty of generative art lies in the variability of the results. With each run of the code, the circles will appear in different locations and with different colors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating Patterns with Math
&lt;/h2&gt;

&lt;p&gt;Generative art often combines randomness with precise mathematical structures. Let’s see an example where we generate a geometric pattern based on regular shapes and cyclical movements:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;createCanvas&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;800&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;800&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nf"&gt;background&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nf"&gt;noFill&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nf"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;translate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Move the origin to the center&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;angle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;TWO_PI&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nf"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;angle&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;radius&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;angle&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;ellipse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Draw circles in a circular pattern&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nf"&gt;noLoop&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Static drawing&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we use trigonometric functions like cos() and sin() to distribute 100 circles around the canvas center in a circular pattern. The beauty of math in generative art is that you can use simple equations to create complex and surprising patterns.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding Interactivity
&lt;/h3&gt;

&lt;p&gt;One of the great advantages of working with JavaScript and p5.js is how easily you can add interactivity to your creations. Below is an example where the colors of a pattern change according to the mouse position:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;createCanvas&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;800&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;800&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;background&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;numLines&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;spacing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;numLines&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;numLines&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;spacing&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;colorValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;mouseX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Changes with mouse position&lt;/span&gt;
    &lt;span class="nf"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;colorValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;line&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this sketch, the color of the lines changes based on the mouse position. Interactivity is an essential component of generative art, as it allows the viewer to directly influence the artwork.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Generative art with JavaScript opens up a world of creative possibilities. Using p5.js, we can transform mathematical equations, random functions, and user interactions into dynamic and surprising visuals. The best part is that, thanks to the flexibility of this environment, the results are unique and always different with each execution.&lt;/p&gt;

&lt;p&gt;Exploring generative art is a great way to blend programming and creativity. Experiment with different shapes, colors, and patterns to see how far you can push your own generative artwork!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>p5js</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Dibujando una Cara Sonriente con p5.js</title>
      <dc:creator>🦄 Maris Botero✨</dc:creator>
      <pubDate>Wed, 11 Sep 2024 16:12:22 +0000</pubDate>
      <link>https://dev.to/marisbotero/dibujando-una-cara-sonriente-con-p5js-3hmm</link>
      <guid>https://dev.to/marisbotero/dibujando-una-cara-sonriente-con-p5js-3hmm</guid>
      <description>&lt;h1&gt;
  
  
  Dibujando una Cara Sonriente con p5.js
&lt;/h1&gt;

&lt;p&gt;En este artículo, exploraremos cómo utilizar la biblioteca p5.js para crear un simple pero encantador dibujo: una cara sonriente. p5.js es una biblioteca de JavaScript que facilita la creación de gráficos y animaciones interactivas. Es ideal para artistas, diseñadores y desarrolladores que desean crear proyectos visuales basados en código.&lt;/p&gt;

&lt;h2&gt;
  
  
  ¿Qué es p5.js?
&lt;/h2&gt;

&lt;p&gt;p5.js es una biblioteca orientada a hacer accesible el mundo de la programación visual. Ofrece un conjunto de funciones que permiten dibujar formas, crear animaciones, e interactuar con el usuario de manera sencilla. Aunque está escrita en JavaScript, los usuarios no necesitan ser expertos en este lenguaje para empezar a crear visuales llamativos.&lt;/p&gt;

&lt;h2&gt;
  
  
  Estructura básica de un sketch en p5.js
&lt;/h2&gt;

&lt;p&gt;Un sketch en p5.js tiene dos funciones principales:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;setup()&lt;/code&gt;&lt;/strong&gt;: Se ejecuta una vez al principio. Aquí es donde inicializamos el lienzo, configuramos colores, y preparamos cualquier elemento necesario.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;draw()&lt;/code&gt;&lt;/strong&gt;: Se ejecuta en bucle, cuadro por cuadro. Aquí colocamos las instrucciones que queremos que se repitan continuamente (como una animación). En nuestro caso, no requerimos una animación, así que lo dejaremos vacío.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  El proyecto: una cara sonriente
&lt;/h2&gt;

&lt;p&gt;El objetivo es dibujar una cara sonriente utilizando formas simples: un círculo grande para la cara, dos círculos más pequeños para los ojos, y un arco para la boca.&lt;/p&gt;

&lt;h3&gt;
  
  
  Paso 1: Crear el lienzo
&lt;/h3&gt;

&lt;p&gt;Lo primero que hacemos es definir el tamaño del lienzo. En este caso, usaremos un tamaño de 400x400 píxeles y estableceremos un fondo negro.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;createCanvas&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nf"&gt;background&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Fondo negro&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Paso 2: Dibujar la cara
&lt;/h3&gt;

&lt;p&gt;La cara es simplemente un gran círculo. Para dibujar un círculo en p5.js, usamos la función &lt;code&gt;ellipse()&lt;/code&gt;, que requiere las coordenadas de su centro, y su ancho y alto. En nuestro caso, dibujaremos el círculo en el centro del lienzo, con un diámetro de 200 píxeles.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Color de línea blanco&lt;/span&gt;
&lt;span class="nf"&gt;strokeWeight&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Grosor de la línea&lt;/span&gt;
&lt;span class="nf"&gt;noFill&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Sin relleno para el círculo&lt;/span&gt;
&lt;span class="nf"&gt;ellipse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Dibuja la cara&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Paso 3: Dibujar los ojos
&lt;/h3&gt;

&lt;p&gt;Los ojos son dos pequeños círculos blancos. Podemos usar la misma función ellipse(), pero esta vez les damos un relleno blanco y los colocamos ligeramente hacia arriba y a los lados del centro de la cara.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Relleno blanco para los ojos&lt;/span&gt;
&lt;span class="nf"&gt;noStroke&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Sin borde para los ojos&lt;/span&gt;
&lt;span class="nf"&gt;ellipse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;160&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;170&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Ojo izquierdo&lt;/span&gt;
&lt;span class="nf"&gt;ellipse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;240&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;170&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Ojo derecho&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Paso 4: Dibujar la sonrisa
&lt;/h3&gt;

&lt;p&gt;Finalmente, para la sonrisa usamos la función arc(). Esta función permite dibujar un arco elíptico que, en este caso, se parece a una sonrisa. Ajustamos las coordenadas para que la curva esté centrada y se vea como una boca.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;noFill&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Sin relleno para la boca&lt;/span&gt;
&lt;span class="nf"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Líneas blancas de nuevo&lt;/span&gt;
&lt;span class="nf"&gt;arc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;220&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;PI&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Dibuja la sonrisa&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  El código completo:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;createCanvas&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nf"&gt;background&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Fondo negro&lt;/span&gt;

  &lt;span class="nf"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Color de línea blanco&lt;/span&gt;
  &lt;span class="nf"&gt;strokeWeight&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Grosor de la línea&lt;/span&gt;
  &lt;span class="nf"&gt;noFill&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Sin relleno para el círculo&lt;/span&gt;

  &lt;span class="c1"&gt;// Dibuja la cara (un círculo grande)&lt;/span&gt;
  &lt;span class="nf"&gt;ellipse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Ojos (dos círculos pequeños)&lt;/span&gt;
  &lt;span class="nf"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Relleno blanco para los ojos&lt;/span&gt;
  &lt;span class="nf"&gt;noStroke&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Sin borde para los ojos&lt;/span&gt;
  &lt;span class="nf"&gt;ellipse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;160&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;170&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nf"&gt;ellipse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;240&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;170&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Boca sonriente&lt;/span&gt;
  &lt;span class="nf"&gt;noFill&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Sin relleno para la boca&lt;/span&gt;
  &lt;span class="nf"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Líneas blancas de nuevo&lt;/span&gt;
  &lt;span class="nf"&gt;arc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;220&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;PI&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Dibuja la sonrisa&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// No se requiere animación, por lo que dejamos el draw vacío&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusión
&lt;/h3&gt;

&lt;p&gt;Este sencillo ejemplo muestra cómo, con unas pocas líneas de código, podemos crear gráficos atractivos utilizando p5.js. Aunque este proyecto es básico, los principios que se utilizan aquí pueden escalarse para crear visuales mucho más complejos y detallados. Si deseas experimentar más, puedes intentar cambiar el tamaño de los elementos, agregar color o incluso hacer una animación en el draw().&lt;/p&gt;

&lt;p&gt;¡Anímate a crear tu propia versión de esta cara sonriente y explorar lo que p5.js tiene para ofrecer!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>p5js</category>
    </item>
    <item>
      <title>Data, ML, and AI in Google Cloud</title>
      <dc:creator>🦄 Maris Botero✨</dc:creator>
      <pubDate>Fri, 06 Sep 2024 20:32:10 +0000</pubDate>
      <link>https://dev.to/marisbotero/data-ml-and-ai-in-google-cloud-1oie</link>
      <guid>https://dev.to/marisbotero/data-ml-and-ai-in-google-cloud-1oie</guid>
      <description>&lt;p&gt;In today's world, data has become one of the most valuable resources. The amount of data we produce, store, and process is growing exponentially, and with this, the need for advanced tools and platforms to handle such massive datasets becomes essential.&lt;/p&gt;

&lt;p&gt;Have you ever wondered how big a petabyte of data is? Imagine a stack of floppy disks that would reach twelve times higher than the Empire State Building, or every tweet ever sent multiplied by 50. This is the magnitude of data we are dealing with in many industries today. Google Cloud offers solutions to manage this data efficiently, making it possible to not only store and analyze vast amounts of information but also to leverage this data for machine learning (ML) and artificial intelligence (AI) applications.&lt;/p&gt;

&lt;p&gt;With tools like BigQuery, AutoML, and TensorFlow within Google Cloud, businesses and developers can harness the power of data in ways that were unimaginable just a few years ago.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Data Tools in Google Cloud: Dataproc, Dataflow, and BigQuery
&lt;/h3&gt;

&lt;p&gt;Google Cloud provides a suite of tools to handle big data efficiently. &lt;strong&gt;Dataproc&lt;/strong&gt; is designed to process large datasets using familiar frameworks like Hadoop and Spark, making it easier to manage and analyze data at scale. &lt;strong&gt;Dataflow&lt;/strong&gt; offers a fully managed solution for real-time and batch data processing, allowing seamless ETL workflows. Lastly, &lt;strong&gt;BigQuery&lt;/strong&gt; serves as Google’s enterprise data warehouse, offering fast, SQL-like queries to analyze vast amounts of data without the burden of infrastructure management. Together, these tools empower businesses to extract value from their data and make informed decisions powered by AI and ML.&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting Started with Machine Learning and AI in Google Cloud
&lt;/h3&gt;

&lt;p&gt;To effectively leverage machine learning (ML) and artificial intelligence (AI) within Google Cloud, follow these key steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Define machine learning (ML), understand the terminology used, and identify the value proposition.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Start by building a solid understanding of ML concepts and how they align with your business goals.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Explore Vertex AI, Google’s unified AI platform.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Vertex AI provides a powerful platform for developing, deploying, and managing ML models at scale, simplifying the AI workflow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Google APIs to apply a range of pre-trained ML models.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Google offers a variety of APIs that allow you to use pre-trained models for tasks like image recognition, natural language processing, and more.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Exploring Vertex AI: Google’s Unified AI Platform
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Vertex AI&lt;/strong&gt; is Google Cloud's fully managed platform designed to streamline the process of building and deploying machine learning models. It brings together all the tools necessary to manage every aspect of the machine learning lifecycle—from data preparation to model training and monitoring.&lt;/p&gt;

&lt;p&gt;With &lt;strong&gt;Vertex AI&lt;/strong&gt;, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automate the creation of ML models with &lt;strong&gt;AutoML&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Train and deploy custom models using tools like &lt;strong&gt;TensorFlow&lt;/strong&gt; or &lt;strong&gt;PyTorch&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Scale easily with managed services that eliminate infrastructure management.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This platform is perfect for both beginners who need end-to-end solutions, and experts looking for flexibility in creating and deploying advanced ML models.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using Google’s Pre-trained Machine Learning APIs
&lt;/h3&gt;

&lt;p&gt;Google Cloud offers a range of powerful &lt;strong&gt;APIs&lt;/strong&gt; that allow developers to integrate machine learning capabilities into their applications without needing to train models from scratch. These pre-trained models are ready to use for tasks such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vision API&lt;/strong&gt; for image analysis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Natural Language API&lt;/strong&gt; for text and sentiment analysis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speech-to-Text API&lt;/strong&gt; for converting spoken language into written text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Translation API&lt;/strong&gt; to automatically translate text between languages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By using these APIs, businesses can quickly add machine learning functionality to their applications, improving user experiences and decision-making processes without needing in-depth ML expertise.&lt;/p&gt;




&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Google Cloud offers a wide variety of tools and platforms that empower businesses to harness the potential of &lt;strong&gt;data&lt;/strong&gt;, &lt;strong&gt;machine learning (ML)&lt;/strong&gt;, and &lt;strong&gt;artificial intelligence (AI)&lt;/strong&gt;. From data processing with &lt;strong&gt;Dataproc&lt;/strong&gt; and &lt;strong&gt;Dataflow&lt;/strong&gt;, to storage and querying with &lt;strong&gt;BigQuery&lt;/strong&gt;, and advanced ML development with &lt;strong&gt;Vertex AI&lt;/strong&gt; and pre-trained APIs, Google Cloud provides a comprehensive ecosystem for driving innovation.&lt;/p&gt;

&lt;p&gt;Whether you're just starting with ML or looking to scale your AI efforts, Google Cloud's suite of services offers everything needed to take your data and insights to the next level. As we continue to navigate the data-driven world, having access to these tools will be crucial for staying competitive and making informed, data-driven decisions.&lt;/p&gt;




&lt;p&gt;Ready to begin your journey with Google Cloud's AI and ML tools? Explore the documentation, try out the APIs, or dive into &lt;strong&gt;Vertex AI&lt;/strong&gt; to experience how easy it can be to transform data into actionable insights.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Creating a Dynamic Geometric Animation with p5.js</title>
      <dc:creator>🦄 Maris Botero✨</dc:creator>
      <pubDate>Tue, 27 Aug 2024 19:05:47 +0000</pubDate>
      <link>https://dev.to/marisbotero/creating-a-dynamic-geometric-animation-in-p5js-39ah</link>
      <guid>https://dev.to/marisbotero/creating-a-dynamic-geometric-animation-in-p5js-39ah</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In this tutorial, you will learn how to create a dynamic and colorful geometric animation using p5.js.The shapes will move randomly across the canvas, changing colors and creating a visually captivating effect.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Step 1: Setting Up Your Environment&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Download p5.js:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go to the &lt;a href="https://p5js.org/" rel="noopener noreferrer"&gt;p5.js website&lt;/a&gt; and download the latest version of p5.js.&lt;/li&gt;
&lt;li&gt;Alternatively, you can use the online p5.js editor &lt;a href="https://editor.p5js.org/" rel="noopener noreferrer"&gt;editor.p5js.org&lt;/a&gt;, which allows you to write and run your code directly in your browser.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Create a New Project:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you’re using the online editor, create a new sketch by clicking on "New" in the top left corner.&lt;/li&gt;
&lt;li&gt;If you’re coding locally, create a new HTML file and link the p5.js library.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Step 2: Writing the Basic Structure&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Let’s start by setting up the basic structure of our p5.js sketch. This includes defining the &lt;code&gt;setup()&lt;/code&gt; and &lt;code&gt;draw()&lt;/code&gt; functions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;createCanvas&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;windowWidth&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;windowHeight&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nf"&gt;noStroke&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;  &lt;span class="c1"&gt;// Disable stroke for the shapes&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;background&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// Dark background with transparency&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Explanation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;createCanvas(windowWidth, windowHeight);&lt;/code&gt;: This sets the canvas size to match your browser window.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;noStroke();&lt;/code&gt;: This removes the border from the shapes we will create.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;background(30, 30, 60, 25);&lt;/code&gt;: This sets the background color to a dark blue with some transparency, creating a trailing effect for the shapes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 3: Adding Dynamic Geometric Shapes&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Now, let’s add the code to create random shapes with varying colors, positions, and sizes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;background&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Dark background with transparency&lt;/span&gt;

  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;colorR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;colorG&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;colorB&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;255&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;shapeType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ellipse&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rect&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;triangle&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

    &lt;span class="nf"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;colorR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;colorG&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;colorB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Set fill color with some transparency&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;shapeType&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ellipse&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;ellipse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;shapeType&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rect&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;rect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;shapeType&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;triangle&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nf"&gt;triangle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Explanation:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Randomized Variables:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; determine the position of each shape on the canvas.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;size&lt;/code&gt; controls the size of each shape.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;colorR&lt;/code&gt;, &lt;code&gt;colorG&lt;/code&gt;, &lt;code&gt;colorB&lt;/code&gt; generate random values for the red, green, and blue components of the fill color.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;fill(colorR, colorG, colorB, 150);&lt;/code&gt;: This sets the fill color with a slight transparency.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Shape Types:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;ellipse(x, y, size, size);&lt;/code&gt;: Draws a circle or ellipse.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rect(x, y, size, size);&lt;/code&gt;: Draws a square or rectangle.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;triangle(x, y, x + size, y, x + size / 2, y - size);&lt;/code&gt;: Draws a triangle.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 4: Making the Animation Responsive&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To make sure the canvas resizes with the window, add the following function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;windowResized&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;resizeCanvas&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;windowWidth&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;windowHeight&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Step 5: Running Your Sketch&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If you’re using the p5.js online editor, simply press the "Play" button to see your animation.&lt;/li&gt;
&lt;li&gt;If you’re coding locally, open your HTML file in a web browser to view the animation.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>p5js</category>
      <category>art</category>
    </item>
    <item>
      <title>Juguemos piedra, papel y tijera con redes neuronales💙</title>
      <dc:creator>🦄 Maris Botero✨</dc:creator>
      <pubDate>Sun, 24 May 2020 19:19:02 +0000</pubDate>
      <link>https://dev.to/marisbotero/juguemos-piedra-papel-y-tijera-con-redes-neuronales-2pm4</link>
      <guid>https://dev.to/marisbotero/juguemos-piedra-papel-y-tijera-con-redes-neuronales-2pm4</guid>
      <description>&lt;p&gt;¿Alguna vez has escuchado el término de machine learning o aprendizaje automático? ¿Es algo que está de moda? ¿Realmente es útil? ¿se tiene que saber mucha matemáticas, estadística y programación? 🤔. El machine learning es una disciplina ligada a la inteligencia artificial y a la estadística que le permite a nuestros ordenadores aprender a resolver problemas sin ser explícitamente programados para ello. El resultado que obtenemos con machine learning son algoritmos capaces de hacer predicciones y tomar decisiones sin programación previa y con datos que no han visto nunca. 😮&lt;/p&gt;

&lt;p&gt;Aunque el camino para aprender requiere conocer de SQL, bases de datos, matemáticas, estadística, programación entre otros. En este tutorial vamos a realizar un juego de piedra, papel o tijeras entrenando una red neuronal, la cual aprenderá a jugar y a ganar. Con este pequeño tutorial verás que con algunas herramientas ya estarás entrenado tu primer algoritmo de aprendizaje automático, el lenguaje de programación que utilizaremos será python, ya veras que muy pronto aprenderás a realizar tus increíbles proyectos de machine learning.&lt;br&gt;
Siempre he pensado que es mejor disfrutar el camino, que pensar en la gran meta.😝 Divertirse mientras puedes aprender cosas nuevas es algo de lo más me gusta hacer, así que si me acompañas vamos a jugar un poco.🤗&lt;/p&gt;

&lt;p&gt;comencemos🤓&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Creamos una lista para las opciones de nuestro juego 🎲
&lt;/h2&gt;

&lt;p&gt;Una lista es una estructura de datos usadas en python 🐍. Lo maravilloso de las listas es que puedes almacenar cualquier tipo de valor como un entero, una cadena de texto y hasta otras funciones. &lt;br&gt;
La notación para lista es una secuencia de valores encerrados entre corchetes y separados por comas. Para nuestro caso tenemos una lista de opciones del juego.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`options = ["👊", "✌", "🖐"]`

💜Nuestras opciones:
- "👊" : piedra
- "🖐" : papel
- "✌" : tijera
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Luego, hacemos una pequeña función donde escribimos las reglas del juego, Tenemos dos jugadores llamados p1 y p2 y vamos a ver cuáles son las opciones para ganar.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def search_winner(p1, p2):
    if p1 == p2:
        result = 0
    elif p1 == "👊" and p2 == "✌":
        result = 1
    elif p1 == "👊" and p2 == "🖐":
        result = 2
    elif p1 == "✌" and p2 == "👊":
        result = 2
    elif p1 == "✌" and p2 == "🖐":
        result = 1
    elif p1 == "🖐" and p2 == "👊":
        result = 1
    elif p1 == "🖐" and p2 == "✌":
        result = 2

    return result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Así podemos comprobar nuestra función:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`search_winner("🖐", "✌")`
`search_winner("✌","✌")`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ahora vamos a crear un pequeño test, para seguir haciendo pruebas. Además hacemos una alternación y pintamos la validación del test. una iteración es repetir el proceso varias veces y algo muy útil en programación.&lt;/p&gt;

&lt;p&gt;test = [&lt;br&gt;
    ["👊", "👊", 0],&lt;br&gt;
    ["👊", "✌", 1],&lt;br&gt;
    ["👊", "🖐", 2]&lt;br&gt;
]&lt;/p&gt;

&lt;p&gt;for partida in test:&lt;br&gt;
    print("player1: %s player2: %s Winner: %s Validation: %s" % (&lt;br&gt;
        partida[0], partida[1], search_winner(partida[0], partida[1]), partida[2]&lt;br&gt;
    ))&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
y estos son los resultados del test:






```
player1: 👊 player2: 👊 Winner: 0 Validation: 0
player1: 👊 player2: ✌ Winner: 1 Validation: 1
player1: 👊 player2: 🖐 Winner: 2 Validation: 2
```





💜Luego creamos una pequeña función que sea random, para el jugador 1 y el jugador 2. Importamos el modulo random con el cual podemos generar números aleatorios.




```
from random import choice
def get_choice():
    return choice(options)

```



💜Ahora una pequeña prueba, para ver nuestros resultados con la función random:



```
for i in range(10):
    player1 = get_choice()
    player2 = get_choice()
    print("player1: %s player2: %s Winner: %s " % (
        player1, player2, search_winner(player1, player2)
    ))

```


💜Después de ejecutar la función tenemos:



```
player1: 👊 player2: 👊 Winner: 0 
player1: 👊 player2: ✌ Winner: 1 
player1: 🖐 player2: ✌ Winner: 2 
player1: ✌ player2: 🖐 Winner: 1 
player1: 👊 player2: ✌ Winner: 1 
player1: ✌ player2: 🖐 Winner: 1 
player1: 🖐 player2: 👊 Winner: 1 
player1: 👊 player2: 🖐 Winner: 2 
player1: 🖐 player2: ✌ Winner: 2 
player1: 👊 player2: 👊 Winner: 0 

```



💜Muy bien!!!! Hemos avanzado mucho en la estructura general nuestro juego, estableciendo las reglas del mismo, cuando realizas algún proyecto de programación siempre es importante partir el problema en pasos más pequeños e ir aumentando el nivel de dificultad, no te preocupes si al principio te cuesta un poco, todos pasamos por eso, solamente permanece en el camino lo puedes lograr.

Ahora vamos a hablar de Redes Neuronales 💁‍♀

## 2. Red Neuronal 🧠
Empecemos con nuestra red neuronal, vamos a hacer una función que convierta los emojis a una lista de ceros y unos para que nuestra red neuronal entienda mejor. Donde la piedra "👊"es [1,0,0], si es tijeras "✌" es [0,1,0] y si es papel "🖐" es [0,0,1]. Imagínate que las máquinas se hablan entre ellas y a esto se le denomina lenguaje de máquina o código de máquina, este lenguaje es una serie de instrucciones en forma de ceros y unos las cuales se ejecutan de manera secuencial. 👩‍💻
Una red neuronal artificial es un sistema que compone de entradas en su interior se realizan funciones de activación para producir salida. Lo que se busca con estos sistemas es que nuestros algoritmos ganen cierta inteligencia de las entradas para realizar una predicción. En nuestro caso queremos que la red aprenda las reglas del juego y que aprenda a ganar.😜

Ahora definamos una nueva función para que nuestro sistema entienda el lenguaje de máquina:



```
def str_to_list(option):
    if option=="👊":
        res = [1,0,0]
    elif option=="✌":
        res = [0,1,0]
    else:
        res = [0,0,1]
    return res

data_X = list(map(str_to_list, ["👊", "✌", "🖐"]))
data_y = list(map(str_to_list, ["🖐", "👊", "✌"]))

print(data_X)
print(data_y)

```



Este es nuestro resultado:



```

[[1, 0, 0], [0, 1, 0], [0, 0, 1]]
[[0, 0, 1], [1, 0, 0], [0, 1, 0]]

```



⚡Ahora vamos a empezar con la red neuronal. Importamos la librería scikit-learn.

Scikit-learn es una librería ideal para diseñar y entrenar redes neuronales, esta librería es usada por spotify, Evernote y utiliza algoritmos de clasificación, regresión ,agrupamiento entre otros. Es una libreria genial para comenzar a entrar tus modelos de machine learning

🧡Te dejo el link con la documentación oficial:(https://scikit-learn.org/stable/)

Ahora vamos a importar nuestra librería y utilizar uno de sus algoritmos de clasificación:




```
from sklearn.neural_network import MLPClassifier
clf = MLPClassifier(verbose=False, warm_start=True)

```



🧡Este es un clasificador perceptrón multicapa que tiene capacidad para resolver problemas que no son linealmente separables. 

&amp;lt;a href="http://google.com.au/" rel="some text"&amp;gt;![Foo](https://upload.wikimedia.org/wikipedia/commons/6/64/RedNeuronalArtificial.png)&amp;lt;/a&amp;gt;

Las capas pueden clasificarse en tres tipos 🤓:

- Capa de entrada: Constituida por aquellas neuronas que introducen los patrones de entrada en la red. En estas neuronas no se produce procesamiento.
- Capas ocultas: Formada por aquellas neuronas cuyas entradas provienen de capas anteriores y cuyas salidas pasan a neuronas de capas posteriores.
- Capa de salida: Neuronas cuyos valores de salida se corresponden con las salidas de toda la red.

💚Ahora vamos a crear nuestro modelo así:



```
model = clf.fit([data_X[0]], [data_y[0]])
print(model)
```




Luego, hacemos una función *jugar a aprender*. La idea es que nuestra red neuronal empiece a aprender a ganar por medio de la experiencia. En la función definimos la predicción que debe ser igual o superior al 95%.




```
def play_and_learn(iters=10, debug=False):
    score = {"win": 0, "loose": 0}

    data_X = []
    data_y = []

    for i in range(iters):
        player1 = get_choice()

        predict = model.predict_proba([str_to_list(player1)])[0]

        if predict[0] &amp;gt;= 0.95:
            player2 = options[0]
        elif predict[1] &amp;gt;= 0.95:
            player2 = options[1]
        elif predict[2] &amp;gt;= 0.95:
            player2 = options[2]
        else:
            player2 = get_choice()

        if debug==True:
            print("Player1: %s Player2 (modelo): %s --&amp;gt; %s" % (player1, predict, player2))

        winner = search_winner(player1, player2)
        if debug==True:
            print("Comprobamos: p1 VS p2: %s" % winner)

        if winner==2:
            data_X.append(str_to_list(player1))
            data_y.append(str_to_list(player2))

            score["win"]+=1
        else:
            score["loose"]+=1

    return score, data_X, data_y


```


Y lo ejecutamos así (Queremos ver si nuestro modelo ha aprendido algo):



```
score, data_X, data_y = play_and_learn(1, debug=True)
print(data_X)
print(data_y)
print("Score: %s %s %%" % (score, (score["win"]*100/(score["win"]+score["loose"]))))
if len(data_X):
    model = model.partial_fit(data_X, data_y)

```


Después de ejecutar:



```
Player1: ✌ Player2 (modelo): [0.17561242 0.16144559 0.83639906] --&amp;gt; 👊
Comprobamos: p1 VS p2: 2
[[0, 1, 0]]
[[1, 0, 0]]
Score: {'win': 1, 'loose': 0} 100.0 %
```




💚Y finalmente vamos a repetir este ejercicio un montón de veces, los algoritmos de inteligencia artificial funcionan gracias a la repetición que se hace y también debido al gran volumen de datos que tenemos hoy en día. por lo cual nuestro sistema debe entrenarse con un montón de iteraciones para que aprenda a ganar.




```
i = 0
historic_pct = []
while True:
    i+=1
    score, data_X, data_y = play_and_learn(1000, debug=False)
    pct = (score["win"]*100/(score["win"]+score["loose"]))
    historic_pct.append(pct)
    print("Iter: %s - score: %s %s %%" % (i, score, pct))

    if len(data_X):
        model = model.partial_fit(data_X, data_y)

    if sum(historic_pct[-9:])==900:
        break

```



Y después de ejecutar tenemos que:



```

Iter: 1 - score: {'win': 341, 'loose': 659} 34.1 %
Iter: 2 - score: {'win': 317, 'loose': 683} 31.7 %
Iter: 3 - score: {'win': 366, 'loose': 634} 36.6 %
Iter: 4 - score: {'win': 326, 'loose': 674} 32.6 %
Iter: 5 - score: {'win': 333, 'loose': 667} 33.3 %
Iter: 6 - score: {'win': 331, 'loose': 669} 33.1 %
Iter: 7 - score: {'win': 340, 'loose': 660} 34.0 %
Iter: 8 - score: {'win': 327, 'loose': 673} 32.7 %
Iter: 9 - score: {'win': 329, 'loose': 671} 32.9 %
Iter: 10 - score: {'win': 326, 'loose': 674} 32.6 %
Iter: 11 - score: {'win': 339, 'loose': 661} 33.9 %
Iter: 12 - score: {'win': 325, 'loose': 675} 32.5 %
Iter: 13 - score: {'win': 340, 'loose': 660} 34.0 %
Iter: 14 - score: {'win': 345, 'loose': 655} 34.5 %
Iter: 15 - score: {'win': 304, 'loose': 696} 30.4 %
Iter: 16 - score: {'win': 351, 'loose': 649} 35.1 %
Iter: 17 - score: {'win': 349, 'loose': 651} 34.9 %
Iter: 18 - score: {'win': 353, 'loose': 647} 35.3 %
Iter: 19 - score: {'win': 336, 'loose': 664} 33.6 %
Iter: 20 - score: {'win': 343, 'loose': 657} 34.3 %
Iter: 21 - score: {'win': 321, 'loose': 679} 32.1 %
Iter: 22 - score: {'win': 336, 'loose': 664} 33.6 %
Iter: 23 - score: {'win': 365, 'loose': 635} 36.5 %
Iter: 24 - score: {'win': 356, 'loose': 644} 35.6 %
Iter: 25 - score: {'win': 355, 'loose': 645} 35.5 %
Iter: 26 - score: {'win': 330, 'loose': 670} 33.0 %
Iter: 27 - score: {'win': 335, 'loose': 665} 33.5 %
Iter: 28 - score: {'win': 341, 'loose': 659} 34.1 %
Iter: 29 - score: {'win': 343, 'loose': 657} 34.3 %
Iter: 30 - score: {'win': 354, 'loose': 646} 35.4 %
Iter: 31 - score: {'win': 324, 'loose': 676} 32.4 %
Iter: 32 - score: {'win': 307, 'loose': 693} 30.7 %
Iter: 33 - score: {'win': 328, 'loose': 672} 32.8 %
Iter: 34 - score: {'win': 340, 'loose': 660} 34.0 %
Iter: 35 - score: {'win': 369, 'loose': 631} 36.9 %
Iter: 36 - score: {'win': 349, 'loose': 651} 34.9 %
Iter: 37 - score: {'win': 335, 'loose': 665} 33.5 %
Iter: 38 - score: {'win': 331, 'loose': 669} 33.1 %
Iter: 39 - score: {'win': 317, 'loose': 683} 31.7 %
Iter: 40 - score: {'win': 299, 'loose': 701} 29.9 %
Iter: 41 - score: {'win': 337, 'loose': 663} 33.7 %
Iter: 42 - score: {'win': 327, 'loose': 673} 32.7 %
Iter: 43 - score: {'win': 351, 'loose': 649} 35.1 %
Iter: 44 - score: {'win': 342, 'loose': 658} 34.2 %
Iter: 45 - score: {'win': 325, 'loose': 675} 32.5 %
Iter: 46 - score: {'win': 300, 'loose': 700} 30.0 %
Iter: 47 - score: {'win': 330, 'loose': 670} 33.0 %
Iter: 48 - score: {'win': 342, 'loose': 658} 34.2 %
Iter: 49 - score: {'win': 325, 'loose': 675} 32.5 %
Iter: 50 - score: {'win': 312, 'loose': 688} 31.2 %
Iter: 51 - score: {'win': 312, 'loose': 688} 31.2 %
Iter: 52 - score: {'win': 330, 'loose': 670} 33.0 %
Iter: 53 - score: {'win': 330, 'loose': 670} 33.0 %
Iter: 54 - score: {'win': 330, 'loose': 670} 33.0 %
Iter: 55 - score: {'win': 329, 'loose': 671} 32.9 %
Iter: 56 - score: {'win': 335, 'loose': 665} 33.5 %
Iter: 57 - score: {'win': 334, 'loose': 666} 33.4 %
Iter: 58 - score: {'win': 353, 'loose': 647} 35.3 %
Iter: 59 - score: {'win': 333, 'loose': 667} 33.3 %
Iter: 60 - score: {'win': 329, 'loose': 671} 32.9 %
Iter: 61 - score: {'win': 338, 'loose': 662} 33.8 %
Iter: 62 - score: {'win': 333, 'loose': 667} 33.3 %
Iter: 63 - score: {'win': 315, 'loose': 685} 31.5 %
Iter: 64 - score: {'win': 313, 'loose': 687} 31.3 %
Iter: 65 - score: {'win': 325, 'loose': 675} 32.5 %
Iter: 66 - score: {'win': 317, 'loose': 683} 31.7 %
Iter: 67 - score: {'win': 319, 'loose': 681} 31.9 %
Iter: 68 - score: {'win': 314, 'loose': 686} 31.4 %
Iter: 69 - score: {'win': 306, 'loose': 694} 30.6 %
Iter: 70 - score: {'win': 333, 'loose': 667} 33.3 %
Iter: 71 - score: {'win': 338, 'loose': 662} 33.8 %
Iter: 72 - score: {'win': 333, 'loose': 667} 33.3 %
Iter: 73 - score: {'win': 338, 'loose': 662} 33.8 %
Iter: 74 - score: {'win': 324, 'loose': 676} 32.4 %
Iter: 75 - score: {'win': 341, 'loose': 659} 34.1 %
Iter: 76 - score: {'win': 326, 'loose': 674} 32.6 %
Iter: 77 - score: {'win': 349, 'loose': 651} 34.9 %
Iter: 78 - score: {'win': 315, 'loose': 685} 31.5 %
Iter: 79 - score: {'win': 341, 'loose': 659} 34.1 %
Iter: 80 - score: {'win': 306, 'loose': 694} 30.6 %
Iter: 81 - score: {'win': 356, 'loose': 644} 35.6 %
Iter: 82 - score: {'win': 353, 'loose': 647} 35.3 %
Iter: 83 - score: {'win': 357, 'loose': 643} 35.7 %
Iter: 84 - score: {'win': 305, 'loose': 695} 30.5 %
Iter: 85 - score: {'win': 342, 'loose': 658} 34.2 %
Iter: 86 - score: {'win': 352, 'loose': 648} 35.2 %
Iter: 87 - score: {'win': 318, 'loose': 682} 31.8 %
Iter: 88 - score: {'win': 339, 'loose': 661} 33.9 %
Iter: 89 - score: {'win': 334, 'loose': 666} 33.4 %
Iter: 90 - score: {'win': 339, 'loose': 661} 33.9 %
Iter: 91 - score: {'win': 328, 'loose': 672} 32.8 %
Iter: 92 - score: {'win': 325, 'loose': 675} 32.5 %
Iter: 93 - score: {'win': 330, 'loose': 670} 33.0 %
Iter: 94 - score: {'win': 331, 'loose': 669} 33.1 %
Iter: 95 - score: {'win': 328, 'loose': 672} 32.8 %
Iter: 96 - score: {'win': 324, 'loose': 676} 32.4 %
Iter: 97 - score: {'win': 343, 'loose': 657} 34.3 %
Iter: 98 - score: {'win': 344, 'loose': 656} 34.4 %
Iter: 99 - score: {'win': 326, 'loose': 674} 32.6 %
Iter: 100 - score: {'win': 350, 'loose': 650} 35.0 %
Iter: 101 - score: {'win': 319, 'loose': 681} 31.9 %
Iter: 102 - score: {'win': 313, 'loose': 687} 31.3 %
Iter: 103 - score: {'win': 344, 'loose': 656} 34.4 %
Iter: 104 - score: {'win': 349, 'loose': 651} 34.9 %
Iter: 105 - score: {'win': 343, 'loose': 657} 34.3 %
Iter: 106 - score: {'win': 360, 'loose': 640} 36.0 %
Iter: 107 - score: {'win': 350, 'loose': 650} 35.0 %
Iter: 108 - score: {'win': 306, 'loose': 694} 30.6 %
Iter: 109 - score: {'win': 331, 'loose': 669} 33.1 %
Iter: 110 - score: {'win': 340, 'loose': 660} 34.0 %
Iter: 111 - score: {'win': 314, 'loose': 686} 31.4 %
Iter: 112 - score: {'win': 334, 'loose': 666} 33.4 %
Iter: 113 - score: {'win': 337, 'loose': 663} 33.7 %
Iter: 114 - score: {'win': 332, 'loose': 668} 33.2 %
Iter: 115 - score: {'win': 331, 'loose': 669} 33.1 %
Iter: 116 - score: {'win': 332, 'loose': 668} 33.2 %
Iter: 117 - score: {'win': 347, 'loose': 653} 34.7 %
Iter: 118 - score: {'win': 343, 'loose': 657} 34.3 %
Iter: 119 - score: {'win': 319, 'loose': 681} 31.9 %
Iter: 120 - score: {'win': 353, 'loose': 647} 35.3 %
Iter: 121 - score: {'win': 366, 'loose': 634} 36.6 %
Iter: 122 - score: {'win': 323, 'loose': 677} 32.3 %
Iter: 123 - score: {'win': 335, 'loose': 665} 33.5 %
Iter: 124 - score: {'win': 343, 'loose': 657} 34.3 %
Iter: 125 - score: {'win': 328, 'loose': 672} 32.8 %
Iter: 126 - score: {'win': 322, 'loose': 678} 32.2 %
Iter: 127 - score: {'win': 341, 'loose': 659} 34.1 %
Iter: 128 - score: {'win': 348, 'loose': 652} 34.8 %
Iter: 129 - score: {'win': 323, 'loose': 677} 32.3 %
Iter: 130 - score: {'win': 366, 'loose': 634} 36.6 %
Iter: 131 - score: {'win': 324, 'loose': 676} 32.4 %
Iter: 132 - score: {'win': 346, 'loose': 654} 34.6 %
Iter: 133 - score: {'win': 319, 'loose': 681} 31.9 %
Iter: 134 - score: {'win': 314, 'loose': 686} 31.4 %
Iter: 135 - score: {'win': 343, 'loose': 657} 34.3 %
Iter: 136 - score: {'win': 315, 'loose': 685} 31.5 %
Iter: 137 - score: {'win': 345, 'loose': 655} 34.5 %
Iter: 138 - score: {'win': 538, 'loose': 462} 53.8 %
Iter: 139 - score: {'win': 540, 'loose': 460} 54.0 %
Iter: 140 - score: {'win': 549, 'loose': 451} 54.9 %
Iter: 141 - score: {'win': 589, 'loose': 411} 58.9 %
Iter: 142 - score: {'win': 574, 'loose': 426} 57.4 %
Iter: 143 - score: {'win': 570, 'loose': 430} 57.0 %
Iter: 144 - score: {'win': 539, 'loose': 461} 53.9 %
Iter: 145 - score: {'win': 525, 'loose': 475} 52.5 %
Iter: 146 - score: {'win': 542, 'loose': 458} 54.2 %
Iter: 147 - score: {'win': 550, 'loose': 450} 55.0 %
Iter: 148 - score: {'win': 539, 'loose': 461} 53.9 %
Iter: 149 - score: {'win': 561, 'loose': 439} 56.1 %
Iter: 150 - score: {'win': 527, 'loose': 473} 52.7 %
Iter: 151 - score: {'win': 521, 'loose': 479} 52.1 %
Iter: 152 - score: {'win': 553, 'loose': 447} 55.3 %
Iter: 153 - score: {'win': 575, 'loose': 425} 57.5 %
Iter: 154 - score: {'win': 550, 'loose': 450} 55.0 %
Iter: 155 - score: {'win': 547, 'loose': 453} 54.7 %
Iter: 156 - score: {'win': 556, 'loose': 444} 55.6 %
Iter: 157 - score: {'win': 574, 'loose': 426} 57.4 %
Iter: 158 - score: {'win': 569, 'loose': 431} 56.9 %
Iter: 159 - score: {'win': 586, 'loose': 414} 58.6 %
Iter: 160 - score: {'win': 513, 'loose': 487} 51.3 %
Iter: 161 - score: {'win': 553, 'loose': 447} 55.3 %
Iter: 162 - score: {'win': 554, 'loose': 446} 55.4 %
Iter: 163 - score: {'win': 535, 'loose': 465} 53.5 %
Iter: 164 - score: {'win': 559, 'loose': 441} 55.9 %
Iter: 165 - score: {'win': 565, 'loose': 435} 56.5 %
Iter: 166 - score: {'win': 546, 'loose': 454} 54.6 %
Iter: 167 - score: {'win': 562, 'loose': 438} 56.2 %
Iter: 168 - score: {'win': 582, 'loose': 418} 58.2 %
Iter: 169 - score: {'win': 560, 'loose': 440} 56.0 %
Iter: 170 - score: {'win': 528, 'loose': 472} 52.8 %
Iter: 171 - score: {'win': 567, 'loose': 433} 56.7 %
Iter: 172 - score: {'win': 571, 'loose': 429} 57.1 %
Iter: 173 - score: {'win': 561, 'loose': 439} 56.1 %
Iter: 174 - score: {'win': 561, 'loose': 439} 56.1 %
Iter: 175 - score: {'win': 564, 'loose': 436} 56.4 %
Iter: 176 - score: {'win': 557, 'loose': 443} 55.7 %
Iter: 177 - score: {'win': 538, 'loose': 462} 53.8 %
Iter: 178 - score: {'win': 569, 'loose': 431} 56.9 %
Iter: 179 - score: {'win': 558, 'loose': 442} 55.8 %
Iter: 180 - score: {'win': 537, 'loose': 463} 53.7 %
Iter: 181 - score: {'win': 560, 'loose': 440} 56.0 %
Iter: 182 - score: {'win': 757, 'loose': 243} 75.7 %
Iter: 183 - score: {'win': 771, 'loose': 229} 77.1 %
Iter: 184 - score: {'win': 772, 'loose': 228} 77.2 %
Iter: 185 - score: {'win': 775, 'loose': 225} 77.5 %
Iter: 186 - score: {'win': 783, 'loose': 217} 78.3 %
Iter: 187 - score: {'win': 761, 'loose': 239} 76.1 %
Iter: 188 - score: {'win': 789, 'loose': 211} 78.9 %
Iter: 189 - score: {'win': 774, 'loose': 226} 77.4 %
Iter: 190 - score: {'win': 783, 'loose': 217} 78.3 %
Iter: 191 - score: {'win': 769, 'loose': 231} 76.9 %
Iter: 192 - score: {'win': 792, 'loose': 208} 79.2 %
Iter: 193 - score: {'win': 785, 'loose': 215} 78.5 %
Iter: 194 - score: {'win': 789, 'loose': 211} 78.9 %
Iter: 195 - score: {'win': 772, 'loose': 228} 77.2 %
Iter: 196 - score: {'win': 780, 'loose': 220} 78.0 %
Iter: 197 - score: {'win': 783, 'loose': 217} 78.3 %
Iter: 198 - score: {'win': 797, 'loose': 203} 79.7 %
Iter: 199 - score: {'win': 772, 'loose': 228} 77.2 %
Iter: 200 - score: {'win': 759, 'loose': 241} 75.9 %
Iter: 201 - score: {'win': 778, 'loose': 222} 77.8 %
Iter: 202 - score: {'win': 774, 'loose': 226} 77.4 %
Iter: 203 - score: {'win': 769, 'loose': 231} 76.9 %
Iter: 204 - score: {'win': 792, 'loose': 208} 79.2 %
Iter: 205 - score: {'win': 749, 'loose': 251} 74.9 %
Iter: 206 - score: {'win': 791, 'loose': 209} 79.1 %
Iter: 207 - score: {'win': 753, 'loose': 247} 75.3 %
Iter: 208 - score: {'win': 792, 'loose': 208} 79.2 %
Iter: 209 - score: {'win': 803, 'loose': 197} 80.3 %
Iter: 210 - score: {'win': 767, 'loose': 233} 76.7 %
Iter: 211 - score: {'win': 779, 'loose': 221} 77.9 %
Iter: 212 - score: {'win': 782, 'loose': 218} 78.2 %
Iter: 213 - score: {'win': 767, 'loose': 233} 76.7 %
Iter: 214 - score: {'win': 791, 'loose': 209} 79.1 %
Iter: 215 - score: {'win': 1000, 'loose': 0} 100.0 %
Iter: 216 - score: {'win': 1000, 'loose': 0} 100.0 %
Iter: 217 - score: {'win': 1000, 'loose': 0} 100.0 %
Iter: 218 - score: {'win': 1000, 'loose': 0} 100.0 %
Iter: 219 - score: {'win': 1000, 'loose': 0} 100.0 %
Iter: 220 - score: {'win': 1000, 'loose': 0} 100.0 %
Iter: 221 - score: {'win': 1000, 'loose': 0} 100.0 %
Iter: 222 - score: {'win': 1000, 'loose': 0} 100.0 %
Iter: 223 - score: {'win': 1000, 'loose': 0} 100.0 %
```




💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜💜

Se puede ver el sistema se comporta igual que un niño que está aprendiendo algo nuevo, gracias a la experiencia y repetición finalmente alcanza un score del 100%. 😀 
Esto ha sido todo, aprendimos que podemos usar la programación para aprender cosas de manera divertida⭐, que las máquinas tiene un lenguaje especial y mediante una serie de instrucciones podemos enseñarles casi cualquier cosa.😮 Finalmente estudiamos un poco sobre redes neuronales y creamos un sistema de clasificación Perceptrón multicapa.😎 

Déjame en los comentarios si te gusto o si tienes alguna duda, yo estaría feliz de ayudarte y espero ver pronto tus divertidas creaciones de machine learning.

Muchas gracias💜
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>deeplearning</category>
      <category>python</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
