Dernière mise à jour : avril 2021.
Nécessite :
- Raspberry pi 4
- alimentation usb
- cable réseau (optionnel si vous utilisez du wifi)
- carte SD >= 4GB pour ubuntu
From 3c148f31fba1b797322b84298eb802e479f2e809 Mon Sep 17 00:00:00 2001 | |
From: Benoit Favre <benoit.favre@lif.univ-mrs.fr> | |
Date: Tue, 9 Sep 2014 11:08:56 +0200 | |
Subject: [PATCH] FIX None macro from X11 colliding with Event::None and others | |
--- | |
src/she/alleg4/she_alleg4.cpp | 7 ++++++- | |
1 file changed, 6 insertions(+), 1 deletion(-) | |
diff --git a/src/she/alleg4/she_alleg4.cpp b/src/she/alleg4/she_alleg4.cpp |
# Proper exif rotation with PIL. Handles all the cases in https://github.com/recurser/exif-orientation-examples | |
from PIL import Image | |
image = Image.open(filename) | |
exif = image._getexif() | |
ORIENTATION = 274 | |
if exif is not None and ORIENTATION in exif: | |
orientation = exif[ORIENTATION] | |
method = {2: Image.FLIP_LEFT_RIGHT, 4: Image.FLIP_TOP_BOTTOM, 8: Image.ROTATE_90, 3: Image.ROTATE_180, 6: Image.ROTATE_270, 5: Image.TRANSPOSE, 7: Image.TRANSVERSE} | |
if orientation in method: |
# Proper exif rotation with PIL. Handles all the cases in https://github.com/recurser/exif-orientation-examples | |
from PIL import Image | |
image = Image.open(filename) | |
exif = image._getexif() | |
ORIENTATION = 274 | |
if exif is not None and ORIENTATION in exif: | |
orientation = exif[ORIENTATION] | |
method = {2: Image.FLIP_LEFT_RIGHT, 4: Image.FLIP_TOP_BOTTOM, 8: Image.ROTATE_90, 3: Image.ROTATE_180, 6: Image.ROTATE_270, 5: Image.TRANSPOSE, 7: Image.TRANSVERSE} | |
if orientation in method: |
# Proper exif rotation with PIL. Handles all the cases in https://github.com/recurser/exif-orientation-examples | |
from PIL import Image | |
image = Image.open(filename) | |
exif = image._getexif() | |
ORIENTATION = 274 | |
if exif is not None and ORIENTATION in exif: | |
orientation = exif[ORIENTATION] | |
method = {2: Image.FLIP_LEFT_RIGHT, 4: Image.FLIP_TOP_BOTTOM, 8: Image.ROTATE_90, 3: Image.ROTATE_180, 6: Image.ROTATE_270, 5: Image.TRANSPOSE, 7: Image.TRANSVERSE} | |
if orientation in method: |
# Extract a docker image retrieved with docker_pull.py (https://github.com/NotGlop/docker-drag) | |
import tarfile | |
import sys, json | |
# The tar contains a manifest.json which lists layers; each layer is a tar archive | |
with tarfile.TarFile(sys.argv[1]) as tf: | |
with tf.extractfile("manifest.json") as manifest_fp: | |
manifest = json.loads(manifest_fp.read()) | |
for layername in manifest[0]['Layers']: | |
with tf.extractfile(layername) as layer_fp: |
import net | |
var | |
sslContext = newContext(certFile = "fullchain.pem", keyFile = "privkey.pem", verifyMode = CVerifyPeer) | |
socket = newSocket(domain = AF_INET6) | |
socket.setSockOpt(OptReuseAddr, true) | |
socket.setSockOpt(OptReusePort, false) | |
socket.bindAddr(Port(1965), "::") | |
socket.listen() | |
sslContext.wrapSocket(socket) |
import openssl | |
import ssl_config | |
from ssl_certs import scanSSLCertificates | |
import nativesockets | |
import uri | |
import os | |
import strutils | |
type Socket = ref object | |
fd: SocketHandle |
"use strict" | |
var fs = require('fs'); | |
var stopwords = fs.readFileSync('stopwords.txt').toString().split('\n').reduce((set, line) => {set.add(line.trim()); return set}, new Set()); | |
var index = { | |
termFrequency: new Map(), | |
documentLength: [], | |
averageDocumentLength: 0, | |
k1: 1.2, |
#{ stdenv, fetchurl, SDL2, SDL2_image makeDesktopItem }: | |
with import <nixpkgs> {}; | |
stdenv.mkDerivation rec { | |
pname = "brogue-ce"; | |
version = "1.8.3"; | |
src = fetchFromGitHub { | |
owner = "tmewett"; | |
repo = "BrogueCE"; |