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
Sitio Xinu | |
https://xinu.cs.purdue.edu/ | |
En Safari | |
https://learning.oreilly.com/library/view/operating-system-design/9781439881118/ | |
https://learning.oreilly.com/library/view/operating-system-design/9781498712439/ |
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
/* | |
https://t.me/RustMX | |
*/ | |
use std::collections::HashMap; | |
fn d1(x:i32)->Result<i32,u32> | |
{ | |
if x >0 | |
{ | |
Ok(x + 5) |
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
/* | |
https://play.rust-lang.org | |
https://t.me/RustMX | |
*/ | |
fn f1( p0:i32) -> i32 | |
{ | |
let p1 = p0 +1; | |
p1*2 | |
} |
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
use nalgebra::{DMatrix, DVector}; | |
fn main() { | |
// Datos de ejemplo | |
let x_data = vec![1.0, 2.0, 3.0, 4.0, 5.0]; | |
let y_data = vec![2.0, 4.0, 6.0, 8.0, 10.0]; | |
// Crear una matriz de diseño X | |
let mut x_matrix = DMatrix::from_fn(x_data.len(), 2, |i, j| if j == 0 { 1.0 } else { x_data[i] }); |
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
use std::collections::HashMap; | |
fn f1(x:i32) -> Option<bool> | |
{ | |
if x>=0 && x<=100 | |
{ | |
Some(true) | |
} | |
else if x>=101 && x<=200 |
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
#[derive(Debug,Clone)] | |
struct Estr01 | |
{ | |
a : i32, | |
b : char, | |
s: String | |
} | |
#[derive(Debug,Clone)] | |
struct Estr02<'a> | |
{ |
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 streamlit as st | |
import boto3 | |
from datetime import datetime | |
import time | |
import requests | |
###manejo de estado | |
if 'transcribiendo' not in st.session_state: | |
st.session_state['transcribiendo'] = False | |
### Layout inicial |
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 boto3 | |
client = boto3.client('rekognition') | |
id ='4abb12e92635247020465ea9ff0e86206096975f378c6954f105d4d5a6b785a7' | |
response = client.get_label_detection(JobId=id) | |
etiquetas=response['Labels'] | |
for i,etiqueta in enumerate(etiquetas,1) : | |
print(f"Etiqueta {i}") | |
print(f"Nombre {etiqueta['Label']['Name']}") | |
print(f"Timestamp {etiqueta['Timestamp']}") |
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 boto3 | |
client = boto3.client('rekognition') | |
response = client.start_label_detection( | |
Video={ | |
'S3Object': { | |
'Bucket': 'aiasaservicetranscribe740327929864', | |
'Name': 'video_of_funny_cat.mp4', | |
} | |
} | |
) |
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 boto3 | |
client = boto3.client('rekognition') | |
censurado = 'img/tedcannabis.jpg' | |
with open(censurado,"rb") as desnudo : | |
imagen = desnudo.read() | |
response=client.detect_moderation_labels(Image = {'Bytes':imagen} ) | |
print(response['ModerationLabels']) |
NewerOlder