Wednesday, 11 April 2018

Open data search engines

If you're looking for datasets for the purpose of research, statistics, etc, one way to find the data is to use the following search term in a search engine:

open data search engine

This will give you a few items to be going on with. Worth trying.


Sunday, 8 April 2018

Ancient software

I was looking on the Internet today looking for PowerShell related information for a scriptblock I was writing when I came across this comment on one of the stackoverflow.com pages.

I don't work for a software company either. But that doesn't mean that your corporate computing environment gets a free pass on being stuck on ancient software. Staying current on your software is part of the cost of doing business today and if they're not willing to invest there, they're probably not investing in their people or other things that are important to keeping operations running.

On reading this, it certainly struck home for a number of reasons. How very true this comment is.


Tuesday, 11 July 2017

Using PowerShell to grep

PowerShell is not Unix of course, but nevertheless, it does have a useful cmdlet to emulate the very useful Unix grep command. This is achieved by the Select-String (finds text in strings and files) cmdlet.

In order to learn more about PowerShell and grep, have a read of Grep, the PowerShell way. It's an excellent article on a comparison between the two. When you read the article, you'll see reference to sls. This is just an alias for Select-String which saves you having to type out the cmdlet name in full.



PS> Get-Alias sls

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           sls -> Select-String
 
I use Select-String myself from time to time but never seem to remember the best way of using it. This article serves as an aide-memoire.


See also


Grep, the PowerShell way
https://communary.net/2014/11/10/grep-the-powershell-way/

Select-String (finds text in strings and files)
https://msdn.microsoft.com/en-us/powershell/reference/5.0/microsoft.powershell.utility/select-string



Keywords: unix grep sls select-string search text file

Sunday, 15 January 2017

Loading a PowerShell assembly

From time to time I write a PowerShell program which makes use of the System.Windows.Forms Namespace. As the documentation reminds us “The System.Windows.Forms namespace contains classes for creating Windows-based applications that take full advantage of the rich user interface features available in the Microsoft Windows operating system”.

In order to make use of this namespace, the relevant assembly needs to be loaded. Up until now I’ve been loading the assembly with the .NET Framework class:

[System.Reflection.Assembly]:: LoadWithPartialName ("System.Windows.Forms") | Out-Null
[System.Reflection.Assembly]:: LoadWithPartialName ("System.Drawing") | Out-Null

Use of the "Assembly" class is discouraged as this API is now obsolete so I now use the "Add-Type" cmdlet:

Add-Type -AssemblyName "System.Windows.Forms";
Add-Type -AssemblyName "System.Drawing";

Loading the assembly with the name alone doesn’t take into account any versions. So, if you wish to load an assembly with a particular version, a different syntax of the command will be required. For the scripts I’m writing, this hasn’t given me a problem although I guess I may have to think about this issue sometime in the future.




Keywords: load powershell assembly

Sunday, 3 July 2016

Instant SQL Formatter (beautify)

I quite often have a need to reformat RDBMS SQL statements into something readable and consistent. The advantage of doing this is the statements are easier on the eye to read.

Two web sites I find useful in this respect are:

http://www.dpriver.com/pp/sqlformat.htm

http://sqlformat.org/


Keywords: sql format beautify

Sunday, 3 April 2016

Gnuplot and graphs

Gnuplot is a command-line driven graphing utility for various platforms. I have used this in the past and the product came to mind again as I was learning to create graphs using R. At present I'm I've not gone back to Gnuplot as I'm creating my statistics graphs using R.


See also

http://www.gnuplot.info/

https://en.wikipedia.org/wiki/Gnuplot

R (programming language)
https://en.wikipedia.org/wiki/R_(programming_language)

https://www.r-project.org/about.html


Keywords: r language, gnuplot, software

CERN and ROOT

ROOT is an object-oriented program and library developed by CERN. It was originally designed for particle physics data analysis and contains several features specific to this field, but it is also used in other applications such as astronomy and data mining.

It provides all the functionalities needed to deal with big data processing, statistical analysis, visualisation and storage.

Rene Brun and Fons Rademakers,
ROOT - An Object Oriented Data Analysis Framework,
Proceedings AIHENP'96 Workshop, Lausanne, Sep. 1996, Nucl. Inst. & Meth. in Phys. Res. A 389 (1997) 81-86.

I noted this with interest as I was looking for something else relating to statistics. I don't think I'll be taking this language any further at present as I've other things to learn.



Keywords: root cern software