Skip to content

Commit

Permalink
Merge branch 'main' into librosa-card
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcfee committed Jul 17, 2022
2 parents 986efa8 + c92999f commit 7702a3c
Show file tree
Hide file tree
Showing 54 changed files with 66 additions and 32 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Card texts are defined in `data.yml`, and color schemes are defined in `group.ya

# Samples

<img src='cards-groups/Sky is the limit-1-astropy-card.png' width='30%' /> <img src='cards-groups/Sky is the limit-2-poliastro-card.png' width='30%' /> <img src='cards-groups/Sky is the limit-3-sunpy-card.png' width='30%' /> <img src='cards-groups/Sky is the limit-4-skypy-card.png' width='30%' /> <img src='cards-groups/Packaging-1-conda-forge-card.png' width='30%' /> <img src='cards-groups/Packaging-2-conda-card.png' width='30%' /> <img src='cards-groups/Performance-1-Dask-card.png' width='30%' /> <img src='cards-groups/Performance-2-cython-card.png' width='30%' /> <img src='cards-groups/Performance-3-numba-card.png' width='30%' /> <img src='cards-groups/Performance-4-cupy-card.png' width='30%' /> <img src='cards-groups/Vizualisation-1-matplotlib-card.png' width='30%' /> <img src='cards-groups/Vizualisation-2-bokeh-card.png' width='30%' /> <img src='cards-groups/Vizualisation-3-Scikit-Image-card.png' width='30%' /> <img src='cards-groups/Support-1-Numfocus-card.png' width='30%' /> <img src='cards-groups/Support-2-Scipy 2022-card.png' width='30%' /> <img src='cards-groups/Support-3-OpenTeams-card.png' width='30%' /> <img src='cards-groups/IDE-1-IPython-card.png' width='30%' /> <img src='cards-groups/IDE-2-Jupyter-card.png' width='30%' /> <img src='cards-groups/IDE-3-Spyder-card.png' width='30%' /> <img src='cards-groups/Mathematics-1-sympy-card.png' width='30%' /> <img src='cards-groups/Mathematics-2-scipy-card.png' width='30%' /> <img src='cards-groups/Mathematics-3-mathjax-card.png' width='30%' /> <img src='cards-groups/Building blocks-1-numpy-card.png' width='30%' /> <img src='cards-groups/Building blocks-2-zarr-card.png' width='30%' /> <img src='cards-groups/Building blocks-3-xarray-card.png' width='30%' /> <img src='cards-groups/Building blocks-4-NetworkX-card.png' width='30%' /> <img src='cards-groups/Machine Learning-1-Scikit-Learn-card.png' width='30%' /> <img src='cards-groups/Machine Learning-2-PyTorch Ignite-card.png' width='30%' /> <img src='cards-groups/Dataframes-1-Pandas-card.png' width='30%' /> <img src='cards-groups/Dataframes-2-GeoPandas-card.png' width='30%' /> <img src='cards-groups/Testing-1-Pytest-card.png' width='30%' /> <img src='cards-groups/Testing-2-Hypothesis-card.png' width='30%' /> <img src='cards-groups/Testing-3-Ghostwriter-card.png' width='30%' />
<img src='cards-groups/Sky-is-the-limit-1-Astropy-card.png' width='30%' /> <img src='cards-groups/Sky-is-the-limit-2-poliastro-card.png' width='30%' /> <img src='cards-groups/Sky-is-the-limit-3-SunPy-card.png' width='30%' /> <img src='cards-groups/Sky-is-the-limit-4-SkyPy-card.png' width='30%' /> <img src='cards-groups/Packaging-5-Conda-Forge-card.png' width='30%' /> <img src='cards-groups/Packaging-6-Conda-card.png' width='30%' /> <img src='cards-groups/Performance-7-Dask-card.png' width='30%' /> <img src='cards-groups/Performance-8-Cython-card.png' width='30%' /> <img src='cards-groups/Performance-9-Numba-card.png' width='30%' /> <img src='cards-groups/Performance-10-CuPy-card.png' width='30%' /> <img src='cards-groups/Vizualisation-11-Matplotlib-card.png' width='30%' /> <img src='cards-groups/Vizualisation-12-Bokeh-card.png' width='30%' /> <img src='cards-groups/Vizualisation-13-Scikit-Image-card.png' width='30%' /> <img src='cards-groups/Support-14-NumFOCUS-card.png' width='30%' /> <img src='cards-groups/Support-15-SciPy-2022-card.png' width='30%' /> <img src='cards-groups/Support-16-OpenTeams-card.png' width='30%' /> <img src='cards-groups/IDE-17-IPython-card.png' width='30%' /> <img src='cards-groups/IDE-18-Jupyter-card.png' width='30%' /> <img src='cards-groups/IDE-19-Spyder-card.png' width='30%' /> <img src='cards-groups/Mathematics-20-SymPy-card.png' width='30%' /> <img src='cards-groups/Mathematics-21-SciPy-card.png' width='30%' /> <img src='cards-groups/Mathematics-22-MathJax-card.png' width='30%' /> <img src='cards-groups/Building-blocks-23-NumPy-card.png' width='30%' /> <img src='cards-groups/Building-blocks-24-Zarr-card.png' width='30%' /> <img src='cards-groups/Building-blocks-25-Zarr-card.png' width='30%' /> <img src='cards-groups/Building-blocks-26-Xarray-card.png' width='30%' /> <img src='cards-groups/Building-blocks-27-NetworkX-card.png' width='30%' /> <img src='cards-groups/Machine-Learning-28-Scikit-Learn-card.png' width='30%' /> <img src='cards-groups/Machine-Learning-29-PyTorch-Ignite-card.png' width='30%' /> <img src='cards-groups/Dataframes-30-Pandas-card.png' width='30%' /> <img src='cards-groups/Dataframes-31-GeoPandas-card.png' width='30%' /> <img src='cards-groups/Dataframes-32-Pandera-card.png' width='30%' /> <img src='cards-groups/Testing-33-Pytest-card.png' width='30%' /> <img src='cards-groups/Testing-34-Hypothesis-card.png' width='30%' /> <img src='cards-groups/Testing-35-Ghostwriter-card.png' width='30%' />

## Suggested Backside Images

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cards-groups/Building blocks-25-Zarr-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cards-groups/Building-blocks-23-NumPy-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cards-groups/Building-blocks-24-Zarr-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cards-groups/Building-blocks-25-Zarr-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cards-groups/Building-blocks-26-Xarray-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cards-groups/Building-blocks-27-NetworkX-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed cards-groups/Dataframes-1-Pandas-card.png
Binary file not shown.
Binary file removed cards-groups/Dataframes-2-GeoPandas-card.png
Binary file not shown.
Binary file added cards-groups/Dataframes-30-Pandas-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cards-groups/Dataframes-31-GeoPandas-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cards-groups/Dataframes-32-Pandera-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified cards-groups/Sky is the limit-1-astropy-card.png
Binary file modified cards-groups/Sky is the limit-2-poliastro-card.png
Binary file modified cards-groups/Sky is the limit-3-sunpy-card.png
Binary file modified cards-groups/Sky is the limit-4-skypy-card.png
Binary file added cards-groups/Sky-is-the-limit-1-Astropy-card.png
Binary file added cards-groups/Sky-is-the-limit-3-SunPy-card.png
Binary file added cards-groups/Sky-is-the-limit-4-SkyPy-card.png
Binary file added cards-groups/Support-15-SciPy-2022-card.png
31 changes: 24 additions & 7 deletions data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,18 @@
by their first names"
- name: Zarr
meth: hex
desc: |+
Chunked, compressed, N-dimensional
arrays storage format and library.
Also works with small datasets,
of less than 128 Tb.
desc:
- |+
Chunked, compressed, N-dimensional
arrays storage format and library.
"Also works with small datasets,
of less than 128 Tb."
- |+
Chunked, compressed, N-dimensional
arrays storage format and library.
"looking forward to pirate day"
- name: NumPy
meth: tri
desc: |+
Expand Down Expand Up @@ -336,7 +342,6 @@
"There are so many resources on
how to learn about scikit !"
- name: Pytest
meth: tri
short: "Library - Common"
Expand Down Expand Up @@ -378,6 +383,7 @@
spending more time on something than
anyone else might reasonably expect."
- name: librosa
short: "Library - Rare"
power: 3
Expand All @@ -389,3 +395,14 @@
"We used to process audio in the time domain,
but it turned out that was just a phase."
- name: "Pandera"
meth: hex
desc: |+
A Statistical Data Testing Toolkit.
Provides a flexible and expressive
API for performing data validation
on dataframes to make data processing
pipelines more readable and robust.
64 changes: 40 additions & 24 deletions gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,40 +241,56 @@ def rect(top, w, bottom):
total = len([x for g in groups for x in g["items"]])
k = 0

flatten = []

gallery = []
for g in groups[:]:
for i, it in enumerate(g["items"], start=1):
k += 1
matching = [d for d in data if d["name"].lower() == it.lower()]
fig, ax = plt.subplots()
fig.set_figheight(20)
fig.set_figwidth(12)
DPI = 150

if len(matching) == 1:
dx = matching[0]
plot_one(
ax,
cmap=g["cmap"],
meth=g["shape"],
name=dx["name"],
short=g["name"],
desc=dx["desc"],
gn=f'{i}/{len(g["items"])}',
tn=f"{k}/{total}",
)
desc = dx["desc"]

if isinstance(desc, str):
desc = [desc]
for d in desc:
flatten.append(
dict(
cmap=g["cmap"],
meth=g["shape"],
name=dx["name"],
short=g["name"],
desc=d,
gn=f'{i}/{len(g["items"])}',
)
)
else:
raise ValueError("matching")
name = f"cards-groups/{g['name']}-{i}-{it}-card.png"
gallery.append(f"<img src='{name}' width='30%' /> ")
print(name)
fig.savefig(
name,
bbox_inches="tight",
pad_inches=0,
dpi=DPI,
)
plt.close("all")

total = len(flatten)
for k, var in enumerate(flatten, start=1):
fig, ax = plt.subplots()
fig.set_figheight(20)
fig.set_figwidth(12)
DPI = 150

plot_one(
ax,
**var,
tn=f"{k}/{total}",
)
name = f"cards-groups/{var['short']}-{k}-{var['name']}-card.png".replace(" ", "-")
gallery.append(f"<img src='{name}' width='30%' /> ")
print(name)
fig.savefig(
name,
bbox_inches="tight",
pad_inches=0,
dpi=DPI,
)
plt.close("all")

print("you can update the readme with")
print("".join(gallery))
1 change: 1 addition & 0 deletions groups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
items:
- Pandas
- GeoPandas
- Pandera
shape: tri
cmap: BrBG
- name: Testing
Expand Down
Binary file added logos/pandera.png

0 comments on commit 7702a3c

Please sign in to comment.