Updated: 9 april 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from IPython.display import HTML | |
from pathlib import Path | |
css_rules = Path('custom.css').read_text() | |
HTML('<style>' + css_rules + '</style>') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |