Wednesday, September 23, 2020

Dynamics 365 and Power Platform monthly reading list August 2020

Technical topics (Configuration, customization and extensibility) 

Topics for Dynamics 365 Business Application Platform consultants, project managers and power users

Wednesday, September 09, 2020

Fixing current .NET SDK does not support targeting .Net Core 2.2 in Visual Studio 2017

 I encountered below exception when building a ASP.NET Core project in Visual Studio - "The current .NET SDK does not support targeting .NET Core 2.2. Either target .NET Core 2.1 or use a version of the .NET SDK that supports .NET Core 2.2".


Luckily this forum post pointed in the correct direction - first check the installed version of the .NET Core SDK on your machine. 

If you are using Visual Studio 2017, you will need to install 2.2.1xx of the SDK to support targetting .NET Core 2.2. You can download the different versions of the .NET Core 2.2 SDK on https://dotnet.microsoft.com/download/dotnet-core/2.2 

Thursday, September 03, 2020

Palm oil price vs SIPEF stock price in Jupyter notebooks with Quandl

Quandl also offers free commodity price data for almost 100 commodities ( See API for commodity data) so I decided to create a Jupyter notebook comparing SIPEF's stock price with the price of palm oil. Take a look at the full notebook I shared on github if you want to learn why - https://github.com/jorisp/tradingnotebooks/blob/master/Quandl_API_Euronext_SIPEFPalmOil.ipynb 

 


Remarks:

  • Be careful when embedding images in a Jupyter notebook that you want to publish on Github (see Images in Markdown not showing when uploaded to Git for a discussion on this) - filenames are case sensitive - I got it working using the url syntax
  • To store the quandl key I used the approach outlined on how to use secrets in Jupyter Notebooks with python-dotenv
  • I really like Matplotlib and its versatility in rendering capabilities  in this notebook I used the ability to visualize multiple time series (see code preview below) with different axes. (see code below)

sipcolor = 'tab:red'
fig,ax1 = plt.subplots()

ax1.plot(data['SIP'],color=sipcolor)
ax1.set_ylabel('SIPEF',color=sipcolor)
#Instantiate a second axes that shares the same x-axis
ax2 = ax1.twinx()
ax2.plot(data['PPOIL'])
ax2.set_ylabel('PALM OIL USD')
plt.gcf().set_size_inches(15,8)
plt.show()

Related posts:

Tuesday, September 01, 2020

Quick tip: workaround kernelspec module not installed with jupyter notebooks in Visual Studio Code

This weekend I tried out working with Jupyter Notebooks in Visual Studio Code. Since I already have Jupyter up and running as part of the Anaconda distro I thought this would be easy but it took me longer than expected. 

First step is to install the Python extension for VS Code  and then you can start working with existing Jupyter Notebooks by just double clicking an existing notebook. Unfortunately this immediately threw an exception "Error: Jupyter cannot be started. Error attempting to locate jupyter: 'Kernelspec' module not installed in the selected interpreter." The workaround suggested on StackOverflow Python/Jupyter notebook in VSCode does not use the right environment did not resolve the issue and also the fixes described on Github - New version tries to install kernelspec were not working.


The workaround which seems to be working for me is starting VS Code from the Anaconda Prompt in the Jupyter workspace directory by typing "code ."