Skip to content

Instantly share code, notes, and snippets.

@fomightez
fomightez / useful_python_snippets.py
Last active May 14, 2024 07:34
Useful Python snippets
# These are meant to work in both Python 2 and 3, except where noted.
# See my useful_pandas_snippets.py for those related to dataframes (such as pickling/`df.to_pickle(save_as)`)
# https://gist.github.com/fomightez/ef57387b5d23106fabd4e02dab6819b4
# also see https://gist.github.com/fomightez/324b7446dc08e56c83fa2d7af2b89a33 for examples of my
# frequently used Python functions and slight variations for more expanded, modular structures.
#argparse
# good snippet collection at https://mkaz.tech/code/python-argparse-cookbook/
@oslego
oslego / devtools-selected-element.md
Last active December 19, 2015 10:49
How to build a Google Chrome DevTools extension where content scripts can access the node selected in the 'Elements' panel.

[Writting in progress] Chrome Developer Tools extensions and The Selected Element

This article is about building extensions for Google Chrome Developer Tools, also known as Chrome DevTools. Specifically, you'll learn how to work with element that is currently selected in the 'Elements' panel. Prior knowledge about DevTools extensions is required. Check out Boris Smus's Extending Chrome Developer Tools for an introduction and read through Google's own documentation on Chrome Extensions.

Chrome Extensions and Chrome DevTools Extensions

You can build extensions for the Google Chrome browser itself, which are targeted at regular users, as well as extensions for Chrome DevTools - the set of panels that developers use to inspect and audit content on web pages.