Automation to Save Your Bacon Elliot Jordan End-User Platform Security Nordstrom “I’M Not Really a Software Developer

Total Page:16

File Type:pdf, Size:1020Kb

Automation to Save Your Bacon Elliot Jordan End-User Platform Security Nordstrom “I’M Not Really a Software Developer Linters Hooks Pipelines Automation to Save Your Bacon Elliot Jordan End-User Platform Security Nordstrom “I’m not really a software developer. I just think I’m a software developer because I develop software.” — Arjen van Bochoven ‣ Package sources ‣ Scripts and extension plist, yaml, json, shell, python attributes ‣ AutoPkg recipes/ shell, python overrides ‣ MDM profiles plist, shell, python plist ‣ Munki repos ‣ Documentation plist, python, shell text, markdown, reStructuredText Mac Software "Dev Ops" Admin Developer Reducing errors Streamlining development Automating tedious tasks Ground Rules Protected "master" branch Peer review Remote Git hosting Production code in Git Code standards Linters Linters Linters Linters Linters Linters Linters Atom + Shellcheck Linters Atom + Shellcheck Terminal $ brew install shellcheck ==> Downloading https://homebrew.bintray.com/bottles/ shellcheck-0.6.0_1.mojave.bottle.tar.gz ==> Pouring shellcheck-0.6.0_1.mojave.bottle.tar.gz ! /usr/local/Cellar/shellcheck/0.6.0_1: 8 files, 7.2MB $ which shellcheck /usr/local/bin/shellcheck ⌘C $ Linters Atom + Shellcheck Linters Atom + Shellcheck Linters Atom + Shellcheck Linters Atom + Shellcheck Linters Atom + Shellcheck Linters Atom + Shellcheck Linters Atom + Shellcheck ⌘V Linters Atom + Shellcheck Linters Atom + Shellcheck Linters Atom + Shellcheck Linters Atom + Shellcheck Click to learn more! Linters Atom + Shellcheck Linters Atom + Shellcheck Typo caught Linters Atom + Shellcheck Suggestions for improving resiliency Linters Atom + Shellcheck Deprecated syntax callouts Linters Atom + Shellcheck Generally accepted practices Linters Atom + Shellcheck Useless cat! Photo: Byron Chin Linters Atom + Shellcheck Linters Atom + Shellcheck Linters Shellcheck + zsh ‣ Shellcheck doesn't currently support zsh However: ‣ That might change someday ‣ Bash scripts should work fine in Catalina Linters Atom + Pylint Linters Atom + Pylint Linters Atom + Pylint Linters Atom + Pylint Linters Atom + Pylint Linters Atom + Pylint Linters Atom + Pylint Linters Atom + Pylint Linters Atom + Pylint Linters Atom + Pylint Linters Fine-Tuning Linters E0611 Linters Fine-Tuning Linters E0611 Linters Fine-Tuning Linters # pylint: disable=E0611 Linters Fine-Tuning Linters # pylint: disable=no-name-in-module Terminal $ pylint example2.py No config file found, using default configuration ************* Module example2 C: 1, 0: Missing module docstring (missing-docstring) E: 3, 0: No name 'CFPreferencesCopyAppValue' in module 'CoreFoundation' (no-name-in-module) C: 6, 0: Constant name "munki_repo" doesn't conform to UPPER_CASE naming style (invalid-name) ---------------------------------------------------------------------- Your code has been rated at -13.33/10 (previous run: -13.33/10, +0.00) $ Linters Fine-Tuning Linters # pylint: disable=no-name-in-module # pylint: enable=no-name-in-module Linters Fine-Tuning Linters # pylint: disable=E0611 Linters Fine-Tuning Linters Linters Fine-Tuning Linters # shellcheck disable=SC2115 Linters Fine-Tuning Linters # shellcheck disable=SC2115 Linters Linter Limitations ‣ Installed per-app and per-Mac ‣ Not easily distributed across a team ‣ Suggestions are optional Linters Autoformatters ‣ Python black, yapf, autopep8, isort ‣ Go gofmt ‣ Ruby rubocop Linters Python Black Linters Python Black Linters Python Black Linters Python Black Linters Fine-Tuning Autoformatters # fmt: off # fmt: on Linters When to Avoid Autoformatters ‣ Submitting a very small change to a repo ‣ Contributing to a new repo for the first time ‣ If the maintainers strongly prefer their own style Linters Autoformatter Limitations ‣ You may not agree with the style choices (but you get used to it) ‣ Can be quite jarring to convert a project to use autoformatters for the first time (large diffs) ‣ Not easily distributable across team without help from other frameworks Linters Hooks Hooks git commit -a -m "My great commit" fix the issue and try again pre-commit hook(s) exit exit nonzero zero commit fails commit succeeds Linters Hooks Hooks git commit -a -m "My great commit" fix the issue and try again pre-commit hook(s) exit exit nonzero zero commit fails commit succeeds Linters Hooks Hooks pre-commit hook(s) Linters Hooks Installing Pre-Commit Terminal $ brew install pre-commit Updating Homebrew... ==> Downloading https://homebrew.bintray.com/bottles/pre-commit-1.17.0.moja ve.bottle.tar.gz ==> Pouring pre-commit-1.17.0.mojave.bottle.tar.gz ! /usr/local/Cellar/pre-commit/1.17.0: 703 files, 8.9MB $ which pre-commit /usr/local/bin/pre-commit $ pre-commit --version pre-commit 1.17.0 $ Linters Hooks Installing Pre-Commit Terminal $ cd ~/path/to/git_repo $ touch .pre-commit-config.yaml $ open -a Atom .pre-commit-config.yaml $ Linters Hooks Installing Pre-Commit Terminal $ cd ~/path/to/git_repo .pre-commit-config.yaml $ touch .pre-commit-config.yaml repos:$ open -a Atom .pre-commit-config.yaml - repo:$ https://github.com/pre-commit/pre-commit-hooks rev: v2.2.3 hooks: - id: no-commit-to-branch Linters Hooks Installing Pre-Commit Terminal $ cd ~/path/to/git_repo $ touch .pre-commit-config.yaml $ open -a Atom .pre-commit-config.yaml $ pre-commit install pre-commit installed at .git/hooks/pre-commit $ Linters Hooks Installing Pre-Commit Terminal $ git branch * master $ git commit -am "Add pre-commit config" Don't commit to branch....................................................Failed $ git checkout -b pre-commit A .pre-install-config.yaml Switched to a new branch 'pre-commit' $ git commit -am "Add pre-commit config" Don't commit to branch....................................................Passed [pre-commit 48f2745] Add pre-commit config 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .pre-install-config.yaml $ Linters Hooks Configuring Pre-Commit .pre-commit-config.yaml repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.2.3 hooks: - id: no-commit-to-branch Linters Hooks Configuring Pre-Commit .pre-commit-config.yaml repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.2.3 hooks: - id: no-commit-to-branch - id: check-added-large-files args: [--maxkb=100] - id: check-merge-conflict - repo: https://github.com/python/black rev: 19.3b0 hooks: - id: black Linters Hooks Configuring Pre-Commit .pre-commit-config.yaml repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.2.3 hooks: - id: no-commit-to-branch P - id: check-added-large-files Text Editor Pre-Commit args: [--maxkb=100] - id: check-merge-conflict - repo: https://github.com/python/black rev: 19.3b0 hooks: - id: black Linters Hooks Configuring Pre-Commit .pre-commit-config.yaml repos: - repo: https://github.com/pre-commit/ - repo: https://github.com/ambv/black pre-commit-hooks rev: 19.3b0 rev: v2.2.1 hooks: hooks: - id: black - id: check-added-large-files args: [--maxkb=200] - repo: https://github.com/asottile/ - id: check-byte-order-marker blacken-docs - id: check-case-conflict rev: v0.5.0 - id: check-docstring-first hooks: - id: check-merge-conflict - id: blacken-docs - id: check-symlinks additional_dependencies: - id: check-yaml [black==19.3b0] - id: mixed-line-ending - id: no-commit-to-branch - id: trailing-whitespace args: [--markdown-linebreak-ext=md] Linters Hooks Configuring Pre-Commit .pre-commit-config.yaml repos: - repo: https://github.com/pre-commit/ - repo: https://github.com/ambv/black pre-commit-hooks rev: 19.3b0 rev: v2.2.1 hooks: hooks: - id: black - id: check-added-large-files args: [--maxkb=200] - repo: https://github.com/asottile/ - id: check-byte-order-marker blacken-docs - id: check-case-conflict rev: v0.5.0 - id: check-docstring-first hooks: - id: check-merge-conflict - id: blacken-docs - id: check-symlinks additional_dependencies: - id: check-yaml [black==19.3b0] - id: mixed-line-ending - id: no-commit-to-branch - id: trailing-whitespace args: [--markdown-linebreak-ext=md] Linters Hooks Updating Pre-Commit Hooks Terminal $ pre-commit autoupdate Updating https://github.com/pre-commit/pre-commit-hooks...updating v2.2.0 -> v2.2.3. Updating https://github.com/python/black...[INFO] Initializing environment for https://github.com/python/black. updating stable -> 19.3b0. Updating https://github.com/asottile/blacken-docs...[INFO] Initializing environment for https://github.com/asottile/blacken-docs. updating v1.0.0 -> v1.1.0. $ Linters Hooks Configuring Pre-Commit .pre-commit-config.yaml repos: - repo: https://github.com/pre-commit/ - repo: https://github.com/ambv/black pre-commit-hooks rev: 19.3b0 rev: v2.2.1 hooks: hooks: - id: black - id: check-added-large-files args: [--maxkb=200] - repo: https://github.com/asottile/ - id: check-byte-order-marker blacken-docs - id: check-case-conflict rev: v0.5.0 - id: check-docstring-first hooks: - id: check-merge-conflict - id: blacken-docs - id: check-symlinks additional_dependencies: - id: check-yaml [black==19.3b0] - id: mixed-line-ending - id: no-commit-to-branch - id: trailing-whitespace args: [--markdown-linebreak-ext=md] Linters Hooks Pre-Commit Hooks for Mac Admins https://github.com/homebysix/pre-commit-macadmin Linters Hooks Pre-Commit Hooks for Mac Admins ~/Developer/pkg-sources/.pre-commit-config.yaml repos: - repo: https://github.com/homebysix/pre-commit-macadmin rev: v1.3.0 hooks: - id: check-munkipkg-buildinfo - id: check-outset-scripts - id: check-plists Linters Hooks Pre-Commit Hooks for Mac Admins ~/Developer/pkg-sources/.pre-commit-config.yaml repos: - repo: https://github.com/homebysix/pre-commit-macadmin rev: v1.3.0 hooks: - id: check-munkipkg-buildinfo - id: check-outset-scripts - id: check-plists
Recommended publications
  • Tinn-R Team Has a New Member Working on the Source Code: Wel- Come Huashan Chen
    Editus eBook Series Editus eBooks is a series of electronic books aimed at students and re- searchers of arts and sciences in general. Tinn-R Editor (2010 1. ed. Rmetrics) Tinn-R Editor - GUI forR Language and Environment (2014 2. ed. Editus) José Cláudio Faria Philippe Grosjean Enio Galinkin Jelihovschi Ricardo Pietrobon Philipe Silva Farias Universidade Estadual de Santa Cruz GOVERNO DO ESTADO DA BAHIA JAQUES WAGNER - GOVERNADOR SECRETARIA DE EDUCAÇÃO OSVALDO BARRETO FILHO - SECRETÁRIO UNIVERSIDADE ESTADUAL DE SANTA CRUZ ADÉLIA MARIA CARVALHO DE MELO PINHEIRO - REITORA EVANDRO SENA FREIRE - VICE-REITOR DIRETORA DA EDITUS RITA VIRGINIA ALVES SANTOS ARGOLLO Conselho Editorial: Rita Virginia Alves Santos Argollo – Presidente Andréa de Azevedo Morégula André Luiz Rosa Ribeiro Adriana dos Santos Reis Lemos Dorival de Freitas Evandro Sena Freire Francisco Mendes Costa José Montival Alencar Junior Lurdes Bertol Rocha Maria Laura de Oliveira Gomes Marileide dos Santos de Oliveira Raimunda Alves Moreira de Assis Roseanne Montargil Rocha Silvia Maria Santos Carvalho Copyright©2015 by JOSÉ CLÁUDIO FARIA PHILIPPE GROSJEAN ENIO GALINKIN JELIHOVSCHI RICARDO PIETROBON PHILIPE SILVA FARIAS Direitos desta edição reservados à EDITUS - EDITORA DA UESC A reprodução não autorizada desta publicação, por qualquer meio, seja total ou parcial, constitui violação da Lei nº 9.610/98. Depósito legal na Biblioteca Nacional, conforme Lei nº 10.994, de 14 de dezembro de 2004. CAPA Carolina Sartório Faria REVISÃO Amek Traduções Dados Internacionais de Catalogação na Publicação (CIP) T591 Tinn-R Editor – GUI for R Language and Environment / José Cláudio Faria [et al.]. – 2. ed. – Ilhéus, BA : Editus, 2015. xvii, 279 p. ; pdf Texto em inglês.
    [Show full text]
  • Using Css to Style the Pdf Output
    Oxygen Markdown Support Alex Jitianu, Syncro Soft [email protected] @AlexJitianu © 2020 Syncro Soft SRL. All rights reserved. Oxygen Markdown Support Agenda • Markdown – the markup language • Markdown editing experience in Oxygen • Markdown and DITA working together • Validation and check for completeness (Quality Assurance) Oxygen Markdown Support What is Markdown? • Easy to learn Create a Google account ============ • Minimalistic How to create or set up your **Google Account** on • your mobile phone. Many authoring tools available * From a Home screen, swipe up to access Apps. • Publishing tools * Tap **Settings** > **Accounts** * Tap **Add account** > **Google**. Oxygen Markdown Support Working with Markdown • Templates • Editing and toolbar actions (GitHub Flavored Markdown) • HTML/DITA/XDITA Preview • Export actions • Oxygen XML Web Author Oxygen Markdown Support DITA-Markdown hybrid projects • Main documentation project written in DITA • SME(s) (developers) contribute content in Markdown Oxygen Markdown Support What is DITA? • DITA is an XML-based open standard • Semantic markup • Strong reuse concepts • Restrictions and specializations • Huge ecosystem of publishing choices Oxygen Markdown Support Using specific DITA concepts in Markdown • Metadata • Specialization types • Titles and document structure • Image and key references • https://github.com/jelovirt/dita-ot-markdown/wiki/Syntax- reference Oxygen Markdown Support What is Lightweight DITA? • Lightweight DITA is a proposed standard for expressing simplified DITA
    [Show full text]
  • Pelican Documentation Release 3
    Pelican Documentation Release 3 Alexis Métaireau November 20, 2012 CONTENTS i ii Pelican Documentation, Release 3 Pelican is a static site generator, written in Python. • Write your weblog entries directly with your editor of choice (vim!) in reStructuredText or Markdown • Includes a simple CLI tool to (re)generate the weblog • Easy to interface with DVCSes and web hooks • Completely static output is easy to host anywhere CONTENTS 1 Pelican Documentation, Release 3 2 CONTENTS CHAPTER ONE FEATURES Pelican currently supports: • Blog articles and pages • Comments, via an external service (Disqus). (Please note that while useful, Disqus is an external service, and thus the comment data will be somewhat outside of your control and potentially subject to data loss.) • Theming support (themes are created using Jinja2 templates) • PDF generation of the articles/pages (optional) • Publication of articles in multiple languages • Atom/RSS feeds • Code syntax highlighting • Compilation of LESS CSS (optional) • Import from WordPress, Dotclear, or RSS feeds • Integration with external tools: Twitter, Google Analytics, etc. (optional) 3 Pelican Documentation, Release 3 4 Chapter 1. Features CHAPTER TWO WHY THE NAME “PELICAN”? “Pelican” is an anagram for calepin, which means “notebook” in French. ;) 5 Pelican Documentation, Release 3 6 Chapter 2. Why the name “Pelican”? CHAPTER THREE SOURCE CODE You can access the source code at: https://github.com/getpelican/pelican 7 Pelican Documentation, Release 3 8 Chapter 3. Source code CHAPTER FOUR FEEDBACK / CONTACT US If you want to see new features in Pelican, don’t hesitate to offer suggestions, clone the repository, etc. There are many ways to contribute.
    [Show full text]
  • Dynamic Documents in Stata: Markdoc, Ketchup, and Weaver
    Haghish, E. F. (2014). Dynamic documents in Stata: MarkDoc, Ketchup, and Weaver. http://haghish.com/talk/reproducible_report.php Dynamic documents in Stata: MarkDoc, Ketchup, and Weaver Summary For Stata users who do not know LaTeX, writing a document that includes text, graphs, and Stata syntax and output has been a tedious and unreproducible manual process. To ease the process of creating dynamic documents in Stata, many Stata users have wished to see two additional features in Stata: literate programming and combining graphs with logfiles in a single document. MarkDoc, Ketchup, and Weaver are three user‐written Stata packages that allow you to create a dynamic document that includes graphs, text, and Stata codes and outputs and export it in a variety of file formats, including PDF, Docx, HTML, LaTex, OpenOffice/LibreOffice, EPUB, etc. I will also discuss further details about the specialties of these packages and their potential applications. Limitations of Stata in producing dynamic documents "The Stata dofile and logfile provide good‐enough tools for reproducing the analysis. However, Stata logfile only includes text output and graphs are exported separately. Consequently, combining a graph to Stata output in a report has been a manual work. In addition, the possibility of adding text to explain the analysis results in Stata output is limited by the duplication problem. For example, a text paragraph that is printed using the display command gets duplicated in the logfile by appearing on the command and the command’s out‐ put. Therefore, writing a analysis document that requires graphs and outputs, as well as text for describing the analysis results has become a manual work which is unreproducible, laborious, time consuming, prone to human error, and boring." [2] .
    [Show full text]
  • Markdown Som Format För Digitalt Bevarande
    1 KARL PETTERSSON Markdown som format för digitalt bevarande Abstract: In the choice of file formats for preservation of text documents, there is a potential trade-off between preserving the integrity and usability of documents. This trade-off is first discussed in relation to four well- established formats: plain text, PDF/A, Office Open XML Document and Open Document Text. These formats are then compared with Markdown, a relatively new so-called lightweight markup language. It is concluded that no single format is optimal with respect to the trade-off problem, when it comes to preserving typical documents in a modern environment, with more or less complex formatting and document structure. Therefore, the feasiblity of using two or more formats for preservation of a single document (e.g. PDF/A combined with Markdown and/or Office Open XML) is discussed. It is necessary to weigh the importance of integrity and long-term usability against the costs of preserving documents in multiple formats. Keywords: Integrity, Usability, Text documents, Markup language Copyright: CC BY-NC-ND- 3.0 https://creativecommons.org/licenses/by- nc-nd/3.0/ 1Karl Pettersson har en masterexamen i ABM med inriktning arkivvetenskap. Han intresserar sig särskilt för frågor relaterade till digitalt bevarande och implementering av filformat och kan kontaktas på [email protected]. 4 Förkortningar i text CSL Citation Style Language. 12 HTML Hypertext Markup Language. 7–11 PDF Portable Document Format. 1, 3–6, 10, 12–15 XML Extensible Markup Language. 1, 3, 5, 6, 9–15 YAML YAML Ain’t Markup Language. 10, 11 Inledning En viktig fråga vid arkivhantering i dagens alltmer digitaliserade samhälle är vilka filformat som skall användas vid elektroniskt bevarande av olika typer av dokument, inte minst textdokument som produceras i exempelvis vanliga ordbehandlingsprogram.
    [Show full text]
  • Personal Knowledge Models with Semantic Technologies
    Max Völkel Personal Knowledge Models with Semantic Technologies Personal Knowledge Models with Semantic Technologies Max Völkel 2 Bibliografische Information Detaillierte bibliografische Daten sind im Internet über http://pkm. xam.de abrufbar. Covergestaltung: Stefanie Miller Herstellung und Verlag: Books on Demand GmbH, Norderstedt c 2010 Max Völkel, Ritterstr. 6, 76133 Karlsruhe This work is licensed under the Creative Commons Attribution- ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Fran- cisco, California, 94105, USA. Zur Erlangung des akademischen Grades eines Doktors der Wirtschaftswis- senschaften (Dr. rer. pol.) von der Fakultät für Wirtschaftswissenschaften des Karlsruher Instituts für Technologie (KIT) genehmigte Dissertation von Dipl.-Inform. Max Völkel. Tag der mündlichen Prüfung: 14. Juli 2010 Referent: Prof. Dr. Rudi Studer Koreferent: Prof. Dr. Klaus Tochtermann Prüfer: Prof. Dr. Gerhard Satzger Vorsitzende der Prüfungskommission: Prof. Dr. Christine Harbring Abstract Following the ideas of Vannevar Bush (1945) and Douglas Engelbart (1963), this thesis explores how computers can help humans to be more intelligent. More precisely, the idea is to reduce limitations of cognitive processes with the help of knowledge cues, which are external reminders about previously experienced internal knowledge. A knowledge cue is any kind of symbol, pattern or artefact, created with the intent to be used by its creator, to re- evoke a previously experienced mental state, when used. The main processes in creating, managing and using knowledge cues are analysed. Based on the resulting knowledge cue life-cycle, an economic analysis of costs and benefits in Personal Knowledge Management (PKM) processes is performed.
    [Show full text]
  • A Lion, a Head, and a Dash of YAML Extending Sphinx to Automate Your Documentation FOSDEM 2018 @Stephenfin Restructuredtext, Docutils & Sphinx
    A lion, a head, and a dash of YAML Extending Sphinx to automate your documentation FOSDEM 2018 @stephenfin reStructuredText, Docutils & Sphinx 1 A little reStructuredText ========================= This document demonstrates some basic features of |rst|. You can use **bold** and *italics*, along with ``literals``. It’s quite similar to `Markdown`_ but much more extensible. CommonMark may one day approach this [1]_, but today is not that day. `docutils`__ does all this for us. .. |rst| replace:: **reStructuredText** .. _Markdown: https://daringfireball.net/projects/markdown/ .. [1] https://talk.commonmark.org/t/444 .. __ http://docutils.sourceforge.net/ A little reStructuredText ========================= This document demonstrates some basic features of |rst|. You can use **bold** and *italics*, along with ``literals``. It’s quite similar to `Markdown`_ but much more extensible. CommonMark may one day approach this [1]_, but today is not that day. `docutils`__ does all this for us. .. |rst| replace:: **reStructuredText** .. _Markdown: https://daringfireball.net/projects/markdown/ .. [1] https://talk.commonmark.org/t/444 .. __ http://docutils.sourceforge.net/ A little reStructuredText This document demonstrates some basic features of reStructuredText. You can use bold and italics, along with literals. It’s quite similar to Markdown but much more extensible. CommonMark may one day approach this [1], but today is not that day. docutils does all this for us. [1] https://talk.commonmark.org/t/444/ A little more reStructuredText ============================== The extensibility really comes into play with directives and roles. We can do things like link to RFCs (:RFC:`2324`, anyone?) or generate some more advanced formatting (I do love me some H\ :sub:`2`\ O).
    [Show full text]
  • R Markdown: the Definitive Guide
    Yihui Xie, J. J. Allaire, Garrett Grolemund R Markdown: The Definitive Guide To Jung Jae-sung (1982 – 2018), a remarkably hard-working badminton player with a remarkably simple playing style Contents List of Tables xvii List of Figures xix Preface xxiii About the Authors xxxv I GetStarted 1 1 Installation 5 2 Basics 7 2.1 Example applications .................. 7 2.1.1 Airbnb’s knowledge repository ......... 7 2.1.2 Homework assignments on RPubs ....... 7 2.1.3 Personalized mail ................. 8 2.1.4 2017 Employer Health Benefits Survey ..... 8 2.1.5 Journal articles .................. 8 2.1.6 Dashboards at eelloo ............... 8 2.1.7 Books ....................... 8 2.1.8 Websites ...................... 8 2.2 Compile an R Markdown document .......... 8 2.3 Cheat sheets ....................... 9 2.4 Output formats ...................... 9 2.5 Markdown syntax .................... 9 2.5.1 Inline formatting ................. 9 2.5.2 Block-level elements ............... 9 2.5.3 Math expressions ................. 9 2.6 R code chunks and inline R code ............ 10 2.6.1 Figures ....................... 10 2.6.2 Tables ....................... 10 vii viii Contents 2.7 Other language engines ................. 10 2.7.1 Python ....................... 10 2.7.2 Shell scripts .................... 10 2.7.3 SQL ........................ 11 2.7.4 Rcpp ........................ 11 2.7.5 Stan ........................ 11 2.7.6 JavaScript and CSS ................ 11 2.7.7 Julia ........................ 11 2.7.8 CandFortran ................... 11 2.8 Interactive documents .................. 11 2.8.1 HTML widgets .................. 11 2.8.2 Shiny documents ................. 12 II Output Formats 13 3 Documents 17 3.1 HTML document ..................... 17 3.1.1 Table of contents ................
    [Show full text]
  • Python Documentation Generator
    SPHINX Python documentation generator Anna Ferrari - 29.06.2021 • Documentation of your python (an other languages like java, C++, R, PHP, javascript,….) code • Outputs in HTML, Latex, ePub, https://www.sphinx-doc.org/en/master/ others • Deploy on webpage (for example in ReadTheDocs) Python documentation https://docs.python.org/3/ • Python • Linux kernel • Conda • Flask • Matplotlib • Jupiter Notebook • Lasagne • Indico • Zenodo …. Result at https://simpleble.readthedocs.io/en/latest/ Let’s get started ! https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html Create a new folder called simpleble-master simpleble-master └── simpleble └── test.py test.py def sum_two_numbers(a, b): return a + b Add to test.py documentation: https://realpython.com/documenting-python-code/ def sum_two_numbers(a, b): ‘’’ This function add two numbers Args: a (float) : first number to add b (float) : second number to add Returns: float The sum of a and b ‘’‘ return a + b Install sphinx ReadTheDocs Theme Create documentation root directory Call sphinx quickstart to initialise the project Let’s modify the configuration file: Uncomment Add the theme for read the documents html_theme = "sphinx_rtd_theme" Add the visualisation of the source code extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] html_show_sourcelink = True Build the html file Now we have an html file, and if we double click we see it in the browser. It’s empty since we didn’t populated it yet. Auto-generate .rst file from python youruser@yourpc:~yourWorkspacePath/simpleble-master/docs$
    [Show full text]
  • CV for Giuseppe Silano
    Last update: August 5, 2021 Karlovo namesti 13 12135 Prague 2, Czech Republic H +420 22435 7634 B [email protected] Giuseppe Silano Í giuseppesilano.net gsilano u gsilano Curriculum Vitae Born in Benevento (Italy), on July 23, 1989 Education Nov 2020 Ph.D. Program in Information Technologies for Engineering, Group for Research on Automatic Control Engineering (GRACE), University of Sannio, Benevento, Italy. { Additional mention of Doctor Europaeus. { Research topics are in robotics, control, path planning and software-in-the-loop. { Supervisor: Prof. Dr. Luigi Iannelli. Mar 2019 – Nov 2019 Visiting Ph.D. student at Laboratoire d’Analyse et d’Architecture des Systèmes (LAAS), Robotics and Interactions (RIS) group, Centre Na- tional de la Recherche Scientifique (CNRS), Toulouse, France. { Control of full-actuated 6DoFs1 robots with onboard sensors. { Supervisor: Prof. Dr. Antonio Franchi. Mar 2016 Master of Science in Electronic Engineering, University of Sannio, Ben- evento, Italy. { Focus on robotics, control, electronics and telecommunication. Jul 2012 Bachelor of Science in Computer Engineering, University of Sannio, Ben- evento, Italy. { Focus on robotics, control, software, telecommunication and electronics. Feb 2012 – Jun 2012 Industrial Internship in Systems Engineering, Mosaico Monitoraggio In- tegrato S.r.l., Benevento, Italy. { Design a software production methodology using an Object Oriented (OO) ap- proach for Programmable Logic Controllers (PLCs). Professional Affiliation Dec 2016 – Today IEEE (Institute of Electrical and Electronic Engineers), Student Member. Dec 2016 – Today IEEE Control Systems Society, Student Member. Dec 2016 – Today IEEE Robotics and Automation Society, Student Member. Academic Appointments Jun 2020 – Today Postdoctoral Research Fellow, Multi-robot Systems Group (MRS), Czech Technical University in Prague, Prague, Czech Republic.
    [Show full text]
  • Package 'Ascii'
    Package ‘ascii’ September 17, 2020 Maintainer Mark Clements <[email protected]> License GPL (>= 2) Title Export R Objects to Several Markup Languages Type Package Description Coerce R object to 'asciidoc', 'txt2tags', 'restructuredText', 'org', 'textile' or 'pandoc' syntax. Package comes with a set of drivers for 'Sweave'. Version 2.4 URL https://github.com/mclements/ascii BugReports https://github.com/mclements/ascii/issues Date 2020-08-18 Depends R (>= 2.13), methods Imports utils, digest, codetools, survival, stats, grDevices Suggests Hmisc, xtable, R2HTML, knitr Collate 'asciiAnova.r' 'asciiDataFrame.r' 'asciiDefault.r' 'asciiDensity.r' 'asciiDescr.r' 'asciiEpi.r' 'asciiGlm.r' 'asciiHmisc.r' 'asciiHtest.r' 'asciiList.r' 'asciiLm.r' 'asciiMatrix.r' 'asciiMemisc.r' 'asciiPrcomp.r' 'asciiSmoothSpline.r' 'asciiSummaryTable.r' 'asciiSurvival.r' 'asciiTable.r' 'asciiTs.r' 'asciiVector.r' 'bind.r' 'cbind.r' 'export.r' 'generic.r' 'groups.r' 'interleave.r' 'paste.matrix.r' 'plim.r' 'print.character.matrix.r' 'RweaveAscii.r' 'show.asciidoc.r' 'show.org.r' 'show.pandoc.r' 'show.r' 'show.rest.r' 'show.t2t.r' 'show.textile.r' 'SweaveAscii.r' 'tocharac.r' 'weaverAscii.r' 'zzz.r' 'print.r' 'cache_expr.R' 'weaver.R' 'unexported.R' RoxygenNote 7.0.2 NeedsCompilation no Author David Hajage [aut], Mark Clements [cre, ctb], Seth Falcon [ctb], 1 2 ascii.anova Terry Therneau [ctb], Matti Pastell [ctb], Friedrich Leisch [ctb] Repository CRAN Date/Publication 2020-09-17 13:10:09 UTC R topics documented: ascii.anova . .2 asciiCbind-class . 23 Asciidoc . 23 asciiList-class . 24 asciiMixed-class . 25 asciiTable-class . 26 cbind.ascii . 26 convert............................................ 27 createreport . 28 fig.............................................. 30 out.............................................. 31 paragraph . 31 plim............................................. 32 print,asciiCbind-method .
    [Show full text]
  • The Mat2doc Documentation System
    The mat2doc documentation system Peter L. Søndergaard July 17, 2014 1 About mat2doc mat2doc is a system made for extracting documenation from the Matlab function headers. You write the documentation in a Wiki-like syntax, and the system produces output for three dierent output formats: • Plain text with simple rendered formulas and no images • HTML / php with javascript formulas and images • Latex for processing with pdatex • Git or Subversion for managing the source code The software is written in Python as a wrapper around reStructuredText, and it can therefore handle all the markup possible in reStructuredText, with a few extra shortcuts suitable for writ- ing documenation.The easiest way of getting started is to look at the source code for ltfat or amtoolbox for a lot of examples. The restructured-text markup language is explained with a lot of examples on the homepage of the project http://docutils.sourceforge.net/rst.html. Cyrrently, the system runs only on Linux. No ocial release has been made yet, but we are working on it. 2 The markup language Read this section to learn about how to write the headers of function les and demos. 2.1 Code and variables Code and variables are typeset by changing the font • Code in always surrounded by backticks as in `c=dgt(...)` and is typeset in a typewriter font: c=dgt(...) The backtics is simply the default role in reStructuredText that has been assigned to this. • Single variables appearing in the text should be surrounded by stars as in *siglen* and is typeset in italics siglen • If you have code in a separate environment spanning one or more lines, close the previous environment by two colons :: .
    [Show full text]