Skip to content

Instantly share code, notes, and snippets.

View rodrigobaron's full-sized avatar
👾

Rodrigo Baron rodrigobaron

👾
View GitHub Profile
@rodrigobaron
rodrigobaron / ingress-nginx-example.yaml
Created November 24, 2021 00:03
Exemple of how to use ingress-nginx
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-app
labels:
app: hello-app
spec:
selector:
matchLabels:
app: hello-app
"""This example showcases the hello world example of Hera using kubernetes user token"""
from typing import Optional
import errno
import os
from hera.v1.input import InputFrom
from hera.v1.resources import Resources
from hera.v1.task import Task
from hera.v1.workflow import Workflow
from hera.v1.volume import Volume
@rodrigobaron
rodrigobaron / submit.md
Created May 19, 2020 13:01 — forked from tanaikech/submit.md
Downloading Shared Files on Google Drive Using Curl

Downloading Shared Files on Google Drive Using Curl

When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.

File size < 40MB

CURL

filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&amp;id=${fileid}"
@rodrigobaron
rodrigobaron / gh-dl-release
Created March 30, 2020 11:35 — forked from maxim/gh-dl-release
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@rodrigobaron
rodrigobaron / Dockerfile.dev
Created February 4, 2020 11:31 — forked from alvarocavalcanti/Dockerfile.dev
Configuring Python Remote Interpreter using Docker
FROM python:3.7
ENV PYTHONUNBUFFERED 1
WORKDIR /code
# Copying the requirements, this is needed because at this point the volume isn't mounted yet
COPY requirements.txt /code/
# Installing requirements, if you don't use this, you should.
# More info: https://pip.pypa.io/en/stable/user_guide/
@rodrigobaron
rodrigobaron / trax_custom_resnet.ipynb
Created January 21, 2020 02:57
trax input layer issue
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

Steps:

  1. Open VirtualBox
  2. Right-click your VM, then click Settings
  3. Go to Shared Folders section
  4. Add a new shared folder
  5. On Add Share prompt, select the Folder Path in your host that you want to be accessible inside your VM.
import rpyc
from rpyc.utils.zerodeploy import DeployedServer
from plumbum import SshMachine
mach = SshMachine("rodrigo@server")
server = DeployedServer(mach, python_executable='/home/rodrigo/venv/bin/python')
conn = server.classic_connect()
import sys
conn.modules.sys.stdout = sys.stdout
@rodrigobaron
rodrigobaron / google_colab_tricks.txt
Created April 25, 2018 16:32
Google Colab Tricks
#
# access gdrive
#
!apt-get install -y -qq software-properties-common python-software-properties module-init-tools
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null
!apt-get update -qq 2>&1 > /dev/null
!apt-get -y install -qq google-drive-ocamlfuse fuse
from google.colab import auth
auth.authenticate_user()
from oauth2client.client import GoogleCredentials
@rodrigobaron
rodrigobaron / cuda_install.sh
Created April 21, 2018 00:56
CUDA install ubuntu*
#!/bin/sh
sudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
sudo apt-key adv --fetch-keys \
http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda-9-0