Automate a Task with Ofelia Cron in Docker and FastAPI

Automate a Task with Ofelia Cron in Docker and FastAPI

Tiempo de lectura: < 1 minuto Reading Time: 1 minute Hello, today we are going to learn how to automate a task using Ofelia, FastAPI, and SQLAlchemy. The first thing we are going to do is create the file that we want to execute with Ofelia’s Cron: cron_execute.py # Create or get db_session from crud.operations_crud import operacion_crud_generar_estadisticas from config.connection import get_db … Read more

Open PDF Blob Base64 (Sent from Server) on Web or Mobile Using Flutter

Open PDF Blob Base64 (Sent from Server) on Web or Mobile Using Flutter

Tiempo de lectura: 2 minutos Reading time: 2 minutes Hello, today we are going to learn how we can open a PDF file sent from a REST API in our Flutter app. The first thing we are going to do is to install the PDF library for mobile in the pubspec.yaml file: flutter_pdfview: ^1.0.0 To install the library, use: flutter … Read more

Retrieve the Platform on Which Our Flutter APP Runs: Web, iOS, Windows, Linux

Retrieve the Platform on Which Our Flutter APP Runs: Web, iOS, Windows, Linux

Tiempo de lectura: < 1 minuto Reading time: < 1 minute Hello, today we are going to check the platform on which we run our Flutter app. To detect if it is Android/iOS/Linux/Windows: We import: import 'dart:io' show Platform; And we can use this if statement to verify the platform: if (Platform.isIOS) { } else if (Platform.isAndroid) { }else if (Platform.isFuchsia) ... Read more

Get and Return PDF File Using FAST-API

Get and Return PDF File Using FAST-API

Tiempo de lectura: < 1 minuto Reading time: < 1 minute Hello, today we are going to see how we can retrieve a saved PDF file and return it using Fast API with Python. We go to our routes file and add the necessary dependencies (in addition to those of Fast API): import os from fastapi.responses import FileResponse Now we are ... Read more

Upload PDF File Using FAST-API

Upload PDF File Using FAST-API

Tiempo de lectura: < 1 minuto Reading time: < 1 minute Hello, today we are going to see how we can upload a PDF file using FAST-API. The first thing we need to do is install python multipart: install python-multipart Once installed, we need to go to our routes file and import this: import shutil Now we create this Route: @app.post("/_pdf", ... Read more

Install Llama 2, Meta’s Open Source and Commercializable AI that Competes with Chat GPT for Use with Python and Docker (with GPU Access)

Install Llama 2, Meta’s Open Source and Commercializable AI that Competes with Chat GPT for Use with Python and Docker (with GPU Access)

Tiempo de lectura: 3 minutos Reading time: 3 minutes Hello, today we are going to see how we can install and download llama 2, the AI from Meta that competes with chatgpt 3.5. To do this, I have created a Docker Compose that will help us set up the environment. The first thing we need to do is go to … Read more

Install Llama 2, the Meta Open Source and Commercializable AI that competes with Chat GPT for use with Python and Docker (with GPU access)

Install Llama 2, the Meta Open Source and Commercializable AI that competes with Chat GPT for use with Python and Docker (with GPU access)

Tiempo de lectura: 3 minutos Hello, today we will see how we can install and download llama 2, the Meta AI that competes with chatgpt 3.5. For this, I have created a Docker Compose that will help us set up the environment. The first thing we need to do is go to the llama 2 page and request a version … Read more

Retrieve language of a WordPress post using the WordPress API

Tiempo de lectura: < 1 minuto html Copy code posts} AS wp_posts JOIN {$wpdb->term_relationships} AS wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) JOIN {$wpdb->terms} AS wp_terms ON (wp_term_relationships.term_taxonomy_id = wp_terms.term_id) JOIN {$wpdb->term_taxonomy} AS wp_term_taxonomy ON (wp_terms.term_id = wp_term_taxonomy.term_id) WHERE wp_posts.ID = %d AND wp_term_taxonomy.taxonomy = ‘language’ “, $post->ID)); // Add the language to the response object $response->data[‘language’] = $language; return $response; } add_filter(‘rest_prepare_post’, … Read more

Hovering the mouse over an element changes its background color – Hover

Tiempo de lectura: < 1 minuto Reading time: < 1 minute I’m going to show you a simple example with the “hover” event on an element. It’s a rectangular container that acts as an interactive element. When the “hover” event (mouse pointer passes over) occurs, its background color changes. Additionally, its size or scale is modified. The HTML code is as … Read more