Skip to content
Extraits de code Groupes Projets
Valider 96f21dcd rédigé par Vincent-Xavier Jumel's avatar Vincent-Xavier Jumel :hammer_pick:
Parcourir les fichiers

Merge branch 'development' of framagit.org:lamadone/informatique/terminale-nsi into development

parents e25d1c15 d5f095b2
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!92Ajout d'un projet sur Douglas-Peucker
Pipeline #1093 réussi
%% Cell type:code id: tags:
```
help('len')
```
%% Output
Help on built-in function len in module builtins:
len(obj, /)
Return the number of items in a container.
%% Cell type:code id: tags:
```
?max
```
%% Output
Docstring:
max(iterable, *[, default=obj, key=func]) -> value
max(arg1, arg2, *args, *[, key=func]) -> value
With a single iterable argument, return its biggest item. The
default keyword-only argument specifies an object to return if
the provided iterable is empty.
With two or more arguments, return the largest argument.
Type: builtin_function_or_method
%% Cell type:code id: tags:
```
import PIL.Image
```
%% Cell type:code id: tags:
```
?PIL.Image
```
%% Output
Type: module
String form: <module 'PIL.Image' from 'C:\\Program Files\\Anaconda\\lib\\site-packages\\PIL\\Image.py'>
File: c:\program files\anaconda\lib\site-packages\pil\image.py
Docstring: <no docstring>
%% Cell type:code id: tags:
```
?PIL.Image.new
```
%% Output
Signature: PIL.Image.new(mode, size, color=0)
Docstring:
Creates a new image with the given mode and size.
:param mode: The mode to use for the new image. See:
:ref:`concept-modes`.
:param size: A 2-tuple, containing (width, height) in pixels.
:param color: What color to use for the image. Default is black.
If given, this should be a single integer or floating point value
for single-band modes, and a tuple for multi-band modes (one value
per band). When creating RGB images, you can also use color
strings as supported by the ImageColor module. If the color is
None, the image is not initialised.
:returns: An :py:class:`~PIL.Image.Image` object.
File: c:\program files\anaconda\lib\site-packages\pil\image.py
Type: function
%% Cell type:code id: tags:
```
import io
```
%% Cell type:code id: tags:
```
?io
```
%% Output
Type: module
String form: <module 'io' from 'C:\\Program Files\\Anaconda\\lib\\io.py'>
File: c:\program files\anaconda\lib\io.py
Docstring:
The io module provides the Python interfaces to stream handling. The
builtin open function is defined in this module.
At the top of the I/O hierarchy is the abstract base class IOBase. It
defines the basic interface to a stream. Note, however, that there is no
separation between reading and writing to streams; implementations are
allowed to raise an OSError if they do not support a given operation.
Extending IOBase is RawIOBase which deals simply with the reading and
writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide
an interface to OS files.
BufferedIOBase deals with buffering on a raw byte stream (RawIOBase). Its
subclasses, BufferedWriter, BufferedReader, and BufferedRWPair buffer
streams that are readable, writable, and both respectively.
BufferedRandom provides a buffered interface to random access
streams. BytesIO is a simple stream of in-memory bytes.
Another IOBase subclass, TextIOBase, deals with the encoding and decoding
of streams into text. TextIOWrapper, which extends it, is a buffered text
interface to a buffered raw stream (`BufferedIOBase`). Finally, StringIO
is an in-memory stream for text.
Argument names are not part of the specification, and only the arguments
of open() are intended to be used as keyword arguments.
data:
DEFAULT_BUFFER_SIZE
An int containing the default buffer size used by the module's buffered
I/O classes. open() uses the file's blksize (as obtained by os.stat) if
possible.
%% Cell type:code id: tags:
```
def f(x: float) -> float:
"""renvoie le triple de x"""
return 3*x
```
%% Cell type:code id: tags:
```
?f
```
%% Output
Signature: f(x: float) -> float
Docstring: renvoie le triple de x
File: z:\informatique\terminale-nsi\<ipython-input-14-65724093fb13>
Type: function
%% Cell type:code id: tags:
```
!pip install --user nb_mypy
```
%% Output
Collecting nb_mypy
Downloading nb_mypy-1.0.2-py3-none-any.whl (6.1 kB)
Collecting astor<1,>=0.8
Downloading astor-0.8.1-py2.py3-none-any.whl (27 kB)
Collecting mypy<1,>=0.7
Downloading mypy-0.931-cp37-cp37m-win_amd64.whl (8.0 MB)
Requirement already satisfied: ipython<8,>=7.0 in c:\users\vjumel\appdata\roaming\python\python37\site-packages (from nb_mypy) (7.28.0)
Requirement already satisfied: tomli>=1.1.0 in c:\users\vjumel\appdata\roaming\python\python37\site-packages (from mypy<1,>=0.7->nb_mypy) (1.2.1)
Requirement already satisfied: typing-extensions>=3.10 in c:\users\vjumel\appdata\roaming\python\python37\site-packages (from mypy<1,>=0.7->nb_mypy) (3.10.0.2)
Requirement already satisfied: mypy-extensions>=0.4.3 in c:\users\vjumel\appdata\roaming\python\python37\site-packages (from mypy<1,>=0.7->nb_mypy) (0.4.3)
Requirement already satisfied: typed-ast<2,>=1.4.0; python_version < "3.8" in c:\users\vjumel\appdata\roaming\python\python37\site-packages (from mypy<1,>=0.7->nb_mypy) (1.4.3)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in c:\program files\anaconda\lib\site-packages (from ipython<8,>=7.0->nb_mypy) (3.0.3)
Requirement already satisfied: matplotlib-inline in c:\users\vjumel\appdata\roaming\python\python37\site-packages (from ipython<8,>=7.0->nb_mypy) (0.1.3)
Requirement already satisfied: pickleshare in c:\program files\anaconda\lib\site-packages (from ipython<8,>=7.0->nb_mypy) (0.7.5)
Requirement already satisfied: traitlets>=4.2 in c:\program files\anaconda\lib\site-packages (from ipython<8,>=7.0->nb_mypy) (4.3.3)
Requirement already satisfied: setuptools>=18.5 in c:\program files\anaconda\lib\site-packages (from ipython<8,>=7.0->nb_mypy) (45.2.0.post20200210)
Requirement already satisfied: jedi>=0.16 in c:\users\vjumel\appdata\roaming\python\python37\site-packages (from ipython<8,>=7.0->nb_mypy) (0.18.0)
Requirement already satisfied: decorator in c:\program files\anaconda\lib\site-packages (from ipython<8,>=7.0->nb_mypy) (4.4.1)
Requirement already satisfied: colorama; sys_platform == "win32" in c:\program files\anaconda\lib\site-packages (from ipython<8,>=7.0->nb_mypy) (0.4.3)
Requirement already satisfied: backcall in c:\program files\anaconda\lib\site-packages (from ipython<8,>=7.0->nb_mypy) (0.1.0)
Requirement already satisfied: pygments in c:\program files\anaconda\lib\site-packages (from ipython<8,>=7.0->nb_mypy) (2.5.2)
Requirement already satisfied: wcwidth in c:\program files\anaconda\lib\site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython<8,>=7.0->nb_mypy) (0.1.8)
Requirement already satisfied: six in c:\program files\anaconda\lib\site-packages (from traitlets>=4.2->ipython<8,>=7.0->nb_mypy) (1.14.0)
Requirement already satisfied: ipython-genutils in c:\program files\anaconda\lib\site-packages (from traitlets>=4.2->ipython<8,>=7.0->nb_mypy) (0.2.0)
Requirement already satisfied: parso<0.9.0,>=0.8.0 in c:\users\vjumel\appdata\roaming\python\python37\site-packages (from jedi>=0.16->ipython<8,>=7.0->nb_mypy) (0.8.2)
Installing collected packages: astor, mypy, nb-mypy
Successfully installed astor-0.8.1 mypy-0.931 nb-mypy-1.0.2
%% Cell type:code id: tags:
```
%load_ext nb_mypy
```
%% Output
Version 1.0.2
%% Cell type:code id: tags:
```
%nb_mypy
```
%% Output
State: On DebugOff
%% Cell type:code id: tags:
```
def f(x: float) -> float:
"""renvoie le triple de x"""
return 3*x
```
%% Cell type:code id: tags:
```
```
Ce diff est replié.
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter