Skip to content

Commit

Permalink
use GH API to fetch up-to-date stargazers_count
Browse files Browse the repository at this point in the history
add CHGNet to cv.projects
  • Loading branch information
janosh committed Oct 8, 2023
1 parent 8ec3fbf commit c2324ba
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 20 deletions.
30 changes: 16 additions & 14 deletions src/routes/cv/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import Icon from '@iconify/svelte'
import cv from './cv-data.yml'
export let data
const email = `janosh@lbl.gov`
const links = { target: `_blank`, rel: `noreferrer` }
Expand Down Expand Up @@ -73,16 +74,17 @@
<section class="body">
<small>
I joined the Materials Project in early 2023 where I build high-throughput workflows
for generating large DFT and ML potential datasets. I am a core maintainer of
for generating large DFT datasets. I am a core maintainer of
<a href="https://github.com/materialsproject/pymatgen">pymatgen</a>
and enjoy building infrastructure around high-quality open source software that enables
new capabilities in computational materials to scale.
and enjoy building high-quality open source software that enables new capabilities in computational
materials to scale. In particular, my current interests are on further development, training
and benchmarking of universal interatomic potentials.
</small>
<h2>
<Icon inline icon="zondicons:education" />&nbsp; Education
</h2>
<ul>
{#each cv.education as { title, thesis_title, date, href, uni }}
{#each data.cv.education as { title, thesis_title, date, href, uni }}
<li>
<h4>
<a {href}>{title}</a>
Expand All @@ -97,7 +99,7 @@
<Icon inline icon="iconoir:journal" />&nbsp; Selected Publications
</h2>
<ul>
{#each cv.publications as { title, authors, journal, date, url: href, arxiv }}
{#each data.cv.publications as { title, authors, journal, date, url: href, arxiv }}
{@const year = new Date(date).getFullYear()}
<li>
<h4>{title}</h4>
Expand All @@ -121,7 +123,7 @@
<!-- <small>only lead dev repos</small> -->
</h2>
<ul>
{#each cv.projects as { url, img_style, github, name, description, stars, logo }}
{#each data.cv.projects as { url, img_style, github, name, description, stars, logo }}
{@const logo_url = logo ?? `${url}/favicon.svg`}
<li>
<h4>
Expand All @@ -147,7 +149,7 @@
<Icon inline icon="mdi:trophy" />&nbsp; Awards
</h2>
<ul>
{#each cv.awards as { name, description, date, href }}
{#each data.cv.awards as { name, description, date, href }}
<li>
<h4><a {href}>{name}</a></h4>
<p>{description} <small>{date}</small></p>
Expand All @@ -159,7 +161,7 @@
<Icon inline icon="material-symbols:volunteer-activism" />&nbsp; Volunteer Work
</h2>
<ul>
{#each cv.volunteer as { name, description, href, logo, role }}
{#each data.cv.volunteer as { name, description, href, logo, role }}
<li>
<h4>
<a {href}><img src={logo} alt={name} height="20" />{name}</a>
Expand All @@ -176,7 +178,7 @@
<Icon inline icon="lucide:languages" />&nbsp; Languages
</h3>
<ul>
{#each cv.languages as { name, level }}
{#each data.cv.languages as { name, level }}
<li>
{name}
<Icon inline icon="carbon:skill-level-{level}" />
Expand All @@ -187,7 +189,7 @@
<h3>
<Icon inline icon="mdi:earth" />&nbsp; Nationality
<ul>
{#each cv.nationality as nat}
{#each data.cv.nationality as nat}
<li>{nat}</li>
{/each}
</ul>
Expand All @@ -197,7 +199,7 @@
<Icon inline icon="carbon:skill-level-advanced" />&nbsp; Skills
</h3>
<ul class="skills">
{#each cv.skills as { name, icon, score, href }}
{#each data.cv.skills as { name, icon, score, href }}
<!-- color based on score style="color: hsl({score * 20}, 100%, 40%)" -->
<li style:font-weight={(score - 3) * 100}>
<a {href}>
Expand All @@ -213,7 +215,7 @@
<Icon inline icon="material-symbols:interests" />&nbsp; Hobbies
</h3>
<ul>
{#each cv.hobbies as { name, icon, href }}
{#each data.cv.hobbies as { name, icon, href }}
<li>
<a {href}>
<Icon inline {icon} />
Expand All @@ -228,7 +230,7 @@
&nbsp; Memberships
</h3>
<ul>
{#each cv.memberships as { name, date, href }}
{#each data.cv.memberships as { name, date, href }}
<li>
<a {href}>{name}</a>&ensp;<small>{date}</small>
</li>
Expand Down
21 changes: 21 additions & 0 deletions src/routes/cv/+page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import cv from './cv.yml'

export const load = async ({ fetch }) => {
// fetch the number of GitHub stars for each repo the projects array in cv.yml

const token = import.meta.env.VITE_GITHUB_TOKEN

for (const project of cv.projects) {
const handle = project.github.replace(`https://github.com/`, ``)

const response = await fetch(`https://api.github.com/repos/${handle}`, {
headers: {
Authorization: `token ${token}`,
},
})
const json = await response.json()
project.stars = json.stargazers_count
}

return { cv }
}
10 changes: 4 additions & 6 deletions src/routes/cv/cv-data.yml → src/routes/cv/cv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,38 +61,36 @@ projects:
img_style: 'filter: invert(1);'
github: https://github.com/janosh/matbench-discovery
description: Benchmark for machine learning energy models simulating a real-world materials discovery campaign. Interactive leader board and Python package make new model submissions easy.
- name: CHGNet
url: https://chgnet.lbl.gov
github: https://github.com/CederGroupHub/chgnet
description: Pretrained universal neural network potential for charge-informed atomistic modeling. Published on the cover of Nature Machine Intelligence.
- name: Elementari
url: https://elementari.janosh.dev
github: https://github.com/janosh/elementari
description: A library of Svelte components for building interactive web apps with performant chemistry visualizations like periodic tables, Bohr atoms, nuclei, heatmaps, scatter plots.
stars: 49
- name: pymatviz
url: https://pymatviz.janosh.dev
img_style: 'filter: invert(1);'
github: https://github.com/janosh/pymatviz
description: A toolkit for visualizations in materials informatics to complement pymatgen.
stars: 48
- name: Tensorboard Reducer
github: https://github.com/janosh/tensorboard-reducer
logo: https://raw.githubusercontent.com/janosh/tensorboard-reducer/main/assets/tensorboard-reducer-square.svg
description: Reduce multiple PyTorch TensorBoard runs to new events/CSV/JSON. Good for model ensembles.
stars: 51
pypi: https://pypi.org/project/tensorboard-reducer
- name: Aviary
github: https://github.com/CompRhys/aviary
logo: https://raw.githubusercontent.com/janosh/tikz/main/assets/aviary/aviary.svg
description: Multiple ML energy model implementations (Roost, Wren, CGCNN, Wrenformer) with a consistent API.
stars: 21
pypi: https://pypi.org/project/tensorboard-reducer
- name: Normalizing Flows
github: https://github.com/janosh/awesome-normalizing-flows
stars: 983
logo: https://api.iconify.design/logos:awesome.svg?color=%23888888
description: Curated list of resources for learning and using normalizing flows, a powerful tool in ML for modeling probability distributions.
- name: MultiSelect
url: https://multiselect.janosh.dev
github: https://github.com/janosh/svelte-multiselect
stars: 146
description: Keyboard-friendly, accessible and customizable multi-select web component.

skills:
Expand Down

0 comments on commit c2324ba

Please sign in to comment.