I like to call foldr
as "fold from the right", while foldl
is "fold from the
left".
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
version: '3' | |
services: | |
mysql: | |
container_name: sqlAmt | |
image: mysql/mysql-server:8.0.23 | |
ports: | |
- '3306:3306' | |
command: --default-authentication-plugin=mysql_native_password | |
restart: always | |
environment: |
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
package com.company; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.Random; | |
enum Letter { | |
RougeVif, | |
Mauve, |
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
typedef std::chrono::high_resolution_clock Clock; | |
typedef std::chrono::milliseconds milliseconds; | |
Clock::time_point tAvantChargement = Clock::now(); | |
milliseconds ms = std::chrono::duration_cast<milliseconds>(tApresChargement - tAvantChargement); | |
std::cout << "temps de chargement du dictionnaire: " << ms.count() << "ms\n"; |
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 <stdio.h> | |
#include <stdlib.h> | |
int main() { | |
// déclarations: | |
double x = 12.35; | |
int i = 123; | |
char c = 'a'; | |
int* pt = &i; |
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
cv::CascadeClassifier face_cascade; | |
face_cascade.load("C:/OpenCV-3.2.0/opencv/sources/data/haarcascades/haarcascade_frontalface_alt2.xml"); | |
std::vector<cv::Rect> faces; | |
face_cascade.detectMultiScale(frame, faces, 1.1, 2, 0|CV_HAAR_SCALE_IMAGE, cv::Size(30, 30) ); | |
// Draw circles on the detected faces | |
for( int i = 0; i < faces.size(); i++ ){ | |
cv::Point center( faces[i].x + faces[i].width*0.5, faces[i].y + faces[i].height*0.5 ); | |
cv::ellipse( frame, center, cv::Size( faces[i].width*0.5, faces[i].height*0.5), 0, 0, 360, cv::Scalar( 255, 0, 255 ), 4, 8, 0 ); | |
} |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
""" | |
python_3_email_with_attachment.py | |
Created by Robert Dempsey on 12/6/14. | |
Copyright (c) 2014 Robert Dempsey. Use at your own peril. | |
This script works with Python 3.x | |
NOTE: replace values in ALL CAPS with your own values |
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
from PIL import ImageGrab | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import cv2 | |
import time | |
import pyautogui | |
print("launched") | |
time.sleep(2) |
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
#!/bin/bash | |
aptitude -y install expect | |
// Not required in actual script | |
MYSQL_ROOT_PASSWORD=abcd1234 | |
SECURE_MYSQL=$(expect -c " | |
set timeout 10 |
NewerOlder