This file contains hidden or 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
#include <array> | |
#include <format> | |
#include <iostream> | |
#include <optional> | |
#include <ranges> | |
#include <tuple> | |
#include <vector> | |
template <typename T, std::size_t N> | |
void print_array(const std::array<T, N> &arr) { |
This file contains hidden or 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
<h1>Estimation statistique de la taille des vues</h1> | |
<div class=""> | |
<p><strong>Conventions mathématiques</strong></p> | |
<p>En informatique, il est important de pouvoir interpréter et appliquer un algorithme. On exprime souvent les algorithmes en utilisant une notation mathématique appelée pseudo-code. Elle a l’avantage de ne pas être spécifique à un langage informatique donné. Elle a l’inconvénient d’être intimidante, surtout lorsqu’on trouve les notations mathématiques ardues.<br class="autobr"> | |
(Ne vous en faites pas : il y a peu de pseudo-code dans ce cours!)</p> | |
<p>En informatique, on utilise toujours le logarithme en base 2 : $$<code><span class="spip_code" dir="ltr">\log 8 =3$$</span></code>. On note parfois le logarithme en base 2 avec $$<code><span class="spip_code" dir="ltr">\log_2$$</span></code>. Pour calculer le logarithme en base 2 avec<br class="autobr"> | |
une calculatrice qui n’a pas le logarithme en base 2, il suffit d’utiliser la formule $$<code><sp |
This file contains hidden or 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
<!-- copier coller dans une page Moodle --> | |
<h1 style="text-align: center; color: #333;">Courbes de l'offre et de la demande : Impact d'une taxe carbone et d'un prix maximal au Québec</h1> | |
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
<div style="max-width: 800px; margin: 0 auto; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 0 10px rgba(0,0,0,0.1);"> | |
<canvas id="supplyDemandChart" style="max-width: 100%;"></canvas> | |
<div style="margin: 20px 0; text-align: center;"> | |
<div style="margin-bottom: 10px;"> | |
<label for="carbonTax" style="font-weight: bold; margin-right: 10px;">Taxe carbone ($/litre) :</label> | |
<input type="range" id="carbonTax" min="0" max="0.5" step="0.01" value="0.10" style="width: 200px;"> | |
<span id="taxValue" style="font-weight: bold; color: #007bff;">0.10</span> |
This file contains hidden or 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
1950 : Alan Turing propose le test de Turing pour évaluer l'intelligence des machines. | |
En 1950, Alan Turing, un mathématicien britannique considéré comme l'un des pères de l'informatique, a proposé une idée révolutionnaire : un test pour déterminer si une machine peut penser comme un humain. Le test de Turing fonctionne ainsi : une personne discute par écrit avec deux interlocuteurs, une machine et un humain, sans savoir qui est qui. Si la personne ne peut pas distinguer la machine de l'humain après une conversation, la machine est considérée comme "intelligente". Ce concept était audacieux à une époque où les ordinateurs étaient encore rudimentaires, capables seulement de calculs simples. Le test de Turing a donné une définition concrète de l'intelligence artificielle, incitant les chercheurs à se demander : "Qu'est-ce que penser ?" et "Les machines peuvent-elles imiter l'esprit humain ?". Cette idée a jeté les bases philosophiques et pratiques de l'IA, inspirant des décennies de recherches pour créer des ma |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
Name | City | Job | |
---|---|---|---|
John | Montreal | Salesman | |
Kamel | Lyon | Researcher | |
Nathalie | Montreal | Translator | |
Bush | Washington | President | |
Tim Bray | Vancouver | Technologist | |
Daniel | Montreal | Professor | |
Peter | Montreal | Professor | |
Jack | Montreal | Professor | |
Nathalie | Montreal | Professor |
This file contains hidden or 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 struct | |
def float_to_scaled_int_double(f, p): | |
# Pack float as 64-bit double (IEEE 754 double precision) | |
packed = struct.pack('>d', f) | |
# Unpack as 64-bit unsigned integer | |
int_val = struct.unpack('>Q', packed)[0] | |
# Extract components (IEEE 754 double precision format): |
This file contains hidden or 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
#include <stdint.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
int count(uint64_t x) { | |
int count = 0; | |
for(int k = 0; k < 64; k++) { | |
count += (x&1); | |
x >>= 1; |
This file contains hidden or 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
#include <array> | |
#include <algorithm> | |
#include <string_view> | |
#include <utility> | |
#include <iostream> | |
#include <cstdint> | |
// Helper to get the first character of a string_view |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
#include "env-inl.h" | |
#include "node_builtins.h" | |
#include "node_external_reference.h" | |
#include "node_internals.h" | |
namespace node { | |
namespace builtins { |
NewerOlder