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
type Input = | |
| ResultGreat | |
| ResultNotSoGreat | |
type ResultImproverAgent (logger) = | |
let agent = MailboxProcessor.Start(fun inbox -> | |
let rec messageLoop () = async { | |
let! msg = inbox.Receive() | |
match msg with | |
| ResultGreat -> "Result already great, cannot be improved" |> logger |
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
open System.IO | |
open System.Security.Cryptography | |
type Config = | |
{ maxFileSize: int64 | |
startPath: string } | |
type FileResult = | |
{ hash: string | |
fullPath: string } |
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
private List<string> CheckFilesInFolder(Sftp connection, List<string> paths) | |
{ | |
var errors = new List<string>(); | |
foreach (var path in paths) | |
{ | |
if (connection.DirectoryExists(path)) | |
{ | |
var files = connection.GetList(path); | |
if (files.Any(f => f.Name.EndsWith(".mp4") || f.Name.EndsWith(".mp3"))) |
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
private void CheckFilesInFolder(Sftp connection, string directory, List<string> errors) | |
{ | |
if (!connection.DirectoryExists(directory)) | |
return; | |
var items = connection.GetList(directory); | |
var files = items.Where(x => x.IsFile).ToList(); | |
if (files.Any(f => f.Name.EndsWith(".mp4") || f.Name.EndsWith(".mp3"))) | |
{ |
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
Parallel.ForEach(_configuration.StorageVolumes, x => | |
{ | |
var listForStorage = paths.Where(p => p.StartsWith(x.BaseLocation)).ToList(); | |
Console.WriteLine(string.Format("Starting volume {0} with {1} folders", x.BaseLocation, listForStorage.Count.ToString())); | |
var storageErrors = _client.CheckCDNForGuidConsistencyErrors(x, listForStorage); | |
lock(allErrors) | |
{ | |
allErrors.AddRange(storageErrors); | |
} | |
}); |
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
namespace GeOda.PicturesEh | |
type SnapConfig = | |
{ | |
programmeId: string | |
carrierId: string | |
outputSnapPath: string | |
outputSnapName: string | |
outputSnapTime: string | |
} |
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
open System | |
//kannikskoleavis, TV2, NRK, VG, Aftenposten, Dagbladet | |
let tips = [| | |
("Bodø", [|7.0;12.0;11.0;10.0;10.0;13.0|]); | |
("Brann", [|9.0;7.0;6.0;5.0;5.0;6.0|]); | |
("Haugesund", [|6.0;5.0;7.0;7.0;6.0;7.0|]); | |
("Lillestrøm", [|8.0;11.0;12.0;13.0;13.0;9.0|]); | |
("Molde", [|1.0;2.0;2.0;1.0;3.0;2.0|]); | |
("Odd", [|13.0;9.0;5.0;6.0;7.0;10.0|]); | |
("Rosenborg", [|2.0;1.0;1.0;2.0;1.0;1.0|]); |