Retrieve version of Python engine & packages

This commit is contained in:
Adi Eldar 2018-11-25 23:27:12 +02:00
Родитель 08587a0d45
Коммит 42a584e9e1
2 изменённых файлов: 75 добавлений и 17 удалений

Просмотреть файл

@ -0,0 +1,51 @@
//
// get_modules_version_sf()
//
// Returns version information for the Python engine and the specified packages
//
.create function with (folder = "Packages\\Utils", docstring = "Returns version information for the Python engine and the specified packages")
get_modules_version_sf(modules:(*))
{
let code =
'import importlib\n'
'import sys\n'
'\n'
'result = df\n'
'for i in range(df.shape[0]):\n'
' try:\n'
' m = importlib.import_module(df.iloc[i, 0])\n'
' result.loc[i, "ver"] = m.__version__\n'
' except Exception as ex:\n'
' result.loc[i, "ver"] = ex.msg\n'
'id = df.shape[0]\n'
'result.loc[id, df.columns[0]] = "Python"\n'
'result.loc[id, "ver"] = sys.version\n';
modules | evaluate python(code, 'df(*),ver:string')
}
let get_modules_version_sf = (modules:(*))
{
let code =
'import importlib\n'
'import sys\n'
'\n'
'result = df\n'
'for i in range(df.shape[0]):\n'
' try:\n'
' m = importlib.import_module(df.iloc[i, 0])\n'
' result.loc[i, "ver"] = m.__version__\n'
' except Exception as ex:\n'
' result.loc[i, "ver"] = ex.msg\n'
'id = df.shape[0]\n'
'result.loc[id, df.columns[0]] = "Python"\n'
'result.loc[id, "ver"] = sys.version\n';
modules | evaluate python(code, 'df(*),ver:string')
}
;
datatable(module:string)
['numpy', 'scipy', 'pandas', 'matplotlib', 'statsmodels', 'sklearn', 'azure.kusto.data', 'adal', 'tensorflow', 'keras']
| invoke get_modules_version_sf()

Просмотреть файл

@ -1,20 +1,13 @@
# azure-kusto-analytics-lib Repository
1. **Time Series Analysis**
1. **KqlMagic**
* Functions
1. [Getting Started with KqlMagic](./KqlMagic/Getting-Started-With-KqlMagic-on-ADX.ipynb)
1. [blackman_filter_sf()](./Series/functions/blackman_filter.csl) - Create a Blackman window low pass filter of specific width
1. [series_fit_poly_sf()](./Series/functions/series_fit_poly.csl)<sup>[1](#footnotes)</sup> - Fit a polynomial of a specified degree to a series
1. [series_fit_sine_sf()](./Series/functions/series_fit_sine.csl)<sup>[1](#footnotes)</sup> - Fit a sine wave to a series
1. [series_moving_avg_sf()](./Series/functions/series_moving_avg.csl) - Moving average of specific width
1. [series_partial_sf()](./Series/functions/series_partial.csl) - Test for series with empty bins
1. [series_rolling_sf()](./Series/functions/series_rolling.csl)<sup>[1](#footnotes)</sup> - Rolling window functions on a series
1. [series_segment_sf()](./Series/functions/series_segment.csl) - Sequental numbering of non zero segments of a boolean series
1. [series_summarize_sf()](./Series/functions/series_summarize.csl)<sup>[1](#footnotes)</sup> - Aggregation functions on a series
* Queries
1. **Labs**
1. [Time Series Analysis Tutorial](./Series/queries/Time-Series-Analysis-Tutorial.csl) - Walkthrough of typical series functions from each category
1. [Custom Time Series Forecasting](./Lab/Custom-Time-Series-Forcasting/Time-Series-Forcast-Walkthrough.csl)<sup>[1](#footnotes)</sup> - build and tailor a time series forecasting model from lower level functions. See task [readme](./Lab/Custom-Time-Series-Forcasting/Time-Series-Forcast-Readme.docx) file
1. [Classification](./Lab/Classifier) - [Build a classifier in Python](./Lab/Classifier/Prediction-of-Room-Occupancy-from-Kusto-Table-with-Kqlmagic.ipynb), [score](./Lab/Classifier/Classifier-Scoring.csl)<sup>[1](#footnotes)</sup> in ADX. See task [readme](./Lab/Classifier/Classifier-Readme.docx) file
1. **Machine Learning**
@ -32,14 +25,28 @@
1. [Training a classifier](./ML/notebooks/Prediction-of-Room-Occupancy-from-Kusto-Table-with-Kqlmagic.ipynb) - Demo of building and training a classifier for prediction of room occupancy in Jupyter using KqlMagic. Scoring is done using the Python plugin (see the [previous tutorial](./ML/queries/Python-Plugin-Tutorial.csl))
1. **KqlMagic**
1. **Time Series Analysis**
1. [Getting Started with KqlMagic](./KqlMagic/Getting-Started-With-KqlMagic-on-ADX.ipynb)
* Functions
1. [blackman_filter_sf()](./Series/functions/blackman_filter.csl) - Create a Blackman window low pass filter of specific width
1. [series_fit_poly_sf()](./Series/functions/series_fit_poly.csl)<sup>[1](#footnotes)</sup> - Fit a polynomial of a specified degree to a series
1. [series_fit_sine_sf()](./Series/functions/series_fit_sine.csl)<sup>[1](#footnotes)</sup> - Fit a sine wave to a series
1. [series_moving_avg_sf()](./Series/functions/series_moving_avg.csl) - Moving average of specific width
1. [series_partial_sf()](./Series/functions/series_partial.csl) - Test for series with empty bins
1. [series_rolling_sf()](./Series/functions/series_rolling.csl)<sup>[1](#footnotes)</sup> - Rolling window functions on a series
1. [series_segment_sf()](./Series/functions/series_segment.csl) - Sequental numbering of non zero segments of a boolean series
1. [series_summarize_sf()](./Series/functions/series_summarize.csl)<sup>[1](#footnotes)</sup> - Aggregation functions on a series
* Queries
1. [Time Series Analysis Tutorial](./Series/queries/Time-Series-Analysis-Tutorial.csl) - Walkthrough of typical series functions from each category
1. **Utils**
* Functions
1. [get_modules_version_sf()](./Utils/functions/get_modules_version.csl)<sup>[1](#footnotes)</sup> - Aggregation functions on a series
1. **Labs**
1. [Custom Time Series Forecasting](./Lab/Custom-Time-Series-Forcasting/Time-Series-Forcast-Walkthrough.csl)<sup>[1](#footnotes)</sup> - build and tailor a time series forecasting model from lower level functions. See task [readme](./Lab/Custom-Time-Series-Forcasting/Time-Series-Forcast-Readme.docx) file
1. [Classification](./Lab/Classifier) - [Build a classifier in Python](./Lab/Classifier/Prediction-of-Room-Occupancy-from-Kusto-Table-with-Kqlmagic.ipynb), [score](./Lab/Classifier/Classifier-Scoring.csl)<sup>[1](#footnotes)</sup> in ADX. See task [readme](./Lab/Classifier/Classifier-Readme.docx) file
<f name="footnotes">