Sho - Interactive data analysis with IronPython



Sho provides those who are working on Technical Computing-styled workloads an interactive environment for data analysis and scientific computing that lets you seamlessly connect scripts (in IronPython) with compiled code (in .NET) to enable fast and flexible prototyping. The environment includes powerful and efficient libraries for linear algebra as well as data visualization that can be used from any .NET language, as well as a feature-rich interactive shell for rapid development. The seamless nature of our environment allows for some unique capabilities:
  • Performing fast linear algebra and statistical computations from either C# or Python
  • Adding visualizations (such as plots and bar charts) to your C# or Python applications
  • Creating rich applications by lashing together C# libraries using Python
  • Debugging mixed python/C# code using Visual Studio 2010

Sho is widely used in Microsoft Research as well as a variety of product groups: we've found the ability to move seamlessly between script and compiled code tremendously useful, and we think you will too. To get you started, Sho comes with packages for large-scale parallel computing (via HPC and the Azure), statistics, and optimization, as well as an extensible package mechanism that makes it easy for you to create and share your own packages.

Installers, documentations, and demos of Sho are available here

The Sho Console running a matrix multiply:

i.sho.matmul.jpg


An example of Intellisense/completion:

i.sho.intel.jpg


Computing a Word Histogram

>>> fp = System.IO.File.ReadAllText("./declarationofindependence.txt")
>>> table = System.Collections.Hashtable()
>>> for word in fp.split():
    if table.ContainsKey(word):
        table[word] +=1
    else:
        table[word] = 1
>>> pairs = zip(list(table.Keys), list(table.Values))
>>> pairs.sort(lambda a,b: a[1]<b[1])
>>> bar([elt[0] for elt in pairs[0:10]], [elt[1] for elt in pairs[0:10]])



i.sho.histogram.jpg


Note: There is currently no real integration between PTVS and Sho, though we hope to work on that in the future. The NumPy/SciPy libraries can be used from Sho.


Last edited Mar 2, 2011 at 10:38 PM by Ptools, version 5

Comments

No comments yet.