Skip to content

Instantly share code, notes, and snippets.

View lucasrodes's full-sized avatar

Lucas Rodés-Guirao lucasrodes

View GitHub Profile
@amarao
amarao / blame-praise.py
Last active September 9, 2024 20:41
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 September 20, 2024 09:38
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 = git@github.com: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: