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
/** | |
* Using NIO e JCodec to convert multiple sequence png images to mp4 video file | |
* Copyright (C) 2019 Leonardo Pereira (www.leonardopereira.com.br) | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, |
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
int bestIndex = 0; | |
IntStream.range(0, population.size()).forEach(idxIndividual -> { | |
Individual individual = population.get(idxIndividual); | |
double x = 0, y = 0; | |
for (int idxId = 0; idxId < individualSize; idxId++) { | |
x += eigenvectors.getEntry(idxId, 0) * individual.get(idxId); | |
y += eigenvectors.getEntry(idxId, 1) * individual.get(idxId); | |
} | |
projectionsSeries[idxIndividual] = new double[] {x, y}; | |
if (population.getBest() == individual) |
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
from mailing import mail | |
def send(): | |
mail.send_email(recipients=[email_to@domain.com], \ | |
subject='[Test Email] Subject', \ | |
text_content='This is a test', \ | |
from_email=settings.DEFAULT_FROM_EMAIL) |