Skip to content

Instantly share code, notes, and snippets.

var indent_level = 0
function indent()
{
var spaces = ""
for( var i=0; i<indent_level; ++i)
spaces = spaces + " "
return spaces
}
@pewerner
pewerner / batchfile.py
Created June 13, 2014 11:50
Launch a Batch File with IronPYthon
from System.Diagnostics import Process
p = Process()
p.StartInfo.UseShellExecute = False
p.StartInfo.RedirectStandardOutput = False
p.StartInfo.FileName = r"C:\test.bat"
p.Start()
p.WaitForExit()
print(p.ExitCode)
@pewerner
pewerner / Optimizer.cs
Created October 14, 2014 17:18
Class for optimizing input files based on volume
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Text;
using System.IO;
namespace InputFileOptimizer