Skip to content

Commit f4204f1

Browse files
Use the right node version
1 parent 1b8e1f0 commit f4204f1

File tree

264 files changed

+16248
-21704
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

264 files changed

+16248
-21704
lines changed

lang/ca/typeshed/stdlib/gc.pyi

Lines changed: 39 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,68 @@
1-
"""Control the garbage collector"""
2-
1+
"""Controla el recol·lector de memòria brossa"""
32
from typing import overload
43

54
def enable() -> None:
6-
"""Enable automatic garbage collection."""
5+
"""Habilita la recol·lecció automàtica de la memòria brossa (habilita)"""
76
...
87

98
def disable() -> None:
10-
"""Disable automatic garbage collection.
9+
"""Inhabilita la recol·lecció automàtica de la memòria brossa (desactiva)
1110
12-
Heap memory can still be allocated,
13-
and garbage collection can still be initiated manually using ``gc.collect``."""
11+
Heap memory can still be allocated,
12+
and garbage collection can still be initiated manually using ``gc.collect``."""
1413

1514
def collect() -> None:
16-
"""Run a garbage collection."""
15+
"""Executa la recol·lecció automàtica de la memòria brossa (Recull)"""
1716
...
1817

1918
def mem_alloc() -> int:
20-
"""Get the number of bytes of heap RAM that are allocated.
19+
"""Obté el nombre de bytes assignats a la memòria dinàmica. (espai de memòria)
2120
22-
:return: The number of bytes allocated.
21+
:return: The number of bytes allocated.
2322
24-
This function is MicroPython extension.
25-
"""
23+
This function is MicroPython extension."""
2624
...
2725

2826
def mem_free() -> int:
29-
"""Get the number of bytes of available heap RAM, or -1 if this amount is not known.
27+
"""Obté el nombre disponible de bytes de la memòria dinàmica, o -1 si no es coneix la quantitat. (memòria lliure)
3028
31-
:return: The number of bytes free.
29+
:return: The number of bytes free.
3230
33-
This function is MicroPython extension.
34-
"""
31+
This function is MicroPython extension."""
3532
...
3633

3734
@overload
3835
def threshold() -> int:
39-
"""Query the additional GC allocation threshold.
36+
"""Consulta l'assignació del llindar del col·lector d'escombraries. (llindar)
4037
41-
:return: The GC allocation threshold.
38+
:return: The GC allocation threshold.
4239
43-
This function is a MicroPython extension. CPython has a similar
44-
function - ``set_threshold()``, but due to different GC
45-
implementations, its signature and semantics are different.
46-
"""
40+
This function is a MicroPython extension. CPython has a similar
41+
function - ``set_threshold()``, but due to different GC
42+
implementations, its signature and semantics are different."""
4743
...
4844

4945
@overload
5046
def threshold(amount: int) -> None:
51-
"""Set the additional GC allocation threshold.
52-
53-
Normally, a collection is triggered only when a new allocation
54-
cannot be satisfied, i.e. on an out-of-memory (OOM) condition.
55-
If this function is called, in addition to OOM, a collection
56-
will be triggered each time after ``amount`` bytes have been
57-
allocated (in total, since the previous time such an amount of bytes
58-
have been allocated). ``amount`` is usually specified as less than the
59-
full heap size, with the intention to trigger a collection earlier than when the
60-
heap becomes exhausted, and in the hope that an early collection will prevent
61-
excessive memory fragmentation. This is a heuristic measure, the effect
62-
of which will vary from application to application, as well as
63-
the optimal value of the ``amount`` parameter.
64-
65-
A value of -1 means a disabled allocation threshold.
66-
67-
This function is a MicroPython extension. CPython has a similar
68-
function - ``set_threshold()``, but due to different GC
69-
implementations, its signature and semantics are different.
70-
71-
:param amount: The number of bytes after which a garbage collection should be triggered.
72-
"""
73-
...
47+
"""Assigna un espai adicional al llindar del col·lector d'escombraries. (llindar)
48+
49+
Normally, a collection is triggered only when a new allocation
50+
cannot be satisfied, i.e. on an out-of-memory (OOM) condition.
51+
If this function is called, in addition to OOM, a collection
52+
will be triggered each time after ``amount`` bytes have been
53+
allocated (in total, since the previous time such an amount of bytes
54+
have been allocated). ``amount`` is usually specified as less than the
55+
full heap size, with the intention to trigger a collection earlier than when the
56+
heap becomes exhausted, and in the hope that an early collection will prevent
57+
excessive memory fragmentation. This is a heuristic measure, the effect
58+
of which will vary from application to application, as well as
59+
the optimal value of the ``amount`` parameter.
60+
61+
A value of -1 means a disabled allocation threshold.
62+
63+
This function is a MicroPython extension. CPython has a similar
64+
function - ``set_threshold()``, but due to different GC
65+
implementations, its signature and semantics are different.
66+
67+
:param amount: (quantitat) El nombre de bytes després del qual s'activarà la recol·lecció de la memòria brossa."""
68+
...

lang/ca/typeshed/stdlib/log.pyi

Lines changed: 48 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,89 @@
1-
"""Log data to your micro:bit V2."""
2-
1+
"""Registre dades en la micro:bit V2 (registre)"""
32
from typing import Literal, Mapping, Optional, Union, overload
4-
53
MILLISECONDS = 1
6-
"""Milliseconds timestamp format."""
7-
4+
"""Format de marca de temps de mil·lisegons. (mil·lisegons)"""
85
SECONDS = 10
9-
"""Seconds timestamp format."""
10-
6+
"""Format de marca de temps de segons. (segons)"""
117
MINUTES = 600
12-
"""Minutes timestamp format."""
13-
8+
"""Format de marca de temps de minuts. (minuts)"""
149
HOURS = 36000
15-
"""Hours timestamp format."""
16-
10+
"""Format de marca de temps d'hores. (hores)"""
1711
DAYS = 864000
18-
"""Days timestamp format."""
12+
"""Format de marca de temps de dies. (dies)"""
1913

20-
def set_labels(
21-
*labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]] = SECONDS
22-
) -> None:
23-
"""Set up the log file header.
14+
def set_labels(*labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]]=SECONDS) -> None:
15+
"""Defineix la capçalera del fitxer de registre. (Defineix l'etiqueta)
2416
25-
Example: ``log.set_labels('X', 'Y', 'Z', timestamp=log.MINUTES)``
17+
Example: ``log.set_labels('X', 'Y', 'Z', timestamp=log.MINUTES)``
2618
27-
Ideally this function should be called a single time, before any data is
28-
logged, to configure the data table header once.
19+
Ideally this function should be called a single time, before any data is
20+
logged, to configure the data table header once.
2921
30-
If a log file already exists when the program starts, or if this function
31-
is called multiple times, it will check the labels already defined in the
32-
log file. If this function call contains any new labels not already
33-
present, it will generate a new header row with the additional columns.
22+
If a log file already exists when the program starts, or if this function
23+
is called multiple times, it will check the labels already defined in the
24+
log file. If this function call contains any new labels not already
25+
present, it will generate a new header row with the additional columns.
3426
35-
By default the first column contains a timestamp for each row. The time
36-
unit can be selected via the timestamp argument.
27+
By default the first column contains a timestamp for each row. The time
28+
unit can be selected via the timestamp argument.
3729
38-
:param *labels: Any number of positional arguments, each corresponding to an entry in the log header.
39-
:param timestamp: Select the timestamp unit that will be automatically added as the first column in every row. Timestamp values can be one of ``log.MILLISECONDS``, ``log.SECONDS``, ``log.MINUTES``, ``log.HOURS``, ``log.DAYS`` or ``None`` to disable the timestamp. The default value is ``log.SECONDS``.
40-
"""
30+
:param *labels: Qualsevol nombre d'arguments posicionals, corresponent cadascun a una entrada en la capçalera del registre.
31+
:param timestamp: (marca horària) Selecciona la unitat de la marca del temps que serà automaticament afegida com a primera columna de cada fila. Els valors de la marca del temps pot ser un de ``log.MILLISECONDS``, ``log.SECONDS``, ``log.MINUTES``, ``log.HOURS``, ``log.DAYS`` o ``None`` per desactivar la marca del temps. El valor per defecte es ``log.SECONDS``."""
4132
...
4233

4334
@overload
44-
def add(
45-
data_dictionary: Optional[Mapping[str, Union[str, int, float]]],
46-
) -> None:
47-
"""Add a data row to the log by passing a dictionary of headers and values.
35+
def add(data_dictionary: Optional[Mapping[str, Union[str, int, float]]]) -> None:
36+
"""Afegeix una fila de dades al registre passant un diccionari de capçaleres i valors. (afegeix)
4837
49-
Example: ``log.add({ 'temp': temperature() })``
38+
Example: ``log.add({ 'temp': temperature() })``
5039
51-
Each call to this function adds a row to the log.
40+
Each call to this function adds a row to the log.
5241
53-
New labels not previously specified via the set_labels function, or by a
54-
previous call to this function, will trigger a new header entry to be added
55-
to the log with the extra labels.
42+
New labels not previously specified via the set_labels function, or by a
43+
previous call to this function, will trigger a new header entry to be added
44+
to the log with the extra labels.
5645
57-
Labels previously specified and not present in a call to this function will
58-
be skipped with an empty value in the log row.
46+
Labels previously specified and not present in a call to this function will
47+
be skipped with an empty value in the log row.
5948
60-
:param data_dictionary: The data to log as a dictionary with a key for each header.
61-
"""
49+
:param data_dictionary: (diccionari de dades) Les dades a ser registrades com un diccionari amb una clau per cada capçalera."""
6250
...
6351

6452
@overload
6553
def add(**kwargs: Union[str, int, float]) -> None:
66-
"""Add a data row to the log using keyword arguments.
54+
"""Afegeix una fila de dades al registre fent servir arguments de paraula clau. (afegeix)
6755
68-
Example: ``log.add(temp=temperature())``
56+
Example: ``log.add(temp=temperature())``
6957
70-
Each call to this function adds a row to the log.
58+
Each call to this function adds a row to the log.
7159
72-
New labels not previously specified via the set_labels function, or by a
73-
previous call to this function, will trigger a new header entry to be added
74-
to the log with the extra labels.
60+
New labels not previously specified via the set_labels function, or by a
61+
previous call to this function, will trigger a new header entry to be added
62+
to the log with the extra labels.
7563
76-
Labels previously specified and not present in a call to this function will
77-
be skipped with an empty value in the log row.
78-
"""
64+
Labels previously specified and not present in a call to this function will
65+
be skipped with an empty value in the log row."""
7966
...
8067

8168
def delete(full=False):
82-
"""Deletes the contents of the log, including headers.
69+
"""Suprimeix el contingut del registre, incloses les capçaleres. (suprimeix)
8370
84-
Example: ``log.delete()``
71+
Example: ``log.delete()``
8572
86-
To add the log headers again the ``set_labels`` function should to be called after this function.
73+
To add the log headers again the ``set_labels`` function should to be called after this function.
8774
88-
There are two erase modes; “full” completely removes the data from the physical storage,
89-
and “fast” invalidates the data without removing it.
75+
There are two erase modes; “full” completely removes the data from the physical storage,
76+
and “fast” invalidates the data without removing it.
9077
91-
:param full: ``True`` selects a “full” erase and ``False`` selects the “fast” erase method.
92-
"""
78+
:param full: (ple) ``True`` selecciona un esborrat "total" ``False`` selecciona un mètode d'esborrat "ràpid"."""
9379
...
9480

9581
def set_mirroring(serial: bool):
96-
"""Configure mirroring of the data logging activity to the serial output.
82+
"""Configura la duplicació de l'activitat de registre de dades a la sortida en sèrie. (estableix mirall)
9783
98-
Example: ``log.set_mirroring(True)``
84+
Example: ``log.set_mirroring(True)``
9985
100-
Serial mirroring is disabled by default. When enabled, it will print to serial each row logged into the log file.
86+
Serial mirroring is disabled by default. When enabled, it will print to serial each row logged into the log file.
10187
102-
:param serial: ``True`` enables mirroring data to the serial output.
103-
"""
104-
...
88+
:param serial: ``True`` permet la duplicació de les dades a la sortida sèrie."""
89+
...

0 commit comments

Comments
 (0)