Office 630
+19 West 4th Street
+New York, NY 10003
-news: true # includes a list of news items +news: false # includes a list of news items selected_papers: true # includes a list of papers marked as "selected={true}" social: true # includes social icons at the bottom of the page --- diff --git a/_pages/cv.md b/_pages/cv.md index ad3e26ddd234..15ebc5fb88aa 100644 --- a/_pages/cv.md +++ b/_pages/cv.md @@ -4,8 +4,8 @@ permalink: /cv/ title: cv nav: true nav_order: 5 -cv_pdf: example_pdf.pdf -description: This is a description of the page. You can modify it in '_pages/cv.md'. You can also change or remove the top pdf download button. +cv_pdf: cv.pdf +description: toc: sidebar: left --- diff --git a/_pages/teaching.md b/_pages/teaching.md index 4af2f4fd98f8..7e8d0403200e 100644 --- a/_pages/teaching.md +++ b/_pages/teaching.md @@ -1,20 +1,21 @@ --- layout: page permalink: /teaching/ -title: teaching -description: Courses +title: Teaching +description: nav: true nav_order: 6 --- # Teaching Assistance ## Graduate -* Information theory: held review sessions -* Algorithmic game theory: Designed problem sets and graded them -* Social and economic networks: Designed problem sets and graded them +* Information theory +* Algorithmic Game Theory +* Social and Economic Networks ## Undergraduate:. -* Probability and Statistics: held review sessions-Designed problem sets and graded them -* Advanced Programming: Designed problem sets and graded them -* Numerical methods: Designed problem sets and graded them +* Introduction to Econometrics +* Probability and Statistics +* Advanced Programming +* Numerical methods diff --git a/_posts/2015-10-20-disqus-comments.md b/_posts/2015-10-20-disqus-comments.md deleted file mode 100644 index cf5388403a17..000000000000 --- a/_posts/2015-10-20-disqus-comments.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -layout: post -title: a post with disqus comments -date: 2015-10-20 11:59:00-0400 -description: an example of a blog post with disqus comments -tags: comments -categories: sample-posts external-services -disqus_comments: true -related_posts: false ---- - -This post shows how to add DISQUS comments. diff --git a/_posts/2022-12-10-giscus-comments.md b/_posts/2022-12-10-giscus-comments.md deleted file mode 100644 index 72e08474a3bd..000000000000 --- a/_posts/2022-12-10-giscus-comments.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -layout: post -title: a post with giscus comments -date: 2022-12-10 11:59:00-0400 -description: an example of a blog post with giscus comments -tags: comments -categories: sample-posts external-services -giscus_comments: true -related_posts: false ---- - -This post shows how to add GISCUS comments. diff --git a/_posts/2023-03-20-table-of-contents.md b/_posts/2023-03-20-table-of-contents.md deleted file mode 100644 index ec91cd33f5f9..000000000000 --- a/_posts/2023-03-20-table-of-contents.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -layout: post -title: a post with table of contents -date: 2023-03-20 11:59:00-0400 -description: an example of a blog post with table of contents -tags: formatting toc -categories: sample-posts -giscus_comments: true -related_posts: false -toc: - beginning: true ---- - -This post shows how to add a table of contents in the beginning of the post. - -## Adding a Table of Contents - -To add a table of contents to a post, simply add - -```yml -toc: - beginning: true -``` - -to the front matter of the post. The table of contents will be automatically generated from the headings in the post. - -### Example of Sub-Heading 1 - -Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. - -### Example of another Sub-Heading 1 - -Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. - -## Table of Contents Options - -If you want to learn more about how to customize the table of contents, you can check the [jekyll-toc](https://github.com/toshimaru/jekyll-toc) repository. - -### Example of Sub-Heading 2 - -Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. - -### Example of another Sub-Heading 2 - -Jean shorts raw denim Vice normcore, art party High Life PBR skateboard stumptown vinyl kitsch. Four loko meh 8-bit, tousled banh mi tilde forage Schlitz dreamcatcher twee 3 wolf moon. Chambray asymmetrical paleo salvia, sartorial umami four loko master cleanse drinking vinegar brunch. Pinterest DIY authentic Schlitz, hoodie Intelligentsia butcher trust fund brunch shabby chic Kickstarter forage flexitarian. Direct trade cold-pressed meggings stumptown plaid, pop-up taxidermy. Hoodie XOXO fingerstache scenester Echo Park. Plaid ugh Wes Anderson, freegan pug selvage fanny pack leggings pickled food truck DIY irony Banksy. diff --git a/_posts/2023-03-21-tables.md b/_posts/2023-03-21-tables.md deleted file mode 100644 index da1d7e89d6a5..000000000000 --- a/_posts/2023-03-21-tables.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -layout: post -title: displaying beautiful tables with Bootstrap Tables -date: 2023-03-20 14:37:00-0400 -description: an example of how to use Bootstrap Tables -tags: formatting tables -categories: sample-posts -giscus_comments: true -related_posts: true -pretty_table: true ---- - -Using markdown to display tables is easy. Just use the following syntax: - -```markdown -| Left aligned | Center aligned | Right aligned | -| :----------- | :------------: | ------------: | -| Left 1 | center 1 | right 1 | -| Left 2 | center 2 | right 2 | -| Left 3 | center 3 | right 3 | -``` - -That will generate: - -| Left aligned | Center aligned | Right aligned | -| :----------- | :------------: | ------------: | -| Left 1 | center 1 | right 1 | -| Left 2 | center 2 | right 2 | -| Left 3 | center 3 | right 3 | - - - -It is also possible to use HTML to display tables. For example, the following HTML code will display a table with [Bootstrap Table](https://bootstrap-table.com/), loaded from a JSON file: - -{% raw %} - -```html -ID | -Item Name | -Item Price | -
---|
ID | -Item Name | -Item Price | -
---|
- | ID | -Item Name | -Item Price | -
---|
- | ID | -Item Name | -Item Price | -
---|
Sorry, the notebook you are looking for does not exist.
-{% endif %} -{:/nomarkdown} -``` - -{% endraw %} - -Let's break it down: this is possible thanks to [Jekyll Jupyter Notebook plugin](https://github.com/red-data-tools/jekyll-jupyter-notebook) that allows you to embed jupyter notebooks in your posts. It basically calls [`jupyter nbconvert --to html`](https://nbconvert.readthedocs.io/en/latest/usage.html#convert-html) to convert the notebook to an html page and then includes it in the post. Since [Kramdown](https://jekyllrb.com/docs/configuration/markdown/) is the default Markdown renderer for Jekyll, we need to surround the call to the plugin with the [::nomarkdown](https://kramdown.gettalong.org/syntax.html#extensions) tag so that it stops processing this part with Kramdown and outputs the content as-is. - -The plugin takes as input the path to the notebook, but it assumes the file exists. If you want to check if the file exists before calling the plugin, you can use the `file_exists` filter. This avoids getting a 404 error from the plugin and ending up displaying the main page inside of it instead. If the file does not exist, you can output a message to the user. The code displayed above outputs the following: - -{::nomarkdown} -{% assign jupyter_path = "assets/jupyter/blog.ipynb" | relative_url %} -{% capture notebook_exists %}{% file_exists assets/jupyter/blog.ipynb %}{% endcapture %} -{% if notebook_exists == "true" %} -{% jupyter_notebook jupyter_path %} -{% else %} - -Sorry, the notebook you are looking for does not exist.
-{% endif %} -{:/nomarkdown} - -Note that the jupyter notebook supports both light and dark themes. diff --git a/_posts/2023-07-12-post-bibliography.md b/_posts/2023-07-12-post-bibliography.md deleted file mode 100644 index 168356c8ba03..000000000000 --- a/_posts/2023-07-12-post-bibliography.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -layout: post -title: a post with bibliography -date: 2023-07-12 09:56:00-0400 -description: an example of a blog post with bibliography -tags: formatting bib -categories: sample-posts -giscus_comments: true -related_posts: false -related_publications: true ---- - -This post shows how to add bibliography to simple blog posts. We support every citation style that [jekyll-scholar](https://github.com/inukshuk/jekyll-scholar) does. That means simple citation like {% cite einstein1950meaning %}, multiple citations like {% cite einstein1950meaning einstein1905movement %}, long references like {% reference einstein1905movement %} or also quotes: - -{% quote einstein1905electrodynamics %} -Lorem ipsum dolor sit amet, consectetur adipisicing elit, -sed do eiusmod tempor. - -Lorem ipsum dolor sit amet, consectetur adipisicing. -{% endquote %} - -If you would like something more academic, check the [distill style post]({% post_url 2018-12-22-distill %}). diff --git a/_posts/2023-12-12-tikzjax.md b/_posts/2023-12-12-tikzjax.md deleted file mode 100644 index a0df3313bacb..000000000000 --- a/_posts/2023-12-12-tikzjax.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -layout: post -title: a post with TikZJax -date: 2023-12-12 22:25:00 -description: this is what included TikZ code could look like -tags: formatting diagrams -categories: sample-posts -tikzjax: true ---- - -This is an example post with TikZ code. TikZJax converts script tags (containing TikZ code) into SVGs. - - diff --git a/_posts/2024-01-26-chartjs.md b/_posts/2024-01-26-chartjs.md deleted file mode 100644 index 210557d6df1f..000000000000 --- a/_posts/2024-01-26-chartjs.md +++ /dev/null @@ -1,188 +0,0 @@ ---- -layout: post -title: a post with chart.js -date: 2024-01-26 01:04:00 -description: this is what included chart.js code could look like -tags: formatting charts -categories: sample-posts -chart: - chartjs: true ---- - -This is an example post with some [chart.js](https://www.chartjs.org/) code. - -````markdown -```chartjs -{ - "type": "line", - "data": { - "labels": [ - "January", - "February", - "March", - "April", - "May", - "June", - "July" - ], - "datasets": [ - { - "label": "# of bugs", - "fill": false, - "lineTension": 0.1, - "backgroundColor": "rgba(75,192,192,0.4)", - "borderColor": "rgba(75,192,192,1)", - "borderCapStyle": "butt", - "borderDash": [], - "borderDashOffset": 0, - "borderJoinStyle": "miter", - "pointBorderColor": "rgba(75,192,192,1)", - "pointBackgroundColor": "#fff", - "pointBorderWidth": 1, - "pointHoverRadius": 5, - "pointHoverBackgroundColor": "rgba(75,192,192,1)", - "pointHoverBorderColor": "rgba(220,220,220,1)", - "pointHoverBorderWidth": 2, - "pointRadius": 1, - "pointHitRadius": 10, - "data": [ - 65, - 59, - 80, - 81, - 56, - 55, - 40 - ], - "spanGaps": false - } - ] - }, - "options": {} -} -``` -```` - -This is how it looks like: - -```chartjs -{ - "type": "line", - "data": { - "labels": [ - "January", - "February", - "March", - "April", - "May", - "June", - "July" - ], - "datasets": [ - { - "label": "# of bugs", - "fill": false, - "lineTension": 0.1, - "backgroundColor": "rgba(75,192,192,0.4)", - "borderColor": "rgba(75,192,192,1)", - "borderCapStyle": "butt", - "borderDash": [], - "borderDashOffset": 0, - "borderJoinStyle": "miter", - "pointBorderColor": "rgba(75,192,192,1)", - "pointBackgroundColor": "#fff", - "pointBorderWidth": 1, - "pointHoverRadius": 5, - "pointHoverBackgroundColor": "rgba(75,192,192,1)", - "pointHoverBorderColor": "rgba(220,220,220,1)", - "pointHoverBorderWidth": 2, - "pointRadius": 1, - "pointHitRadius": 10, - "data": [ - 65, - 59, - 80, - 81, - 56, - 55, - 40 - ], - "spanGaps": false - } - ] - }, - "options": {} -} -``` - -Also another example chart. - -````markdown -```chartjs -{ - "type": "doughnut", - "data": { - "labels": [ - "Red", - "Blue", - "Yellow" - ], - "datasets": [ - { - "data": [ - 300, - 50, - 100 - ], - "backgroundColor": [ - "#FF6384", - "#36A2EB", - "#FFCE56" - ], - "hoverBackgroundColor": [ - "#FF6384", - "#36A2EB", - "#FFCE56" - ] - } - ] - }, - "options": {} -} -``` -```` - -Which generates: - -```chartjs -{ - "type": "doughnut", - "data": { - "labels": [ - "Red", - "Blue", - "Yellow" - ], - "datasets": [ - { - "data": [ - 300, - 50, - 100 - ], - "backgroundColor": [ - "#FF6384", - "#36A2EB", - "#FFCE56" - ], - "hoverBackgroundColor": [ - "#FF6384", - "#36A2EB", - "#FFCE56" - ] - } - ] - }, - "options": {} -} -``` diff --git a/_posts/2024-01-26-echarts.md b/_posts/2024-01-26-echarts.md deleted file mode 100644 index b496288d05ef..000000000000 --- a/_posts/2024-01-26-echarts.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -layout: post -title: a post with echarts -date: 2024-01-26 16:03:00 -description: this is what included echarts code could look like -tags: formatting charts -categories: sample-posts -chart: - echarts: true ---- - -This is an example post with some [echarts](https://echarts.apache.org/) code. - -````markdown -```echarts -{ - "title": { - "text": "ECharts Getting Started Example" - }, - "responsive": true, - "tooltip": {}, - "legend": { - "top": "30px", - "data": ["sales"] - }, - "xAxis": { - "data": ["Shirts", "Cardigans", "Chiffons", "Pants", "Heels", "Socks"] - }, - "yAxis": {}, - "series": [ - { - "name": "sales", - "type": "bar", - "data": [5, 20, 36, 10, 10, 20] - } - ] -} -``` -```` - -Which generates: - -```echarts -{ - "title": { - "text": "ECharts Getting Started Example" - }, - "responsive": true, - "tooltip": {}, - "legend": { - "top": "30px", - "data": ["sales"] - }, - "xAxis": { - "data": ["Shirts", "Cardigans", "Chiffons", "Pants", "Heels", "Socks"] - }, - "yAxis": {}, - "series": [ - { - "name": "sales", - "type": "bar", - "data": [5, 20, 36, 10, 10, 20] - } - ] -} -``` - -Note that this library offer support for both light and dark themes. You can switch between them using the theme switcher in the top right corner of the page. diff --git a/_posts/2024-01-26-geojson-map.md b/_posts/2024-01-26-geojson-map.md deleted file mode 100644 index 6909aee64e02..000000000000 --- a/_posts/2024-01-26-geojson-map.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -layout: post -title: a post with geojson -date: 2024-01-26 17:57:00 -description: this is what included geojson code could look like -tags: formatting charts maps -categories: sample-posts -map: true ---- - -This is an example post with some [geojson](https://geojson.org/) code. The support is provided thanks to [Leaflet](https://leafletjs.com/). To create your own visualization, go to [geojson.io](https://geojson.io/). - -````markdown -```geojson -{ - "type": "FeatureCollection", - "features": [ - { - "type": "Feature", - "properties": {}, - "geometry": { - "coordinates": [ - [ - [ - -60.11363029935569, - -2.904625022183211 - ], - [ - -60.11363029935569, - -3.162613728707967 - ], - [ - -59.820894493858034, - -3.162613728707967 - ], - [ - -59.820894493858034, - -2.904625022183211 - ], - [ - -60.11363029935569, - -2.904625022183211 - ] - ] - ], - "type": "Polygon" - } - } - ] -} -``` -```` - -Which generates: - -```geojson -{ - "type": "FeatureCollection", - "features": [ - { - "type": "Feature", - "properties": {}, - "geometry": { - "coordinates": [ - [ - [ - -60.11363029935569, - -2.904625022183211 - ], - [ - -60.11363029935569, - -3.162613728707967 - ], - [ - -59.820894493858034, - -3.162613728707967 - ], - [ - -59.820894493858034, - -2.904625022183211 - ], - [ - -60.11363029935569, - -2.904625022183211 - ] - ] - ], - "type": "Polygon" - } - } - ] -} -``` diff --git a/_posts/2024-01-27-advanced-images.md b/_posts/2024-01-27-advanced-images.md deleted file mode 100644 index 3baa160bb07c..000000000000 --- a/_posts/2024-01-27-advanced-images.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -layout: post -title: a post with advanced image components -date: 2024-01-27 11:46:00 -description: this is what advanced image components could look like -tags: formatting images -categories: sample-posts -thumbnail: assets/img/9.jpg -images: - compare: true - slider: true ---- - -This is an example post with advanced image components. - -## Image Slider - -This is a simple image slider. It uses the [Swiper](https://swiperjs.com/) library. Check the [examples page](https://swiperjs.com/demos) for more information of what you can achieve with it. - -{{myName}}
'); -+ -+ var config = {templates: {'generic-empty-diff': emptyDiffTemplate}}; -+ var hoganUtils = new (require('../src/hoganjs-utils.js').HoganJsUtils)(config); -+ var result = hoganUtils.render('generic', 'empty-diff', {myName: 'Rodrigo Fernandes'}); -+ assert.equal('Rodrigo Fernandes
', result); -+ }); - }); - }); -diff --git a/test/line-by-line-tests.js b/test/line-by-line-tests.js -index 1cd92073..8869b3df 100644 ---- a/test/line-by-line-tests.js -+++ b/test/line-by-line-tests.js -@@ -14,7 +14,7 @@ describe('LineByLinePrinter', function() { - ' File without changes\n' + - ' \n' + - ' \n' + -- '\n'; -+ ''; - - assert.equal(expected, fileHtml); - }); -@@ -422,7 +422,6 @@ describe('LineByLinePrinter', function() { - ' \n' + - ' \n' + - '\n' + -- '\n' + - ' \n' + - ' \n' + - ' \n' + -diff --git a/test/side-by-side-printer-tests.js b/test/side-by-side-printer-tests.js -index 76625f8e..771daaa5 100644 ---- a/test/side-by-side-printer-tests.js -+++ b/test/side-by-side-printer-tests.js -@@ -14,7 +14,7 @@ describe('SideBySidePrinter', function() { - ' File without changes\n' + - ' \n' + - ' \n' + -- '\n'; -+ ''; - - assert.equal(expectedRight, fileHtml.right); - assert.equal(expectedLeft, fileHtml.left); -@@ -324,7 +324,6 @@ describe('SideBySidePrinter', function() { - ' \n' + - ' \n' + - '\n' + -- '\n' + - ' \n' + - ' \n' + - ' \n' + - -From f3cadb96677d0eb82fc2752dc3ffbf35ca9b5bdb Mon Sep 17 00:00:00 2001 -From: Rodrigo Fernandes{{myName}}
'); - - var config = {templates: {'generic-empty-diff': emptyDiffTemplate}}; -@@ -44,5 +44,27 @@ describe('HoganJsUtils', function() { - var result = hoganUtils.render('generic', 'empty-diff', {myName: 'Rodrigo Fernandes'}); - assert.equal('Rodrigo Fernandes
', result); - }); -+ -+ it('should allow templates to be overridden with uncompiled templates', function() { -+ var emptyDiffTemplate = '{{myName}}
'; -+ -+ var config = {rawTemplates: {'generic-empty-diff': emptyDiffTemplate}}; -+ var hoganUtils = new (require('../src/hoganjs-utils.js').HoganJsUtils)(config); -+ var result = hoganUtils.render('generic', 'empty-diff', {myName: 'Rodrigo Fernandes'}); -+ assert.equal('Rodrigo Fernandes
', result); -+ }); -+ -+ it('should allow templates to be overridden giving priority to compiled templates', function() { -+ var emptyDiffTemplate = HoganJsUtils.compile('{{myName}}
'); -+ var emptyDiffTemplateUncompiled = 'Not used!
'; -+ -+ var config = { -+ templates: {'generic-empty-diff': emptyDiffTemplate}, -+ rawTemplates: {'generic-empty-diff': emptyDiffTemplateUncompiled} -+ }; -+ var hoganUtils = new (require('../src/hoganjs-utils.js').HoganJsUtils)(config); -+ var result = hoganUtils.render('generic', 'empty-diff', {myName: 'Rodrigo Fernandes'}); -+ assert.equal('Rodrigo Fernandes
', result); -+ }); - }); - }); -``` diff --git a/_posts/2024-01-27-vega-lite.md b/_posts/2024-01-27-vega-lite.md deleted file mode 100644 index 099eb88f6940..000000000000 --- a/_posts/2024-01-27-vega-lite.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -layout: post -title: a post with vega lite -date: 2024-01-27 00:20:00 -last_updated: 2024-04-14 04:30:00 -description: this is what included vega lite code could look like -tags: formatting charts -categories: sample-posts -chart: - vega_lite: true ---- - -This is an example post with some [vega lite](https://vega.github.io/vega-lite/) code. - -````markdown -```vega_lite -{ - "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "description": "A dot plot showing each movie in the database, and the difference from the average movie rating. The display is sorted by year to visualize everything in sequential order. The graph is for all Movies before 2019.", - "data": { - "url": "https://raw.githubusercontent.com/vega/vega/main/docs/data/movies.json" - }, - "transform": [ - {"filter": "datum['IMDB Rating'] != null"}, - {"filter": {"timeUnit": "year", "field": "Release Date", "range": [null, 2019]}}, - { - "joinaggregate": [{ - "op": "mean", - "field": "IMDB Rating", - "as": "AverageRating" - }] - }, - { - "calculate": "datum['IMDB Rating'] - datum.AverageRating", - "as": "RatingDelta" - } - ], - "mark": "point", - "encoding": { - "x": { - "field": "Release Date", - "type": "temporal" - }, - "y": { - "field": "RatingDelta", - "type": "quantitative", - "title": "Rating Delta" - }, - "color": { - "field": "RatingDelta", - "type": "quantitative", - "scale": {"domainMid": 0}, - "title": "Rating Delta" - } - } -} -``` -```` - -Which generates: - -```vega_lite -{ - "$schema": "https://vega.github.io/schema/vega-lite/v5.json", - "description": "A dot plot showing each movie in the database, and the difference from the average movie rating. The display is sorted by year to visualize everything in sequential order. The graph is for all Movies before 2019.", - "data": { - "url": "https://raw.githubusercontent.com/vega/vega/main/docs/data/movies.json" - }, - "transform": [ - {"filter": "datum['IMDB Rating'] != null"}, - {"filter": {"timeUnit": "year", "field": "Release Date", "range": [null, 2019]}}, - { - "joinaggregate": [{ - "op": "mean", - "field": "IMDB Rating", - "as": "AverageRating" - }] - }, - { - "calculate": "datum['IMDB Rating'] - datum.AverageRating", - "as": "RatingDelta" - } - ], - "mark": "point", - "encoding": { - "x": { - "field": "Release Date", - "type": "temporal" - }, - "y": { - "field": "RatingDelta", - "type": "quantitative", - "title": "Rating Delta" - }, - "color": { - "field": "RatingDelta", - "type": "quantitative", - "scale": {"domainMid": 0}, - "title": "Rating Delta" - } - } -} -``` - -This plot supports both light and dark themes. diff --git a/_posts/2024-04-15-pseudocode.md b/_posts/2024-04-15-pseudocode.md deleted file mode 100644 index d7ff18b86334..000000000000 --- a/_posts/2024-04-15-pseudocode.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -layout: post -title: a post with pseudo code -date: 2024-04-15 00:01:00 -description: this is what included pseudo code could look like -tags: formatting code -categories: sample-posts -pseudocode: true ---- - -This is an example post with some pseudo code rendered by [pseudocode](https://github.com/SaswatPadhi/pseudocode.js). The example presented here is the same as the one in the [pseudocode.js](https://saswat.padhi.me/pseudocode.js/) documentation, with only one simple but important change: everytime you would use `$`, you should use `$$` instead. Also, note that the `pseudocode` key in the front matter is set to `true` to enable the rendering of pseudo code. As an example, using this code: - -````markdown -```pseudocode -% This quicksort algorithm is extracted from Chapter 7, Introduction to Algorithms (3rd edition) -\begin{algorithm} -\caption{Quicksort} -\begin{algorithmic} -\PROCEDURE{Quicksort}{$$A, p, r$$} - \IF{$$p < r$$} - \STATE $$q = $$ \CALL{Partition}{$$A, p, r$$} - \STATE \CALL{Quicksort}{$$A, p, q - 1$$} - \STATE \CALL{Quicksort}{$$A, q + 1, r$$} - \ENDIF -\ENDPROCEDURE -\PROCEDURE{Partition}{$$A, p, r$$} - \STATE $$x = A[r]$$ - \STATE $$i = p - 1$$ - \FOR{$$j = p$$ \TO $$r - 1$$} - \IF{$$A[j] < x$$} - \STATE $$i = i + 1$$ - \STATE exchange - $$A[i]$$ with $$A[j]$$ - \ENDIF - \STATE exchange $$A[i]$$ with $$A[r]$$ - \ENDFOR -\ENDPROCEDURE -\end{algorithmic} -\end{algorithm} -``` -```` - -Generates: - -```pseudocode -% This quicksort algorithm is extracted from Chapter 7, Introduction to Algorithms (3rd edition) -\begin{algorithm} -\caption{Quicksort} -\begin{algorithmic} -\PROCEDURE{Quicksort}{$$A, p, r$$} - \IF{$$p < r$$} - \STATE $$q = $$ \CALL{Partition}{$$A, p, r$$} - \STATE \CALL{Quicksort}{$$A, p, q - 1$$} - \STATE \CALL{Quicksort}{$$A, q + 1, r$$} - \ENDIF -\ENDPROCEDURE -\PROCEDURE{Partition}{$$A, p, r$$} - \STATE $$x = A[r]$$ - \STATE $$i = p - 1$$ - \FOR{$$j = p$$ \TO $$r - 1$$} - \IF{$$A[j] < x$$} - \STATE $$i = i + 1$$ - \STATE exchange - $$A[i]$$ with $$A[j]$$ - \ENDIF - \STATE exchange $$A[i]$$ with $$A[r]$$ - \ENDFOR -\ENDPROCEDURE -\end{algorithmic} -\end{algorithm} -``` diff --git a/_posts/2024-04-28-post-citation.md b/_posts/2024-04-28-post-citation.md deleted file mode 100644 index 4b47a27fca18..000000000000 --- a/_posts/2024-04-28-post-citation.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -layout: post -title: a post that can be cited -date: 2024-04-28 15:06:00 -description: this is what a post that can be cited looks like -tags: formatting citation -categories: sample-posts -citation: true ---- - -This is an example post that can be cited. The content of the post ends here, while the citation information is automatically provided below. The only thing needed is for you to set the `citation` key in the front matter to `true`. diff --git a/_posts/2024-04-29-typograms.md b/_posts/2024-04-29-typograms.md deleted file mode 100644 index 6caff4e67a65..000000000000 --- a/_posts/2024-04-29-typograms.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -layout: post -title: a post with typograms -date: 2024-04-29 23:36:10 -description: this is what included typograms code could look like -tags: formatting diagrams -categories: sample-posts -typograms: true ---- - -This is an example post with some [typograms](https://github.com/google/typograms/) code. - -````markdown -```typograms -+----+ -| |---> My first diagram! -+----+ -``` -```` - -Which generates: - -```typograms -+----+ -| |---> My first diagram! -+----+ -``` - -Another example: - -````markdown -```typograms -.------------------------. -|.----------------------.| -||"https://example.com" || -|'----------------------'| -| ______________________ | -|| || -|| Welcome! || -|| || -|| || -|| .----------------. || -|| | username | || -|| '----------------' || -|| .----------------. || -|| |"*******" | || -|| '----------------' || -|| || -|| .----------------. || -|| | "Sign-up" | || -|| '----------------' || -|| || -|+----------------------+| -.------------------------. -``` -```` - -which generates: - -```typograms -.------------------------. -|.----------------------.| -||"https://example.com" || -|'----------------------'| -| ______________________ | -|| || -|| Welcome! || -|| || -|| || -|| .----------------. || -|| | username | || -|| '----------------' || -|| .----------------. || -|| |"*******" | || -|| '----------------' || -|| || -|| .----------------. || -|| | "Sign-up" | || -|| '----------------' || -|| || -|+----------------------+| -.------------------------. -``` - -For more examples, check out the [typograms documentation](https://google.github.io/typograms/#examples). diff --git a/_posts/2024-05-01-tabs.md b/_posts/2024-05-01-tabs.md deleted file mode 100644 index f3d6e2d2211e..000000000000 --- a/_posts/2024-05-01-tabs.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -layout: post -title: a post with tabs -date: 2024-05-01 00:32:13 -description: this is what included tabs in a post could look like -tags: formatting code -categories: sample-posts -tabs: true ---- - -This is how a post with [tabs](https://github.com/Ovski4/jekyll-tabs) looks like. Note that the tabs could be used for different purposes, not only for code. - -## First tabs - -To add tabs, use the following syntax: - -{% raw %} - -```liquid -{% tabs group-name %} - -{% tab group-name tab-name-1 %} - -Content 1 - -{% endtab %} - -{% tab group-name tab-name-2 %} - -Content 2 - -{% endtab %} - -{% endtabs %} -``` - -{% endraw %} - -With this you can generate visualizations like: - -{% tabs log %} - -{% tab log php %} - -```php -var_dump('hello'); -``` - -{% endtab %} - -{% tab log js %} - -```javascript -console.log("hello"); -``` - -{% endtab %} - -{% tab log ruby %} - -```javascript -pputs 'hello' -``` - -{% endtab %} - -{% endtabs %} - -## Another example - -{% tabs data-struct %} - -{% tab data-struct yaml %} - -```yaml -hello: - - "whatsup" - - "hi" -``` - -{% endtab %} - -{% tab data-struct json %} - -```json -{ - "hello": ["whatsup", "hi"] -} -``` - -{% endtab %} - -{% endtabs %} - -## Tabs for something else - -{% tabs something-else %} - -{% tab something-else text %} - -Regular text - -{% endtab %} - -{% tab something-else quote %} - -> A quote - -{% endtab %} - -{% tab something-else list %} - -Hipster list - -- brunch -- fixie -- raybans -- messenger bag - -{% endtab %} - -{% endtabs %} diff --git a/_posts/_2018-12-22-distill.md b/_posts/_2018-12-22-distill.md deleted file mode 100644 index 6fa2e8d8002b..000000000000 --- a/_posts/_2018-12-22-distill.md +++ /dev/null @@ -1,321 +0,0 @@ ---- -layout: distill -title: a distill-style blog post -description: an example of a distill-style blog post and main elements -tags: distill formatting -giscus_comments: true -date: 2021-05-22 -featured: true - -authors: - - name: Albert Einstein - url: "https://en.wikipedia.org/wiki/Albert_Einstein" - affiliations: - name: IAS, Princeton - - name: Boris Podolsky - url: "https://en.wikipedia.org/wiki/Boris_Podolsky" - affiliations: - name: IAS, Princeton - - name: Nathan Rosen - url: "https://en.wikipedia.org/wiki/Nathan_Rosen" - affiliations: - name: IAS, Princeton - -bibliography: 2018-12-22-distill.bib - -# Optionally, you can add a table of contents to your post. -# NOTES: -# - make sure that TOC names match the actual section names -# for hyperlinks within the post to work correctly. -# - we may want to automate TOC generation in the future using -# jekyll-toc plugin (https://github.com/toshimaru/jekyll-toc). -toc: - - name: Equations - # if a section has subsections, you can add them as follows: - # subsections: - # - name: Example Child Subsection 1 - # - name: Example Child Subsection 2 - - name: Citations - - name: Footnotes - - name: Code Blocks - - name: Interactive Plots - - name: Layouts - - name: Other Typography? - -# Below is an example of injecting additional post-specific styles. -# If you use this post as a template, delete this _styles block. -_styles: > - .fake-img { - background: #bbb; - border: 1px solid rgba(0, 0, 0, 0.1); - box-shadow: 0 0px 4px rgba(0, 0, 0, 0.1); - margin-bottom: 12px; - } - .fake-img p { - font-family: monospace; - color: white; - text-align: left; - margin: 12px 0; - text-align: center; - font-size: 16px; - } ---- - -## Equations - -This theme supports rendering beautiful math in inline and display modes using [MathJax 3](https://www.mathjax.org/) engine. -You just need to surround your math expression with `$$`, like `$$ E = mc^2 $$`. -If you leave it inside a paragraph, it will produce an inline expression, just like $$ E = mc^2 $$. - -To use display mode, again surround your expression with `$$` and place it as a separate paragraph. -Here is an example: - -$$ -\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) -$$ - -Note that MathJax 3 is [a major re-write of MathJax](https://docs.mathjax.org/en/latest/upgrading/whats-new-3.0.html) that brought a significant improvement to the loading and rendering speed, which is now [on par with KaTeX](http://www.intmath.com/cg5/katex-mathjax-comparison.php). - ---- - -## Citations - -Citations are then used in the article body with the `.l-body
-.l-page
-.l-body-outset
-.l-page-outset
-.l-screen
-.l-screen-inset
-.l-gutter
-