martes, 26 de noviembre de 2024
domingo, 10 de noviembre de 2024
C++ de arduino sobre Notepad
esto ayuda a que se pueda tener los mismos estilos (aprox.) que arduino IDE pero en notepad++
git clone https://github.com/FLL-e/Notepadpp-Arduino.git
copiar los archivos XML de la carpeta que se descargo
y pegarlos a la carpeta de lenguajes definidos por usuario, esta carpeta se lo puede abrir desde Notepad++
Finalmente debería de quedar algo así:
reiniciar NOTEPAD++ y a disfrutar de lenguaje C++ estilo arduino sobre este editor
jueves, 25 de julio de 2024
Python + OPENCV + Arduino/ESP
Comando para crear un ambiente virtual, instalar requerimientos para trabajar con jupyter notebook, ademas de la libreria Pyserial para controlar con rs232 una placa Arduino o ESP32
comandos en orden:
conda info --env
conda update --all --yes
conda create -n OPENCV python=3.9
conda activate OPENCV
python --version
conda install anaconda::jupyter
si no se ejecuta, antes de instalar jupyter hacer correr este comando: conda config --set channel_priority flexible
conda install conda-forge::opencv
conda install anaconda::pyserial
conda update pip
si no se ejecuta, antes del conda update pip ejecutar este comando: conda config --add channels conda-forge
pip install cvzone
pip install mediapipe
pip install controller
viernes, 5 de julio de 2024
Kali Linux sobre Windows utilizando Docker
Estos pasos los realizo, talvez se pueden reducir a mucho menos pasos, pero así me ¡funciona! utilizando un dockerfile.
1- En un sistema Windows descargar e instalar Docker desktop
2- una vez abierto el docker desktop, Pull a la imagen Kalilinux/kali-rolling que es la que recomiendo utilizar
3- Verificamos si ya tenemos la imagen Kalilinux/kali-rolling en PowerShell de windows
4- entramos a kali linux
docker run -it kalilinux/kali-rolling
5- ejecutamos los siguientes comandos
apt update
apt full-upgrade -y
apt autoremove -y
5- damos build al archivo dockerfile colocando un nombre de la imagen nueva (yo le llame mikaliwin), y a esperar que descargue (mucho tiempo, vi una película con todo lo que tardo), descarga aproximadamente 4Gb.
6- momento de utilizar Kali con docker en windows
docker run -it --network=host mikaliwin bash
Adicional: si por ejemplo nos olvidamos la instalación de un programa, una vez dentro del Kali, en linea Bash por ejemplo pudiéramos instalar:
apt install net-tools
lunes, 1 de abril de 2024
RF-nano
Emisor TX
#include <SPI.h>#include "Mirf.h"#include "nRF24L01.h"#include "MirfHardwareSpiDriver.h"Nrf24l Mirf = Nrf24l(10, 9);int value;int contador=0;int MOV=1;void setup(){Serial.begin(9600);Mirf.spi = &MirfHardwareSpi;Mirf.init();//Set your own address (sender address) using 5 charactersMirf.setRADDR((byte *)"CONTR");Mirf.payload = sizeof(value);Mirf.channel = 90; //Set the channel usedMirf.config();}void loop(){Mirf.setTADDR((byte *)"ROB01"); //Set the receiver addressvalue = MOV; //adelante MOV=1Mirf.send((byte *)&value); //Send instructions, send random number valuewhile (Mirf.isSending()) delay(1); //Until you send successfully, exit the loopdelay(200);contador=contador+1;if(contador>=50){MOV=2;}if(contador>=100){MOV=1;contador=0;}}
Receptor RX
//Receiver program#include <SPI.h>#include "Mirf.h"#include "nRF24L01.h"#include "MirfHardwareSpiDriver.h"Nrf24l Mirf = Nrf24l(10, 9);int value;int mov;//MOTOR 1const int mot1_A=6;const int mot1_B=5;//MOTOR 2const int mot2_A=4;const int mot2_B=3;//MOTOR 3const int mot3_A=14; //A0const int mot3_B=15; //A1//MOTOR 4const int mot4_A=16; //A2const int mot4_B=17; //A3void setup(){Serial.begin(9600);Mirf.spi = &MirfHardwareSpi;Mirf.init();Mirf.setRADDR((byte *)"ROB01"); //Set your own address (receiver address) using 5 charactersMirf.payload = sizeof(value);Mirf.channel = 90; //Set the used channelMirf.config();Serial.println("Listening..."); //Start listening to received datapinMode(mot1_A, OUTPUT);pinMode(mot1_B, OUTPUT);pinMode(mot2_A, OUTPUT);pinMode(mot2_B, OUTPUT);pinMode(mot3_A, OUTPUT);pinMode(mot3_B, OUTPUT);pinMode(mot4_A, OUTPUT);pinMode(mot4_B, OUTPUT);}void loop(){if (Mirf.dataReady()) { //When the program is received, the received data is output from the serial portMirf.getData((byte *) &value);mov=value;Serial.println(mov);switch (mov) {case 1:adelante();break;case 2:atras();break;case 3:izquierda();break;case 4:derecha();break;case 5:detenido();break;default:// if nothing else matches, do the default// default is optionalbreak;}}}void adelante() {digitalWrite(mot1_A, HIGH);digitalWrite(mot1_B, LOW);digitalWrite(mot2_A, HIGH);digitalWrite(mot2_B, LOW);digitalWrite(mot3_A, HIGH);digitalWrite(mot3_B, LOW);digitalWrite(mot4_A, HIGH);digitalWrite(mot4_B, LOW);}void atras() {digitalWrite(mot1_A, LOW);digitalWrite(mot1_B, HIGH);digitalWrite(mot2_A, LOW);digitalWrite(mot2_B, HIGH);digitalWrite(mot3_A, LOW);digitalWrite(mot3_B, HIGH);digitalWrite(mot4_A, LOW);digitalWrite(mot4_B, HIGH);}void izquierda() {//motor 1 y 3 adelantedigitalWrite(mot1_A, HIGH);digitalWrite(mot1_B, LOW);digitalWrite(mot3_A, HIGH);digitalWrite(mot3_B, LOW);//motor 2 y 4 atrasdigitalWrite(mot2_A, LOW);digitalWrite(mot2_B, HIGH);digitalWrite(mot4_A, LOW);digitalWrite(mot4_B, HIGH);}void derecha() {//motor 1 y 3 atrasdigitalWrite(mot1_A, LOW);digitalWrite(mot1_B, HIGH);digitalWrite(mot3_A, LOW);digitalWrite(mot3_B, HIGH);//motor 2 y 4 adelantedigitalWrite(mot2_A, HIGH);digitalWrite(mot2_B, LOW);digitalWrite(mot4_A, HIGH);digitalWrite(mot4_B, LOW);}void detenido() {digitalWrite(mot1_A, LOW);digitalWrite(mot1_B, LOW);digitalWrite(mot2_A, LOW);digitalWrite(mot2_B, LOW);digitalWrite(mot3_A, LOW);digitalWrite(mot3_B, LOW);digitalWrite(mot4_A, LOW);digitalWrite(mot4_B, LOW);}
Robot
miércoles, 21 de febrero de 2024
todo de docker rapido
Instalar
https://www.youtube.com/watch?v=ZO4KWQfUBBc
BUSCAR imagen
en cmd buscar contenedores
o en por web en docker hub https://hub.docker.com/
DESCARGAR imagen en este caso Ubuntu, solo el comando:
docker pull ubuntu
BUILD a una imagen ya descargada con docker, creando de esta manera el contenedor
docker run -it ubuntu:latest /bin/bash
es necesario actualizar dependencias para no tener errores en el contenedor docker ubuntu
apt-get update
apt-get upgrade
instalando algunos programas útiles
apt-get install net-tools
apt-get install -y build-essential
apt-get install -y software-properties-common
add-apt-repository ppa:deadsnakes/ppa
apt-get update
apt-get install python3
apt-get install python3-pip
ln -s /usr/bin/python3 /usr/bin/python
salir del contenedor ya coriendo bash
exit
VOLVER a entrar al contenedor del cual salimos que esta en suspension, con la misma sesion
comandos
docker ps -a
docker start 4bca06dc3530
docker exec -it gracious_stonebraker bash
OJO
tener en cuenta que descargar imagen no es tener el contenedor. Al ejecutar RUN creamos el contenedor para ver contenedores ACTIVOS:
docker ps
para ver todos los contenedores ACTIVOS e INACTIVOS:
docker ps -a
para detener un CONTENEDOR activo:
docker stop 3db75215661 (id del contenedor activo)
para arrancar un CONTENEDOR detenido:
docker start 3db75215661 (id del contenedor inactivo)
docker sobre linux ver rapidamente este video https://www.youtube.com/watch?v=_0EYw9PGMnM
domingo, 28 de enero de 2024
cursos recomendados
courses & resources
topic | format | difficulty | release year | price | course |
---|---|---|---|---|---|
Generative AI | GitHub repository | 🟩⬜⬜ | 2023 | free | Generative AI for Beginners by Microsoft |
Deep Learning | YouTube playlist | 🟩🟩⬜ | 2023 | free | 6.5940 TinyML and Efficient Deep Learning Computing by Massachusetts Institute of Technology |
Natural Language Processing | YouTube playlist | 🟩🟩⬜ | 2023 | free | Natural Language Processing by The University of Texas at Austin |
Deep Learning | website | 🟩⬜⬜ | 2023 | free | Deep Learning Fundamentals - Learning Deep Learning Using a Modern Open-Source Stack by Sebastian Raschka |
Large Language Models | YouTube playlist | 🟩🟩⬜ | 2023 | free | LLM Bootcamp - Spring 2023 by The Full Stack |
Python | YouTube playlist | 🟩⬜⬜ | 2023 | free | CS50: Introduction to Programming with Python by Harvard University x freeCodeCamp.org |
Stable Diffusion and Deep Learning | website | 🟩🟩⬜ | 2023 | free | Practical Deep Learning for Coders part 2: Deep Learning Foundations to Stable Diffusion by fast.ai |
Deep Learning | YouTube playlist | 🟩⬜⬜ | 2023 | free | 6.S191: Introduction to Deep Learning by Massachusetts Institute of Technology |
Deep Learning | YouTube playlist | 🟩⬜⬜ | 2023 | free | Neural Networks: Zero to Hero by Andrej Karpathy |
Large Language Models and Prompt Engineering | website | 🟩⬜⬜ | 2023 | free | Prompt Engineering Guide by DAIR.AI |
Computer Vision | YouTube playlist | 🟩⬜⬜ | 2023 | free | Computer Vision in Practice by Piotr Skalski x Roboflow |
Natural Language Processing | YouTube playlist | 🟩🟩⬜ | 2023 | free | CS685: Advanced Natural Language Processing by University of Massachusetts |
Machine Learning | YouTube playlist | 🟩🟩⬜ | 2022 | free | CS229: Machine Learning by Stanford University |
MLOps | YouTube playlist | 🟩🟩⬜ | 2022 | free | Machine Learning Engineering for Production by Andrew Y. Ng |
Multimodal Machine Learning | YouTube playlist | 🟩🟩🟩 | 2022 | free | 11-777: Multimodal Machine Learning by Carnegie Mellon University |
Deep Multi-Task and Meta Learning | YouTube playlist | 🟩🟩🟩 | 2022 | free | CS330 Deep Multi-Task and Meta Learning by Stanford University |
Deep Learning | YouTube playlist | 🟩⬜⬜ | 2022 | free | Practical Deep Learning for Coders by fast.ai |
Natural Language Processing | YouTube playlist | 🟩🟩⬜ | 2021 | free | CS224U: Natural Language Understanding by Stanford University |
Transformers | YouTube playlist | 🟩🟩🟩 | 2021 | free | CS25: Transformers United by Stanford University |
Deep Learning | YouTube playlist | 🟩🟩⬜ | 2021 | free | NYU-DLSP21: NYU Deep Learning Spring by New York University |
Natural Language Processing and Transformers | website | 🟩⬜⬜ | 2021 | free | NLP Course by Hugging Face |
Deep Learning | book | 🟩⬜⬜ | 2021 | free | Dive into Deep Learning by d2l.ai |
Reinforcement Learning | YouTube playlist | 🟩🟩🟩 | 2021 | free | Reinforcement Learning Course by DeepMind x University College London |
Natural Language Processing | YouTube playlist | 🟩🟩⬜ | 2021 | free | CS224N: Natural Language Processing with Deep Learning by Stanford University |
Deep Learning | YouTube playlist | 🟩🟩⬜ | 2020 | free | Deep Learning Lecture Series by DeepMind x University College London |
Linear Algebra | website | 🟩🟩🟩 | 2019 | free | Advanced Linear Algebra - Foundations to Frontiers by Margaret E. Myers & Robert A. van de Geijn |
Artificial Intelligence | Youtube playlist | 🟩🟩⬜ | 2019 | free | Stanford CS221: Artificial Intelligence: Principles and Techniques by Stanford University |
Computer Vision | Youtube playlist | 🟩🟩⬜ | 2019 | free | University of Michigan EECS 498.008 / 598.008: Deep Learning for Computer Vision by University of Michigan |
Computer Vision | YouTube playlist | 🟩🟩⬜ | 2018 | free | CS231n: Deep Learning for Computer Vision by Stanford University |
Statistics and Probability | YouTube playlist | 🟩⬜⬜ | 2013 | free | Statistics 110: Probability by Harvard University |