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
[program:amqp_mailer] | |
command=php /symfony/bin/console messenger:consume-messages amqp_mailer | |
startsecs = 0 | |
stdout_logfile=/tmp/supervisord-amqp.log | |
stdout_logfile_maxbytes=10MB |
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
App\Message\Handler\ConfirmCommandMailerHandler: | |
tags: ['messenger.message_handler'] |
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
<?php | |
namespace App\Message\Interfaces; | |
interface Mailer extends Message | |
{ | |
} |
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
namespace App\Message\Interfaces; | |
interface Message | |
{ | |
} | |
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
parameters: | |
messenger.transport.default_serialization_context: {groups: [messenger]} | |
framework: | |
messenger: | |
transports: | |
# les Data Source Name pour mes différents transports | |
amqp_mailer: '%env(MESSENGER_TRANSPORT_DSN_MAILER)%' | |
amqp_default: '%env(MESSENGER_TRANSPORT_DSN)%' |
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
###> symfony/messenger ### | |
MESSENGER_TRANSPORT_DSN_MAILER=amqp://LOGIN:PASSWORD@HOST:5672/%2f/mails | |
MESSENGER_TRANSPORT_DSN=amqp://LOGIN:PASSWORD@HOST:5672/%2f/default | |
###< symfony/messenger ### |
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
// récupération de mon entité, avec doctrine ici | |
$mojito = $this->entityManager->getRepository(Cocktail::class)->find(666); | |
// nous génère la matrice en enlevant le mojito | |
$matrices = $this->cocktailMachineLearning->generateMatricesWithoutCocktails([$mojito]); | |
// initialisation de l'algo | |
$classifier = new KNearestNeighbors(1, new CocktailsDistance()); | |
// entrainement de l'algo sur les données normalisées |
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
<?php | |
namespace App\Services; | |
use Phpml\Math\Distance; | |
class CocktailsDistance implements Distance | |
{ | |
/** |
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
sub vcl_backend_response { | |
if (bereq.url ~ "\.(jpe?g|png|gif|pdf|tiff?|css|js|ttf|woff2?|otf|eot|svg)$") { | |
set beresp.ttl = std.duration(beresp.http.age+"s",0s) + 24h; | |
} | |
} |
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
<img alt="Recette simple du Mojito alsacien" | |
data-src="{{ asset(cocktail.image)|imagine_filter('medium_desktop') }}" | |
data-srcset="{{ asset(cocktail.image)|imagine_filter('medium_mobile') }} 200w, {{ asset(cocktail.image)|imagine_filter('medium_tablet') }} 400w" | |
sizes="(min-width: 20em) 35vw, 100vw"> |