python | poetry | pipenv | conda | |
---|---|---|---|---|
installer un package | pip install | poetry add | pipenv install | conda install |
liste des dépendances | requirements.txt | pyproject.toml + poetry.lock | Pipfile + Pipfile.lock | environment.yml |
installer toutes les dépendances | pip install -r requirements.txt | poetry install | pipenv install | conda install |
mettre à jour toutes les dépendances | X | poetry update | pipenv update | conda update |
créer un environnem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let dfs g r = | |
let n = Array.length g in | |
let seen = Array.make n false in | |
let rec aux v = | |
if not seen.(v) then ( | |
seen.(v) <- true; | |
Printf.printf "Sommet %d visité\n%!" v; | |
List.iter aux g.(v) | |
) in | |
aux r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Tree t = E | N (Tree t) t (Tree t) deriving (Show, Eq) | |
get e E = error "get E" | |
get e (N g (k, v) d) | |
| e == k = v | |
| e < k = get e g | |
| otherwise = get e d | |
set k v E = N E (k, v) E | |
set k v (N g (k', v') d) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jupyter/base-notebook:2021-08-09 | |
USER root | |
RUN apt-get update && apt install -y software-properties-common && add-apt-repository ppa:avsm/ppa \ | |
&& apt install -y --no-install-recommends zlib1g-dev libffi-dev libgmp-dev libzmq5-dev \ | |
pkg-config build-essential ocaml opam \ | |
&& rm -rf /var/lib/apt/lists/ | |
USER ${NB_USER} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
RUN apt-get update && apt install -y software-properties-common && add-apt-repository ppa:avsm/ppa \ | |
&& apt install -y --no-install-recommends zlib1g-dev libffi-dev libgmp-dev libzmq5-dev pkg-config \ | |
build-essential curl sudo ocaml opam python3-pip \ | |
&& rm -rf /var/lib/apt/lists/ \ | |
&& curl -sSL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh \ | |
&& bash /tmp/miniconda.sh -bfp /usr/local \ | |
&& rm -rf /tmp/miniconda.sh \ | |
&& pip3 install notebook sos-notebook \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import projet.a.b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool.poetry] | |
name = "projet" | |
version = "0.1.0" | |
description = "" | |
authors = ["Quentin Fortier <qpfortier@gmail.com>"] | |
[tool.poetry.dependencies] | |
python = "^3.9" | |
[tool.poetry.dev-dependencies] |