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 typing import Any | |
from pytorch_lightning.utilities.fetching import AbstractDataFetcher | |
from pytorch_lightning.utilities.model_helpers import is_overridden | |
from pytorch_lightning.utilities.signature_utils import is_param_in_hook_signature | |
| |
| |
def on_run_start(self, data_fetcher: AbstractDataFetcher, **kwargs: Any) -> None: | |
self.trainer.logger_connector.on_epoch_start() | |
self.trainer.call_hook("on_epoch_start") | |
self.trainer.call_hook("on_train_epoch_start") |
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 $nbPlayer = 4; | |
$nbDice = 6; | |
$scores = array_fill(0, $nbPlayer, $nbDice); | |
$return = "\n"; | |
for($round = 1; count(array_filter($scores, function($score) { return $score == 0 ;})) == 0; $round++) { | |
echo $return,"Round ",$round,$return,$return; | |
$dices = array_map(function($score) { | |
return array_map(function($i) { | |
return mt_rand(0,6); | |
}, array_fill(0, $score, 0)); |
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
bool fixed_is_directory(std::string path) { | |
boost::system::error_code errorCode; | |
bool result = boost::filesystem::is_directory(path, errorCode); | |
if (errorCode.value() == 2) {//not found | |
return false; | |
} else if (errorCode.value() != 0) { | |
//this second call will fire the correct exception | |
boost::filesystem::is_directory(path); | |
} else { | |
return result; |
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
bool fixed_is_directory(std::string path) { | |
boost::system::error_code errorCode; | |
bool result = boost::filesystem::is_directory(path, errorCode); | |
if (errorCode.value() != 0) { | |
//this second call will fire the correct exception | |
boost::filesystem::is_directory(path); | |
} else { | |
return result; | |
} | |
} |
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 async = require("async"); | |
var cheerio = require("cheerio"); | |
var request = require("request"); | |
var uri = require("uri-js"); | |
var _ = require("lodash"); | |
var fs = require("fs"); | |
var done = {}; | |
var toSave = [ "image", "application", "audio", "video" ]; | |
var toParse = [ "text/html" ]; | |
var output = "./out.data"; |