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
Arguments: | |
/usr/bin/node /usr/share/yarn/bin/yarn.js install | |
PATH: | |
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
Yarn version: | |
1.22.4 | |
Node version: |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.6.1/css/ol.css" type="text/css"> | |
<style> | |
.map { | |
height: 400px; | |
width: 100%; | |
} | |
</style> |
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
''' | |
Simple JSON server | |
''' | |
import io | |
import http.server | |
import json | |
class HTTPHandler(http.server.BaseHTTPRequestHandler): | |
def jsonRes(self): | |
enc = 'utf-8' |
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
type 'a binaryTree = | |
| None | |
| Node of ('a binaryTree)*'a*('a binaryTree) | |
;; | |
let tree1 = Node( | |
Node( | |
Node(Node(None, 7, None), 4, None), | |
2, | |
Node(None, 5, None) |
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
type 'a binaryTree = | |
| None | |
| Node of ('a binaryTree)*'a*('a binaryTree) | |
;; | |
let tree1 = Node( | |
Node( | |
Node(None, 5, None), | |
12, | |
Node( |
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 numpy as np | |
import matplotlib.pyplot as plt | |
import sys | |
## EXERCICE 1 | |
def gris(f_in, f_out): | |
f = plt.imread(f_in) | |
l,c,d = np.shape(f) | |
g = np.zeros((l,c,d)) |
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
#include <stdio.h> | |
#include <math.h> | |
int main() | |
{ | |
int n = 100000; | |
double size = 1.0 / n; | |
double area = 0.0; | |
for (int i = 0; i < n; i++) | |
{ |
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
var input = []; | |
readline_object.on("line", (value) => { //Read input values | |
input.push(value); | |
}) | |
readline_object.on("close", ContestResponse); | |
function ContestResponse(){ | |
input = input.slice(1) | |
let cases = [] | |
let data = input.map(l => l.split('')) |
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 numpy as np | |
from PIL import Image | |
J = np.asarray(Image.open('36.jpg').convert('RGB')) | |
r = 20 | |
def inShape(y, x, shape): |
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
# TP 20, Représentation des nb réeels | |
""" | |
3. Donner une fonction binaire(x, n) qui retourne la chaîne de caractère donnant l'écriture binaire de x dont la partie fractionnaire est bornée par n. | |
4. Donner une fonction decimal(c) qui fait l'opération inverse. | |
""" | |
def binaire(x, n): | |
s = '' |