Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/AI_Brain / daemon/make_enumerations.cs |
| Date | Not specified in source |
| Repository | Janady13/AI_Brain |
| Revision | 6d0767aad08781eb5c4e1eb14a42ec92c437be78 |
| Branch | copilot/convert-python-files-to-csharp |
| Path or archive member | daemon/make_enumerations.cs |
| Original SHA-256 | e10f63bd51d01df0f0b718739f87508d67dc116cf4be82e87302303dbf04d996 |
| Git blob SHA | 69fb35ec2fe65485234b08d511ffea5a32864a15 |
| Reading-copy SHA-256 | e10f63bd51d01df0f0b718739f87508d67dc116cf4be82e87302303dbf04d996 |
Recovered source transcript
Download complete source text ↓58 lines · 2.0 KB
// Generate enumeration files from seed generators
using System;
using System.Collections.Generic;
using System.IO;
namespace AIBrain.Daemon
{
public static class MakeEnumerations
{
private static readonly string OUTDIR =
Path.Combine(Path.GetDirectoryName(typeof(MakeEnumerations).Assembly.Location) ?? ".", "enumerations");
private static void WriteLines(string path, IEnumerable<string> lines, int n)
{
Directory.CreateDirectory(Path.GetDirectoryName(path));
using (var writer = new StreamWriter(path, false, System.Text.Encoding.UTF8))
{
int i = 0;
foreach (var line in lines)
{
i++;
var txt = line.EndsWith(".") ? line : $"{line}.";
writer.WriteLine(txt);
if (i >= n)
break;
}
}
}
public static void Main(string[] args)
{
Directory.CreateDirectory(OUTDIR);
WriteLines(Path.Combine(OUTDIR, "math_model_500.txt"), SeedMathModels.GenMathModels(500), 500);
WriteLines(Path.Combine(OUTDIR, "agent_500.txt"), SeedAgents.GenAgents(500), 500);
WriteLines(Path.Combine(OUTDIR, "language_500.txt"), SeedLanguage.GenLanguage(500), 500);
WriteLines(Path.Combine(OUTDIR, "prophecy_500.txt"), SeedProphecy.GenProphecy(500), 500);
WriteLines(Path.Combine(OUTDIR, "marketing_500.txt"), SeedMarketing.GenMarketing(500), 500);
Console.WriteLine("Generated 500-line enumerations in:");
foreach (var fn in new[]
{
"math_model_500.txt",
"agent_500.txt",
"language_500.txt",
"prophecy_500.txt",
"marketing_500.txt"
})
{
Console.WriteLine(Path.Combine(OUTDIR, fn));
}
}
}
}