Skip to content

Instantly share code, notes, and snippets.

@macoj
macoj / hide_code_pdf.md
Last active December 17, 2020 15:20
Hiding code when exporting jupyter notebook to pdf
@nipunsadvilkar
nipunsadvilkar / Different_style_guide_python.md
Last active December 20, 2024 23:06
What is the standard Python docstring format?

Formats

Python docstrings can be written following several formats as the other posts showed. However the default Sphinx docstring format was not mentioned and is based on reStructuredText (reST). You can get some information about the main formats in that tuto.

Note that the reST is recommended by the PEP 287

There follows the main used formats for docstrings.

- Epytext

@vishalkuo
vishalkuo / outlier_removal.py
Last active March 31, 2021 21:53
Remove outliers using numpy. Normally, an outlier is outside 1.5 * the IQR experimental analysis has shown that a higher/lower IQR might produce more accurate results. Interestingly, after 1000 runs, removing outliers creates a larger standard deviation between test run results.
import numpy as np
def removeOutliers(x, outlierConstant):
a = np.array(x)
upper_quartile = np.percentile(a, 75)
lower_quartile = np.percentile(a, 25)
IQR = (upper_quartile - lower_quartile) * outlierConstant
quartileSet = (lower_quartile - IQR, upper_quartile + IQR)
resultList = []
for y in a.tolist():
@scribu
scribu / README.md
Last active August 5, 2019 09:59
Convert notes from Tomboy XML to Evernote XML

This is a quick script to convert notes from Tomboy to Evernote.

Usage

pip install -r requirements.txt
mkdir export/
python tomboy-export.py <tomboy-dir>
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active January 22, 2025 09:27 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.