This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
tutorials:python_quick_reference [2021/05/11 16:24] marcus.williams [Handy Matrix & Vector Operations] |
tutorials:python_quick_reference [2021/07/29 20:00] marcus.williams [S] |
||
---|---|---|---|
Line 436: | Line 436: | ||
===== Jupyter Notebook Markdown Tricks ===== | ===== Jupyter Notebook Markdown Tricks ===== | ||
+ | Links | ||
+ | <code> | ||
+ | [Github](http://github.com) | ||
+ | </code> | ||
+ | |||
+ | |||
Embed an image | Embed an image | ||
<code> | <code> | ||
Line 441: | Line 447: | ||
</code> | </code> | ||
+ | ===== Python Debugger (PDB) ===== | ||
+ | [[https://docs.python.org/3/library/pdb.html|ref]] | ||
+ | |||
+ | <code> | ||
+ | import pdb; pdb.set_trace() | ||
+ | </code> | ||
+ | |||
+ | ''n'' for next line; ''c'' to continue; ''s'' for step; ''exit'' for exit | ||
===== Other functions ===== | ===== Other functions ===== | ||
==== A ==== | ==== A ==== | ||
Line 566: | Line 580: | ||
<code> | <code> | ||
set([1,2,3]) - set([2,3,4]) | set([1,2,3]) - set([2,3,4]) | ||
+ | </code> | ||
+ | |||
+ | See other set [[https://www.w3schools.com/python/python_ref_set.asp|operations]] including: | ||
+ | <code> | ||
+ | set1.union(set2) | ||
+ | set1.intersection(set2) | ||
</code> | </code> | ||
==== T ==== | ==== T ==== |