Background remover
[1] https://www.cutout.pro/remove-video-background #5s
Video splitter
[1] https://echowave.io/app/tools/split/ #many parts
Software Developer, Programming, Web resources and entertaiment. Desarrollo de software, programación, recursos web y entretenimiento.
Background remover
[1] https://www.cutout.pro/remove-video-background #5s
Video splitter
[1] https://echowave.io/app/tools/split/ #many parts
#Learn more: https://stepik.org/lesson/9173
stepik (background revisor code)
import random
def generate(): #create test cases
num_tests = 50
tests = []
tests.append("5\n")
tests.append("11\n")
tests.append("18\n")
for test in range(num_tests):
test_case = "%d\n" % (test)
tests.append(test_case)
tests.append("200\n")
return tests
def solve(dataset): #real solution
n = int(dataset.strip())
if (n == 0):
f = 0;
elif (n == 1):
f = 1;
else:
fm1 = 0
fm2 = 1
for i in range(n):
f = fm1 + fm2
fm2 = fm1
fm1 = f
return str(f)
def check(reply, clue): #validator
return int(reply) == int(clue)
python code snippet to get url for use with vlc and show the camera on LAN
#connection code , previously done in this blog
media = camera.create_media_service()
profiles = media.GetProfiles()
for p in profiles:
print("Profile:", p.Name)
print("Token:", p.token)
uri = media.GetStreamUri({
'StreamSetup': {
'Stream': 'RTP-Unicast',
'Transport': {
'Protocol': 'RTSP'
}
},
'ProfileToken': p.token
})
print("RTSP:", uri.Uri)
print()
#
vlc 'rtsp://admin:your_key@192.168.1.8:554/Streaming/Channels/101?transportmode=unicast&profile=Profile_1'
python code to test camera ONVIF(EZVIZ) on LAN, if you do not know the ip, use nmap to scan.
from onvif import ONVIFCamera
camera = ONVIFCamera(
'192.168.1.8',
80,
'admin',
'your_key', #get from QR or app
no_cache=True
)
print("Connected to ONVIF")
info = camera.devicemgmt.GetDeviceInformation()
print("Manufacturer:", info.Manufacturer)
print("Model:", info.Model)
print("Firmware:", info.FirmwareVersion)
print("Serial:", info.SerialNumber)
print("Hardware ID:", info.HardwareId)
[1] Slides +Animation https://slidespeak.co/free-tools/animate-slides-with-ai
[2] Slides to mp4 https://slidespeak.co/free-tools/convert-powerpoint-to-video-ai
[3] https://app.synthesia.io (To get text to speak/chrome)
[4] Animation introductions https://www.flexclip.com (To get intro)
References:
[1] gas sensors MQx https://naylampmechatronics.com/blog/42_tutorial-sensores-de-gas-mq2-mq3-mq7-y-mq135.html
[2] gas sensor MQ135 https://www.tecneu.com/blogs/tutoriales-de-electronica/mq135
[3] gas sensor MQ137 (Ammonia) https://circuitdigest.com/microcontroller-projects/arduino-mq137-ammonia-sensor
Resources(wifi):
[1] https://mecatronica.saisac.pe/producto/modulo-esp-01-esp8266-wifi/
[2] https://www.electromania.pe/?s=ESP8266&post_type=product
[3] https://www.teslaelectronic.com.pe/producto/modulo-esp8266-serial-wifi/?srsltid=AfmBOoq-9awBhXa6sHpJDswF0XyhD_mICthqr3IEZgQzeOaCFI0GygXP
avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied
$ ls -l /dev/ttyACM*
crw-rw-r-- 1 root dialout ... /dev/ttyACM0
Fix:
sudo chmod a+rw /dev/ttyACM0
Resources:
[1] https://www.arduino.cc/en/software/
[2] Simulator https://www.tinkercad.com/
Resources:
[1] https://www.vosviewer.com/download
[2] https://www.vosviewer.com/documentation/Manual_VOSviewer_1.6.20.pdf
[3] https://api.crossref.org/swagger-ui/index.html #how to query
How to run on PC/Linux
javaws file.jnlpIf not installed:
sudo apt install icedtea-netx
echo "HISTSIZE=$HISTSIZE"
echo "HISTFILESIZE=$HISTFILESIZE"
#update the .bachrc file
# Keep more commands in memory
HISTSIZE=10000
# Keep more (or unlimited) lines in the history file
HISTFILESIZE=100000
# or for effectively unlimited on Bash ≥4.3:
# HISTFILESIZE=-1
Escenary: You need to upload many files to github, then need to clone, add the files and upload from local, instead file by file.
cd Downloads/UnsaTesis/Waste/
ls
mkdir github
cd github
git clone https://github.com/fincahuanaco/solid_waste_peru.git
ls
cd solid_waste_peru/
ls
git add .
git commit -m "Add maps of Lima and Arequipa"
git config --global user.email "you@example.com"
git commit -m "Add maps of Lima and Arequipa"
#after added files to directory
git push origin main
git config --global user.email "you@example.com"
git push origin main
git config --global credential.helper store
#store credentials on disk
clear
git push origin main
Change image size during paper writing (overleaf time compilation affected)
sudo apt install pngquant
pngquant --quality=90-100 budget_map.png
pngquant --quality=85-95 waste_stress_result.png #more aggressive
sudo apt install oxipng
#does not installed for me
Bonus
Cut video using ffmpeg
ffmpeg -ss 00:30:30 -i DAIA-Mat-Sec2-S15.mp4 -c copy DAIA-Mat-Sec2-S15_output.mp4
Caso Cantuta 90's
[1] https://www.infobae.com/america/peru/2022/07/23/masacre-de-la-cantuta-el-crimen-de-los-estudiantes-a-manos-de-asesinos-encubiertos-en-las-fuerzas-armadas/
[2] https://elpais.com/internacional/2023-05-29/caso-la-cantuta-los-restos-de-las-victimas-que-permanecieron-en-inglaterra-durante-30-anos.html
String search: ipsos Distribución Poblacional 2022
[1] 2010-2025 https://cpi.pe/banco-de-datos/estadisticas-poblacionales/
Air quality
[1] Map https://www.iqair.com/es/air-quality-map
[2] https://www.senamhi.gob.pe/?p=calidad-del-aire-pronostico
[3] Air and others https://sinia.minam.gob.pe/portal/estadisticas-del-sector-ambiente/?marcoOrdenador=sinia&eid=45&tab=datos
[4] PM2.5, PM10, NO2 https://sinia.minam.gob.pe/portal/estadisticas-del-sector-ambiente/?marcoOrdenador=sinia&eid=148&tab=datos
[1] Crime Index https://www.numbeo.com/crime/rankings.jsp
[2] Traffic Index https://www.numbeo.com/traffic/rankings_by_country.jsp
Resources:
[1] https://objectiveunclear.com/
[2] Airplanes Live 3D https://objectiveunclear.com/airloom.html
[3] https://airplanes.live/
[4] Lima https://globe.airplanes.live/?icao=e80329
2021 Physics-based Deep Learning
Resources:
[1] Web https://physicsbaseddeeplearning.org
[1] Book https://arxiv.org/abs/2109.05237
[1] https://github.com/tum-pbs/pbdl-book
[out:json][timeout:60];
(
node["natural"="tree"]({{bbox}});
);
out body;
>;
out skel qt;
Resources:
[1] Create queries and export as geojson https://overpass-turbo.eu/
Google maps alternatives
Resources:
[1] JavaScript Lib for maps https://leafletjs.com/ #associate to OpenStreetMap
[2] Peruvian shape files https://www.geogpsperu.com
[3] OpenStreetMap editor https://josm.openstreetmap.de/
java -jar josm-tested.jar
Apps:
[Image to tex] https://latexconvert.com/
[Tex to image] https://www.bruot.org/tex2img/
[Solve eq] https://notegpt.io/photo-math
https://latexeditor.lagrida.com/ #offline
Step 1:
wget -O - https://repo.fortinet.com/repo/forticlient/7.2/ubuntu/DEB-GPG-KEY | gpg --dearmor | sudo tee /usr/share/keyrings/repo.fortinet.com.gpg
Step 2:
sudo vi /etc/apt/sources.list.d/repo.fortinet.com.list
deb [arch=amd64] https://repo.fortinet.com/repo/6.4/ubuntu/ /bionic multiverse
Step 3:
sudo apt install forticlient
ICMC VPN
[1] https://atendimentosti.usp.br/otrs/public.pl?Action=PublicFAQExplorer;CategoryID=12
clicar em Configure VPN e na janela de configuração New VPN Connection preencher somente os campos abaixo:
References:
[1] github https://iterative-refinement.github.io/
[2] Image Super-Resolution via Iterative Refinement https://arxiv.org/abs/2104.07636
Claro - PerĆŗ
[1] https://cuenta.claro.com.pe/DirectorioAbonadosMovil/servlet/directorioAbonados
sudo apt update && sudo apt install qemu-system-x86
# Create a 1GB disk image
qemu-img create -f qcow2 win95.qcow2 1G
qemu-img create -f qcow2 win95.qcow2 500M #500MB
# Run
qemu-system-i386 -m 64 -cpu pentium \ -drive file=win95.qcow2,format=qcow2 \ -net nic,model=pcnet -net user \ -soundhw sb16 \ -vga cirrus \ -cdrom /path/to/windows95.iso \ -boot d
#My command
$ qemu-system-i386 -m 64 -cpu pentium -drive file=win95.qcow2,format=qcow2,index=0,media=disk -drive file=./isos/W95_FULL_AR.iso,index=1,media=cdrom -fda ./isos/Windows95a.img -boot c -vga cirrus
Resources:
https://archive.org/ #Locate isos
code in python for flip horizontal images:
from PIL import Image
import os
import sys
def flip_horizontal(input_path):
# Split filename and extension
base, ext = os.path.splitext(input_path)
# Create output filename
output_path = f"{base}_flipped{ext}"
# Open image
with Image.open(input_path) as img:
# Flip horizontally
flipped = img.transpose(Image.FLIP_LEFT_RIGHT)
# Save result
flipped.save(output_path)
return output_path
# Example usage
if __name__ == "__main__":
if len(sys.argv) < 2:
print("No input files provided.")
sys.exit(1)
for input_image in sys.argv[1:]:
try:
output_image = flip_horizontal(input_image)
print(f"Saved: {output_image}")
except Exception as e:
print(f"Error processing {input_image}: {e}")
Mobile development is the process of creating software applications for smartphones, tablets, and other mobile devices, primarily focusing on the Android and iOS platforms.
[1] https://flutter.dev/development/mobile #framework/compiler for make apk
[2] https://dartpad.dev/ #preview code
Step by step https://cgian.com/category/blender/
https://docs.google.com/presentation/d/1R9SXecAUshzz8HeN6VCLPUHpUJVBhTcMfQr0WIyszx4/edit?usp=sharing
about:config
privacy.webrtc.legacyGlobalIndicator
set to false (+add if not exist)
privacy.webrtc.hideGlobalIndicator
set to true (+add if not exist)
pip install notebook
jupyter notebook
pip install jupyterlab
jupyter lab
pip install voila
voila
Upgrade to nodejs 20/22
References:
[1] https://jupyter.org/install
Kazam in ubuntu 20 does not show box when you choose area for screen capture
sudo add-apt-repository ppa:sylvain-pineau/kazam
sudo apt update
sudo apt install kazam
$ kazam --version #works
kazam 1.5.3 'NX-72307'
Online tools
[1] work in private space (20c/day) https://ezremove.ai/
[2] Good for small images https://www.remove.bg/upload
[2] Average https://removal.ai/upload/
[3] Average https://snapbg.ai/upload
[1] https://qgis.org/resources/installation-guide/#debian--ubuntu
Shapefiles
[1] PerĆŗ https://www.geogpsperu.com/2014/03/base-de-datos-peru-shapefile-shp-minam.html
LM Studio [2]
chmod +x LM-Studio-*.AppImage
./LM-Studio-*.AppImage
Ollama on TUI
curl -fsSL https://ollama.com/install.sh | sh
ollama --version
ollama run qwen2.5-coder:1.5b
Resources:
[1] Opencode https://opencode.ai/download
[2] LM Studio AppImage https://lmstudio.ai/
Automate Horizontal flip by command line single and secure
First:
#!/bin/bash
for f in "$@"; do
# Extract path, filename, and extension
DIR="$(dirname "$f")"
FILE="$(basename "$f")"
NAME="${FILE%.*}"
EXT="${FILE##*.}"
OUTPUT="$DIR/${NAME}_flipped.$EXT"
gimp -i -b "(let* (
(image (car (gimp-file-load RUN-NONINTERACTIVE \"$f\" \"$f\")))
(drawable (car (gimp-image-get-active-layer image)))
)
(gimp-item-transform-flip-simple drawable ORIENTATION-HORIZONTAL TRUE 0)
(gimp-file-save RUN-NONINTERACTIVE image drawable \"$OUTPUT\" \"$OUTPUT\")
(gimp-quit 0)
)"
done
Second:
#!/bin/bash
for f in "$@"; do
DIR="$(dirname "$f")"
FILE="$(basename "$f")"
NAME="${FILE%.*}"
EXT="${FILE##*.}"
OUTPUT="$DIR/${NAME}_flipped.$EXT"
TMP="$(mktemp --suffix=".$EXT")"
# Run GIMP flip
gimp -i -b "(let* (
(image (car (gimp-file-load RUN-NONINTERACTIVE \"$f\" \"$f\")))
(drawable (car (gimp-image-get-active-layer image)))
)
(gimp-item-transform-flip-simple drawable ORIENTATION-HORIZONTAL TRUE 0)
(gimp-file-save RUN-NONINTERACTIVE image drawable \"$TMP\" \"$TMP\")
(gimp-quit 0)
)" >/dev/null 2>&1
# Check result
if [ $? -eq 0 ] && [ -s "$TMP" ]; then
mv "$TMP" "$OUTPUT"
echo "✔ Flipped: $OUTPUT"
else
echo "✖ ERROR flipping $f"
rm -f "$TMP"
fi
done
[1] https://typst.app/pricing/
[2] https://app.inscrive.io
[3] Using LLM https://prism.openai.com
References:
[1] https://inscrive.io/articles/overleaf-alternatives
Nubefact
[1] https://www.operador.pe/registro
[2] https://probar-xml.nubefact.com/
[3] xml examples https://drive.google.com/uc?id=1F5Tk3Wo23bNHcskf7PuPEjyZeU8q3Kwk&export=download&authuser=0
A minimal and customizable Docker image running the Android emulator as a service.
https://github.com/HQarroum/docker-android
Add --password-store=basic to the end of the command line.
google-chrome-stable --password-store=basic.
Disable timers on current web page
in console write the following command
let id = setTimeout(() => {}, 0); while (id--) { clearTimeout(id); clearInterval(id); }
Unminify JavaScript code
https://unminify.com/
Install odoo as service
Step 1: Create a script
user ~ vi /usr/local/bin/odoo-start.sh
#!/bin/bash
# Optional: Port forward example with socat (install via apt install socat)
#socat TCP-LISTEN:8080,fork TCP:localhost:8069 &
# Your Odoo command (example for Odoo 17)
#exec /path/to/odoo-bin -c /path/to/odoo.conf --addons-path=/path/to/addons -d your_db --workers=2
export PYTHONHOME=/usr/local # Or remove if not required
exec /home/user/Software/odoo-17.0/venv/bin/python3 /home/user/Software/odoo-17.0/odoo-bin --http-port=8070 -d casa17g4
Step 2: Create service
user ~ vi /etc/systemd/system/odoo17.service
[Unit]
Description=Odoo 17 Service
After=network.target postgresql.service
[Service]
Type=simple
User=user
Group=user
WorkingDirectory=/home/user/Software/odoo-17.0
ExecStart=/usr/local/bin/odoo-start.sh
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
Step 3: Run and Debug
sudo systemctl daemon-reload
sudo systemctl reset-failed odoo17
sudo systemctl start odoo17
sudo journalctl -u odoo17 -e # See error
sudo journalctl -u odoo17 -f # See live
Step 4: Set it for boot
systemctl list-unit-files --type=service --state=enabled | grep odoo
sudo systemctl enable odoo17
systemctl list-unit-files --type=service --state=enabled | grep odoo
sudo systemctl disable odoo17 # disable from boot list
Object.entries(obj)const obj = { foo: "bar", baz: 42 };
console.log(Object.entries(obj)); // [ ['foo', 'bar'], ['baz', 42] ] const obj = { foo: "bar", baz: 42 };
const map = new Map(Object.entries(obj));
console.log(map); // Map(2) {"foo" => "bar", "baz" => 42}// Using for...of loop
const obj = { a: 5, b: 7, c: 9 };
for (const [key, value] of Object.entries(obj)) {
console.log(`${key} ${value}`); // "a 5", "b 7", "c 9"
}
// Using array methods
Object.entries(obj).forEach(([key, value]) => {
console.log(`${key} ${value}`); // "a 5", "b 7", "c 9"
});const object = {
a: 1,
b: 2,
c: 3,
};
console.log(Object.getOwnPropertyNames(object));
// Expected output: Array ["a", "b", "c"]
const object1 = {
a: 'somestring',
b: 42,
c: false
};
console.log(Object.values(object1));
// Expected output: ["somestring", 42, false]
References:
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
[2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames
Interactive learn for example docker, kubernetes, linux, python and more
Resources:
Image to Tex
[2] https://www.img2latex.xyz/convert
[3] https://ai-math.io/image-to-latex
[4] https://image2latex.comfyai.app/
[5] https://tools.useoctree.com/tools/math-to-latex
[6] https://www.math2tex.com/ #login required
[7] https://mathpix.com/image-to-latex #login required
[8] Standalone https://github.com/lukas-blecher/LaTeX-OCR
Tex to Image
[1] https://latexeditor.lagrida.com/
[2] https://www.bruot.org/tex2img/ #choose size 1x, 2x, ....
Solve equation/equations from image
[1] Image to Latex code (txt) https://notegpt.io/photo-math
Editors
[1] extract endpoints/URLs https://github.com/s0md3v/Diggy/tree/master
[2] alternative to nmap https://github.com/s0md3v/Smap
Qwen Image Edit 2511 — 3D Camera Control
[1] https://huggingface.co/spaces/multimodalart/qwen-image-multiple-angles-3d-camera
Testimonios:
[1] Sesion 29 / Santiago Martin Rivas https://www.youtube.com/watch?v=yKYVZirFdhs
[2] Sesion 30 / Santiago Martin Rivas https://www.youtube.com/watch?v=rXx4uFF8yaM
[3] Sesion 28 / Carlos Pichilingue
[4] Sesion 57/ Gral Rodolfo Robles Espinoza https://www.youtube.com/watch?v=uq6hwVLTLsw (Mafia Montesinos/Generales/Ejercito alternativo)
Caso Barrios Altos
[4] Sesion 17 / Pedro Suppo SƔnchez https://www.youtube.com/watch?v=nVy6ysUzIWE
[5] Sesion 24 / HƩctor Gamarra Mamani https://www.youtube.com/watch?v=IyNIHDJD9QE
Caso Cantuta
[6] Sesion 19/ Ćngel Felipe SauƱi Pomaya https://www.youtube.com/watch?v=A2lsUQ7VKTw
[7] Sesion 23/ Pablo AtĆŗncar Cama https://www.youtube.com/watch?v=BBq6IqQrOAY
Hoy en dia
[1] Hercules Gomez Casanova sale libre https://www.youtube.com/watch?v=w2rhaj_GiBI
Sentencia Final
Sesion 161 https://www.youtube.com/watch?v=zLl9A69dTuU
Referencias:
[1] Escuela de las Americas, egresados https://derechos.org/soa/pe-mq.html
Background remover [1] https://www.cutout.pro/remove-video-background #5s Video splitter [1] https://echowave.io/app/tools/split/ #many pa...