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
public static IEnumerable<T1> Batch2<T, T1>( | |
this IEnumerable<T> list, | |
int batchSize, | |
int maxParallelism, | |
Func<IEnumerable<T>, IEnumerable<T1>> action) | |
{ | |
int i = 0; | |
return ( | |
from item in list | |
group item by (int)i++ / batchSize |
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
public static IEnumerable<T1> Batch<T,T1>( | |
this IEnumerable<T> list, | |
int batchSize, | |
Func<IEnumerable<T>, IEnumerable<T1>> action, | |
bool processInParallel = false) | |
{ | |
int i = 0; | |
var grpqry = from item in list | |
group item by (int)i++ / batchSize | |
into part |
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
require "rubygems" | |
require "mp3info" | |
require "csv" | |
chapterarray = [] | |
#Dir.glob("/Users/klumsy/Downloads/bible/01_Genesis/*.mp3") do |f| | |
Dir.glob("/Users/klumsy/Downloads/bible/**/*.mp3") do |f| | |
Mp3Info.open(f) do |mp3info| | |
title = mp3info.tag.title | |
puts title |
NewerOlder