Skip to content

Instantly share code, notes, and snippets.

View sdelquin's full-sized avatar
🎯
Working!

Sergio Delgado Quintero sdelquin

🎯
Working!
View GitHub Profile
@sdelquin
sdelquin / df-kaggle-style.css
Last active May 17, 2023 11:32
Styles for Pandas Dataframes inspired in Kaggle formatting
/* Styles for Pandas Dataframes inspired in Kaggle formatting.
It works on JupyterLab and Jupyter Notebook */
:is(.jp-RenderedHTML, .rendered_html) table {
background: #fff;
border: 0;
border-right: 1px solid hsla(210, 3%, 87%, 0.5);
color: rgba(0, 0, 0, 0.7);
display: block;
font-size: 12px;
@sdelquin
sdelquin / check_tools.py
Created July 22, 2021 16:38
Check tools from pylovepdf
import os
import sys
from prettyconf import config
from pylovepdf import ILovePdf
PUBLIC_KEY = config('ILOVEPDF_PUBLIC_KEY')
# tool names as described in https://github.com/AndyCyberSec/pylovepdf#tools
TOOLS = [
@sdelquin
sdelquin / load-custom-css.py
Last active May 25, 2021 03:14
Load custom CSS for Jupyter Notebook
from IPython.display import HTML
from pathlib import Path
css_rules = Path('custom.css').read_text()
HTML('<style>' + css_rules + '</style>')
@sdelquin
sdelquin / factorial.py
Created January 25, 2019 19:09
Factorial made in Python
def recursive_factorial(n):
if n == 1:
return 1
return n * recursive_factorial(n - 1)
def iterative_factorial(n):
result = 1
for i in range(2, n+1):
result *= i
@sdelquin
sdelquin / rename.py
Created May 15, 2018 17:15
Watch a directory and rename created files with a timestamp
# pip install watchdog
# python3 rename.py <path>
import sys
import time
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import datetime
import os