XD blog

blog page

c sharp


2014-12-19 Example in C# and unions of enumerables

I often how to compute the concatenation of several lists in C# using Linq.

var iterator = new List<List<string>> () ... ;
var union = iterator.Aggregate( (a,b) => a.Concat(b) ) ;  // enumerate on strings

And if you are looking to a page easy which gives you many examples, that should be this one: 101 LINQ Samples.

2014-02-23 Python and C# in the same program

I pretty much use Python for everything, I link many of my tools with Python, having the same place to run them. However, C# is very convenient if you want to automate some processes on Windows. Since I discovered pythonnet, I do not look anymore for a way to do things in Python, I do it in C#, I make an assembly and I link it to Python.


more...

2013-07-16 Les trucs que je ne sais jamais quand j'en ai besoin

I read two blogs about stuff I never remember when I need it. I often manipulate text file and I know the linux tools are doing quite a great job about that. But I never remember the syntax. This blog post seems to be a good pointer: Useful Unix commands for data science.

The second is about mutex and lock. The second one is used to synchronize threads among a single application. The first one (mutex) is used to synchronize processes among them (but also threads as a consequence). And if you want to use mutex all the time because it is convenient, you should read this blog post first: Lock vs. Mutex.


Xavier Dupré