Skip to content

Instantly share code, notes, and snippets.

View lucasrodes's full-sized avatar

Lucas Rodés-Guirao lucasrodes

View GitHub Profile
@Dynnammo
Dynnammo / scrap_graph_metabase.py
Created September 20, 2023 10:12
Scrap a Metabase graph using Python + Selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.firefox.options import Options
import time
from random import random
@amarao
amarao / blame-praise.py
Last active September 28, 2025 15:59
Example of argparse with subparsers for python
#!/usr/bin/env python
import argparse
def main(command_line=None):
parser = argparse.ArgumentParser('Blame Praise app')
parser.add_argument(
'--debug',
action='store_true',
help='Print debug info'
@surya501
surya501 / airport-embedding.py
Created March 14, 2017 18:31
Airport embedding in keras
# %matplotlib inline
import pandas as pd
import numpy as np
import keras
import tensorflow as tf
import os
from keras.models import Model
from keras.layers import Input, Embedding, merge
from keras.layers.core import Flatten, Dense, Dropout, Lambda
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active November 30, 2025 00:48
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: