From 96029c42744adeb4125a73daf78c69f53020ed7a Mon Sep 17 00:00:00 2001 From: Dan Schofield Date: Wed, 5 Jul 2023 16:16:38 +0100 Subject: [PATCH 1/3] added parts to cover open code checklist --- .flake8 | 17 +++++ .github/pull_request_template.md | 40 ++++++++++++ .github/workflows/pre-commit.yml | 14 ++++ .pre-commit-config.yaml | 48 ++++++++++++++ CHANGELOG.md | 42 ++++++++++++ CONTRIBUTING.md | 34 ++++++++++ OPEN_CODE_CHECKLIST.md | 49 ++++++++++++++ README.md | 109 ++++++++++++++++++++++--------- requirements.txt | 17 +++-- src/numpy_utils.py | 16 ++--- src/tab0_mot_tab.py | 1 + src/tab1_undirect.py | 11 ++-- src/tab2_direct.py | 10 +-- streamlit_hypergraphs.py | 14 ++-- 14 files changed, 362 insertions(+), 60 deletions(-) create mode 100644 .flake8 create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .pre-commit-config.yaml create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 OPEN_CODE_CHECKLIST.md diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..a121f2e --- /dev/null +++ b/.flake8 @@ -0,0 +1,17 @@ +[flake8] +# Rule definitions: http://flake8.pycqa.org/en/latest/user/error-codes.html +# D203: 1 blank line required before class docstring +# W503: line break before binary operator +exclude = + env*, + __pycache__, + node_modules, + bower_components, + migrations +ignore = D203,W503 +max-line-length = 115 +extend-ignore = E203 +per-file-ignores = + # __init__.py files are allowed to have unused imports and lines-too-long + */__init__.py:F401 + */**/**/__init__.py:F401,E501 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..e2903d0 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,40 @@ +# Summary + +**What/Why** + +Add your summary here - keep it brief, to the point, and in plain English. [For further +information about pull requests, check out the GDS +Way](https://gds-way.cloudapps.digital/standards/pull-requests.html). + +**Your approach** + +Why did you choose this approach? + +**What to review** + +Include any helpful pointers for the reviewer. + +# Checklists + + + +This pull/merge request meets the following requirements: + +- [ ] code runs +- [ ] [developments are ethical][data-ethics-framework] +- [ ] developments are secure (no data or notebook output) +- [ ] you have made proportionate checks that the code works correctly +- [ ] [minimum usable documentation][agilemodeling] written in the `docs` folder + +Comments have been added below around the incomplete checks. + +[agilemodeling]: http://agilemodeling.com/essays/documentLate.htm +[data-ethics-framework]: https://www.gov.uk/government/publications/data-ethics-framework diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..15f0018 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,14 @@ +name: pre-commit + +on: + pull_request: + push: + branches: main + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - uses: pre-commit/action@v3.0.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..881185a --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,48 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +# exclude: ^folder/ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + + - repo: https://github.com/kynan/nbstripout + rev: 0.6.1 + hooks: + - id: nbstripout + + - repo: https://github.com/pycqa/isort + rev: 5.12.0 + hooks: + - id: isort + name: isort - Sort Python imports (auto-fixes) + types: [cython, pyi, python] + args: ["--profile", "black", "--filter-files"] + + - repo: https://github.com/pycqa/flake8 + rev: 6.0.0 + hooks: + - id: flake8 + name: flake8 - Python linting + + - repo: https://github.com/psf/black + rev: 23.3.0 # Replace by any tag/version: https://github.com/psf/black/tags + hooks: + - id: black + name: black - consistent Python code formatting (auto-fixes) + language_version: python # Should be a command that runs python3.6+ + + - repo: https://github.com/nbQA-dev/nbQA + rev: 1.7.0 + hooks: + - id: nbqa-isort + name: nbqa-isort - Sort Python imports (notebooks; auto-fixes) + # strangely the args need to be concatenated + args: ["--profile=black"] + - id: nbqa-black + name: nbqa-black - consistent Python code formatting (notebooks; auto-fixes) + additional_dependencies: [black==22.3.0] diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7afa389 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,42 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +Instructions on how to update this Changelog are available in the `Updating the Changelog` section of the [`CONTRIBUTING.md`](./CONTRIBUTING.md). This project follows [semantic versioning](https://semver.org/spec/v2.0.0.html). + +--- +### [Pre-release v0.3.1] + +Minor updates before making repo public + +--- + +### [Pre-release v0.3.0](https://github.com/nhsx/hypergraphical/releases/tag/v0.3.0) + +Changes to **Hypergraphs for Multimorbidity** project: +- Successor tab added to the Streamlit app - this tab allows the user to input a set of 'diseases' and find out the next likely observed disease progressions using the hyperedge centrality scores calculated from the dual hypergraph +- Minor changes to functions and scripts + +--- + +### [Pre-release v0.2.0](https://github.com/nhsx/hypergraphical/releases/tag/v0.2.0) + +Changes to **Hypergraphs for Multimorbidity** project: +- Directed hypergraphs page added to Streamlit app +- Minor changes to clean the Python scripts + +--- + +### [Pre-release v0.1.0](https://github.com/nhsx/hypergraphical/releases/tag/v0.1.0) + +Added description of the **Hypergraphs for Multimorbidity** project, plus: +- What multimorbidities are and what hypergraphs are +- How hypergraphs can be used to look at patient pathways with multimorbidities +- Walkthrough of how undirected graphs are built from a population of fictitious randomly generated 'patients' +- Calculation of node centrality using Eigenvector centrality + +--- + +### [Pre-release v0.0.0] + +Added working codebase for **Hypergraph Animations** using `manim` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..d7f621f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,34 @@ +# Contributing +We love contributions! We've compiled these docs to help you understand our contribution guidelines. If you still have questions, please [contact us](mailto:england.tdau@nhs.net), we'd be super happy to help. + +## Contents of this file +- [Code of conduct](#code-of-conduct) +- [Folder structure](#folder-structure) +- [Commit hygiene](#commit-hygiene) +- [Updating Changelog](#updating-changelog) + +## Code of Conduct +Please read [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) before contributing. + +## Commit hygiene + +Please see the GDS [Git style guide in the 'How to store source code' page of the GDS Way](https://gds-way.cloudapps.digital/standards/source-code/), which describes how we prefer Git history and commit messages to read. + +## Updating the Changelog + +If you open a GitHub pull request on this repo, please update `CHANGELOG` to reflect your contribution. + +Add your entry under `Unreleased` as: +- `Breaking changes` +- `New features` +- `Fixes` + +Internal changes to the project that are not part of the public API do not need changelog entries, for example fixing the CI build server. + +These sections follow [semantic versioning](https://semver.org/spec/v2.0.0.html), where: + +- `Breaking changes` corresponds to a `major` (1.X.X) change. +- `New features` corresponds to a `minor` (X.1.X) change. +- `Fixes` corresponds to a `patch` (X.X.1) change. + +See the [`CHANGELOG.md`](./CHANGELOG.md) for an example for how this looks. diff --git a/OPEN_CODE_CHECKLIST.md b/OPEN_CODE_CHECKLIST.md new file mode 100644 index 0000000..df56181 --- /dev/null +++ b/OPEN_CODE_CHECKLIST.md @@ -0,0 +1,49 @@ +# Open Code Checklist +To ensure that the code we publish is appropraite, clear and reusable we require a set way of working when pushing code to private and public repoistories. It is difficult to set any precise but generic standards and so we ask that the following checklist is considered with mandatroy items filled out. + +## When publishing your code you need to make sure: + + +### you’re clear about who owns the code and how others can use it + +- [ ] Does your code have an appropriate licence and copyright notice? (**Mandatory**) +- [ ] Is there a README and does it document intended purpose? (**Mandatory**) +- [ ] Is the README clear and concise? (**Optional** - use analytics unit template or [example](https://github.com/othneildrew/Best-README-Template/blob/master/BLANK_README.md)) +- [ ] Do you need to consider MHRA 'software as a medical device' guidance? (**Mandatory** - use [flowchart](https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/999908/Software_flow_chart_Ed_1-08b-IVD.pdf)) +- [ ] Who has responsibility for ongoing support and communications for the code? (**Optional** Best practice to assign, else state the code is not maintained and when the last update was) +- [ ] Has a responsible disclosure process for security issues been defined? (**Mandatory** - could use github issues) +- [ ] Who will address identified issues and security concerns? (**Mandatory**. - assign monitoring of above disclosure process) +- [ ] Has semantic versioning been used? (**Optional**) +- [ ] Have [contribution guidelines](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md) or [PR style guides](https://github.com/alphagov/styleguides/blob/master/pull-requests.md) been included? (**Optional**) +- [ ] Are package dependencies and libaries documented with versions? (**Optional**) + +### You do not release information that should remain closed + +- [ ] Does the code include any sensitive, personal, secret or top secret data/information? (**Mandatory**) +- [ ] Does the code include any unreleased policy? (**Mandatory**) +- [ ] Does the code include business sensitive algorithms (e.g. finance allocations)? (**Mandatory**) +- [ ] Has written permission been obtained for any data stored from the data owner? (**Mandatory**) +- [ ] Are any data transfers conducted safely and securely? (**Mandatory**) +- [ ] Are any credentials contained in the source code? (**Mandatory** - check in both current version and git history) +- [ ] Are any secret keys contained in the source code? (**Mandatory** - check in both current version and git history) +- [ ] Are the commit messages informative? (**Optional**) +- [ ] Do the commit messages include any sensitive information (e.g. names)? (**Mandatory**) +- [ ] Does the git history contain any sensitive information (e.g. at one time real data or credentials were in the code but have since been removed) (**Mandatory**) +- [ ] Have notebook outputs been removed/checked for sensitive information? (**Mandatory** - check but some appropriate outputs maybe useful: [Example]( https://github.com/best-practice-and-impact/govcookiecutter/blob/main/%7B%7B%20cookiecutter.repo_name%20%7D%7D/.pre-commit-config.yaml)) +- [ ] Is configuration written as code and separated from analytical code? (**Optional**) + +### You store it in a repository managed by your department (to make licensing/copyright clear) + +- [ ] Is the code version controlled using GIT or similar? (**Optional**) +- [ ] Is the code stored in your organisational GitHub account? Is it the same organisation that funds the relevant staff time? (**Optional**) + +### Any third-party tools you use to host or manage your code follow the National Cyber Security Centre’s cloud security guidance + +- [ ] Are third party tools used within the code? (**Mandatory** check. Best practice is to keep an inventory) +- [ ] If so do they adhere to the NCSC's [Cloud Security Principles](https://www.ncsc.gov.uk/collection/cloud-security/implementing-the-cloud-security-principles)? (**Mandatory**) + +### An internal code review has been completed + +- [ ] Has a colleague reviewed the code for sensitive data content and security vulnerabilities? (**Mandatory** - Best practice is to record automated code quality and security tools used) +- [ ] Has a code quality review been completed focussing on the end usability and clarity? (**Optional** - consider runing through the [example](https://best-practice-and-impact.github.io/qa-of-code-guidance/checklist_higher.html) or similar code quality checklist) +- [ ] Has the code been assessed for its [level or RAP](https://github.com/NHSDigital/rap-community-of-practice/blob/main/what_is_RAP/levels_of_RAP.md)(Reproducible Analytical Pipeline)? diff --git a/README.md b/README.md index cf54aa4..c442b7d 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,68 @@ # Hypergraphical -### About +## About the project -This repository contains two types of code, _Hypergraph Animations_ and _Hypergraphs for Multimorbidity_. +[![status: experimental](https://github.com/GIScience/badges/raw/master/status/experimental.svg)](https://github.com/GIScience/badges#experimental) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) -As described below one part -contains the code to create hypergraph animations using `manim`, explaining how -hypergraphs are constructed. The second component is a streamlit applet which -provides an interactive walkthrough of calculating node centrality and -PageRank scores of hypergraphs. This code supports the Transforming Healthcare -Data with Graph-based Techniques Using SAIL DataBank project. A link to the + +This repository contains two components: + - _Hypergraph Animations_ + - _Hypergraphs for Multimorbidity_ + +The first components contains the code to create hypergraph animations using `manim`, explaining how +hypergraphs are constructed. + +The second component is a streamlit applet which provides an interactive walkthrough of calculating node centrality and +PageRank scores of hypergraphs. This code supports the Transforming Healthcare +Data with Graph-based Techniques Using SAIL DataBank project and a link to the original project proposal can be found [here](https://nhsx.github.io/nhsx-internship-projects/). _**Note:** Only public or fake data are shared in this repository._ -# Hypergraph Animations +⚠️ The repository uses [pre-commit](https://pre-commit.com) hooks to enforce code style using [black](https://github.com/psf/black), follows [flake8](https://github.com/PyCQA/flake8), and performs a few other checks. See `.pre-commit-config.yaml` for more details. These hooks will also need installing locally via: + +```{bash} +pre-commit autoupdate +pre-commit install +``` + +and then will be checked on commit. -A library of animations explaining hypergraphs using manim. +# Hypergraph Animations + +A library of animations explaining hypergraphs using `manim`. -## Installation Instructions +### Installation Instructions -A detailed tutorial for installing manim can be found here: +A detailed tutorial for installing `manim` can be found here: [Manim Docs](https://docs.manim.community/en/stable/installation.html) -## Quick Guide +### Quick Guide 1. Clone the repository locally 2. Install Manim in a virtual environment (use the instructions found above) 3. Run virtual environment - + ``` $ source venv/bin/activate venv ``` - + 4. Run the following command to create the Hypergraph Example ``` $ manim -qm src/hypergraphs/hypergraphs.py HypergraphExample ``` - + 5. The mp4 will autoplay. If not please find the video in the following directory: - ``` + ``` $ media/videos/hypergraphs/720p30/ - + ``` -## TL;DC (Too Long; Didn't Clone) +### TL;DC (Too Long; Didn't Clone) Please find a colab workbook here: @@ -59,26 +73,26 @@ Please find a colab workbook here: # Hypergraphs for Multimorbidity -This __prototype__ tool has been built using Streamlit, a Python app framework that can be used to create web apps. This Streamlit app allows users to explore hypergraphs in the context of multimoribidity. +This __prototype__ tool has been built using Streamlit, a Python app framework that can be used to create web apps. This Streamlit app allows users to explore hypergraphs in the context of multimoribidity. -_This is not an official NHS England product or service but instead is an interactive applet prototype containing ongoing work. +> This is not an official NHS England product or service but instead is an interactive applet prototype containing ongoing work. This __prototype__ aims only to demonstrate work that may be of interest to others. Opinions expressed in this applet are not representative of the views of NHS England and any content here should __not__ be regarded as official output in any form. -For more information about NHS England please visit our official -[website](https://www.england.nhs.uk/)._ +For more information about NHS England please visit our official +[website](https://www.england.nhs.uk/). -The Streamlit applet explains what multimorbidity is, what hypergraphs are and why hypergraphs are useful for modelling multimoribidity. This applet randomly generates a set of _fictious_ 'patients' and their disease pathways to demonstrate the use of hypergraphs in understanding multimorbidity. The -sidebar on the left of this page can be used to change the number of 'patients' to +The Streamlit applet explains what multimorbidity is, what hypergraphs are and why hypergraphs are useful for modelling multimoribidity. This applet randomly generates a set of _fictious_ 'patients' and their disease pathways to demonstrate the use of hypergraphs in understanding multimorbidity. The +sidebar on the left of this page can be used to change the number of 'patients' to generate and the maximum number of diseases to include in their pathways. -In changing the number of patients and diseases, the hypergraph outputs will change +In changing the number of patients and diseases, the hypergraph outputs will change and this is purposeful to enable you to observe how population alterations result in different outcomes. -Users can follow through the examples to find out how the hypergraph-mm works by generating hyperedge and hyperarc weights for the population, followed by calculating centrality to show the importance of different diseases within the population. +Users can follow through the examples to find out how the hypergraph-mm works by generating hyperedge and hyperarc weights for the population, followed by calculating centrality to show the importance of different diseases within the population. ![Hypergraphs for Multimoribidity Tool](/images/streamlit_screenshot.PNG) -## Deployment (local) Instructions +### Deployment (local) Instructions To deploy the streamlit app locally we advise following the instructions below: @@ -106,6 +120,41 @@ Streamlit will then render the tool and display it in your default web browser a http://localhost:8501/ ``` -## Testing +### Testing + +Run tests by using `pytest test_streamlit/test_edge_count.py`. + +--- +### Roadmap + +See the repo [Issues](./Issues/) for a list of proposed features (and known problems). + +### Contributing + +Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. + +1. Fork the Project +2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) +3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) +4. Push to the Branch (`git push origin feature/AmazingFeature`) +5. Open a Pull Request + +_See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guidance._ + +### License + +Unless stated otherwise, the codebase is released under [the MIT Licence][mit]. +This covers both the codebase and any sample code in the documentation. + +_See [LICENSE](./LICENSE) for more information._ + +The project specific documentation is [© Crown copyright][copyright] and available under the terms +of the [Open Government 3.0][ogl] licence. + +[mit]: LICENCE +[copyright]: http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/ +[ogl]: http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/ + +### Contact -Run tests by using `pytest test_streamlit/test_edge_count.py`. \ No newline at end of file +To find out more about [DART](https://www.nhsx.nhs.uk/key-tools-and-info/nhsx-analytics-unit/) visit our [project website](https://nhsx.github.io/AnalyticsUnit/projects.html) or get in touch [here](mailto:england.tdau@nhs.net). diff --git a/requirements.txt b/requirements.txt index 98d2b1c..649bbfe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,14 +1,17 @@ -pytest -ipykernel -wheel -mypy -tox -flake8 black -networkx +flake8 hypernetx +ipykernel +isort matplotlib +mypy +networkx numpy pandas +pre-commit==2.21.0 +pytest +scipy seaborn streamlit +tox +wheel diff --git a/src/numpy_utils.py b/src/numpy_utils.py index 160caf1..70faeee 100644 --- a/src/numpy_utils.py +++ b/src/numpy_utils.py @@ -1,16 +1,16 @@ -import networkx as nx -import hypernetx as hnx -import matplotlib.pyplot as plt +# import streamlit as st +import math import random -from string import ascii_uppercase as auc -from PIL import Image -from itertools import chain, combinations from ast import literal_eval +from itertools import chain, combinations +from string import ascii_uppercase as auc -# import streamlit as st -import math +import hypernetx as hnx +import matplotlib.pyplot as plt +import networkx as nx import numpy as np import pandas as pd +from PIL import Image ############################################################################### diff --git a/src/tab0_mot_tab.py b/src/tab0_mot_tab.py index d5bbc27..d8b5047 100644 --- a/src/tab0_mot_tab.py +++ b/src/tab0_mot_tab.py @@ -2,6 +2,7 @@ # Libraries and Imports ############################################################################### import streamlit as st + from src import numpy_utils diff --git a/src/tab1_undirect.py b/src/tab1_undirect.py index 1d29786..e70e79c 100644 --- a/src/tab1_undirect.py +++ b/src/tab1_undirect.py @@ -1,15 +1,14 @@ ############################################################################### # Libraries and Imports ############################################################################### -import streamlit as st -import pandas as pd -import numpy as np -from scipy import linalg - - # from sklearn import preprocessing from string import ascii_uppercase as auc +import numpy as np +import pandas as pd +import streamlit as st +from scipy import linalg + # local from src import numpy_utils diff --git a/src/tab2_direct.py b/src/tab2_direct.py index ba0d998..0cb7d02 100644 --- a/src/tab2_direct.py +++ b/src/tab2_direct.py @@ -1,16 +1,16 @@ ############################################################################### # Libraries and Imports ############################################################################### -import streamlit as st -import pandas as pd -import numpy as np -from scipy import linalg import itertools from string import ascii_uppercase as auc +import numpy as np +import pandas as pd +import streamlit as st +from scipy import linalg # local -from src import numpy_utils, create_figs +from src import create_figs, numpy_utils ############################################################################## diff --git a/streamlit_hypergraphs.py b/streamlit_hypergraphs.py index 810d766..22ae1db 100644 --- a/streamlit_hypergraphs.py +++ b/streamlit_hypergraphs.py @@ -1,15 +1,21 @@ ############################################################################### # Libraries and Imports ############################################################################### -import streamlit as st import base64 -from src import numpy_utils, progressions, tab0_mot_tab, tab1_undirect -from src import tab2_direct from string import ascii_uppercase as auc + import numpy as np import pandas as pd -from src import hyperarc_centrality +import streamlit as st +from src import ( + hyperarc_centrality, + numpy_utils, + progressions, + tab0_mot_tab, + tab1_undirect, + tab2_direct, +) ############################################################################### # Configure Page and Format From 5fe6ecba5f01d38da9a89d48eafca26a8a6bf424 Mon Sep 17 00:00:00 2001 From: Dan Schofield Date: Wed, 5 Jul 2023 16:20:45 +0100 Subject: [PATCH 2/3] update aspects of checklist --- OPEN_CODE_CHECKLIST.md | 50 +++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/OPEN_CODE_CHECKLIST.md b/OPEN_CODE_CHECKLIST.md index df56181..b201f1b 100644 --- a/OPEN_CODE_CHECKLIST.md +++ b/OPEN_CODE_CHECKLIST.md @@ -6,41 +6,41 @@ To ensure that the code we publish is appropraite, clear and reusable we require ### you’re clear about who owns the code and how others can use it -- [ ] Does your code have an appropriate licence and copyright notice? (**Mandatory**) -- [ ] Is there a README and does it document intended purpose? (**Mandatory**) -- [ ] Is the README clear and concise? (**Optional** - use analytics unit template or [example](https://github.com/othneildrew/Best-README-Template/blob/master/BLANK_README.md)) +- [x] Does your code have an appropriate licence and copyright notice? (**Mandatory**) +- [x] Is there a README and does it document intended purpose? (**Mandatory**) +- [x] Is the README clear and concise? (**Optional** - use analytics unit template or [example](https://github.com/othneildrew/Best-README-Template/blob/master/BLANK_README.md)) - [ ] Do you need to consider MHRA 'software as a medical device' guidance? (**Mandatory** - use [flowchart](https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/999908/Software_flow_chart_Ed_1-08b-IVD.pdf)) -- [ ] Who has responsibility for ongoing support and communications for the code? (**Optional** Best practice to assign, else state the code is not maintained and when the last update was) -- [ ] Has a responsible disclosure process for security issues been defined? (**Mandatory** - could use github issues) -- [ ] Who will address identified issues and security concerns? (**Mandatory**. - assign monitoring of above disclosure process) -- [ ] Has semantic versioning been used? (**Optional**) -- [ ] Have [contribution guidelines](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md) or [PR style guides](https://github.com/alphagov/styleguides/blob/master/pull-requests.md) been included? (**Optional**) -- [ ] Are package dependencies and libaries documented with versions? (**Optional**) +- [x] Who has responsibility for ongoing support and communications for the code? (**Optional** Best practice to assign, else state the code is not maintained and when the last update was) +- [x] Has a responsible disclosure process for security issues been defined? (**Mandatory** - could use github issues) +- [x] Who will address identified issues and security concerns? (**Mandatory**. - assign monitoring of above disclosure process) +- [x] Has semantic versioning been used? (**Optional**) +- [x] Have [contribution guidelines](https://github.com/alphagov/govuk-frontend/blob/master/CONTRIBUTING.md) or [PR style guides](https://github.com/alphagov/styleguides/blob/master/pull-requests.md) been included? (**Optional**) +- [x] Are package dependencies and libaries documented with versions? (**Optional**) ### You do not release information that should remain closed -- [ ] Does the code include any sensitive, personal, secret or top secret data/information? (**Mandatory**) -- [ ] Does the code include any unreleased policy? (**Mandatory**) -- [ ] Does the code include business sensitive algorithms (e.g. finance allocations)? (**Mandatory**) -- [ ] Has written permission been obtained for any data stored from the data owner? (**Mandatory**) -- [ ] Are any data transfers conducted safely and securely? (**Mandatory**) -- [ ] Are any credentials contained in the source code? (**Mandatory** - check in both current version and git history) -- [ ] Are any secret keys contained in the source code? (**Mandatory** - check in both current version and git history) -- [ ] Are the commit messages informative? (**Optional**) -- [ ] Do the commit messages include any sensitive information (e.g. names)? (**Mandatory**) -- [ ] Does the git history contain any sensitive information (e.g. at one time real data or credentials were in the code but have since been removed) (**Mandatory**) -- [ ] Have notebook outputs been removed/checked for sensitive information? (**Mandatory** - check but some appropriate outputs maybe useful: [Example]( https://github.com/best-practice-and-impact/govcookiecutter/blob/main/%7B%7B%20cookiecutter.repo_name%20%7D%7D/.pre-commit-config.yaml)) -- [ ] Is configuration written as code and separated from analytical code? (**Optional**) +- [x] Does the code include any sensitive, personal, secret or top secret data/information? (**Mandatory**) +- [x] Does the code include any unreleased policy? (**Mandatory**) +- [x] Does the code include business sensitive algorithms (e.g. finance allocations)? (**Mandatory**) +- [x] Has written permission been obtained for any data stored from the data owner? (**Mandatory**) +- [x] Are any data transfers conducted safely and securely? (**Mandatory**) +- [x] Are any credentials contained in the source code? (**Mandatory** - check in both current version and git history) +- [x] Are any secret keys contained in the source code? (**Mandatory** - check in both current version and git history) +- [x] Are the commit messages informative? (**Optional**) +- [x] Do the commit messages include any sensitive information (e.g. names)? (**Mandatory**) +- [x] Does the git history contain any sensitive information (e.g. at one time real data or credentials were in the code but have since been removed) (**Mandatory**) +- [x] Have notebook outputs been removed/checked for sensitive information? (**Mandatory** - check but some appropriate outputs maybe useful: [Example]( https://github.com/best-practice-and-impact/govcookiecutter/blob/main/%7B%7B%20cookiecutter.repo_name%20%7D%7D/.pre-commit-config.yaml)) +- [x] Is configuration written as code and separated from analytical code? (**Optional**) ### You store it in a repository managed by your department (to make licensing/copyright clear) -- [ ] Is the code version controlled using GIT or similar? (**Optional**) -- [ ] Is the code stored in your organisational GitHub account? Is it the same organisation that funds the relevant staff time? (**Optional**) +- [x] Is the code version controlled using GIT or similar? (**Optional**) +- [x] Is the code stored in your organisational GitHub account? Is it the same organisation that funds the relevant staff time? (**Optional**) ### Any third-party tools you use to host or manage your code follow the National Cyber Security Centre’s cloud security guidance -- [ ] Are third party tools used within the code? (**Mandatory** check. Best practice is to keep an inventory) -- [ ] If so do they adhere to the NCSC's [Cloud Security Principles](https://www.ncsc.gov.uk/collection/cloud-security/implementing-the-cloud-security-principles)? (**Mandatory**) +- [x] Are third party tools used within the code? (**Mandatory** check. Best practice is to keep an inventory) +- [x] If so do they adhere to the NCSC's [Cloud Security Principles](https://www.ncsc.gov.uk/collection/cloud-security/implementing-the-cloud-security-principles)? (**Mandatory**) ### An internal code review has been completed From 08f1cb0f1431770c58962233a43e524798420011 Mon Sep 17 00:00:00 2001 From: Dan Schofield Date: Wed, 5 Jul 2023 16:36:54 +0100 Subject: [PATCH 3/3] pre-commit fixes --- .gitignore | 2 +- .streamlit/config.toml | 2 +- .vscode/settings.json | 2 +- markdown_text/dir_hypergraphs.txt | 25 +- markdown_text/graphs.txt | 18 +- markdown_text/mm_description.txt | 4 +- markdown_text/overview.txt | 19 +- markdown_text/project_aims.txt | 1 - markdown_text/prototype.txt | 4 +- markdown_text/purpose.txt | 14 +- markdown_text/ref_list.txt | 1 - markdown_text/summary.txt | 10 +- markdown_text/undir_hypergraphs.txt | 16 +- pyproject.toml | 2 - setup.cfg | 2 +- src/hypergraphs/hypergraphs.py | 51 +- test_streamlit/test_edge_count.py | 3 - tox.ini | 1 - workbooks/hypergraph_animations.ipynb | 1307 ++++--------------------- 19 files changed, 252 insertions(+), 1232 deletions(-) diff --git a/.gitignore b/.gitignore index e0bff0d..7812a67 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ venv/ __pycache__/ drawing_test.ipynb patient_converter_playground.ipynb -remove_dead_end.ipynb \ No newline at end of file +remove_dead_end.ipynb diff --git a/.streamlit/config.toml b/.streamlit/config.toml index 7fa3999..b227b0f 100644 --- a/.streamlit/config.toml +++ b/.streamlit/config.toml @@ -4,4 +4,4 @@ primaryColor="#0072CE" backgroundColor="#ffffff" secondaryBackgroundColor="#e8eef9" textColor="#000000" -font="sans serif" \ No newline at end of file +font="sans serif" diff --git a/.vscode/settings.json b/.vscode/settings.json index d99f2f3..cee7b74 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,4 +3,4 @@ "editor.defaultFormatter": "ms-python.black-formatter" }, "python.formatting.provider": "none" -} \ No newline at end of file +} diff --git a/markdown_text/dir_hypergraphs.txt b/markdown_text/dir_hypergraphs.txt index 4c916f4..2a776b4 100644 --- a/markdown_text/dir_hypergraphs.txt +++ b/markdown_text/dir_hypergraphs.txt @@ -1,32 +1,29 @@ -You can explore and visualise how undirected population-based hypergraphs are built from multiple fictitious patients in the +You can explore and visualise how undirected population-based hypergraphs are built from multiple fictitious patients in the `Undirected Hypergraph` tab at the top of this page. #### Directed B-Hypergraphs -Directed hypergraphs expand on undirected hypergraphs, but have the advantage that they can represent directionality between +Directed hypergraphs expand on undirected hypergraphs, but have the advantage that they can represent directionality between relationships i.e. the sequence in which conditions occur in patients. -A directed hypergraph $\mathcal{H}_D(V, \mathcal{E})$ is a collection of nodes stored in $V = \{v_1, \dots, v_n\}$, and hyperarcs, +A directed hypergraph $\mathcal{H}_D(V, \mathcal{E})$ is a collection of nodes stored in $V = \{v_1, \dots, v_n\}$, and hyperarcs, $\mathcal{E} = \{e_1, \dots,e_m\}$. Each hyperarc $e_i = \langle T(e_i), H(e_i)\rangle$ where $T(e_i), H(e_i) \subseteq V$ represents - a collection of nodes such that those $v_i \in T(e_i)$ are the tails of the hyperarc and those $v_j \in H(e_i)$ are the heads of - the hyperarc. + a collection of nodes such that those $v_i \in T(e_i)$ are the tails of the hyperarc and those $v_j \in H(e_i)$ are the heads of + the hyperarc. There are various types of directed hypergraphs, B-hypergraphs, F-hypergraphs, and BF-hypergraphs to name a few. -B-hypergraphs are restricted to have only one head node for each hyperarc, but can have unlimited tail nodes. For example, someone -might have disease $C$ and $A$ (tail nodes) and then gain disease $B$ (head node) (see visual below). In the opposite case, +B-hypergraphs are restricted to have only one head node for each hyperarc, but can have unlimited tail nodes. For example, someone +might have disease $C$ and $A$ (tail nodes) and then gain disease $B$ (head node) (see visual below). In the opposite case, F-hypergraphs can have only one tail node but unlimited head nodes. BF-hypergraphs have no restriction on the number of tail or head nodes. -We chose to use B-hypergraphs due to the computational complexity being high in the BF-hypergraph variation and because the -clinical way that conditions tend to aggregate can be well represented with B-hypergraphs. However, we do appreciate the -limitation here that someone may gain two diseases simultaneously, which could be better represented using BF-hypergraphs, but we +We chose to use B-hypergraphs due to the computational complexity being high in the BF-hypergraph variation and because the +clinical way that conditions tend to aggregate can be well represented with B-hypergraphs. However, we do appreciate the +limitation here that someone may gain two diseases simultaneously, which could be better represented using BF-hypergraphs, but we apply a workaround to this. This is out of the scope of this dashboard, but further information can be found in an upcoming publication and code base. Undirected, parent hyperedges give rise to children hyperarcs (directed hyperedges). Sibling hyperarcs are hyperarcs which have the same parent hyperedge and thus have the same set of nodes as the hyperarc in question. An example of a hyperarc with its siblings -and parent hyperedge are shown in the image below. You can explore and visualise how directed hypergraphs are built from multiple +and parent hyperedge are shown in the image below. You can explore and visualise how directed hypergraphs are built from multiple fictitious patients in the `Directed Hypergraph` tab at the top of this page. - - - diff --git a/markdown_text/graphs.txt b/markdown_text/graphs.txt index 9612935..303fd24 100644 --- a/markdown_text/graphs.txt +++ b/markdown_text/graphs.txt @@ -1,21 +1,19 @@ _What are graphs and hypergraphs and why do we want to use them?_ -Using hypergraphs enables more complexities and relationships from the data to be included. -_Why?_ Let's start by describing __undirected graphs__, __directed graphs__, __undirected hypergraphs__ and __directed -hypergraphs__. +Using hypergraphs enables more complexities and relationships from the data to be included. +_Why?_ Let's start by describing __undirected graphs__, __directed graphs__, __undirected hypergraphs__ and __directed +hypergraphs__. -Graphs are very good at structuring interactivity and networks, which makes them particularly useful in healthcare where healthcare +Graphs are very good at structuring interactivity and networks, which makes them particularly useful in healthcare where healthcare data can be sparse. A standard graph $\mathcal{G}(v,e)$ can connect only 2 objects/nodes ($v$) with one edge ($e$). Only pairwise connections can exist. -Graphs can be directed or undirected. Directed graphs give directionality to node interactions. For a temporal example lets imagine -$node_1$ is diabetes which could happen prior to $node_2$ which is chronic kidney disease, directionality shows the temporal order +Graphs can be directed or undirected. Directed graphs give directionality to node interactions. For a temporal example lets imagine +$node_1$ is diabetes which could happen prior to $node_2$ which is chronic kidney disease, directionality shows the temporal order or sequence of events. Alternatively, in an undirected graph edges connecting two nodes/diseases simply imply there is a relationship between the two. Here we should emphasize that standard graphs only enable __pairwise__ relationships to be represented. - -Graphs have the benefit of allowing extra information to be stored in the nodes or edges, these can be weights or attributes. For -example, you may wish to store more details about a condition within a node or the elapsed time between disease contraction within +Graphs have the benefit of allowing extra information to be stored in the nodes or edges, these can be weights or attributes. For +example, you may wish to store more details about a condition within a node or the elapsed time between disease contraction within an edge. - diff --git a/markdown_text/mm_description.txt b/markdown_text/mm_description.txt index 1830834..fd27bd9 100644 --- a/markdown_text/mm_description.txt +++ b/markdown_text/mm_description.txt @@ -1,7 +1,6 @@ Multimorbidity is defined as having 2 or more long term chronic health conditions simultaneously. Multimorbidity is associated with increased health service utilisation (Cassell et al., 2018). -People are living longer and so the population is ageing. This is due to -improvements in lifestyle through things such as having healthier diets, exercising and not smoking. Treatment improvements mean that more people are surviving acute conditions. The number of hospitals and other healthcare services are not increasing fast enough to keep up with this rising ageing population and increased health service utilisation required by patients with multimorbidity, so healthcare services are being burdened. +People are living longer and so the population is ageing. This is due to improvements in lifestyle through things such as having healthier diets, exercising and not smoking. Treatment improvements mean that more people are surviving acute conditions. The number of hospitals and other healthcare services are not increasing fast enough to keep up with this rising ageing population and increased health service utilisation required by patients with multimorbidity, so healthcare services are being burdened. Frameworks and policies in healthcare management are designed for individual conditions, rather than multiple. Patients with multiple long-term conditions can be difficult to treat as medications may interact and conditions require different management strategies. If departments could be placed more optimally distally when multimorbidity occurs, access for patients could be easier and quicker. Which is especially important for those with frailties. Additionally, having departments closer together allows them to communicate to better integrate treatment plans for their in common patients. @@ -10,4 +9,3 @@ Approximately 1 in 4 patients in primary care within the UK had multiple chronic One study using data from around 14 million patients in 2012 found that hypertension, depression/anxiety and then chronic pain were the most prevalent multimorbidity conditions. They also found than females (30\%) were more likely to have multimorbidity than males (24.4\%). And those with a low socioeconomic status had 4.2\% more people with multimorbidity than the highest socioeconomic status group. Additionally, around half of GP consultations and hospital admissions were for multimorbidity. 78.7\% of prescriptions were for multimorbidity (Cassell et al., 2018). As multimorbidity becomes more prevalent its important that research in multimorbidity develops so that strategies can be backed up to change health frameworks and policies, to prevent accumulation of conditions, better manage those with multiple condition and reduce the burden on healthcare. - diff --git a/markdown_text/overview.txt b/markdown_text/overview.txt index 65da8c4..2947e5e 100644 --- a/markdown_text/overview.txt +++ b/markdown_text/overview.txt @@ -2,16 +2,15 @@ This work is a continuation of the hypergraphs work carried out by Rafferty et al. 2021: -[Multimorbidity Hypergraphs GitHub](https://github.com/SwanseaUniversityMedical/multimorbidity_hypergraphs), -[Original Paper](https://www.sciencedirect.com/science/article/pii/S1532046421002458). +[Multimorbidity Hypergraphs GitHub](https://github.com/SwanseaUniversityMedical/multimorbidity_hypergraphs), [Original Paper](https://www.sciencedirect.com/science/article/pii/S1532046421002458). -We wish to demonstrate how hypergraphs can be used to capture relationships between multiple diseases -rather than relationships between pairs of diseases. For example, looking at multimorbidity -patterns instead of just comorbidities, which standard graphs tend to do. More people are suffering -from multiple chronic diseases at the same time, so it's important to think about how we can find -patterns in the uptake of multimoribidities, to see if prevention techniques or treatments could -be put in place sooner to improve the quality of life in patients. +We wish to demonstrate how hypergraphs can be used to capture relationships between multiple diseases +rather than relationships between pairs of diseases. For example, looking at multimorbidity +patterns instead of just comorbidities, which standard graphs tend to do. More people are suffering +from multiple chronic diseases at the same time, so it's important to think about how we can find +patterns in the uptake of multimoribidities, to see if prevention techniques or treatments could +be put in place sooner to improve the quality of life in patients. -On this page you can find out the [aims of this project](#project-aims), find out a bit more about -what [multimorbidity](#multimorbidity) is and what types of [graphs](#graphs) we talk about within this project +On this page you can find out the [aims of this project](#project-aims), find out a bit more about +what [multimorbidity](#multimorbidity) is and what types of [graphs](#graphs) we talk about within this project (including standard graphs, undirected hypergraphs and directed hypergraphs). diff --git a/markdown_text/project_aims.txt b/markdown_text/project_aims.txt index 0d203a9..c6bb988 100644 --- a/markdown_text/project_aims.txt +++ b/markdown_text/project_aims.txt @@ -13,4 +13,3 @@ This project has various overarching objectives which we are aiming to achieve. * Help prioritise care services. * Optimise treatment and management to improve pain and reduce healthcare costs. - diff --git a/markdown_text/prototype.txt b/markdown_text/prototype.txt index 7c7e7c0..93130f9 100644 --- a/markdown_text/prototype.txt +++ b/markdown_text/prototype.txt @@ -2,7 +2,5 @@ __:blue[Prototype:]__ _This is not an official NHS England product or service bu This __prototype__ aims only to demonstrate work that may be of interest to others. Opinions expressed in this applet are not representative of the views of NHS England and any content here should __not__ be regarded as official output in any form. -For more information about NHS England please visit our official +For more information about NHS England please visit our official [website](https://www.england.nhs.uk/)._ - - diff --git a/markdown_text/purpose.txt b/markdown_text/purpose.txt index 6d9ae03..b5d95d7 100644 --- a/markdown_text/purpose.txt +++ b/markdown_text/purpose.txt @@ -1,13 +1,13 @@ ### Purpose of This Applet The model shown in this applet builds upon the work carried out in Rafferty et al., 2021. -This Streamlit applet can be used to learn about how the hypergraphs multimorbidity model works with fictitious patient data. -It provides test cases to allow users to understand the model and apply the `hypergraphs_mm` package to their own data +This Streamlit applet can be used to learn about how the hypergraphs multimorbidity model works with fictitious patient data. +It provides test cases to allow users to understand the model and apply the `hypergraphs_mm` package to their own data (the `hypergraph-mm` package is currently held within a private NHSX GitHub repository but will soon become available publically and as a PyPI package). -It aims to explain graphs and hypergraphs in a health setting. It can be used to demonstrate the complexity of different types of +It aims to explain graphs and hypergraphs in a health setting. It can be used to demonstrate the complexity of different types of graphs (left sidebar 'Show Maximum Number of Edges'). -This website gives a interactive walkthrough of how to calulcate hyperedge weights, hyperarc weights, undirected hypergraph centrality, -transition matrices and PageRank. The user can navigate between the pages using the tabs `Undirected Hypergraph`, `Directed Hypergraph` +This website gives a interactive walkthrough of how to calulcate hyperedge weights, hyperarc weights, undirected hypergraph centrality, +transition matrices and PageRank. The user can navigate between the pages using the tabs `Undirected Hypergraph`, `Directed Hypergraph` and `Successors` at the top of each page. -It demonstrates a method to draw B-hypergraphs using the NetworkX package, where psuedonodes are used for hyperarc tails to -transition to hyperarc heads. \ No newline at end of file +It demonstrates a method to draw B-hypergraphs using the NetworkX package, where psuedonodes are used for hyperarc tails to +transition to hyperarc heads. diff --git a/markdown_text/ref_list.txt b/markdown_text/ref_list.txt index 45a32ea..b7ad94c 100644 --- a/markdown_text/ref_list.txt +++ b/markdown_text/ref_list.txt @@ -13,4 +13,3 @@ the Population Ageing and Care Simulation (PACSim) model. Age and Ageing, 47(3): James Rafferty, Alan Watkins, Jane Lyons, Ronan A Lyons, Ashley Akbari, Niels Peek, Farideh Jalali- Najafabadi, Thamer Ba Dhafari, Alexander Pate, Glen P Martin, et al. Ranking sets of morbidities using hypergraph centrality. Journal of Biomedical Informatics, 122:103916, 2021. - diff --git a/markdown_text/summary.txt b/markdown_text/summary.txt index 24a42b7..3144fde 100644 --- a/markdown_text/summary.txt +++ b/markdown_text/summary.txt @@ -1,6 +1,6 @@ -This applet randomly generates a set of fictious 'patients' and their disease -pathways to demonstrate the use of hypergraphs in understanding multimorbidity. The -sidebar on the left of this page can be used to change the number of 'patients' to +This applet randomly generates a set of fictious 'patients' and their disease +pathways to demonstrate the use of hypergraphs in understanding multimorbidity. The +sidebar on the left of this page can be used to change the number of 'patients' to generate and the maximum number of diseases to include in their pathways. -In changing the number of patients and diseases, the outputs will change -and this is purposeful to enable you to observe how population alterations result in different outcomes. \ No newline at end of file +In changing the number of patients and diseases, the outputs will change +and this is purposeful to enable you to observe how population alterations result in different outcomes. diff --git a/markdown_text/undir_hypergraphs.txt b/markdown_text/undir_hypergraphs.txt index d77bf2f..586e755 100644 --- a/markdown_text/undir_hypergraphs.txt +++ b/markdown_text/undir_hypergraphs.txt @@ -3,21 +3,21 @@ Hypergraphs $\mathcal{H}(v,e)$ can connect 2 or more nodes per edge. Hypergraphs were defined by Berge 1976, Berge defined hypergraphs to be an extension of graphs which enable relationships between - many nodes, rather than just pairwise relationships. + many nodes, rather than just pairwise relationships. -Hypergraphs enable multimorbidity edge connections between diseases to be established rather than only co-morbidity. Where the nodes +Hypergraphs enable multimorbidity edge connections between diseases to be established rather than only co-morbidity. Where the nodes are the diseases and the hyperedges are the multimorbidity sets. -Both graphs and hypergraphs can be undirected or directed. The key difference when directionality is involved is that the hypergraph -edges (hyperedges), become hyperarcs due to their directionality, and can have different numbers of inputs and outputs (heads and +Both graphs and hypergraphs can be undirected or directed. The key difference when directionality is involved is that the hypergraph +edges (hyperedges), become hyperarcs due to their directionality, and can have different numbers of inputs and outputs (heads and tails). #### Undirected Hypergraphs The edges connecting nodes in undirected hypergraphs are called hyperedges. These hyperedges can be visualised as 'elastic bands' or with line connections (shown below). -Similar to the example given for standard graphs, the nodes in undirected hypergraphs can be diseases and the hyperedges represent -relationships between these diseases. For example, showing that a person with disease $x$ will likely have disease $y$. +Similar to the example given for standard graphs, the nodes in undirected hypergraphs can be diseases and the hyperedges represent +relationships between these diseases. For example, showing that a person with disease $x$ will likely have disease $y$. -The hyperedges can also store additonal information about the connection, such as how common/prevalent the relationship is between -nodes/diseases. +The hyperedges can also store additonal information about the connection, such as how common/prevalent the relationship is between +nodes/diseases. diff --git a/pyproject.toml b/pyproject.toml index fd0624b..6d1b4c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,3 @@ [build-system] requires = ["setuptools", "wheel", "cython"] build-backend = "setuptools.build_meta" - - diff --git a/setup.cfg b/setup.cfg index 8a1d4c9..565c49f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,4 +22,4 @@ exclude = [options.entry_points] console_scripts = - hypergraph = hypergraph.hypergraph:main \ No newline at end of file + hypergraph = hypergraph.hypergraph:main diff --git a/src/hypergraphs/hypergraphs.py b/src/hypergraphs/hypergraphs.py index 2d2c180..abe4603 100644 --- a/src/hypergraphs/hypergraphs.py +++ b/src/hypergraphs/hypergraphs.py @@ -1,3 +1,4 @@ +# flake8: noqa from abc import ABC from manim import * @@ -14,10 +15,10 @@ def construct(self): # Transition 1 - Introducing a hypergraph title = Tex(r"We can take a hypergraph") title.to_corner(UP + LEFT) - d1 = OuterLabeledDot([1, 2, 0], label="D1", swatch=YELLOW), - d2 = OuterLabeledDot([-1, 1, 0], label="D2", swatch=BLUE), - d3 = OuterLabeledDot([1.4, -1.4, 0], label="D3", swatch=GREEN), - d4 = OuterLabeledDot([-3, -2, 0], label="D4", swatch=GREY), + d1 = (OuterLabeledDot([1, 2, 0], label="D1", swatch=YELLOW),) + d2 = (OuterLabeledDot([-1, 1, 0], label="D2", swatch=BLUE),) + d3 = (OuterLabeledDot([1.4, -1.4, 0], label="D3", swatch=GREEN),) + d4 = (OuterLabeledDot([-3, -2, 0], label="D4", swatch=GREY),) d5 = OuterLabeledDot([3, 1, 0], label="D5", swatch=MAROON) disease = [d1[0], d2[0], d3[0], d4[0], d5] @@ -34,41 +35,28 @@ def construct(self): self.wait() - self.play( - FadeIn(*disease) - ) + self.play(FadeIn(*disease)) self.wait() edge1.next_to(a1) edge2.next_to(a2) - self.play( - Create(a1), - Create(a2), - FadeIn(edge1, edge2) - ) + self.play(Create(a1), Create(a2), FadeIn(edge1, edge2)) self.wait() - self.play( - FadeOut( - title, - *disease, - a1, - a2 - ) - ) + self.play(FadeOut(title, *disease, a1, a2)) - incidence_matrix = IntegerMatrix([[0, 1], - [1, 0], - [1, 1], - [1, 0], - [0, 1]], - left_bracket="(", - right_bracket=")") + incidence_matrix = IntegerMatrix( + [[0, 1], [1, 0], [1, 1], [1, 0], [0, 1]], + left_bracket="(", + right_bracket=")", + ) - incidence_text = Tex(r"And convert it to an incidence matrix and a bipartite graph.") + incidence_text = Tex( + r"And convert it to an incidence matrix and a bipartite graph." + ) incidence_text.to_corner(UP + LEFT) self.play( @@ -96,16 +84,13 @@ def construct(self): self.wait() self.play( - incidence_matrix.animate.shift(LEFT * 5.5, UP), - FadeIn(*disease, a1, a2) + incidence_matrix.animate.shift(LEFT * 5.5, UP), FadeIn(*disease, a1, a2) ) self.add(l1, l2, l3, l4, l5, l6) self.wait() - self.play( - FadeOut(a1, a2) - ) + self.play(FadeOut(a1, a2)) self.wait() diff --git a/test_streamlit/test_edge_count.py b/test_streamlit/test_edge_count.py index 954d3c7..aa758ca 100644 --- a/test_streamlit/test_edge_count.py +++ b/test_streamlit/test_edge_count.py @@ -1,6 +1,3 @@ -import os - -os.chdir("C:/Users/ZOEHANCOX/OneDrive - NHS England/hypergraphical") from src import numpy_utils # import pytest diff --git a/tox.ini b/tox.ini index 6d4daac..6ff9955 100644 --- a/tox.ini +++ b/tox.ini @@ -21,4 +21,3 @@ deps = black commands = black {posargs: --check --diff .} - diff --git a/workbooks/hypergraph_animations.ipynb b/workbooks/hypergraph_animations.ipynb index dbd7e7a..166a1dc 100644 --- a/workbooks/hypergraph_animations.ipynb +++ b/workbooks/hypergraph_animations.ipynb @@ -1,1132 +1,185 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { "colab": { - "provenance": [] + "base_uri": "https://localhost:8080/" }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - } + "id": "NjTx6UwN8L_M", + "outputId": "7596ef62-2a8d-4e30-9488-3d98f6664194" + }, + "outputs": [], + "source": [ + "!sudo apt update\n", + "!sudo apt install libcairo2-dev ffmpeg \\\n", + " texlive texlive-latex-extra texlive-fonts-extra \\\n", + " texlive-latex-recommended texlive-science \\\n", + " tipa libpango1.0-dev\n", + "!pip install manim\n", + "!pip install IPython --upgrade " + ] }, - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "NjTx6UwN8L_M", - "outputId": "7596ef62-2a8d-4e30-9488-3d98f6664194" - }, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "\u001b[33m\r0% [Working]\u001b[0m\r \rGet:1 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/ InRelease [3,626 B]\n", - "\u001b[33m\r0% [Connecting to archive.ubuntu.com (91.189.91.39)] [Connecting to security.ub\u001b[0m\u001b[33m\r0% [Connecting to archive.ubuntu.com (91.189.91.39)] [Connecting to security.ub\u001b[0m\u001b[33m\r0% [1 InRelease gpgv 3,626 B] [Waiting for headers] [Connecting to security.ubu\u001b[0m\r \rHit:2 http://archive.ubuntu.com/ubuntu bionic InRelease\n", - "\u001b[33m\r0% [1 InRelease gpgv 3,626 B] [Waiting for headers] [Waiting for headers] [Wait\u001b[0m\r \rIgn:3 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 InRelease\n", - "\u001b[33m\r0% [1 InRelease gpgv 3,626 B] [Waiting for headers] [Waiting for headers] [Wait\u001b[0m\r \rGet:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]\n", - "\u001b[33m\r0% [1 InRelease gpgv 3,626 B] [4 InRelease 14.2 kB/88.7 kB 16%] [Waiting for he\u001b[0m\r \rHit:5 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease\n", - "\u001b[33m\r0% [1 InRelease gpgv 3,626 B] [4 InRelease 15.6 kB/88.7 kB 18%] [Waiting for he\u001b[0m\r \rHit:6 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 Release\n", - "Get:7 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]\n", - "Get:8 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [83.3 kB]\n", - "Hit:9 http://ppa.launchpad.net/c2d4u.team/c2d4u4.0+/ubuntu bionic InRelease\n", - "Hit:10 http://ppa.launchpad.net/cran/libgit2/ubuntu bionic InRelease\n", - "Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2,348 kB]\n", - "Hit:13 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic InRelease\n", - "Hit:14 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease\n", - "Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [1,392 kB]\n", - "Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [3,552 kB]\n", - "Get:17 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [3,129 kB]\n", - "Get:18 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [1,351 kB]\n", - "Get:19 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1,573 kB]\n", - "Fetched 13.6 MB in 3s (4,537 kB/s)\n", - "Reading package lists... Done\n", - "Building dependency tree \n", - "Reading state information... Done\n", - "23 packages can be upgraded. Run 'apt list --upgradable' to see them.\n", - "Reading package lists... Done\n", - "Building dependency tree \n", - "Reading state information... Done\n", - "ffmpeg is already the newest version (7:3.4.11-0ubuntu0.1).\n", - "The following package was automatically installed and is no longer required:\n", - " libnvidia-common-460\n", - "Use 'sudo apt autoremove' to remove it.\n", - "The following additional packages will be installed:\n", - " autoconf automake autopoint autotools-dev debhelper dh-autoreconf\n", - " dh-strip-nondeterminism file fonts-adf-accanthis fonts-adf-berenis\n", - " fonts-adf-gillius fonts-adf-universalis fonts-cabin fonts-comfortaa\n", - " fonts-croscore fonts-crosextra-caladea fonts-crosextra-carlito\n", - " fonts-dejavu-core fonts-dejavu-extra fonts-droid-fallback fonts-ebgaramond\n", - " fonts-ebgaramond-extra fonts-font-awesome fonts-freefont-otf\n", - " fonts-freefont-ttf fonts-gfs-artemisia fonts-gfs-baskerville\n", - " fonts-gfs-complutum fonts-gfs-didot fonts-gfs-neohellenic fonts-gfs-olga\n", - " fonts-gfs-porson fonts-gfs-solomos fonts-go fonts-junicode fonts-lato\n", - " fonts-linuxlibertine fonts-lmodern fonts-lobster fonts-lobstertwo\n", - " fonts-noto-hinted fonts-noto-mono fonts-oflb-asana-math fonts-open-sans\n", - " fonts-roboto-hinted fonts-sil-gentium fonts-sil-gentium-basic\n", - " fonts-sil-gentiumplus fonts-sil-gentiumplus-compact fonts-stix fonts-texgyre\n", - " gettext gettext-base gir1.2-freedesktop gir1.2-pango-1.0 intltool-debian\n", - " javascript-common libarchive-cpio-perl libarchive-zip-perl\n", - " libcairo-script-interpreter2 libcupsfilters1 libcupsimage2\n", - " libfile-stripnondeterminism-perl libgs9 libgs9-common libijs-0.35\n", - " libjbig2dec0 libjs-jquery libkpathsea6 libmagic-mgc libmagic1\n", - " libmail-sendmail-perl libpangoxft-1.0-0 libpixman-1-dev libpotrace0\n", - " libptexenc1 libruby2.5 libsigsegv2 libsynctex1 libsys-hostname-long-perl\n", - " libtexlua52 libtexluajit2 libtimedate-perl libtool libxcb-shm0-dev\n", - " libzzip-0-13 lmodern m4 po-debconf poppler-data preview-latex-style rake\n", - " ruby ruby-did-you-mean ruby-minitest ruby-net-telnet ruby-power-assert\n", - " ruby-test-unit ruby2.5 rubygems-integration t1utils tex-common tex-gyre\n", - " texlive-base texlive-binaries texlive-fonts-extra-links\n", - " texlive-fonts-recommended texlive-lang-greek texlive-latex-base\n", - " texlive-pictures texlive-plain-generic\n", - "Suggested packages:\n", - " autoconf-archive gnu-standards autoconf-doc dh-make dwz fonts-noto fontforge\n", - " gettext-doc libasprintf-dev libgettextpo-dev apache2 | lighttpd | httpd\n", - " libcairo2-doc imagemagick libpango1.0-doc libtool-doc gcj-jdk m4-doc\n", - " libmail-box-perl poppler-utils ghostscript fonts-japanese-mincho\n", - " | fonts-ipafont-mincho fonts-japanese-gothic | fonts-ipafont-gothic\n", - " fonts-arphic-ukai fonts-arphic-uming fonts-nanum ri ruby-dev bundler gv\n", - " | postscript-viewer perl-tk xpdf-reader | pdf-viewer cm-super\n", - " texlive-fonts-extra-doc texlive-fonts-recommended-doc texlive-latex-base-doc\n", - " python-pygments icc-profiles libfile-which-perl\n", - " libspreadsheet-parseexcel-perl texlive-latex-extra-doc\n", - " texlive-latex-recommended-doc texlive-pstricks dot2tex prerex ruby-tcltk\n", - " | libtcltk-ruby texlive-pictures-doc vprerex texlive-science-doc\n", - "The following NEW packages will be installed:\n", - " autoconf automake autopoint autotools-dev debhelper dh-autoreconf\n", - " dh-strip-nondeterminism file fonts-adf-accanthis fonts-adf-berenis\n", - " fonts-adf-gillius fonts-adf-universalis fonts-cabin fonts-comfortaa\n", - " fonts-croscore fonts-crosextra-caladea fonts-crosextra-carlito\n", - " fonts-dejavu-core fonts-dejavu-extra fonts-droid-fallback fonts-ebgaramond\n", - " fonts-ebgaramond-extra fonts-font-awesome fonts-freefont-otf\n", - " fonts-freefont-ttf fonts-gfs-artemisia fonts-gfs-baskerville\n", - " fonts-gfs-complutum fonts-gfs-didot fonts-gfs-neohellenic fonts-gfs-olga\n", - " fonts-gfs-porson fonts-gfs-solomos fonts-go fonts-junicode fonts-lato\n", - " fonts-linuxlibertine fonts-lmodern fonts-lobster fonts-lobstertwo\n", - " fonts-noto-hinted fonts-noto-mono fonts-oflb-asana-math fonts-open-sans\n", - " fonts-roboto-hinted fonts-sil-gentium fonts-sil-gentium-basic\n", - " fonts-sil-gentiumplus fonts-sil-gentiumplus-compact fonts-stix fonts-texgyre\n", - " gettext gettext-base gir1.2-freedesktop gir1.2-pango-1.0 intltool-debian\n", - " javascript-common libarchive-cpio-perl libarchive-zip-perl\n", - " libcairo-script-interpreter2 libcairo2-dev libcupsfilters1 libcupsimage2\n", - " libfile-stripnondeterminism-perl libgs9 libgs9-common libijs-0.35\n", - " libjbig2dec0 libjs-jquery libkpathsea6 libmagic-mgc libmagic1\n", - " libmail-sendmail-perl libpango1.0-dev libpangoxft-1.0-0 libpixman-1-dev\n", - " libpotrace0 libptexenc1 libruby2.5 libsigsegv2 libsynctex1\n", - " libsys-hostname-long-perl libtexlua52 libtexluajit2 libtimedate-perl libtool\n", - " libxcb-shm0-dev libzzip-0-13 lmodern m4 po-debconf poppler-data\n", - " preview-latex-style rake ruby ruby-did-you-mean ruby-minitest\n", - " ruby-net-telnet ruby-power-assert ruby-test-unit ruby2.5\n", - " rubygems-integration t1utils tex-common tex-gyre texlive texlive-base\n", - " texlive-binaries texlive-fonts-extra texlive-fonts-extra-links\n", - " texlive-fonts-recommended texlive-lang-greek texlive-latex-base\n", - " texlive-latex-extra texlive-latex-recommended texlive-pictures\n", - " texlive-plain-generic texlive-science tipa\n", - "0 upgraded, 119 newly installed, 0 to remove and 23 not upgraded.\n", - "Need to get 611 MB of archives.\n", - "After this operation, 1,622 MB of additional disk space will be used.\n", - "Get:1 http://archive.ubuntu.com/ubuntu bionic/main amd64 fonts-droid-fallback all 1:6.0.1r16-1.1 [1,805 kB]\n", - "Get:2 http://archive.ubuntu.com/ubuntu bionic/main amd64 fonts-lato all 2.0-2 [2,698 kB]\n", - "Get:3 http://archive.ubuntu.com/ubuntu bionic/main amd64 poppler-data all 0.4.8-2 [1,479 kB]\n", - "Get:4 http://archive.ubuntu.com/ubuntu bionic/main amd64 tex-common all 6.09 [33.0 kB]\n", - "Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmagic-mgc amd64 1:5.32-2ubuntu0.4 [184 kB]\n", - "Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmagic1 amd64 1:5.32-2ubuntu0.4 [68.6 kB]\n", - "Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 file amd64 1:5.32-2ubuntu0.4 [22.1 kB]\n", - "Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gettext-base amd64 0.19.8.1-6ubuntu0.3 [113 kB]\n", - "Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsigsegv2 amd64 2.12-1 [14.7 kB]\n", - "Get:10 http://archive.ubuntu.com/ubuntu bionic/main amd64 m4 amd64 1.4.18-1 [197 kB]\n", - "Get:11 http://archive.ubuntu.com/ubuntu bionic/main amd64 autoconf all 2.69-11 [322 kB]\n", - "Get:12 http://archive.ubuntu.com/ubuntu bionic/main amd64 autotools-dev all 20180224.1 [39.6 kB]\n", - "Get:13 http://archive.ubuntu.com/ubuntu bionic/main amd64 automake all 1:1.15.1-3ubuntu2 [509 kB]\n", - "Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 autopoint all 0.19.8.1-6ubuntu0.3 [426 kB]\n", - "Get:15 http://archive.ubuntu.com/ubuntu bionic/main amd64 libtool all 2.4.6-2 [194 kB]\n", - "Get:16 http://archive.ubuntu.com/ubuntu bionic/main amd64 dh-autoreconf all 17 [15.8 kB]\n", - "Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libarchive-zip-perl all 1.60-1ubuntu0.1 [84.6 kB]\n", - "Get:18 http://archive.ubuntu.com/ubuntu bionic/main amd64 libfile-stripnondeterminism-perl all 0.040-1.1~build1 [13.8 kB]\n", - "Get:19 http://archive.ubuntu.com/ubuntu bionic/main amd64 libtimedate-perl all 2.3000-2 [37.5 kB]\n", - "Get:20 http://archive.ubuntu.com/ubuntu bionic/main amd64 dh-strip-nondeterminism all 0.040-1.1~build1 [5,208 B]\n", - "Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gettext amd64 0.19.8.1-6ubuntu0.3 [1,293 kB]\n", - "Get:22 http://archive.ubuntu.com/ubuntu bionic/main amd64 intltool-debian all 0.35.0+20060710.4 [24.9 kB]\n", - "Get:23 http://archive.ubuntu.com/ubuntu bionic/main amd64 po-debconf all 1.0.20 [232 kB]\n", - "Get:24 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 debhelper all 11.1.6ubuntu2 [902 kB]\n", - "Get:25 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-adf-accanthis all 0.20110505-1 [202 kB]\n", - "Get:26 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-adf-berenis all 0.20110505-1 [281 kB]\n", - "Get:27 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-adf-gillius all 0.20110505-1 [190 kB]\n", - "Get:28 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-adf-universalis all 0.20110505-1 [111 kB]\n", - "Get:29 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-cabin all 1.5-2 [140 kB]\n", - "Get:30 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-comfortaa all 3.001-2 [129 kB]\n", - "Get:31 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-croscore all 20171026-2 [2,135 kB]\n", - "Get:32 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-crosextra-caladea all 20130214-2 [82.4 kB]\n", - "Get:33 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-crosextra-carlito all 20130920-1 [742 kB]\n", - "Get:34 http://archive.ubuntu.com/ubuntu bionic/main amd64 fonts-dejavu-core all 2.37-1 [1,041 kB]\n", - "Get:35 http://archive.ubuntu.com/ubuntu bionic/main amd64 fonts-dejavu-extra all 2.37-1 [1,953 kB]\n", - "Get:36 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-ebgaramond all 0.016-1 [474 kB]\n", - "Get:37 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-ebgaramond-extra all 0.016-1 [2,157 kB]\n", - "Get:38 http://archive.ubuntu.com/ubuntu bionic/main amd64 fonts-font-awesome all 4.7.0~dfsg-3 [513 kB]\n", - "Get:39 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-freefont-otf all 20120503-7 [3,055 kB]\n", - "Get:40 http://archive.ubuntu.com/ubuntu bionic/main amd64 fonts-freefont-ttf all 20120503-7 [4,202 kB]\n", - "Get:41 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-gfs-artemisia all 1.1-5 [260 kB]\n", - "Get:42 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-gfs-baskerville all 1.1-5 [43.4 kB]\n", - "Get:43 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-gfs-complutum all 1.1-6 [41.6 kB]\n", - "Get:44 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-gfs-didot all 1.1-6 [278 kB]\n", - "Get:45 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-gfs-neohellenic all 1.1-6 [215 kB]\n", - "Get:46 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-gfs-olga all 1.1-5 [33.4 kB]\n", - "Get:47 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-gfs-porson all 1.1-6 [33.7 kB]\n", - "Get:48 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-gfs-solomos all 1.1-5 [40.7 kB]\n", - "Get:49 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-go all 0~20161116-1 [348 kB]\n", - "Get:50 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-junicode all 1.001-2 [684 kB]\n", - "Get:51 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-linuxlibertine all 5.3.0-4 [1,627 kB]\n", - "Get:52 http://archive.ubuntu.com/ubuntu bionic/main amd64 fonts-lmodern all 2.004.5-3 [4,551 kB]\n", - "Get:53 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-lobster all 2.0-2 [38.7 kB]\n", - "Get:54 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-lobstertwo all 2.0-2 [92.7 kB]\n", - "Get:55 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-noto-hinted all 20171026-2 [6,653 kB]\n", - "Get:56 http://archive.ubuntu.com/ubuntu bionic/main amd64 fonts-noto-mono all 20171026-2 [75.5 kB]\n", - "Get:57 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-oflb-asana-math all 000.907-6 [246 kB]\n", - "Get:58 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-open-sans all 1.11-1 [575 kB]\n", - "Get:59 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-roboto-hinted all 2:0~20160106-2 [2,918 kB]\n", - "Get:60 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-sil-gentium all 20081126:1.03-2 [245 kB]\n", - "Get:61 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-sil-gentium-basic all 1.102-1 [384 kB]\n", - "Get:62 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-sil-gentiumplus all 5.000-2 [2,807 kB]\n", - "Get:63 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-sil-gentiumplus-compact all 5.000-2 [1,514 kB]\n", - "Get:64 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-texgyre all 20160520-1 [8,761 kB]\n", - "Get:65 http://archive.ubuntu.com/ubuntu bionic/main amd64 gir1.2-freedesktop amd64 1.56.1-1 [9,080 B]\n", - "Get:66 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpangoxft-1.0-0 amd64 1.40.14-1ubuntu0.1 [15.0 kB]\n", - "Get:67 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 gir1.2-pango-1.0 amd64 1.40.14-1ubuntu0.1 [21.6 kB]\n", - "Get:68 http://archive.ubuntu.com/ubuntu bionic/main amd64 javascript-common all 11 [6,066 B]\n", - "Get:69 http://archive.ubuntu.com/ubuntu bionic/main amd64 libarchive-cpio-perl all 0.10-1 [9,644 B]\n", - "Get:70 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcairo-script-interpreter2 amd64 1.15.10-2ubuntu0.1 [53.5 kB]\n", - "Get:71 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpixman-1-dev amd64 0.34.0-2ubuntu0.1 [244 kB]\n", - "Get:72 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libxcb-shm0-dev amd64 1.13-2~ubuntu18.04 [6,684 B]\n", - "Get:73 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcairo2-dev amd64 1.15.10-2ubuntu0.1 [626 kB]\n", - "Get:74 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcupsfilters1 amd64 1.20.2-0ubuntu3.1 [108 kB]\n", - "Get:75 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcupsimage2 amd64 2.2.7-1ubuntu2.9 [18.6 kB]\n", - "Get:76 http://archive.ubuntu.com/ubuntu bionic/main amd64 libijs-0.35 amd64 0.35-13 [15.5 kB]\n", - "Get:77 http://archive.ubuntu.com/ubuntu bionic/main amd64 libjbig2dec0 amd64 0.13-6 [55.9 kB]\n", - "Get:78 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgs9-common all 9.26~dfsg+0-0ubuntu0.18.04.17 [5,092 kB]\n", - "Get:79 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libgs9 amd64 9.26~dfsg+0-0ubuntu0.18.04.17 [2,267 kB]\n", - "Get:80 http://archive.ubuntu.com/ubuntu bionic/main amd64 libjs-jquery all 3.2.1-1 [152 kB]\n", - "Get:81 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libkpathsea6 amd64 2017.20170613.44572-8ubuntu0.1 [54.9 kB]\n", - "Get:82 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsys-hostname-long-perl all 1.5-1 [11.7 kB]\n", - "Get:83 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmail-sendmail-perl all 0.80-1 [22.6 kB]\n", - "Get:84 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpango1.0-dev amd64 1.40.14-1ubuntu0.1 [288 kB]\n", - "Get:85 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpotrace0 amd64 1.14-2 [17.4 kB]\n", - "Get:86 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libptexenc1 amd64 2017.20170613.44572-8ubuntu0.1 [34.5 kB]\n", - "Get:87 http://archive.ubuntu.com/ubuntu bionic/main amd64 rubygems-integration all 1.11 [4,994 B]\n", - "Get:88 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 ruby2.5 amd64 2.5.1-1ubuntu1.12 [48.6 kB]\n", - "Get:89 http://archive.ubuntu.com/ubuntu bionic/main amd64 ruby amd64 1:2.5.1 [5,712 B]\n", - "Get:90 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 rake all 12.3.1-1ubuntu0.1 [44.9 kB]\n", - "Get:91 http://archive.ubuntu.com/ubuntu bionic/main amd64 ruby-did-you-mean all 1.2.0-2 [9,700 B]\n", - "Get:92 http://archive.ubuntu.com/ubuntu bionic/main amd64 ruby-minitest all 5.10.3-1 [38.6 kB]\n", - "Get:93 http://archive.ubuntu.com/ubuntu bionic/main amd64 ruby-net-telnet all 0.1.1-2 [12.6 kB]\n", - "Get:94 http://archive.ubuntu.com/ubuntu bionic/main amd64 ruby-power-assert all 0.3.0-1 [7,952 B]\n", - "Get:95 http://archive.ubuntu.com/ubuntu bionic/main amd64 ruby-test-unit all 3.2.5-1 [61.1 kB]\n", - "Get:96 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libruby2.5 amd64 2.5.1-1ubuntu1.12 [3,073 kB]\n", - "Get:97 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsynctex1 amd64 2017.20170613.44572-8ubuntu0.1 [41.4 kB]\n", - "Get:98 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libtexlua52 amd64 2017.20170613.44572-8ubuntu0.1 [91.2 kB]\n", - "Get:99 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libtexluajit2 amd64 2017.20170613.44572-8ubuntu0.1 [230 kB]\n", - "Get:100 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libzzip-0-13 amd64 0.13.62-3.1ubuntu0.18.04.1 [26.0 kB]\n", - "Get:101 http://archive.ubuntu.com/ubuntu bionic/main amd64 lmodern all 2.004.5-3 [9,631 kB]\n", - "Get:102 http://archive.ubuntu.com/ubuntu bionic/main amd64 preview-latex-style all 11.91-1ubuntu1 [185 kB]\n", - "Get:103 http://archive.ubuntu.com/ubuntu bionic/main amd64 t1utils amd64 1.41-2 [56.0 kB]\n", - "Get:104 http://archive.ubuntu.com/ubuntu bionic/universe amd64 tex-gyre all 20160520-1 [4,998 kB]\n", - "Get:105 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 texlive-binaries amd64 2017.20170613.44572-8ubuntu0.1 [8,179 kB]\n", - "Get:106 http://archive.ubuntu.com/ubuntu bionic/main amd64 texlive-base all 2017.20180305-1 [18.7 MB]\n", - "Get:107 http://archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-fonts-recommended all 2017.20180305-1 [5,262 kB]\n", - "Get:108 http://archive.ubuntu.com/ubuntu bionic/main amd64 texlive-latex-base all 2017.20180305-1 [951 kB]\n", - "Get:109 http://archive.ubuntu.com/ubuntu bionic/main amd64 texlive-latex-recommended all 2017.20180305-1 [14.9 MB]\n", - "Get:110 http://archive.ubuntu.com/ubuntu bionic/universe amd64 texlive all 2017.20180305-1 [14.4 kB]\n", - "Get:111 http://archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-fonts-extra all 2017.20180305-2 [354 MB]\n", - "Get:112 http://archive.ubuntu.com/ubuntu bionic/universe amd64 fonts-stix all 1.1.1-4 [591 kB]\n", - "Get:113 http://archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-fonts-extra-links all 2017.20180305-2 [20.6 kB]\n", - "Get:114 http://archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-lang-greek all 2017.20180305-1 [76.3 MB]\n", - "Get:115 http://archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-pictures all 2017.20180305-1 [4,026 kB]\n", - "Get:116 http://archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-latex-extra all 2017.20180305-2 [10.6 MB]\n", - "Get:117 http://archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-plain-generic all 2017.20180305-2 [23.6 MB]\n", - "Get:118 http://archive.ubuntu.com/ubuntu bionic/universe amd64 texlive-science all 2017.20180305-2 [3,077 kB]\n", - "Get:119 http://archive.ubuntu.com/ubuntu bionic/universe amd64 tipa all 2:1.3-20 [2,978 kB]\n", - "Fetched 611 MB in 10s (60.2 MB/s)\n", - "debconf: unable to initialize frontend: Dialog\n", - "debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, <> line 119.)\n", - "debconf: falling back to frontend: Readline\n", - "debconf: unable to initialize frontend: Readline\n", - "debconf: (This frontend requires a controlling tty.)\n", - "debconf: falling back to frontend: Teletype\n", - "dpkg-preconfigure: unable to re-open stdin: \n", - "Selecting previously unselected package fonts-droid-fallback.\n", - "(Reading database ... 124016 files and directories currently installed.)\n", - "Preparing to unpack .../000-fonts-droid-fallback_1%3a6.0.1r16-1.1_all.deb ...\n", - "Unpacking fonts-droid-fallback (1:6.0.1r16-1.1) ...\n", - "Selecting previously unselected package fonts-lato.\n", - "Preparing to unpack .../001-fonts-lato_2.0-2_all.deb ...\n", - "Unpacking fonts-lato (2.0-2) ...\n", - "Selecting previously unselected package poppler-data.\n", - "Preparing to unpack .../002-poppler-data_0.4.8-2_all.deb ...\n", - "Unpacking poppler-data (0.4.8-2) ...\n", - "Selecting previously unselected package tex-common.\n", - "Preparing to unpack .../003-tex-common_6.09_all.deb ...\n", - "Unpacking tex-common (6.09) ...\n", - "Selecting previously unselected package libmagic-mgc.\n", - "Preparing to unpack .../004-libmagic-mgc_1%3a5.32-2ubuntu0.4_amd64.deb ...\n", - "Unpacking libmagic-mgc (1:5.32-2ubuntu0.4) ...\n", - "Selecting previously unselected package libmagic1:amd64.\n", - "Preparing to unpack .../005-libmagic1_1%3a5.32-2ubuntu0.4_amd64.deb ...\n", - "Unpacking libmagic1:amd64 (1:5.32-2ubuntu0.4) ...\n", - "Selecting previously unselected package file.\n", - "Preparing to unpack .../006-file_1%3a5.32-2ubuntu0.4_amd64.deb ...\n", - "Unpacking file (1:5.32-2ubuntu0.4) ...\n", - "Selecting previously unselected package gettext-base.\n", - "Preparing to unpack .../007-gettext-base_0.19.8.1-6ubuntu0.3_amd64.deb ...\n", - "Unpacking gettext-base (0.19.8.1-6ubuntu0.3) ...\n", - "Selecting previously unselected package libsigsegv2:amd64.\n", - "Preparing to unpack .../008-libsigsegv2_2.12-1_amd64.deb ...\n", - "Unpacking libsigsegv2:amd64 (2.12-1) ...\n", - "Selecting previously unselected package m4.\n", - "Preparing to unpack .../009-m4_1.4.18-1_amd64.deb ...\n", - "Unpacking m4 (1.4.18-1) ...\n", - "Selecting previously unselected package autoconf.\n", - "Preparing to unpack .../010-autoconf_2.69-11_all.deb ...\n", - "Unpacking autoconf (2.69-11) ...\n", - "Selecting previously unselected package autotools-dev.\n", - "Preparing to unpack .../011-autotools-dev_20180224.1_all.deb ...\n", - "Unpacking autotools-dev (20180224.1) ...\n", - "Selecting previously unselected package automake.\n", - "Preparing to unpack .../012-automake_1%3a1.15.1-3ubuntu2_all.deb ...\n", - "Unpacking automake (1:1.15.1-3ubuntu2) ...\n", - "Selecting previously unselected package autopoint.\n", - "Preparing to unpack .../013-autopoint_0.19.8.1-6ubuntu0.3_all.deb ...\n", - "Unpacking autopoint (0.19.8.1-6ubuntu0.3) ...\n", - "Selecting previously unselected package libtool.\n", - "Preparing to unpack .../014-libtool_2.4.6-2_all.deb ...\n", - "Unpacking libtool (2.4.6-2) ...\n", - "Selecting previously unselected package dh-autoreconf.\n", - "Preparing to unpack .../015-dh-autoreconf_17_all.deb ...\n", - "Unpacking dh-autoreconf (17) ...\n", - "Selecting previously unselected package libarchive-zip-perl.\n", - "Preparing to unpack .../016-libarchive-zip-perl_1.60-1ubuntu0.1_all.deb ...\n", - "Unpacking libarchive-zip-perl (1.60-1ubuntu0.1) ...\n", - "Selecting previously unselected package libfile-stripnondeterminism-perl.\n", - "Preparing to unpack .../017-libfile-stripnondeterminism-perl_0.040-1.1~build1_all.deb ...\n", - "Unpacking libfile-stripnondeterminism-perl (0.040-1.1~build1) ...\n", - "Selecting previously unselected package libtimedate-perl.\n", - "Preparing to unpack .../018-libtimedate-perl_2.3000-2_all.deb ...\n", - "Unpacking libtimedate-perl (2.3000-2) ...\n", - "Selecting previously unselected package dh-strip-nondeterminism.\n", - "Preparing to unpack .../019-dh-strip-nondeterminism_0.040-1.1~build1_all.deb ...\n", - "Unpacking dh-strip-nondeterminism (0.040-1.1~build1) ...\n", - "Selecting previously unselected package gettext.\n", - "Preparing to unpack .../020-gettext_0.19.8.1-6ubuntu0.3_amd64.deb ...\n", - "Unpacking gettext (0.19.8.1-6ubuntu0.3) ...\n", - "Selecting previously unselected package intltool-debian.\n", - "Preparing to unpack .../021-intltool-debian_0.35.0+20060710.4_all.deb ...\n", - "Unpacking intltool-debian (0.35.0+20060710.4) ...\n", - "Selecting previously unselected package po-debconf.\n", - "Preparing to unpack .../022-po-debconf_1.0.20_all.deb ...\n", - "Unpacking po-debconf (1.0.20) ...\n", - "Selecting previously unselected package debhelper.\n", - "Preparing to unpack .../023-debhelper_11.1.6ubuntu2_all.deb ...\n", - "Unpacking debhelper (11.1.6ubuntu2) ...\n", - "Selecting previously unselected package fonts-adf-accanthis.\n", - "Preparing to unpack .../024-fonts-adf-accanthis_0.20110505-1_all.deb ...\n", - "Unpacking fonts-adf-accanthis (0.20110505-1) ...\n", - "Selecting previously unselected package fonts-adf-berenis.\n", - "Preparing to unpack .../025-fonts-adf-berenis_0.20110505-1_all.deb ...\n", - "Unpacking fonts-adf-berenis (0.20110505-1) ...\n", - "Selecting previously unselected package fonts-adf-gillius.\n", - "Preparing to unpack .../026-fonts-adf-gillius_0.20110505-1_all.deb ...\n", - "Unpacking fonts-adf-gillius (0.20110505-1) ...\n", - "Selecting previously unselected package fonts-adf-universalis.\n", - "Preparing to unpack .../027-fonts-adf-universalis_0.20110505-1_all.deb ...\n", - "Unpacking fonts-adf-universalis (0.20110505-1) ...\n", - "Selecting previously unselected package fonts-cabin.\n", - "Preparing to unpack .../028-fonts-cabin_1.5-2_all.deb ...\n", - "Unpacking fonts-cabin (1.5-2) ...\n", - "Selecting previously unselected package fonts-comfortaa.\n", - "Preparing to unpack .../029-fonts-comfortaa_3.001-2_all.deb ...\n", - "Unpacking fonts-comfortaa (3.001-2) ...\n", - "Selecting previously unselected package fonts-croscore.\n", - "Preparing to unpack .../030-fonts-croscore_20171026-2_all.deb ...\n", - "Unpacking fonts-croscore (20171026-2) ...\n", - "Selecting previously unselected package fonts-crosextra-caladea.\n", - "Preparing to unpack .../031-fonts-crosextra-caladea_20130214-2_all.deb ...\n", - "Unpacking fonts-crosextra-caladea (20130214-2) ...\n", - "Selecting previously unselected package fonts-crosextra-carlito.\n", - "Preparing to unpack .../032-fonts-crosextra-carlito_20130920-1_all.deb ...\n", - "Unpacking fonts-crosextra-carlito (20130920-1) ...\n", - "Selecting previously unselected package fonts-dejavu-core.\n", - "Preparing to unpack .../033-fonts-dejavu-core_2.37-1_all.deb ...\n", - "Unpacking fonts-dejavu-core (2.37-1) ...\n", - "Selecting previously unselected package fonts-dejavu-extra.\n", - "Preparing to unpack .../034-fonts-dejavu-extra_2.37-1_all.deb ...\n", - "Unpacking fonts-dejavu-extra (2.37-1) ...\n", - "Selecting previously unselected package fonts-ebgaramond.\n", - "Preparing to unpack .../035-fonts-ebgaramond_0.016-1_all.deb ...\n", - "Unpacking fonts-ebgaramond (0.016-1) ...\n", - "Selecting previously unselected package fonts-ebgaramond-extra.\n", - "Preparing to unpack .../036-fonts-ebgaramond-extra_0.016-1_all.deb ...\n", - "Unpacking fonts-ebgaramond-extra (0.016-1) ...\n", - "Selecting previously unselected package fonts-font-awesome.\n", - "Preparing to unpack .../037-fonts-font-awesome_4.7.0~dfsg-3_all.deb ...\n", - "Unpacking fonts-font-awesome (4.7.0~dfsg-3) ...\n", - "Selecting previously unselected package fonts-freefont-otf.\n", - "Preparing to unpack .../038-fonts-freefont-otf_20120503-7_all.deb ...\n", - "Unpacking fonts-freefont-otf (20120503-7) ...\n", - "Selecting previously unselected package fonts-freefont-ttf.\n", - "Preparing to unpack .../039-fonts-freefont-ttf_20120503-7_all.deb ...\n", - "Unpacking fonts-freefont-ttf (20120503-7) ...\n", - "Selecting previously unselected package fonts-gfs-artemisia.\n", - "Preparing to unpack .../040-fonts-gfs-artemisia_1.1-5_all.deb ...\n", - "Unpacking fonts-gfs-artemisia (1.1-5) ...\n", - "Selecting previously unselected package fonts-gfs-baskerville.\n", - "Preparing to unpack .../041-fonts-gfs-baskerville_1.1-5_all.deb ...\n", - "Unpacking fonts-gfs-baskerville (1.1-5) ...\n", - "Selecting previously unselected package fonts-gfs-complutum.\n", - "Preparing to unpack .../042-fonts-gfs-complutum_1.1-6_all.deb ...\n", - "Unpacking fonts-gfs-complutum (1.1-6) ...\n", - "Selecting previously unselected package fonts-gfs-didot.\n", - "Preparing to unpack .../043-fonts-gfs-didot_1.1-6_all.deb ...\n", - "Unpacking fonts-gfs-didot (1.1-6) ...\n", - "Selecting previously unselected package fonts-gfs-neohellenic.\n", - "Preparing to unpack .../044-fonts-gfs-neohellenic_1.1-6_all.deb ...\n", - "Unpacking fonts-gfs-neohellenic (1.1-6) ...\n", - "Selecting previously unselected package fonts-gfs-olga.\n", - "Preparing to unpack .../045-fonts-gfs-olga_1.1-5_all.deb ...\n", - "Unpacking fonts-gfs-olga (1.1-5) ...\n", - "Selecting previously unselected package fonts-gfs-porson.\n", - "Preparing to unpack .../046-fonts-gfs-porson_1.1-6_all.deb ...\n", - "Unpacking fonts-gfs-porson (1.1-6) ...\n", - "Selecting previously unselected package fonts-gfs-solomos.\n", - "Preparing to unpack .../047-fonts-gfs-solomos_1.1-5_all.deb ...\n", - "Unpacking fonts-gfs-solomos (1.1-5) ...\n", - "Selecting previously unselected package fonts-go.\n", - "Preparing to unpack .../048-fonts-go_0~20161116-1_all.deb ...\n", - "Unpacking fonts-go (0~20161116-1) ...\n", - "Selecting previously unselected package fonts-junicode.\n", - "Preparing to unpack .../049-fonts-junicode_1.001-2_all.deb ...\n", - "Unpacking fonts-junicode (1.001-2) ...\n", - "Selecting previously unselected package fonts-linuxlibertine.\n", - "Preparing to unpack .../050-fonts-linuxlibertine_5.3.0-4_all.deb ...\n", - "Unpacking fonts-linuxlibertine (5.3.0-4) ...\n", - "Selecting previously unselected package fonts-lmodern.\n", - "Preparing to unpack .../051-fonts-lmodern_2.004.5-3_all.deb ...\n", - "Unpacking fonts-lmodern (2.004.5-3) ...\n", - "Selecting previously unselected package fonts-lobster.\n", - "Preparing to unpack .../052-fonts-lobster_2.0-2_all.deb ...\n", - "Unpacking fonts-lobster (2.0-2) ...\n", - "Selecting previously unselected package fonts-lobstertwo.\n", - "Preparing to unpack .../053-fonts-lobstertwo_2.0-2_all.deb ...\n", - "Unpacking fonts-lobstertwo (2.0-2) ...\n", - "Selecting previously unselected package fonts-noto-hinted.\n", - "Preparing to unpack .../054-fonts-noto-hinted_20171026-2_all.deb ...\n", - "Unpacking fonts-noto-hinted (20171026-2) ...\n", - "Selecting previously unselected package fonts-noto-mono.\n", - "Preparing to unpack .../055-fonts-noto-mono_20171026-2_all.deb ...\n", - "Unpacking fonts-noto-mono (20171026-2) ...\n", - "Selecting previously unselected package fonts-oflb-asana-math.\n", - "Preparing to unpack .../056-fonts-oflb-asana-math_000.907-6_all.deb ...\n", - "Unpacking fonts-oflb-asana-math (000.907-6) ...\n", - "Selecting previously unselected package fonts-open-sans.\n", - "Preparing to unpack .../057-fonts-open-sans_1.11-1_all.deb ...\n", - "Unpacking fonts-open-sans (1.11-1) ...\n", - "Selecting previously unselected package fonts-roboto-hinted.\n", - "Preparing to unpack .../058-fonts-roboto-hinted_2%3a0~20160106-2_all.deb ...\n", - "Unpacking fonts-roboto-hinted (2:0~20160106-2) ...\n", - "Selecting previously unselected package fonts-sil-gentium.\n", - "Preparing to unpack .../059-fonts-sil-gentium_20081126%3a1.03-2_all.deb ...\n", - "Unpacking fonts-sil-gentium (20081126:1.03-2) ...\n", - "Selecting previously unselected package fonts-sil-gentium-basic.\n", - "Preparing to unpack .../060-fonts-sil-gentium-basic_1.102-1_all.deb ...\n", - "Unpacking fonts-sil-gentium-basic (1.102-1) ...\n", - "Selecting previously unselected package fonts-sil-gentiumplus.\n", - "Preparing to unpack .../061-fonts-sil-gentiumplus_5.000-2_all.deb ...\n", - "Unpacking fonts-sil-gentiumplus (5.000-2) ...\n", - "Selecting previously unselected package fonts-sil-gentiumplus-compact.\n", - "Preparing to unpack .../062-fonts-sil-gentiumplus-compact_5.000-2_all.deb ...\n", - "Unpacking fonts-sil-gentiumplus-compact (5.000-2) ...\n", - "Selecting previously unselected package fonts-texgyre.\n", - "Preparing to unpack .../063-fonts-texgyre_20160520-1_all.deb ...\n", - "Unpacking fonts-texgyre (20160520-1) ...\n", - "Selecting previously unselected package gir1.2-freedesktop:amd64.\n", - "Preparing to unpack .../064-gir1.2-freedesktop_1.56.1-1_amd64.deb ...\n", - "Unpacking gir1.2-freedesktop:amd64 (1.56.1-1) ...\n", - "Selecting previously unselected package libpangoxft-1.0-0:amd64.\n", - "Preparing to unpack .../065-libpangoxft-1.0-0_1.40.14-1ubuntu0.1_amd64.deb ...\n", - "Unpacking libpangoxft-1.0-0:amd64 (1.40.14-1ubuntu0.1) ...\n", - "Selecting previously unselected package gir1.2-pango-1.0:amd64.\n", - "Preparing to unpack .../066-gir1.2-pango-1.0_1.40.14-1ubuntu0.1_amd64.deb ...\n", - "Unpacking gir1.2-pango-1.0:amd64 (1.40.14-1ubuntu0.1) ...\n", - "Selecting previously unselected package javascript-common.\n", - "Preparing to unpack .../067-javascript-common_11_all.deb ...\n", - "Unpacking javascript-common (11) ...\n", - "Selecting previously unselected package libarchive-cpio-perl.\n", - "Preparing to unpack .../068-libarchive-cpio-perl_0.10-1_all.deb ...\n", - "Unpacking libarchive-cpio-perl (0.10-1) ...\n", - "Selecting previously unselected package libcairo-script-interpreter2:amd64.\n", - "Preparing to unpack .../069-libcairo-script-interpreter2_1.15.10-2ubuntu0.1_amd64.deb ...\n", - "Unpacking libcairo-script-interpreter2:amd64 (1.15.10-2ubuntu0.1) ...\n", - "Selecting previously unselected package libpixman-1-dev:amd64.\n", - "Preparing to unpack .../070-libpixman-1-dev_0.34.0-2ubuntu0.1_amd64.deb ...\n", - "Unpacking libpixman-1-dev:amd64 (0.34.0-2ubuntu0.1) ...\n", - "Selecting previously unselected package libxcb-shm0-dev:amd64.\n", - "Preparing to unpack .../071-libxcb-shm0-dev_1.13-2~ubuntu18.04_amd64.deb ...\n", - "Unpacking libxcb-shm0-dev:amd64 (1.13-2~ubuntu18.04) ...\n", - "Selecting previously unselected package libcairo2-dev:amd64.\n", - "Preparing to unpack .../072-libcairo2-dev_1.15.10-2ubuntu0.1_amd64.deb ...\n", - "Unpacking libcairo2-dev:amd64 (1.15.10-2ubuntu0.1) ...\n", - "Selecting previously unselected package libcupsfilters1:amd64.\n", - "Preparing to unpack .../073-libcupsfilters1_1.20.2-0ubuntu3.1_amd64.deb ...\n", - "Unpacking libcupsfilters1:amd64 (1.20.2-0ubuntu3.1) ...\n", - "Selecting previously unselected package libcupsimage2:amd64.\n", - "Preparing to unpack .../074-libcupsimage2_2.2.7-1ubuntu2.9_amd64.deb ...\n", - "Unpacking libcupsimage2:amd64 (2.2.7-1ubuntu2.9) ...\n", - "Selecting previously unselected package libijs-0.35:amd64.\n", - "Preparing to unpack .../075-libijs-0.35_0.35-13_amd64.deb ...\n", - "Unpacking libijs-0.35:amd64 (0.35-13) ...\n", - "Selecting previously unselected package libjbig2dec0:amd64.\n", - "Preparing to unpack .../076-libjbig2dec0_0.13-6_amd64.deb ...\n", - "Unpacking libjbig2dec0:amd64 (0.13-6) ...\n", - "Selecting previously unselected package libgs9-common.\n", - "Preparing to unpack .../077-libgs9-common_9.26~dfsg+0-0ubuntu0.18.04.17_all.deb ...\n", - "Unpacking libgs9-common (9.26~dfsg+0-0ubuntu0.18.04.17) ...\n", - "Selecting previously unselected package libgs9:amd64.\n", - "Preparing to unpack .../078-libgs9_9.26~dfsg+0-0ubuntu0.18.04.17_amd64.deb ...\n", - "Unpacking libgs9:amd64 (9.26~dfsg+0-0ubuntu0.18.04.17) ...\n", - "Selecting previously unselected package libjs-jquery.\n", - "Preparing to unpack .../079-libjs-jquery_3.2.1-1_all.deb ...\n", - "Unpacking libjs-jquery (3.2.1-1) ...\n", - "Selecting previously unselected package libkpathsea6:amd64.\n", - "Preparing to unpack .../080-libkpathsea6_2017.20170613.44572-8ubuntu0.1_amd64.deb ...\n", - "Unpacking libkpathsea6:amd64 (2017.20170613.44572-8ubuntu0.1) ...\n", - "Selecting previously unselected package libsys-hostname-long-perl.\n", - "Preparing to unpack .../081-libsys-hostname-long-perl_1.5-1_all.deb ...\n", - "Unpacking libsys-hostname-long-perl (1.5-1) ...\n", - "Selecting previously unselected package libmail-sendmail-perl.\n", - "Preparing to unpack .../082-libmail-sendmail-perl_0.80-1_all.deb ...\n", - "Unpacking libmail-sendmail-perl (0.80-1) ...\n", - "Selecting previously unselected package libpango1.0-dev.\n", - "Preparing to unpack .../083-libpango1.0-dev_1.40.14-1ubuntu0.1_amd64.deb ...\n", - "Unpacking libpango1.0-dev (1.40.14-1ubuntu0.1) ...\n", - "Selecting previously unselected package libpotrace0.\n", - "Preparing to unpack .../084-libpotrace0_1.14-2_amd64.deb ...\n", - "Unpacking libpotrace0 (1.14-2) ...\n", - "Selecting previously unselected package libptexenc1:amd64.\n", - "Preparing to unpack .../085-libptexenc1_2017.20170613.44572-8ubuntu0.1_amd64.deb ...\n", - "Unpacking libptexenc1:amd64 (2017.20170613.44572-8ubuntu0.1) ...\n", - "Selecting previously unselected package rubygems-integration.\n", - "Preparing to unpack .../086-rubygems-integration_1.11_all.deb ...\n", - "Unpacking rubygems-integration (1.11) ...\n", - "Selecting previously unselected package ruby2.5.\n", - "Preparing to unpack .../087-ruby2.5_2.5.1-1ubuntu1.12_amd64.deb ...\n", - "Unpacking ruby2.5 (2.5.1-1ubuntu1.12) ...\n", - "Selecting previously unselected package ruby.\n", - "Preparing to unpack .../088-ruby_1%3a2.5.1_amd64.deb ...\n", - "Unpacking ruby (1:2.5.1) ...\n", - "Selecting previously unselected package rake.\n", - "Preparing to unpack .../089-rake_12.3.1-1ubuntu0.1_all.deb ...\n", - "Unpacking rake (12.3.1-1ubuntu0.1) ...\n", - "Selecting previously unselected package ruby-did-you-mean.\n", - "Preparing to unpack .../090-ruby-did-you-mean_1.2.0-2_all.deb ...\n", - "Unpacking ruby-did-you-mean (1.2.0-2) ...\n", - "Selecting previously unselected package ruby-minitest.\n", - "Preparing to unpack .../091-ruby-minitest_5.10.3-1_all.deb ...\n", - "Unpacking ruby-minitest (5.10.3-1) ...\n", - "Selecting previously unselected package ruby-net-telnet.\n", - "Preparing to unpack .../092-ruby-net-telnet_0.1.1-2_all.deb ...\n", - "Unpacking ruby-net-telnet (0.1.1-2) ...\n", - "Selecting previously unselected package ruby-power-assert.\n", - "Preparing to unpack .../093-ruby-power-assert_0.3.0-1_all.deb ...\n", - "Unpacking ruby-power-assert (0.3.0-1) ...\n", - "Selecting previously unselected package ruby-test-unit.\n", - "Preparing to unpack .../094-ruby-test-unit_3.2.5-1_all.deb ...\n", - "Unpacking ruby-test-unit (3.2.5-1) ...\n", - "Selecting previously unselected package libruby2.5:amd64.\n", - "Preparing to unpack .../095-libruby2.5_2.5.1-1ubuntu1.12_amd64.deb ...\n", - "Unpacking libruby2.5:amd64 (2.5.1-1ubuntu1.12) ...\n", - "Selecting previously unselected package libsynctex1:amd64.\n", - "Preparing to unpack .../096-libsynctex1_2017.20170613.44572-8ubuntu0.1_amd64.deb ...\n", - "Unpacking libsynctex1:amd64 (2017.20170613.44572-8ubuntu0.1) ...\n", - "Selecting previously unselected package libtexlua52:amd64.\n", - "Preparing to unpack .../097-libtexlua52_2017.20170613.44572-8ubuntu0.1_amd64.deb ...\n", - "Unpacking libtexlua52:amd64 (2017.20170613.44572-8ubuntu0.1) ...\n", - "Selecting previously unselected package libtexluajit2:amd64.\n", - "Preparing to unpack .../098-libtexluajit2_2017.20170613.44572-8ubuntu0.1_amd64.deb ...\n", - "Unpacking libtexluajit2:amd64 (2017.20170613.44572-8ubuntu0.1) ...\n", - "Selecting previously unselected package libzzip-0-13:amd64.\n", - "Preparing to unpack .../099-libzzip-0-13_0.13.62-3.1ubuntu0.18.04.1_amd64.deb ...\n", - "Unpacking libzzip-0-13:amd64 (0.13.62-3.1ubuntu0.18.04.1) ...\n", - "Selecting previously unselected package lmodern.\n", - "Preparing to unpack .../100-lmodern_2.004.5-3_all.deb ...\n", - "Unpacking lmodern (2.004.5-3) ...\n", - "Selecting previously unselected package preview-latex-style.\n", - "Preparing to unpack .../101-preview-latex-style_11.91-1ubuntu1_all.deb ...\n", - "Unpacking preview-latex-style (11.91-1ubuntu1) ...\n", - "Selecting previously unselected package t1utils.\n", - "Preparing to unpack .../102-t1utils_1.41-2_amd64.deb ...\n", - "Unpacking t1utils (1.41-2) ...\n", - "Selecting previously unselected package tex-gyre.\n", - "Preparing to unpack .../103-tex-gyre_20160520-1_all.deb ...\n", - "Unpacking tex-gyre (20160520-1) ...\n", - "Selecting previously unselected package texlive-binaries.\n", - "Preparing to unpack .../104-texlive-binaries_2017.20170613.44572-8ubuntu0.1_amd64.deb ...\n", - "Unpacking texlive-binaries (2017.20170613.44572-8ubuntu0.1) ...\n", - "Selecting previously unselected package texlive-base.\n", - "Preparing to unpack .../105-texlive-base_2017.20180305-1_all.deb ...\n", - "Unpacking texlive-base (2017.20180305-1) ...\n", - "Selecting previously unselected package texlive-fonts-recommended.\n", - "Preparing to unpack .../106-texlive-fonts-recommended_2017.20180305-1_all.deb ...\n", - "Unpacking texlive-fonts-recommended (2017.20180305-1) ...\n", - "Selecting previously unselected package texlive-latex-base.\n", - "Preparing to unpack .../107-texlive-latex-base_2017.20180305-1_all.deb ...\n", - "Unpacking texlive-latex-base (2017.20180305-1) ...\n", - "Selecting previously unselected package texlive-latex-recommended.\n", - "Preparing to unpack .../108-texlive-latex-recommended_2017.20180305-1_all.deb ...\n", - "Unpacking texlive-latex-recommended (2017.20180305-1) ...\n", - "Selecting previously unselected package texlive.\n", - "Preparing to unpack .../109-texlive_2017.20180305-1_all.deb ...\n", - "Unpacking texlive (2017.20180305-1) ...\n", - "Selecting previously unselected package texlive-fonts-extra.\n", - "Preparing to unpack .../110-texlive-fonts-extra_2017.20180305-2_all.deb ...\n", - "Unpacking texlive-fonts-extra (2017.20180305-2) ...\n", - "Selecting previously unselected package fonts-stix.\n", - "Preparing to unpack .../111-fonts-stix_1.1.1-4_all.deb ...\n", - "Unpacking fonts-stix (1.1.1-4) ...\n", - "Selecting previously unselected package texlive-fonts-extra-links.\n", - "Preparing to unpack .../112-texlive-fonts-extra-links_2017.20180305-2_all.deb ...\n", - "Unpacking texlive-fonts-extra-links (2017.20180305-2) ...\n", - "Selecting previously unselected package texlive-lang-greek.\n", - "Preparing to unpack .../113-texlive-lang-greek_2017.20180305-1_all.deb ...\n", - "Unpacking texlive-lang-greek (2017.20180305-1) ...\n", - "Selecting previously unselected package texlive-pictures.\n", - "Preparing to unpack .../114-texlive-pictures_2017.20180305-1_all.deb ...\n", - "Unpacking texlive-pictures (2017.20180305-1) ...\n", - "Selecting previously unselected package texlive-latex-extra.\n", - "Preparing to unpack .../115-texlive-latex-extra_2017.20180305-2_all.deb ...\n", - "Unpacking texlive-latex-extra (2017.20180305-2) ...\n", - "Selecting previously unselected package texlive-plain-generic.\n", - "Preparing to unpack .../116-texlive-plain-generic_2017.20180305-2_all.deb ...\n", - "Unpacking texlive-plain-generic (2017.20180305-2) ...\n", - "Selecting previously unselected package texlive-science.\n", - "Preparing to unpack .../117-texlive-science_2017.20180305-2_all.deb ...\n", - "Unpacking texlive-science (2017.20180305-2) ...\n", - "Selecting previously unselected package tipa.\n", - "Preparing to unpack .../118-tipa_2%3a1.3-20_all.deb ...\n", - "Unpacking tipa (2:1.3-20) ...\n", - "Setting up libgs9-common (9.26~dfsg+0-0ubuntu0.18.04.17) ...\n", - "Setting up libkpathsea6:amd64 (2017.20170613.44572-8ubuntu0.1) ...\n", - "Setting up libjs-jquery (3.2.1-1) ...\n", - "Setting up libtexlua52:amd64 (2017.20170613.44572-8ubuntu0.1) ...\n", - "Setting up fonts-droid-fallback (1:6.0.1r16-1.1) ...\n", - "Setting up libsynctex1:amd64 (2017.20170613.44572-8ubuntu0.1) ...\n", - "Setting up libptexenc1:amd64 (2017.20170613.44572-8ubuntu0.1) ...\n", - "Setting up fonts-gfs-neohellenic (1.1-6) ...\n", - "Setting up tex-common (6.09) ...\n", - "debconf: unable to initialize frontend: Dialog\n", - "debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)\n", - "debconf: falling back to frontend: Readline\n", - "update-language: texlive-base not installed and configured, doing nothing!\n", - "Setting up libarchive-zip-perl (1.60-1ubuntu0.1) ...\n", - "Setting up fonts-stix (1.1.1-4) ...\n", - "Setting up fonts-comfortaa (3.001-2) ...\n", - "Setting up libtimedate-perl (2.3000-2) ...\n", - "Setting up libcairo-script-interpreter2:amd64 (1.15.10-2ubuntu0.1) ...\n", - "Setting up libsigsegv2:amd64 (2.12-1) ...\n", - "Setting up fonts-dejavu-core (2.37-1) ...\n", - "Setting up fonts-linuxlibertine (5.3.0-4) ...\n", - "Setting up poppler-data (0.4.8-2) ...\n", - "Setting up fonts-gfs-porson (1.1-6) ...\n", - "Setting up gir1.2-freedesktop:amd64 (1.56.1-1) ...\n", - "Setting up libxcb-shm0-dev:amd64 (1.13-2~ubuntu18.04) ...\n", - "Setting up libpangoxft-1.0-0:amd64 (1.40.14-1ubuntu0.1) ...\n", - "Setting up fonts-oflb-asana-math (000.907-6) ...\n", - "Setting up libarchive-cpio-perl (0.10-1) ...\n", - "Setting up tex-gyre (20160520-1) ...\n", - "Setting up fonts-lobster (2.0-2) ...\n", - "Setting up fonts-gfs-solomos (1.1-5) ...\n", - "Setting up fonts-adf-accanthis (0.20110505-1) ...\n", - "Setting up gettext-base (0.19.8.1-6ubuntu0.3) ...\n", - "Setting up fonts-freefont-otf (20120503-7) ...\n", - "Setting up preview-latex-style (11.91-1ubuntu1) ...\n", - "Setting up fonts-open-sans (1.11-1) ...\n", - "Setting up fonts-texgyre (20160520-1) ...\n", - "Setting up m4 (1.4.18-1) ...\n", - "Setting up fonts-crosextra-carlito (20130920-1) ...\n", - "Setting up fonts-ebgaramond-extra (0.016-1) ...\n", - "Setting up fonts-font-awesome (4.7.0~dfsg-3) ...\n", - "Setting up fonts-junicode (1.001-2) ...\n", - "Setting up libmagic-mgc (1:5.32-2ubuntu0.4) ...\n", - "Setting up fonts-noto-mono (20171026-2) ...\n", - "Setting up gir1.2-pango-1.0:amd64 (1.40.14-1ubuntu0.1) ...\n", - "Setting up libmagic1:amd64 (1:5.32-2ubuntu0.4) ...\n", - "Setting up fonts-lato (2.0-2) ...\n", - "Setting up libcupsfilters1:amd64 (1.20.2-0ubuntu3.1) ...\n", - "Setting up libsys-hostname-long-perl (1.5-1) ...\n", - "Setting up fonts-gfs-complutum (1.1-6) ...\n", - "Setting up fonts-cabin (1.5-2) ...\n", - "Setting up libcupsimage2:amd64 (2.2.7-1ubuntu2.9) ...\n", - "Setting up fonts-sil-gentiumplus-compact (5.000-2) ...\n", - "Setting up libjbig2dec0:amd64 (0.13-6) ...\n", - "Setting up ruby-did-you-mean (1.2.0-2) ...\n", - "Setting up fonts-adf-gillius (0.20110505-1) ...\n", - "Setting up libmail-sendmail-perl (0.80-1) ...\n", - "Setting up fonts-crosextra-caladea (20130214-2) ...\n", - "Setting up fonts-gfs-baskerville (1.1-5) ...\n", - "Setting up autotools-dev (20180224.1) ...\n", - "Setting up fonts-noto-hinted (20171026-2) ...\n", - "Setting up libpixman-1-dev:amd64 (0.34.0-2ubuntu0.1) ...\n", - "Setting up t1utils (1.41-2) ...\n", - "Setting up fonts-ebgaramond (0.016-1) ...\n", - "Setting up ruby-net-telnet (0.1.1-2) ...\n", - "Setting up fonts-croscore (20171026-2) ...\n", - "Setting up libijs-0.35:amd64 (0.35-13) ...\n", - "Setting up rubygems-integration (1.11) ...\n", - "Setting up libpotrace0 (1.14-2) ...\n", - "Setting up fonts-adf-berenis (0.20110505-1) ...\n", - "Setting up fonts-adf-universalis (0.20110505-1) ...\n", - "Setting up fonts-sil-gentiumplus (5.000-2) ...\n", - "Setting up fonts-gfs-didot (1.1-6) ...\n", - "Setting up javascript-common (11) ...\n", - "Setting up fonts-gfs-artemisia (1.1-5) ...\n", - "Setting up fonts-dejavu-extra (2.37-1) ...\n", - "Setting up fonts-freefont-ttf (20120503-7) ...\n", - "Setting up ruby-minitest (5.10.3-1) ...\n", - "Setting up fonts-go (0~20161116-1) ...\n", - "Setting up libzzip-0-13:amd64 (0.13.62-3.1ubuntu0.18.04.1) ...\n", - "Setting up fonts-sil-gentium (20081126:1.03-2) ...\n", - "Setting up libgs9:amd64 (9.26~dfsg+0-0ubuntu0.18.04.17) ...\n", - "Setting up fonts-sil-gentium-basic (1.102-1) ...\n", - "Setting up libtexluajit2:amd64 (2017.20170613.44572-8ubuntu0.1) ...\n", - "Setting up fonts-gfs-olga (1.1-5) ...\n", - "Setting up autopoint (0.19.8.1-6ubuntu0.3) ...\n", - "Setting up fonts-lmodern (2.004.5-3) ...\n", - "Setting up ruby-power-assert (0.3.0-1) ...\n", - "Setting up fonts-roboto-hinted (2:0~20160106-2) ...\n", - "Setting up libfile-stripnondeterminism-perl (0.040-1.1~build1) ...\n", - "Setting up libcairo2-dev:amd64 (1.15.10-2ubuntu0.1) ...\n", - "Setting up gettext (0.19.8.1-6ubuntu0.3) ...\n", - "Setting up fonts-lobstertwo (2.0-2) ...\n", - "Setting up autoconf (2.69-11) ...\n", - "Setting up file (1:5.32-2ubuntu0.4) ...\n", - "Setting up texlive-binaries (2017.20170613.44572-8ubuntu0.1) ...\n", - "update-alternatives: using /usr/bin/xdvi-xaw to provide /usr/bin/xdvi.bin (xdvi.bin) in auto mode\n", - "update-alternatives: using /usr/bin/bibtex.original to provide /usr/bin/bibtex (bibtex) in auto mode\n", - "Setting up intltool-debian (0.35.0+20060710.4) ...\n", - "Setting up automake (1:1.15.1-3ubuntu2) ...\n", - "update-alternatives: using /usr/bin/automake-1.15 to provide /usr/bin/automake (automake) in auto mode\n", - "Setting up texlive-base (2017.20180305-1) ...\n", - "mktexlsr: Updating /var/lib/texmf/ls-R-TEXLIVEDIST... \n", - "mktexlsr: Updating /var/lib/texmf/ls-R-TEXMFMAIN... \n", - "mktexlsr: Updating /var/lib/texmf/ls-R... \n", - "mktexlsr: Done.\n", - "tl-paper: setting paper size for dvips to a4: /var/lib/texmf/dvips/config/config-paper.ps\n", - "tl-paper: setting paper size for dvipdfmx to a4: /var/lib/texmf/dvipdfmx/dvipdfmx-paper.cfg\n", - "tl-paper: setting paper size for xdvi to a4: /var/lib/texmf/xdvi/XDvi-paper\n", - "tl-paper: setting paper size for pdftex to a4: /var/lib/texmf/tex/generic/config/pdftexconfig.tex\n", - "debconf: unable to initialize frontend: Dialog\n", - "debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)\n", - "debconf: falling back to frontend: Readline\n", - "Setting up texlive-fonts-extra-links (2017.20180305-2) ...\n", - "Setting up libpango1.0-dev (1.40.14-1ubuntu0.1) ...\n", - "Setting up texlive-fonts-recommended (2017.20180305-1) ...\n", - "Setting up texlive-plain-generic (2017.20180305-2) ...\n", - "Setting up texlive-latex-base (2017.20180305-1) ...\n", - "Setting up lmodern (2.004.5-3) ...\n", - "Setting up libtool (2.4.6-2) ...\n", - "Setting up texlive-latex-recommended (2017.20180305-1) ...\n", - "Setting up texlive-lang-greek (2017.20180305-1) ...\n", - "Setting up texlive-fonts-extra (2017.20180305-2) ...\n", - "Setting up po-debconf (1.0.20) ...\n", - "Setting up texlive-science (2017.20180305-2) ...\n", - "Setting up texlive-pictures (2017.20180305-1) ...\n", - "Setting up tipa (2:1.3-20) ...\n", - "Regenerating '/var/lib/texmf/fmtutil.cnf-DEBIAN'... done.\n", - "Regenerating '/var/lib/texmf/fmtutil.cnf-TEXLIVEDIST'... done.\n", - "update-fmtutil has updated the following file(s):\n", - "\t/var/lib/texmf/fmtutil.cnf-DEBIAN\n", - "\t/var/lib/texmf/fmtutil.cnf-TEXLIVEDIST\n", - "If you want to activate the changes in the above file(s),\n", - "you should run fmtutil-sys or fmtutil.\n", - "Setting up texlive (2017.20180305-1) ...\n", - "Setting up texlive-latex-extra (2017.20180305-2) ...\n", - "Setting up dh-autoreconf (17) ...\n", - "Setting up ruby-test-unit (3.2.5-1) ...\n", - "Setting up dh-strip-nondeterminism (0.040-1.1~build1) ...\n", - "Setting up debhelper (11.1.6ubuntu2) ...\n", - "Setting up libruby2.5:amd64 (2.5.1-1ubuntu1.12) ...\n", - "Setting up ruby2.5 (2.5.1-1ubuntu1.12) ...\n", - "Setting up ruby (1:2.5.1) ...\n", - "Setting up rake (12.3.1-1ubuntu0.1) ...\n", - "Processing triggers for libc-bin (2.27-3ubuntu1.6) ...\n", - "Processing triggers for man-db (2.8.3-2ubuntu0.1) ...\n", - "Processing triggers for fontconfig (2.12.6-0ubuntu2) ...\n", - "Processing triggers for mime-support (3.60ubuntu1) ...\n", - "Processing triggers for tex-common (6.09) ...\n", - "debconf: unable to initialize frontend: Dialog\n", - "debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)\n", - "debconf: falling back to frontend: Readline\n", - "Running updmap-sys. This may take some time... done.\n", - "Running mktexlsr /var/lib/texmf ... done.\n", - "Building format(s) --all.\n", - "\tThis may take some time... done.\n", - "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", - "Collecting manim\n", - " Downloading manim-0.17.2-py3-none-any.whl (524 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m524.5/524.5 KB\u001b[0m \u001b[31m10.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting pydub<0.26.0,>=0.25.1\n", - " Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)\n", - "Collecting rich!=12.0.0,>=6.0\n", - " Downloading rich-13.0.1-py3-none-any.whl (238 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m238.1/238.1 KB\u001b[0m \u001b[31m26.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting mapbox-earcut<2.0.0,>=1.0.0\n", - " Downloading mapbox_earcut-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (104 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m105.0/105.0 KB\u001b[0m \u001b[31m12.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting moderngl<6.0.0,>=5.6.3\n", - " Downloading moderngl-5.7.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (710 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m710.5/710.5 KB\u001b[0m \u001b[31m30.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting click-default-group<2.0.0,>=1.2.2\n", - " Downloading click-default-group-1.2.2.tar.gz (3.3 kB)\n", - " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - "Collecting decorator<6.0.0,>=5.0.7\n", - " Downloading decorator-5.1.1-py3-none-any.whl (9.1 kB)\n", - "Collecting moderngl-window<3.0.0,>=2.3.0\n", - " Downloading moderngl_window-2.4.2-py3-none-any.whl (368 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m368.4/368.4 KB\u001b[0m \u001b[31m32.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting svgelements<2.0.0,>=1.8.0\n", - " Downloading svgelements-1.9.0-py2.py3-none-any.whl (132 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m132.8/132.8 KB\u001b[0m \u001b[31m15.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: tqdm<5.0.0,>=4.62.3 in /usr/local/lib/python3.8/dist-packages (from manim) (4.64.1)\n", - "Requirement already satisfied: numpy<2.0,>=1.19 in /usr/local/lib/python3.8/dist-packages (from manim) (1.21.6)\n", - "Collecting screeninfo<0.9,>=0.8\n", - " Downloading screeninfo-0.8.1-py3-none-any.whl (12 kB)\n", - "Collecting srt<4.0.0,>=3.5.0\n", - " Downloading srt-3.5.2.tar.gz (24 kB)\n", - " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - "Collecting click<=9.0,>=7.2\n", - " Downloading click-8.1.3-py3-none-any.whl (96 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m96.6/96.6 KB\u001b[0m \u001b[31m11.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting isosurfaces==0.1.0\n", - " Downloading isosurfaces-0.1.0-py3-none-any.whl (10 kB)\n", - "Collecting watchdog<3.0.0,>=2.1.6\n", - " Downloading watchdog-2.2.1-py3-none-manylinux2014_x86_64.whl (78 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m79.0/79.0 KB\u001b[0m \u001b[31m8.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: scipy<2.0.0,>=1.7.3 in /usr/local/lib/python3.8/dist-packages (from manim) (1.7.3)\n", - "Collecting skia-pathops<0.8.0,>=0.7.0\n", - " Downloading skia_pathops-0.7.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.0/3.0 MB\u001b[0m \u001b[31m69.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting cloup<0.14.0,>=0.13.0\n", - " Downloading cloup-0.13.1-py2.py3-none-any.whl (51 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m51.8/51.8 KB\u001b[0m \u001b[31m6.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting requests<3.0.0,>=2.26.0\n", - " Downloading requests-2.28.1-py3-none-any.whl (62 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.8/62.8 KB\u001b[0m \u001b[31m6.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting manimpango<0.5.0,>=0.4.0.post0\n", - " Downloading ManimPango-0.4.3.tar.gz (4.1 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m4.1/4.1 MB\u001b[0m \u001b[31m89.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", - " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", - " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", - "Collecting Pillow<10.0,>=9.1\n", - " Downloading Pillow-9.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.3/3.3 MB\u001b[0m \u001b[31m81.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting Pygments<3.0.0,>=2.10.0\n", - " Downloading Pygments-2.14.0-py3-none-any.whl (1.1 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.1/1.1 MB\u001b[0m \u001b[31m61.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: networkx<3.0,>=2.5 in /usr/local/lib/python3.8/dist-packages (from manim) (2.8.8)\n", - "Collecting pycairo<2.0,>=1.21\n", - " Downloading pycairo-1.23.0.tar.gz (344 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m344.6/344.6 KB\u001b[0m \u001b[31m26.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25h Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", - " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", - " Installing backend dependencies ... \u001b[?25l\u001b[?25hdone\n", - " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", - "Collecting colour<0.2.0,>=0.1.5\n", - " Downloading colour-0.1.5-py2.py3-none-any.whl (23 kB)\n", - "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.8/dist-packages (from cloup<0.14.0,>=0.13.0->manim) (4.4.0)\n", - "Collecting glcontext<3,>=2.3.6\n", - " Downloading glcontext-2.3.7-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (52 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m52.3/52.3 KB\u001b[0m \u001b[31m6.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting pyglet>=2.0dev23\n", - " Downloading pyglet-2.0.3-py3-none-any.whl (968 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m968.6/968.6 KB\u001b[0m \u001b[31m52.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting pyrr<1,>=0.10.3\n", - " Downloading pyrr-0.10.3-py3-none-any.whl (46 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m46.8/46.8 KB\u001b[0m \u001b[31m4.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests<3.0.0,>=2.26.0->manim) (1.24.3)\n", - "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests<3.0.0,>=2.26.0->manim) (2.10)\n", - "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests<3.0.0,>=2.26.0->manim) (2022.12.7)\n", - "Requirement already satisfied: charset-normalizer<3,>=2 in /usr/local/lib/python3.8/dist-packages (from requests<3.0.0,>=2.26.0->manim) (2.1.1)\n", - "Collecting commonmark<0.10.0,>=0.9.0\n", - " Downloading commonmark-0.9.1-py2.py3-none-any.whl (51 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m51.1/51.1 KB\u001b[0m \u001b[31m6.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: multipledispatch in /usr/local/lib/python3.8/dist-packages (from pyrr<1,>=0.10.3->moderngl-window<3.0.0,>=2.3.0->manim) (0.6.0)\n", - "Requirement already satisfied: six in /usr/local/lib/python3.8/dist-packages (from multipledispatch->pyrr<1,>=0.10.3->moderngl-window<3.0.0,>=2.3.0->manim) (1.15.0)\n", - "Building wheels for collected packages: click-default-group, manimpango, pycairo, srt\n", - " Building wheel for click-default-group (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Created wheel for click-default-group: filename=click_default_group-1.2.2-py3-none-any.whl size=3385 sha256=aa8606c5a3f1c3f6fadc1543ee5566fa34fb5f080d23c353965878291bda4159\n", - " Stored in directory: /root/.cache/pip/wheels/7e/9f/ec/d087477ddc7c2807136ca08eb01b5f00e66da90eb4dbf323ab\n", - " Building wheel for manimpango (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", - " Created wheel for manimpango: filename=ManimPango-0.4.3-cp38-cp38-linux_x86_64.whl size=312596 sha256=0438d80428fa37a42a1b09dbba037f211a08d214eca2dde35739d324d04c9ac3\n", - " Stored in directory: /root/.cache/pip/wheels/d3/c5/ba/8cfa393b01c575165f67bfbc26c09d5f36ca1cbaba2a3bc75c\n", - " Building wheel for pycairo (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", - " Created wheel for pycairo: filename=pycairo-1.23.0-cp38-cp38-linux_x86_64.whl size=297272 sha256=17632352260cfdfb011ca82fc5843cf334c66487f355a7282abe6a3ec53db88b\n", - " Stored in directory: /root/.cache/pip/wheels/d9/25/86/ba7950c33840b1fda7ab932c7c7172d77b994807c5fd35c3ea\n", - " Building wheel for srt (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Created wheel for srt: filename=srt-3.5.2-py3-none-any.whl size=22487 sha256=7cdd64e5f94f7b9bb006697639a21287b64172e3dc0ed3fd9d1ff713d9f65019\n", - " Stored in directory: /root/.cache/pip/wheels/90/d5/90/2c5207a2aa1613bff020121ce21fe165a40d9422dbe5eef6e8\n", - "Successfully built click-default-group manimpango pycairo srt\n", - "Installing collected packages: svgelements, pyglet, pydub, glcontext, commonmark, colour, watchdog, srt, skia-pathops, screeninfo, requests, Pygments, pycairo, Pillow, moderngl, mapbox-earcut, manimpango, isosurfaces, decorator, click, rich, pyrr, cloup, click-default-group, moderngl-window, manim\n", - " Attempting uninstall: requests\n", - " Found existing installation: requests 2.25.1\n", - " Uninstalling requests-2.25.1:\n", - " Successfully uninstalled requests-2.25.1\n", - " Attempting uninstall: Pygments\n", - " Found existing installation: Pygments 2.6.1\n", - " Uninstalling Pygments-2.6.1:\n", - " Successfully uninstalled Pygments-2.6.1\n", - " Attempting uninstall: Pillow\n", - " Found existing installation: Pillow 7.1.2\n", - " Uninstalling Pillow-7.1.2:\n", - " Successfully uninstalled Pillow-7.1.2\n", - " Attempting uninstall: decorator\n", - " Found existing installation: decorator 4.4.2\n", - " Uninstalling decorator-4.4.2:\n", - " Successfully uninstalled decorator-4.4.2\n", - " Attempting uninstall: click\n", - " Found existing installation: click 7.1.2\n", - " Uninstalling click-7.1.2:\n", - " Successfully uninstalled click-7.1.2\n", - "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", - "ipython 7.9.0 requires jedi>=0.10, which is not installed.\n", - "moviepy 0.2.3.5 requires decorator<5.0,>=4.0.2, but you have decorator 5.1.1 which is incompatible.\n", - "flask 1.1.4 requires click<8.0,>=5.1, but you have click 8.1.3 which is incompatible.\u001b[0m\u001b[31m\n", - "\u001b[0mSuccessfully installed Pillow-9.4.0 Pygments-2.14.0 click-8.1.3 click-default-group-1.2.2 cloup-0.13.1 colour-0.1.5 commonmark-0.9.1 decorator-5.1.1 glcontext-2.3.7 isosurfaces-0.1.0 manim-0.17.2 manimpango-0.4.3 mapbox-earcut-1.0.1 moderngl-5.7.4 moderngl-window-2.4.2 pycairo-1.23.0 pydub-0.25.1 pyglet-2.0.3 pyrr-0.10.3 requests-2.28.1 rich-13.0.1 screeninfo-0.8.1 skia-pathops-0.7.4 srt-3.5.2 svgelements-1.9.0 watchdog-2.2.1\n", - "Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n", - "Requirement already satisfied: IPython in /usr/local/lib/python3.8/dist-packages (7.9.0)\n", - "Collecting IPython\n", - " Downloading ipython-8.8.0-py3-none-any.whl (775 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m775.8/775.8 KB\u001b[0m \u001b[31m13.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: pexpect>4.3 in /usr/local/lib/python3.8/dist-packages (from IPython) (4.8.0)\n", - "Collecting jedi>=0.16\n", - " Downloading jedi-0.18.2-py2.py3-none-any.whl (1.6 MB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.6/1.6 MB\u001b[0m \u001b[31m52.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hRequirement already satisfied: pickleshare in /usr/local/lib/python3.8/dist-packages (from IPython) (0.7.5)\n", - "Requirement already satisfied: traitlets>=5 in /usr/local/lib/python3.8/dist-packages (from IPython) (5.7.1)\n", - "Requirement already satisfied: backcall in /usr/local/lib/python3.8/dist-packages (from IPython) (0.2.0)\n", - "Requirement already satisfied: pygments>=2.4.0 in /usr/local/lib/python3.8/dist-packages (from IPython) (2.14.0)\n", - "Collecting matplotlib-inline\n", - " Downloading matplotlib_inline-0.1.6-py3-none-any.whl (9.4 kB)\n", - "Collecting prompt-toolkit<3.1.0,>=3.0.11\n", - " Downloading prompt_toolkit-3.0.36-py3-none-any.whl (386 kB)\n", - "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m386.4/386.4 KB\u001b[0m \u001b[31m32.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", - "\u001b[?25hCollecting stack-data\n", - " Downloading stack_data-0.6.2-py3-none-any.whl (24 kB)\n", - "Requirement already satisfied: decorator in /usr/local/lib/python3.8/dist-packages (from IPython) (5.1.1)\n", - "Requirement already satisfied: parso<0.9.0,>=0.8.0 in /usr/local/lib/python3.8/dist-packages (from jedi>=0.16->IPython) (0.8.3)\n", - "Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.8/dist-packages (from pexpect>4.3->IPython) (0.7.0)\n", - "Requirement already satisfied: wcwidth in /usr/local/lib/python3.8/dist-packages (from prompt-toolkit<3.1.0,>=3.0.11->IPython) (0.2.5)\n", - "Collecting asttokens>=2.1.0\n", - " Downloading asttokens-2.2.1-py2.py3-none-any.whl (26 kB)\n", - "Collecting pure-eval\n", - " Downloading pure_eval-0.2.2-py3-none-any.whl (11 kB)\n", - "Collecting executing>=1.2.0\n", - " Downloading executing-1.2.0-py2.py3-none-any.whl (24 kB)\n", - "Requirement already satisfied: six in /usr/local/lib/python3.8/dist-packages (from asttokens>=2.1.0->stack-data->IPython) (1.15.0)\n", - "Installing collected packages: pure-eval, executing, prompt-toolkit, matplotlib-inline, jedi, asttokens, stack-data, IPython\n", - " Attempting uninstall: prompt-toolkit\n", - " Found existing installation: prompt-toolkit 2.0.10\n", - " Uninstalling prompt-toolkit-2.0.10:\n", - " Successfully uninstalled prompt-toolkit-2.0.10\n", - " Attempting uninstall: IPython\n", - " Found existing installation: ipython 7.9.0\n", - " Uninstalling ipython-7.9.0:\n", - " Successfully uninstalled ipython-7.9.0\n", - "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", - "google-colab 1.0.0 requires ipython~=7.9.0, but you have ipython 8.8.0 which is incompatible.\u001b[0m\u001b[31m\n", - "\u001b[0mSuccessfully installed IPython-8.8.0 asttokens-2.2.1 executing-1.2.0 jedi-0.18.2 matplotlib-inline-0.1.6 prompt-toolkit-3.0.36 pure-eval-0.2.2 stack-data-0.6.2\n" - ] - } - ], - "source": [ - "!sudo apt update\n", - "!sudo apt install libcairo2-dev ffmpeg \\\n", - " texlive texlive-latex-extra texlive-fonts-extra \\\n", - " texlive-latex-recommended texlive-science \\\n", - " tipa libpango1.0-dev\n", - "!pip install manim\n", - "!pip install IPython --upgrade " - ] - }, - { - "cell_type": "code", - "source": [ - "from manim import *\n", - "from abc import ABC" - ], - "metadata": { - "id": "SUia5fq6B_zj" - }, - "execution_count": 4, - "outputs": [] - }, - { - "cell_type": "code", - "source": [ - "%%manim -qm -v WARNING HypergraphExample\n", - "\n", - "class OuterLabeledDot(VGroup, ABC):\n", - " def __init__(self, position=ORIGIN, swatch=WHITE, label=\"\", **kwargs):\n", - " dot = Dot(position, color=swatch)\n", - " super().__init__(dot, Tex(label).next_to(dot, 0.4 * UL), **kwargs)\n", - "\n", - "\n", - "class HypergraphExample(ThreeDScene):\n", - " def construct(self):\n", - " # Transition 1 - Introducing a hypergraph\n", - " title = Tex(r\"We can take a hypergraph\")\n", - " title.to_corner(UP + LEFT)\n", - " d1 = OuterLabeledDot([1, 2, 0], label=\"D1\", swatch=YELLOW),\n", - " d2 = OuterLabeledDot([-1, 1, 0], label=\"D2\", swatch=BLUE),\n", - " d3 = OuterLabeledDot([1.4, -1.4, 0], label=\"D3\", swatch=GREEN),\n", - " d4 = OuterLabeledDot([-3, -2, 0], label=\"D4\", swatch=GREY),\n", - " d5 = OuterLabeledDot([3, 1, 0], label=\"D5\", swatch=MAROON)\n", - "\n", - " disease = [d1[0], d2[0], d3[0], d4[0], d5]\n", - "\n", - " a1 = ArcPolygon([-4, -3, 1], [3, -2, 1], [-2, 2, 1])\n", - " a2 = ArcPolygon([1, -2, 0.5], [4, 2, 1], [0, 3, 1], color=RED)\n", - "\n", - " edge1 = LabeledDot(Tex(\"e1\", color=BLACK))\n", - " edge2 = LabeledDot(Tex(\"e2\", color=BLACK))\n", - "\n", - " self.play(\n", - " Write(title),\n", - " )\n", - "\n", - " self.wait()\n", - "\n", - " self.play(\n", - " FadeIn(*disease)\n", - " )\n", - "\n", - " self.wait()\n", - "\n", - " edge1.next_to(a1)\n", - " edge2.next_to(a2)\n", - "\n", - " self.play(\n", - " Create(a1),\n", - " Create(a2),\n", - " FadeIn(edge1, edge2)\n", - " )\n", - "\n", - " self.wait()\n", - "\n", - " self.play(\n", - " FadeOut(\n", - " title,\n", - " *disease,\n", - " a1,\n", - " a2\n", - " )\n", - " )\n", - "\n", - " incidence_matrix = IntegerMatrix([[0, 1],\n", - " [1, 0],\n", - " [1, 1],\n", - " [1, 0],\n", - " [0, 1]],\n", - " left_bracket=\"(\",\n", - " right_bracket=\")\")\n", - "\n", - " incidence_text = Tex(r\"And convert it to an incidence matrix and a bipartite graph.\")\n", - " incidence_text.to_corner(UP + LEFT)\n", - "\n", - " self.play(\n", - " FadeIn(incidence_text),\n", - " )\n", - "\n", - " self.wait()\n", - "\n", - " self.add(edge2, incidence_matrix)\n", - "\n", - " self.wait()\n", - "\n", - " d = VGroup()\n", - " d.add(*disease)\n", - "\n", - " l1 = Line(edge1, d[1])\n", - " l2 = Line(edge1, d[2])\n", - " l3 = Line(edge1, d[3])\n", - " l4 = Line(edge2, d[2])\n", - " l5 = Line(edge2, d[4])\n", - " l6 = Line(edge2, d[0])\n", - "\n", - " self.play(FadeOut(incidence_text))\n", - "\n", - " self.wait()\n", - "\n", - " self.play(\n", - " incidence_matrix.animate.shift(LEFT * 5.5, UP),\n", - " FadeIn(*disease, a1, a2)\n", - " )\n", - "\n", - " self.add(l1, l2, l3, l4, l5, l6)\n", - "\n", - " self.wait()\n", - "\n", - " self.play(\n", - " FadeOut(a1, a2)\n", - " )\n", - "\n", - " self.wait()\n", - "\n" - ], - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 741 - }, - "id": "OsvAsVLJ9qQM", - "outputId": "adac51ab-b8cb-4330-9350-9b8ea52d9a33" - }, - "execution_count": 5, - "outputs": [ - { - "output_type": "stream", - "name": "stderr", - "text": [] - }, - { - "output_type": "display_data", - "data": { - "text/plain": [ - "" - ], - "text/html": [ - "" - ] - }, - "metadata": {} - } - ] + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "SUia5fq6B_zj" + }, + "outputs": [], + "source": [ + "from abc import ABC\n", + "\n", + "from manim import *" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 741 }, - { - "cell_type": "code", - "source": [], - "metadata": { - "id": "eN5V5F009rlq" - }, - "execution_count": null, - "outputs": [] - } - ] -} \ No newline at end of file + "id": "OsvAsVLJ9qQM", + "outputId": "adac51ab-b8cb-4330-9350-9b8ea52d9a33" + }, + "outputs": [], + "source": [ + "%%manim -qm -v WARNING HypergraphExample\n", + "\n", + "class OuterLabeledDot(VGroup, ABC):\n", + " def __init__(self, position=ORIGIN, swatch=WHITE, label=\"\", **kwargs):\n", + " dot = Dot(position, color=swatch)\n", + " super().__init__(dot, Tex(label).next_to(dot, 0.4 * UL), **kwargs)\n", + "\n", + "\n", + "class HypergraphExample(ThreeDScene):\n", + " def construct(self):\n", + " # Transition 1 - Introducing a hypergraph\n", + " title = Tex(r\"We can take a hypergraph\")\n", + " title.to_corner(UP + LEFT)\n", + " d1 = OuterLabeledDot([1, 2, 0], label=\"D1\", swatch=YELLOW),\n", + " d2 = OuterLabeledDot([-1, 1, 0], label=\"D2\", swatch=BLUE),\n", + " d3 = OuterLabeledDot([1.4, -1.4, 0], label=\"D3\", swatch=GREEN),\n", + " d4 = OuterLabeledDot([-3, -2, 0], label=\"D4\", swatch=GREY),\n", + " d5 = OuterLabeledDot([3, 1, 0], label=\"D5\", swatch=MAROON)\n", + "\n", + " disease = [d1[0], d2[0], d3[0], d4[0], d5]\n", + "\n", + " a1 = ArcPolygon([-4, -3, 1], [3, -2, 1], [-2, 2, 1])\n", + " a2 = ArcPolygon([1, -2, 0.5], [4, 2, 1], [0, 3, 1], color=RED)\n", + "\n", + " edge1 = LabeledDot(Tex(\"e1\", color=BLACK))\n", + " edge2 = LabeledDot(Tex(\"e2\", color=BLACK))\n", + "\n", + " self.play(\n", + " Write(title),\n", + " )\n", + "\n", + " self.wait()\n", + "\n", + " self.play(\n", + " FadeIn(*disease)\n", + " )\n", + "\n", + " self.wait()\n", + "\n", + " edge1.next_to(a1)\n", + " edge2.next_to(a2)\n", + "\n", + " self.play(\n", + " Create(a1),\n", + " Create(a2),\n", + " FadeIn(edge1, edge2)\n", + " )\n", + "\n", + " self.wait()\n", + "\n", + " self.play(\n", + " FadeOut(\n", + " title,\n", + " *disease,\n", + " a1,\n", + " a2\n", + " )\n", + " )\n", + "\n", + " incidence_matrix = IntegerMatrix([[0, 1],\n", + " [1, 0],\n", + " [1, 1],\n", + " [1, 0],\n", + " [0, 1]],\n", + " left_bracket=\"(\",\n", + " right_bracket=\")\")\n", + "\n", + " incidence_text = Tex(r\"And convert it to an incidence matrix and a bipartite graph.\")\n", + " incidence_text.to_corner(UP + LEFT)\n", + "\n", + " self.play(\n", + " FadeIn(incidence_text),\n", + " )\n", + "\n", + " self.wait()\n", + "\n", + " self.add(edge2, incidence_matrix)\n", + "\n", + " self.wait()\n", + "\n", + " d = VGroup()\n", + " d.add(*disease)\n", + "\n", + " l1 = Line(edge1, d[1])\n", + " l2 = Line(edge1, d[2])\n", + " l3 = Line(edge1, d[3])\n", + " l4 = Line(edge2, d[2])\n", + " l5 = Line(edge2, d[4])\n", + " l6 = Line(edge2, d[0])\n", + "\n", + " self.play(FadeOut(incidence_text))\n", + "\n", + " self.wait()\n", + "\n", + " self.play(\n", + " incidence_matrix.animate.shift(LEFT * 5.5, UP),\n", + " FadeIn(*disease, a1, a2)\n", + " )\n", + "\n", + " self.add(l1, l2, l3, l4, l5, l6)\n", + "\n", + " self.wait()\n", + "\n", + " self.play(\n", + " FadeOut(a1, a2)\n", + " )\n", + "\n", + " self.wait()\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "eN5V5F009rlq" + }, + "outputs": [], + "source": [] + } + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +}