30 Matching Annotations
  1. Nov 2023
  2. May 2023
    1. In the Pandoc Plugin settings, add — citeproc to the ‘Extra Pandoc arguments’ setting. This will be what takes the markdown citations and converts them to in-text citations in the conversion process. It also inserts a full reference list on the end of your document automatically, all completely formatted. To get this to work, you have to specify the location of the .bib file on your system by adding the path, in quotations, to a ‘bibliography’ YAML property.
  3. Jan 2023
    1. Python — Json documents double as valid Python literals with minimal adaptation, and Python supports trailing commas and comments. It has variables and functions, powerful string interpolation, and json.dump built in. A self-contained Python file that prints json to stdout goes a long way!

      If you would like to template yaml, then rather do it in Nix or Python

    2. always quote all strings. (Indeed, you can tell that somebody is an experienced yaml engineer when they defensively quote all the strings.) We can choose to always use true and false rather than yes and no, and generally stay away from the arcane features.

      Advices for yaml users

    3. I think the main reason that yaml is so prevalent despite its pitfalls, is that for a long time it was the only viable configuration format.

      Yaml has strange issues, but is popular as it was one of the 1st options

  4. Dec 2022
  5. Nov 2022
  6. Sep 2022
  7. May 2022
  8. Mar 2022
    1. To get a sorted list of all glossary items you could use YAML in the front matter of each glossary term then use the dataview plugin and sort ascending.
      • idea for glossary
  9. Jan 2022
    1. An extension to python markdown that takes metadata embedded as YAML in a page of markdown and render it as JSON-LD in the HTML created by MkDocs.
      • YAML input

        "@context": "http://schema.org"
        "@id": "#lesson1"
        "@type":
          - CreativeWork
        learningResourceType: LessonPlan
        hasPart: {
        "@id": "#activity1"
        }
        author:
          "@type": Person
          name: Phil Barker
        
      • Default JSON-LD output

        <script type="application/ld+json">
        { "@context":  "http://schema.org",
        "@id": "#lesson1",
        "@type":["CreativeWork"],
        "learningResourceType": "LessonPlan",
        "name": "Practice Counting Strategies",
        "hasPart": {
          "@id": "#activity1-1"
        }
        "author": {
          "@type": "Person"
          "name": "Phil Barker"
        }
        }
        </script>
        
  10. Aug 2021
  11. Sep 2020
  12. Jul 2020
    1. Using |- preserves newlines within the command and does not append a newline at the end of the command string. Beforehand I was using > which replaces newlines in the command string with spaces.
  13. May 2020
    1. Not merge the values of the keys.

      This is one of the biggest limatations of <<: *anchor: it overwrites values of keys. It's too heavy-handed and therefore of limited use. You can only use it if you don't mind keys getting overwritten (such as if you are going to overwrite the keys below the <<:.).

    2. GitLab will perform a reverse deep merge based on the keys
    3. It’s an alternative to using YAML anchors and is a little more flexible and readable
  14. Apr 2020
    1. A notebook, at a very basic level, is just a bunch of JSON that references blocks of code and the order in which they should be executed.But notebooks prioritize presentation and interactivity at the expense of reproducibility. YAML is the other side of that coin, ignoring presentation in favor of simplicity and reproducibility—making it much better for production.

      Summary of the article:

      Notebook = presentation + interactivity

      YAML = simplicity + reproducibility

    2. There is no hidden state or arbitrary execution order in a YAML file, and any changes you make to it can easily be tracked by Git

      In comparison to notebooks, YAML is more compatible for Git and in the end might be a better solution for ML

  15. Mar 2020
    1. I wrote a plugin for Vim that lets you easily toggle a YML file between nested format: xx.yml1 2 3 4 en: baz: "baize" foo: bar: "baare" and a flat format: xx.yml1 2 en.baz: "baize" en.foo.bar: "baare" This is really useful, as the flat format is easier to search and edit.
  16. Feb 2020
  17. Sep 2017
    1. Note: When mapping ports in the HOST:CONTAINER format, you may experience erroneous results when using a container port lower than 60, because YAML will parse numbers in the format xx:yy as sexagesimal (base 60). For this reason, we recommend always explicitly specifying your port mappings as strings.

      Cool feature

  18. Mar 2017