Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://doi.org/10.5281/zenodo.11373234
23 April 2025, 21:23:49 UTC
  • Code
  • Branches (0)
  • Releases (1)
  • Visits
    • Branches
    • Releases
      • 1
      • 1
    • dbe46e6
    • /
    • saridout-kpd_model_code-79b3e8c
    • /
    • README.md
    Raw File Download

    To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
    Select below a type of object currently browsed in order to display its associated SWHID and permalink.

    • content
    • directory
    • snapshot
    • release
    origin badgecontent badge
    swh:1:cnt:2e6a6ccca220ff7ffdf4083ce2a965a39785685a
    origin badgedirectory badge
    swh:1:dir:20e5d3cdc15b499aa3eea04c72f0403d2397306a
    origin badgesnapshot badge
    swh:1:snp:0ca2497b1149c0b82a8c17fc5ad8aab11076782d
    origin badgerelease badge
    swh:1:rel:81e1c51c151fea06f525ddba6ba1535b1ee24796

    This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
    Select below a type of object currently browsed in order to generate citations for them.

    • content
    • directory
    • snapshot
    • release
    (requires biblatex-software package)
    Generating citation ...
    (requires biblatex-software package)
    Generating citation ...
    (requires biblatex-software package)
    Generating citation ...
    (requires biblatex-software package)
    Generating citation ...
    README.md
    # Code for "A mathematical model for ketosis-prone diabetes suggests the existence of multiple  pancreatic β-cell inactivation mechanisms"
    
    The file "environment.yml" specifies the packages used to perform all simulations, and can be used with anaconda to create an environment matching ours.
    
    With such an environment active, running the jupyter notebook "code/all_simulations.ipynb" will run all the simulations and save the data to the directory "data".
    
    From this data, the notebook "code/all_plots.ipynb" can be used to generate all plots. 
    
    To set up the environment and install it as a kernel for jupyter notebooks, run the commands:
    
    ```
    conda env create --name kpd --file environment.yml
    conda activate kpd
    python -m ipykernel install --user --name kpd --display-name "Python (KPD)"
    ```
    
    Then, start a new jupyter session and the kernel "Python (KPD)" should be selectable in the list of kernels. Alternatively, the kernel can be selected from the command line by running
    
    ```
    jupyter notebook --MultiKernelManager.default_kernel_name=kpd
    ```
    
    Depending on your computer's LaTeX environment, you may get LaTeX errors when plotting. You can fix such errors without downloading the needed LaTeX packages by commenting out all of the axis label and text commands..
    
    To remove the environment, run:
    ```
    jupyter kernelspec uninstall kpd
    conda remove -n kpd --all
    ```
    
    
    

    back to top

    Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
    The source code of Software Heritage itself is available on our development forge.
    The source code files archived by Software Heritage are available under their own copyright and licenses.
    Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API