component/query
component/classes
component/value
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 numpy as np | |
| from matplotlib import pyplot as plt | |
| plt.ion() | |
| # say you have a bunch of distributions you'd like to look at | |
| data_sets = [np.random.poisson(lam, size=100), for lam in np.random.randint(1, 100, size=10)] | |
| # in a REPL, this one-liner makes it easy to plot each one successively waiting for ENTER from the terminal | |
| _ = [[plt.hist(data), input()] for data in data_sets] |
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
| #!/usr/bin/env python3 | |
| import pip | |
| searcher = pip.commands.SearchCommand() | |
| options, _ = searcher.parse_args([]) | |
| hits = searcher.search('*', options) | |
| hits_transformed = pip.commands.search.transform_hits(hits) | |
| for hit in hits_transformed: | |
| print(hit['name']) |
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
| /** | |
| * Expose `Emitter`. | |
| */ | |
| module.exports = Emitter; | |
| /** | |
| * Initialize a new `Emitter`. | |
| * | |
| * @api public |
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
| /* Times New Roman-based stack */ | |
| $timesNewRoman = Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif | |
| /* Modern Georgia-based serif stack */ | |
| $modernGeorgia = Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif | |
| /* Traditional Garamond-based serif stack */ | |
| $garamond = "Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif | |
| /* Helvetica/Arial-based sans serif stack */ |
NewerOlder