Skip to content

Commit 8db6807

Browse files
author
Guilherme
committedApr 17, 2022
refactor: fixing collections etc
1 parent 51b2974 commit 8db6807

20 files changed

+135
-43
lines changed
 

‎_config.yml

+16-6
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ sass:
212212

213213
# Outputting
214214
permalink: /:categories/:title/
215-
paginate: 5 # amount of posts to show
215+
paginate: 20 # amount of posts to show
216216
paginate_path: /page:num/
217217
timezone: # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
218218

@@ -263,11 +263,6 @@ tag_archive:
263263
# tag: /tags/:name/
264264

265265

266-
# ReCaptcha
267-
reCaptcha:
268-
siteKey: "6LezUPkUAAAAAMwtanUF9dmGRyjxAaFMbZ_K72IB"
269-
secret: "K44KvotvmTfeGETORDbRsnaFknT+EpGrun/8X6ZTkoJ0lawcuFoY33831UnQRrghMm50+qbdIShI8l2mcq/kK13zKo4K8iUpcEbrBoHEyeypDvIEtbdtXLaknQRpnEZ57k1kr0vgAKLEWFWBXSYSrX6N0aS0VyIDyMYCnm4KfTQyYkY5u6D48LCudgil0Edkz+zeRFi499/4JA/4XmH8hEz2fZNM5kEGey1/8T44AmCx9szy7NhRxMdPMEzMw+NRiGTv7JGGs9BfsKQBEdeJF8PGXTzRNoyi004q/t/vsHScglBmdt1BAKgjNQqK9ZNxQFWTcFs5cvPuoYlM7dJbtht0ngpDyzvpwlMUYEPPoRNyMx6AD3NKX/lymap4Yz3hc7nVAalYYMfnR9LAjE4CVjWhu9ToQXuEOJlB99fR1TM2TSZ00kyQ+H9T2eO7xYQeg+JtFi66wxLYto34/2ocKX7j8YuUZO1PyVHo2B4zgjCbS0+u/1y/j5us2WXw6upx7LGPkR4OyGMd5tBmzag6ca7/4WryPQTkS8ypj1ybh6ygiH7fr9miFU26v3aCGO+WpbfQCf/SNUDx8k8vVYo47MVoPeigs89tdv0ABOaSDesdo+Mqr4YDzO7nK6GmweG6HfvJdYVM84DjbBwyQBp1BVHKeEGJKsNCGZA7MedK9ko="
270-
271266
# HTML Compression
272267
# - https://jch.penibelst.de/
273268
compress_html:
@@ -276,6 +271,12 @@ compress_html:
276271
envs: development
277272

278273

274+
collections:
275+
databytes:
276+
output: true
277+
permalink: /:collection/:path/
278+
279+
279280
# Defaults
280281
defaults:
281282
# _posts
@@ -297,3 +298,12 @@ defaults:
297298
values:
298299
layout: single
299300
author_profile: true
301+
# _databytes
302+
- scope:
303+
path: ""
304+
type: databytes
305+
values:
306+
layout: single
307+
author_profile: true
308+
share: true
309+
read_time: true

‎_data/navigation.yml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
main:
33
# - title: "Quick-Start Guide"
44
# url: https://mmistakes.github.io/minimal-mistakes/docs/quick-start-guide/
5+
- title: "Data Bytes"
6+
url: /data-bytes/
57
- title: "About"
68
url: /about/
79
# - title: "Sample Posts"

‎_bytes/2020-11-04-data-bytes-data-privacy-en.md ‎_databytes/2020-11-04-data-bytes-data-privacy-en.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ title: "Data Bytes - Data Privacy"
33
tags: [machine learning, data, privacy, ethics]
44
toc: true
55
lang: en
6-
ref: data-bytes-data-privacy
6+
ref: data-privacy
77
excerpt: A little bit on Data Privacy
88
header:
9-
image: "/images/data-bytes/data-privacy/theme.png"
9+
overlay_image: "/images/data-bytes/data-privacy/theme.png"
1010

1111
---
1212

‎_bytes/2020-11-04-data-bytes-data-privacy-pt_BR.md ‎_databytes/2020-11-04-data-bytes-data-privacy-pt_BR.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ title: "Data Bytes - Data Privacy"
33
tags: [machine learning, data, privacy, ethics]
44
toc: true
55
lang: pt_BR
6-
ref: data-bytes-data-privacy
6+
ref: data-privacy
77
excerpt: Um pouco de privacidade de Dados
88
header:
9-
image: "/images/data-bytes/data-privacy/theme.png"
9+
overlay_image: "/images/data-bytes/data-privacy/theme.png"
1010
---
1111

1212
(Imagem tirada [daqui](https://www.bigcommerce.com/blog/consumer-data-privacy/))

‎_bytes/2021-03-26-data-bytes-concept-drift-en.md ‎_databytes/2021-03-26-data-bytes-concept-drift-en.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ title: "Data Bytes - Concept Drift"
33
tags: [machine learning, data]
44
toc: true
55
lang: en
6-
ref: data-bytes-concept-drift
6+
ref: concept-drift
77
excerpt: Concept Drift - Data Bytes
88
header:
9-
image: "/images/data-bytes/concept-drift/post.png"
9+
overlay_image: "/images/data-bytes/concept-drift/post.png"
1010
---
1111

1212
**Data Bytes** is a blog series that consists of small posts (or *bytes*) that elaborates a subject in a summarized way - almost like an introduction to incite you to learn more about it.

‎_bytes/2021-03-26-data-bytes-concept-drift-pt_BR.md ‎_databytes/2021-03-26-data-bytes-concept-drift-pt_BR.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ title: "Data Bytes - Concept Drift"
33
tags: [machine learning, data]
44
toc: true
55
lang: pt_BR
6-
ref: data-bytes-concept-drift
6+
ref: concept-drift
77
excerpt: Concept Drift - Data Bytes
88
header:
9-
image: "/images/data-bytes/concept-drift/post.png"
9+
overlay_image: "/images/data-bytes/concept-drift/post.png"
1010
---
1111

1212
**Data Bytes** é uma série do blog que consiste em pequenas posts (ou *bytes*) que tentam explicar um assunto de uma forma bastante resumida - é quase uma introdução para te incentivar a aprender mais sobre.
+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{% if post.header.teaser %}
2+
{% capture teaser %}{{ post.header.teaser }}{% endcapture %}
3+
{% else %}
4+
{% capture teaser %}{{ site.teaser }}{% endcapture %}
5+
{% endif %}
6+
7+
<div class="{{ include.type | default: "list" }}__item">
8+
{% if post.link %}
9+
<a href="{{ post.link }}" target="_blank">
10+
{% else %}
11+
<a href="{{ base_path }}{{ post.url }}">
12+
{% endif %}
13+
<article class="archive__item" itemscope itemtype="http://schema.org/CreativeWork">
14+
{% if include.type == "grid" and teaser != blank %}
15+
<div class="archive__item-teaser">
16+
<img src=
17+
{% if teaser contains "http" %}
18+
"{{ teaser }}"
19+
{% else %}
20+
"{{ teaser | prepend: "/images/" | prepend: base_path }}"
21+
{% endif %}
22+
alt="">
23+
</div>
24+
{% endif %}
25+
<h2 class="archive__item-title" itemprop="headline">
26+
{% if post.id %}
27+
{{ post.title | markdownify | remove: "<p>" | remove: "</p>" }}
28+
{% else %}
29+
{{ post.title }}
30+
{% endif %}
31+
{% if post.link %}
32+
<i class="fa fa-star" aria-hidden="true"></i>
33+
{% endif %}
34+
</h2>
35+
{% if post.read_time %}
36+
<p class="page__meta"><i class="fa fa-clock-o" aria-hidden="true"></i> {% include read-time.html %}</p>
37+
{% endif %}
38+
{% if post.excerpt %}
39+
<p class="archive__item-excerpt" itemprop="description">
40+
{{ post.excerpt | markdownify | strip_html | truncate: 160 }}
41+
{% assign entries = site[include.collection] %}
42+
{% assign versions=entries | where:"ref", post.ref | sort: 'lang' %}
43+
{% if versions.size > 1 %}
44+
{% for version in versions %}
45+
{% if version.lang != site.lang %}
46+
<a href="{{ version.url }}" >{{ site.data.i18n[version.lang].icon }} </a>
47+
{% endif %}
48+
{% endfor %}
49+
{% endif %}
50+
</p>
51+
{% endif %}
52+
</article>
53+
</a>
54+
</div>

‎_includes/documents-collection.html

+14-17
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
{% assign entries = site[include.collection] %}
22

3-
{% if include.sort_by == 'title' %}
4-
{% if include.sort_order == 'reverse' %}
5-
{% assign entries = entries | sort: 'title' | reverse %}
6-
{% else %}
7-
{% assign entries = entries | sort: 'title' %}
8-
{% endif %}
9-
{% elsif include.sort_by == 'date' %}
10-
{% if include.sort_order == 'reverse' %}
11-
{% assign entries = entries | sort: 'date' | reverse %}
12-
{% else %}
13-
{% assign entries = entries | sort: 'date' %}
14-
{% endif %}
3+
{% assign entries = entries | group_by: 'ref' %}
4+
5+
{% if include.sort_by %}
6+
{% assign entries = entries | sort: include.sort_by %}
157
{% endif %}
168

17-
{%- for post in entries -%}
18-
{%- unless post.hidden -%}
19-
{% include archive-single.html %}
20-
{%- endunless -%}
21-
{%- endfor -%}
9+
{% assign entries = entries | reverse %}
10+
11+
{% for group in entries %}
12+
{% if group.items.size > 1 %}
13+
{% assign post = group.items | where: "lang",site.lang | first %}
14+
{% else %}
15+
{% assign post = group.items[0] %}
16+
{% endif %}
17+
{% include archive-single-collection.html collection=include.collection %}
18+
{% endfor %}

‎_layouts/collection.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
{{ content }}
66

7-
<div class="entries-{{ page.entries_layout }}">
8-
{% include documents-collection.html collection=page.collection sort_by=page.sort_by sort_order=page.sort_order type=page.entries_layout %}
7+
{% assign entries_layout = page.entries_layout | default: 'list' %}
8+
<div class="entries-{{ entries_layout }}">
9+
{% include documents-collection.html collection=page.collection sort_by=page.sort_by sort_order=page.sort_order type=entries_layout %}
910
</div>

‎_layouts/single.html

+6-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@
3434
{% endunless %}
3535

3636
{% if page.bookauthor == null and page.permalink == null %}
37-
{% assign versions=site.posts | where:"ref", page.ref | sort: 'lang' %}
37+
{% if page.collection == "posts" %}
38+
{% assign versions=site.posts | where:"ref", page.ref | sort: 'lang' %}
39+
{% else %}
40+
{% assign entries = site[page.collection] %}
41+
{% assign versions=entries | where:"ref", page.ref | sort: 'lang' %}
42+
{% endif %}
3843
{% if versions.size > 1 %}
3944
{% for version in versions %}
4045
{% if version.lang != page.lang %}

‎_pages/databytes.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Data Bytes
3+
header:
4+
overlay_image: "/images/databytes.jpg"
5+
layout: collection
6+
permalink: /data-bytes/
7+
collection: databytes
8+
entries_layout: list
9+
sort_by: date
10+
classes: wide
11+
---
12+
13+
This is Data Bytes, a collection of short posts about Data Science and Machine Learning. Here I will try to explore some interesting subjects about what I've been studying and working about these areas.
14+
15+
As always, feel free to contact me about anything and I hope these small data bites (or bytes) can help you or at least instigate your curiosity to study more!
16+
17+
Happy Reading!

‎_posts/2020-05-18-hello-world.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tags: [general]
55
lang: en
66
ref: hello-world
77
header:
8-
image: "/images/hello-world/hello-world.png"
8+
overlay_image: "/images/hello-world/hello-world.png"
99
---
1010

1111
# Hello World!

‎_posts/2020-09-09-monitoring-machine-learning-en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ lang: en
66
ref: quality-for-machine-learning-pt-1
77
excerpt: Introduction to Quality for Machine Learning, pt. 1
88
header:
9-
image: "/images/monitoring-machine-learning/theme.jpeg"
9+
overlay_image: "/images/monitoring-machine-learning/theme.jpeg"
1010
---
1111

1212
Lately, one of the key subjects I've been studying and thinking about is Quality for Machine Learning Systems. I remember a couple of years ago when entering the field of ML that I had no idea how to measure quality. By that time, I was writing my first unit tests for web servers and had the first initial view on what quality is for Software in general, but when it came to ML, I had no idea what to look out for.

‎_posts/2020-09-09-monitoring-machine-learning-pt_BR.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ lang: pt_BR
66
ref: quality-for-machine-learning-pt-1
77
excerpt: Introdução a Qualidade para Machine Learning, pt. 1
88
header:
9-
image: "/images/monitoring-machine-learning/theme.jpeg"
9+
overlay_image: "/images/monitoring-machine-learning/theme.jpeg"
1010
---
1111

1212
Nos últimos tempos um dos temas principais que tenho estudado e pensado sobre é Qualidade para aplicações e sistemas de Machine Learning. Lembro-me de há alguns poucos anos atrás, quando ingressei na área de ML, que não tinha ideia de como medir qualidade. Naquela época, eu estava começando a escrever meus primeiros testes unitários para aplicações WEB e já tinha uma primeira visão sobre o que era qualidade para Software em geral, mas quando contemplado com o conceito de ML eu não tinha ideia do que pensar ou o que procurar.

‎_posts/2020-12-02-metaprogramming-101-en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ lang: en
66
ref: metaprogramming-101
77
excerpt: Metaclasses and Metaprogramming in Python
88
header:
9-
image: "/images/metaprogramming/post.png"
9+
overlay_image: "/images/metaprogramming/post.png"
1010
---
1111

1212
Before understanding what metaprogramming is, why don't we refresh a little bit about Python classes, objects, and metaclasses?

‎_posts/2020-12-02-metaprogramming-101-pt_BR.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ lang: pt_BR
66
ref: metaprogramming-101
77
excerpt: Metaclasses e Metaprogramação em Python
88
header:
9-
image: "/images/metaprogramming/post.png"
9+
overlay_image: "/images/metaprogramming/post.png"
1010
---
1111

1212
Antes de falarmos e entendermos mais sobre metaprogramação, que tal um pequeno "refresco" sobre o que são classes, objetos e metaclasses em Python?

‎assets/css/main.scss

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ This is what is currently in "_variables.scss" under the "Breakpoints" section:
2727
2828
Override $max-width (don't forget the semicolon!):
2929
*/
30-
$max-width: 100%;
31-
32-
3330
@import "minimal-mistakes/skins/{{ site.minimal_mistakes_skin | default: 'default' }}"; // skin
3431
@import "minimal-mistakes"; // main partials
3532

‎images/cookie.png

9.01 KB
Loading

‎images/databytes.jpg

2.25 MB
Loading

‎index.html

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
---
22
header:
33
overlay_image: "/images/theme.jpg"
4-
paginate: 5
4+
paginate: 20
55
layout: archive
66
author_profile: true
7+
feature_row:
8+
- alt: "data bytes"
9+
title: "🍪 Data Bytes"
10+
excerpt: "Check out my collection of small blog posts about Data Science and Machine Learning!"
11+
url: "/data-bytes/"
12+
btn_class: "btn--primary"
13+
btn_label: "Learn more"
714
---
815
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon.png">
916
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
@@ -13,6 +20,8 @@
1320
<meta name="msapplication-TileColor" content="#da532c">
1421
<meta name="theme-color" content="#ffffff">
1522

23+
{% include feature_row %}
24+
1625
<h3 class="archive__subtitle">Posts</h3>
1726

1827
{% assign items_grouped = paginator.posts | group_by: 'ref' %}

0 commit comments

Comments
 (0)
Please sign in to comment.