-
Create new Automator application with Run Shell script action (exact steps below).
- Open Automator.app (e.g. from Spotlight)
- Select File → New in menu
- Select "Application", click "Choose"
- With "Actions" toggle selected, type "Run Shell Script" in filter box, double click on filtered item
-
Put contents from
lock_spotify_version.shinto script's body (exact steps below). -
In opened right-hand item select
/bin/shas "Shell" type and copy contents of Gist's "lock_spotify_version.sh" below/in text area
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 seaborn as sns | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| iris = sns.load_dataset('iris') | |
| f, ax = plt.subplots(figsize=(10, 8)) | |
| species_list = np.unique(iris.species) | |
| color_list = ['r', 'g', 'b'] | |
| data = [np.array(iris[iris.species==s].sepal_length) for s in species_list] |
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
| ## GOAL: | |
| ## re-create a figure similar to Fig. 2 in Wilson et al. (2018), | |
| ## Nature 554: 183-188. Available from: | |
| ## https://www.nature.com/articles/nature25479#s1 | |
| ## | |
| ## combines a boxplot (or violin) with the raw data, by splitting each | |
| ## category location in two (box on left, raw data on right) | |
| # initial set-up ---------------------------------------------------------- |
Raymond Hettinger's professional at doing code review and architecture review
P vs. NP. Pythonic vs. Non-Pythonic.
- Golden rule of PEP-8: PEP-8 onto yourself. PEP 8 is style guide, not a law book.
- Care about intelligibility, not simply visually better
- Transforming (Java) API to pythonic ones
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
| """ | |
| Copyright 2017 Ronald J. Nowling | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software |
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
| # By Jake VanderPlas | |
| # License: BSD-style | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| def discrete_cmap(N, base_cmap=None): | |
| """Create an N-bin discrete colormap from the specified input map""" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

