diff --git a/content/Blog/js_in_pelican.rst b/content/Blog/js_in_pelican.rst index c94d71c..00fc94e 100644 --- a/content/Blog/js_in_pelican.rst +++ b/content/Blog/js_in_pelican.rst @@ -1,12 +1,55 @@ Embedding js in pelican -####################### +######################### :date: 2024-01-22 +:tags: pelican, javascript, chart.js :authors: Matt Gibson +:modified: 2024-04-04 -This is a stub. An example of how to embed a javascript file in a pelican article. + +Sometimes I like to write a little js in my blog posts. Here is an example of how to embed a javascript file in a pelican article. .. raw:: html
+ +Below the fold, is an example of embedding a js chart into a pelican article. Specifically, we have the crude marriage rates in Australia for 2000 to 2022. Not many surprises here, the crude marriage rate has been in decline for the past 20 years, barring some minor fluctions most dramatically due to Covid. + +.. raw:: html + +
+ +
+ + + + + +source data: `Parliamentary library `_ + +Note `this website `_ here is wrong because the `ABS changed there methods `_. Pretty cheeky to charge you $199 USD per year for bad collation of public data. \ No newline at end of file diff --git a/content/Blog/jupyter_ecosystem.rst b/content/Blog/jupyter_ecosystem.rst index c07ad4a..5956e97 100644 --- a/content/Blog/jupyter_ecosystem.rst +++ b/content/Blog/jupyter_ecosystem.rst @@ -1,7 +1,23 @@ -The Wild West of the Jupyter +The Wild West of Jupyter ############################# :date: 2024-02-13 :authors: Matt Gibson -this is a stub. There's some wacky stuff in the Jupyter ecosystem. \ No newline at end of file +There's some wacky stuff in the Jupyter ecosystem, but I think on thing that really stood out for me is the extension of jupyter notebooks into web development and the interaction with javascript. So web assembly is a thing and you can run C code little isolated javascripts instances, maybe even from your CDN, so of course you want to compile `Python in WASM `_, and now you're wondering, didn't Jupyter do some fancy refactoring and that I think about I can put a webserver in there too... + + +Behold `JupyterLite `_: + +.. raw:: html + + + +Wow! Just what you always wanted free notebook hosting! you can install packages, you can code, + +powered by this: +https://jupyterlite.readthedocs.io/en/latest/_images/jupyterlite-diagram.svg \ No newline at end of file diff --git a/content/data/CrudeMarriageRateAU.csv b/content/data/CrudeMarriageRateAU.csv new file mode 100644 index 0000000..d7a8047 --- /dev/null +++ b/content/data/CrudeMarriageRateAU.csv @@ -0,0 +1,22 @@ +Year, CrudeMarriageRate +2020, 3.1 +2019, 4.5 +2018, 4.8 +2017, 4.6 +2016, 4.9 +2015, 4.8 +2014, 5.2 +2013, 5.1 +2012, 5.4 +2011, 5.4 +2010, 5.4 +2009, 5.5 +2008, 5.5 +2007, 5.5 +2006, 5.5 +2005, 5.4 +2004, 5.5 +2003, 5.4 +2002, 5.4 +2001, 5.3 +2000, 5.9 diff --git a/content/data/median_age_at_first_marriage_au.csv b/content/data/median_age_at_first_marriage_au.csv new file mode 100644 index 0000000..e7c6afe --- /dev/null +++ b/content/data/median_age_at_first_marriage_au.csv @@ -0,0 +1,12 @@ +Year Men Women +2021 30.8 29.4 +2020 30.6 29.2 +2019 30.7 29.3 +2018 30.7 29.2 +2017 30.4 28.8 +2016 30.3 28.7 +2015 30.1 28.5 +2014 30.0 28.4 +2013 29.9 28.3 +2007 29.6 27.6 +1997 27.8 25.9 \ No newline at end of file diff --git a/content/js/demo.js b/content/js/demo.js index e5ad84f..27a12a5 100644 --- a/content/js/demo.js +++ b/content/js/demo.js @@ -1,16 +1,22 @@ // get id div #demo and change text +let some_soft_colours = ["#D9EDBF", "#FFB996", "#FFCF81", "#FEFBC9B", "#FBF3D5", "#D6DAC8", "#79AC78"]; +let some_text = ["Hello", "World", "How", "Are", "You", "Today", "?"]; function myCallback() { - const elt = document.getElementById("demo"); - if (elt.innerHTML === "Hello JavaScript") { - elt.innerHTML = "Hello World"; - elt.style.backgroundColor = "#64a6ea"; - elt.style.maxWidth = "7em"; - } else { - elt.innerHTML = "Hello JavaScript"; - elt.style.backgroundColor = "#7eed94"; - elt.style.maxWidth = "10em"; - } + // cycle through the colours and text sequentially + let colour = some_soft_colours.shift(); + let text = some_text.shift(); + some_soft_colours.push(colour); + some_text.push(text); + // get the div element + let div = document.getElementById("demo"); + // change the text and colour + div.innerHTML = text; + div.style.color = colour; + div.style.backgroundColor = "navy"; + // set max width + div.style.maxWidth = "80px"; + } diff --git a/content/pages/About.md b/content/pages/About.md new file mode 100644 index 0000000..704bddd --- /dev/null +++ b/content/pages/About.md @@ -0,0 +1,14 @@ +--- +Title: About Me +Author: Matt Gibson +Summary: About me page +save_as: index.html +--- + +I am a software and machine learning developer in [Sydney](http://en.wikipedia.org/wiki/Sydney), NSW, Australia. I like [computing](https://en.wikipedia.org/wiki/MOS_Technology_6502), [data](https://search.r-project.org/CRAN/refmans/vcd/html/HorseKicks.html), [machine learning](https://pytorch.org/) and [cooking](https://web.archive.org/web/20160210065535/http://www.seriouseats.com/the-food-lab/?ref=nav_main). I'm delighted by the scientific enterprise which allows us ["to see a World in a Grain of Sand"](https://www.poetryfoundation.org/poems/43650/auguries-of-innocence). + +I'm also quite keen on gibbons 🐒. + +I acknowledge and pay my respects to the Traditional Custodians of the land on which I work and live, and their elders past, present, and emerging. Sovereignty was never ceded. + +This second version of my homepage hosted by Github Pages and created using [Pelican](https://github.com/getpelican/pelican). diff --git a/content/pages/CV.md b/content/pages/CV.md new file mode 100644 index 0000000..69eaa26 --- /dev/null +++ b/content/pages/CV.md @@ -0,0 +1,29 @@ +--- +Title: CV +Author: Matt Gibson +Summary: My CV +--- + +Looking for work. My email can be found on my github commits. + +### Experience + + +- Contract Developer +- Machine Learning Researcher +- Research Engineer +- Data Scientist +- Data Analyst + +### Education + + +- Ph.D. UNSW, CS (Computer Vision and Machine learning) +- M.Sc. University of Sydney, Maths (Algebraic Combinatorics) +- B.Sc. University of Auckland, Maths (H1) + Computation and Logic + +### Skills + +- Tools: Linux, Tensorflow, Pytorch +- Techniques: Deep Learning, Computer Vision, Time Series +- Languages: Python, Javascript, R, SQL, C, HTML, CSS diff --git a/content/pages/CV.rst b/content/pages/CV.rst deleted file mode 100644 index 41e9bbc..0000000 --- a/content/pages/CV.rst +++ /dev/null @@ -1,23 +0,0 @@ -===== -CV -===== - -:author: Matt Gibson -:summary: My CV - -Looking for work. My email can be found on my github commits. - - -Experience ------------- - -- Freelance Developer -- Research Engineer -- Data Scientist - -Education ------------- - -- Ph.D. UNSW, CS (Computer Vision and Machine learning) -- M.Sc. University of Sydney, Maths (Algebraic Combinatorics) -- B.Sc. University of Auckland, Maths (H1) + Computation and Logic diff --git a/content/pages/about.rst b/content/pages/about.rst deleted file mode 100644 index 828cd2b..0000000 --- a/content/pages/about.rst +++ /dev/null @@ -1,17 +0,0 @@ -======== -About Me -======== -:author: Matt Gibson -:summary: About me page -:URL: -:save_as: index.html - - -I am a software and machine learning developer in `Sydney `_, NSW, Australia. I like `computing `_, `data `_, `machine learning `_ and `cooking `_. I'm delighted by the scientific enterprise which allows us `"to see a World in a Grain of Sand" `_. - - -I'm also quite keen on gibbons 🐒. - -I acknowledge and pay my respects to the Traditional Custodians of the land on which I work and live, and their elders past, present, and emerging. Sovereignty was never ceded. - -This second version of my homepage hosted by Github Pages and created using `Pelican `_. diff --git a/pelicanconf.py b/pelicanconf.py index 659ee27..85757b5 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -29,6 +29,9 @@ ] # ▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲ +LOAD_CONTENT_CACHE = False + + DISPLAY_PAGES_ON_MENU = False DISPLAY_CATEGORIES_ON_MENU = False @@ -36,7 +39,7 @@ PATH = "content" # pages are standalone html -PAGE_PATHS = ['pages'] +PAGE_PATHS = ["pages"] # articles are arranged chronologically ARTICLES_PATH = ["Blog"] diff --git a/themes/my-basic/static/css/style.css b/themes/my-basic/static/css/style.css index 8de390a..bc506af 100644 --- a/themes/my-basic/static/css/style.css +++ b/themes/my-basic/static/css/style.css @@ -4,6 +4,10 @@ --my-bg-color: #fff; --my-link-color: navy; --my-header-link-color: black; + --small-font-size: 75%; + + --border: #ccc; + --standard-border-radius: 5px; } body { @@ -29,6 +33,29 @@ body { display: block; */ } +/* Typographical settings */ +h1, h2, h3 { + line-height: 1.1rem; +} + +h1 { + font-size: 2.35em; +} + +h2 { + font-size: 2em; +} + +h3 { + font-size: 1.75em; +} + + +small, sub, sup { + font-size: var(--small-font-size); +} + +/* styling for nav */ nav ul { display: flex; margin: 0; @@ -37,15 +64,24 @@ nav ul { } nav ul a { - padding: 0.5em 1em; + padding: 0.5em 1em 0.5em 0; display: block; } +/* nav li { + border: 1px solid var(--border); + border-radius: var(--standard-border-radius); + margin: 0 0.5em; +} */ + +hgroup h1 a:hover, hgroup h1 a:visited, hgroup h1 a:link { + text-decoration: none; +} header a:link { color: var(--my-header-link-color); - text-decoration: none; + text-decoration: underline; } header a:hover, @@ -70,7 +106,23 @@ main a:visited { } +/* styling for code */ +/* for articles */ +article { + padding: 0 0 0.75em 0; + border-bottom: 1px solid #ccc; + margin-bottom: 0.75em; +} +article p { + margin: 0 0 0.8em 0; +} +article footer { + font-size: var(--small-font-size); + margin-top: 1em; + /* border-top: 1px solid #8a55a8; */ + padding-top: 0.5em; +} \ No newline at end of file diff --git a/content/extra/favicon.ico b/themes/my-basic/static/images/favicon.ico similarity index 100% rename from content/extra/favicon.ico rename to themes/my-basic/static/images/favicon.ico diff --git a/themes/my-basic/templates/article.html b/themes/my-basic/templates/article.html new file mode 100644 index 0000000..b859af7 --- /dev/null +++ b/themes/my-basic/templates/article.html @@ -0,0 +1,66 @@ +{% extends "base.html" %} +{% block html_lang %}{{ article.lang }}{% endblock %} + +{% block title %}{{ SITENAME|striptags }} - {{ article.title|striptags }}{% endblock %} + +{% block head %} +{{ super() }} + +{% import 'translations.html' as translations with context %} +{% if translations.entry_hreflang(article) %} +{{ translations.entry_hreflang(article) }} +{% endif %} + +{% if article.description %} + +{% endif %} + +{% for tag in article.tags %} + +{% endfor %} + +{% endblock %} + +{% block content %} +
+
+

+ {{ + article.title }} +

+ {% import 'translations.html' as translations with context %} + {{ translations.translations_for(article) }} +
+ {{ article.content }} +
+

Published:

+ {% if article.modified %} +

Last updated:

+ {% endif %} + {% if article.authors %} +
+ By {% for author in article.authors %} + {{ author }} + {% endfor %} +
+ {% endif %} + {% if article.category %} +

+ Category: {{ article.category }} +

+ {% endif %} + {% if article.tags %} +

+ Tags: + {% for tag in article.tags %} + {{ tag }} + {% endfor %} +

+ {% endif %} +
+
+{% endblock %} \ No newline at end of file diff --git a/themes/my-basic/templates/base.html b/themes/my-basic/templates/base.html index ecb2408..1355609 100644 --- a/themes/my-basic/templates/base.html +++ b/themes/my-basic/templates/base.html @@ -17,6 +17,8 @@ + + {% if FEED_ALL_ATOM %}
-

{{ SITENAME }}

{% if SITESUBTITLE %}

{{ SITESUBTITLE }}

{% endif %} +

{{ SITENAME }}

+ {% if SITESUBTITLE %}

{{ SITESUBTITLE }}

{% endif %}