Skip to content

Instantly share code, notes, and snippets.

View Davidnet's full-sized avatar
🦔

David Cardozo Davidnet

🦔
View GitHub Profile
@Davidnet
Davidnet / example_video.py
Created August 6, 2020 22:19
Snippets_for_colab
# Como reproducir videos en Colab
from IPython.display import HTML
from base64 import b64encode
mp4 = open("/content/examples/videos/roller-coaster.mp4", "rb").read()
data_url = "data:video/mp4;base64," + b64encode(mp4).decode()
HTML("""
<video controls>
<source src="%s" type="video/mp4">
</video>
from dateutil.parser import parse, parserinfo
month_list = [(month[0:3], month) for month in ['enero',
'febrero',
'marzo',
'abril',
'mayo',
'junio',
'julio',
'agosto',
'septiembre',
{
"number": 990000112,
"type_document_id": 1,
"date": "2020-02-02",
"time": "09:08:39",
"resolution_number": "18760000001",
"prefix": "FE",
"sendmail": false,
"customer": {
"identification_number": 901097473,
@Davidnet
Davidnet / rsync-watch.sh
Created July 7, 2021 17:49 — forked from cgarciae/rsync-watch.sh
rsync project to server
rsync --exclude-from=.gitignore -avz -e ssh . $1
while inotifywait -r -e modify,create,delete . ; do
rsync --exclude-from=.gitignore -avz --delete -e ssh . $1
done
https://www.youtube.com/watch?v=qDKSH_X68XE https://www.youtube.com/watch?v=Rqah6F0D6-Y https://www.youtube.com/watch?v=pk9ptAkR84k https://www.youtube.com/watch?v=8nIhUx9rnOU https://www.youtube.com/watch?v=1PKH_D6zjoM
@Davidnet
Davidnet / download_video.py
Last active February 7, 2023 16:52
Test Kubeflow
from pathlib import Path
def download_videos(video_path: Path, audio_files: Path):
from shutil import make_archive
import tempfile
from pytube import YouTube
from pytube.exceptions import RegexMatchError
with open(video_path.resolve(), "r") as f:
videos_ids = f.read().splitlines()
@Davidnet
Davidnet / urls-from-nvidia.txt
Created February 6, 2023 20:41
urls from nvidia
https://www.youtube.com/watch?v=MdwANJnUFng
@Davidnet
Davidnet / urls.txt
Created April 10, 2023 15:50
Kubeflow Urls
https://www.youtube.com/watch?v=CUQT-YccpR8
Hello everyone I am trying to run the following pipeline with TPUs,
In GCP I have quotas, and credits, yet in vertex it fails with the same message: "Internal Error" please contact Vertex AI, but to contact them, yet does anyone see anything wrong with the following definition?
from kfp import dsl
import google_cloud_pipeline_components.v1.custom_job as gcp_components_custom_job
@Davidnet
Davidnet / pyproject.toml
Created November 3, 2023 20:28
Problematic pyproject
[tool.poetry]
name = "aiplatform-issue"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.11,<3.12.0"
kfp = "2.4.0"