Skip to content

Instantly share code, notes, and snippets.

View David-Estevez's full-sized avatar
🙄
Coding robot world domination

David Estévez Fernández David-Estevez

🙄
Coding robot world domination
View GitHub Profile
@David-Estevez
David-Estevez / labels.py
Created December 6, 2017 16:31
Customize automatically the labels of a new repo
"""
Update the labels in a repo
Requirements:
$ pip install begins requests
# Usage:
$ python labels.py --owner <repo_owner> --repo <repo_name> --api-key <GitHub API key>
@David-Estevez
David-Estevez / break-url-links.tex
Created June 16, 2017 16:36
Break long url into several lines in LaTeX
@David-Estevez
David-Estevez / table.tex
Created February 28, 2017 16:24
IEEE style table template for papers
\begin{table*}[ht]
%\renewcommand{\arraystretch}{1.3}
\vspace{1em}
\caption{Original Algorithm: Results, expressed in percentage (\%)}
\label{table:good_results}
\centering
\begin{tabular}{|r||r|r|r|r|r|r||r|} % <-- edit with number of rows
% <-- table contents go here -->
\end{tabular}
\end{table*}
@David-Estevez
David-Estevez / rename-ebook.sh
Created January 22, 2017 18:03
Rename Ebook acording to the PDF's title and author metadata
TITLE=`pdfinfo $1 | head -n 2 | cut -d ':' -f2 | head -n1 | sed -e 's/^[[:space:]]*//'`
AUTHOR=`pdfinfo $1 | head -n 2 | cut -d ':' -f2 | tail -n1 | sed -e 's/^[[:space:]]*//'`
echo "$TITLE - [$AUTHOR]"
@David-Estevez
David-Estevez / oreilly-free-ebooks.py
Last active January 17, 2018 13:45
Extracts all links from O'Reilly website to automate free eBook download
##################################################################################
# O'Reilly Free Books link extractor
##################################################################################
#
# Extracts all links from O'Reilly website to automate free eBook download.
# Looks for existing files in the current directory to avoid downloading the same
# book twice.
#
##################################################################################
#
@David-Estevez
David-Estevez / repostatistics.py
Created November 12, 2016 18:56
repostatistics
import requests, json
import operator
from tqdm import tqdm
def main():
org = 'asrob-uc3m'
url_repos = 'https://api.github.com/orgs/{}/repos'
url_repo_contributors = 'https://api.github.com/repos/{}/{}/contributors'
contributors = {}