This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const imageBinary = null | |
const changeImagenUpdate = (e) => { | |
e.preventDefault(); | |
const imageSelected = e.target.files[0]; | |
const reader = new FileReader(); | |
reader.readAsDataURL(imageSelected); | |
reader.onload = e => { | |
e.preventDefault(); | |
imageBinary = e.target.result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const generateCode = (nombre)=> { | |
//OBTENIENDO PARTE DEL NOMBRE DE LA PERSONA | |
var primerNombre = "" | |
var arrayNombre = nombre.split(" "); | |
var nombreConEspacios = arrayNombre.length; | |
if (nombreConEspacios > 1) { | |
primerNombre = arrayNombre[0] | |
} | |
const abecedario = ["ww","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","$","&","#","@"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
</head> | |
<body> | |
<input id="myInput" type="file" multiple /> | |
<button type="click" id="btn">CLICK</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Fragment, useState } from "react"; | |
function App() { | |
const [Autos] = useState(["volvo", "saab", "mercedes", "audi"]); | |
const [ValueSelected, setValueSelected] = useState(0); | |
const toggle = (AutoSeleccionado) => { | |
const indexSelected = Autos.findIndex((auto) => auto === AutoSeleccionado); | |
setValueSelected(indexSelected); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fastapi import FastAPI, UploadFile, File, BackgroundTasks | |
from fastapi.responses import JSONResponse | |
from os import getcwd | |
from PIL import Image | |
app = FastAPI() | |
PATH_FILES = getcwd() + "/" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import getenv | |
from azure.storage.blob import BlobServiceClient | |
blob_service_client = BlobServiceClient.from_connection_string( | |
getenv("AZURE_STORAGE_CONNECTION_STRING")) | |
### Methods for blobs (Files) | |
def upload_blob(filename: str, container: str, data: BinaryIO): | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import path | |
import pickle | |
from google.auth.transport.requests import Request | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
from googleapiclient.discovery import build | |
# IF YOU MODIFY THE SCOPE DELETE THE TOKEN.TXT FILE | |
SCOPES = ['https://www.googleapis.com/auth/calendar.events', | |
'https://www.googleapis.com/auth/calendar'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { BlobServiceClient } from "@azure/storage-blob"; | |
import { config } from "dotenv"; | |
config(); | |
const blobService = BlobServiceClient.fromConnectionString( | |
process.env.AZURE_STORAGE_CONNECTION_STRING | |
); | |
// Methods for blobs (Files) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
grafana: | |
image: grafana/grafana | |
ports: | |
- 3000:3000 | |
prometheus: | |
image: prom/prometheus | |
ports: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
grafana: | |
image: grafana/grafana | |
ports: | |
- 3000:3000 | |
prometheus: | |
image: prom/prometheus | |
ports: |
OlderNewer