Saturday, December 7, 2019

VSCode Python: Refer global site packages inside virtual environment

Using virtual environments in Visual Studio Code is a great practise while working on python. However, I had noticed that whenever I create a virtual environment, I had to reinstall the commonly used packages like numpy again in the virtual environment folder. The typical size of all such packages for a python program using Keras packages is nearly 500 MB.

Though this is a very good - and probably essential - practise for production environment, I did not want to use up a lot of unnecessary disk place in my study laptop's hard disk. After seraching on internet I could get some solutions to this problem like setting pythonPath variable in settings.json file under the project folder.

But I was curious and wanted to look for other possible options, and finally I found a setting in the pyenv.cfg file under the virtual environment folder. This file has a setting include-system-site-packages. Setting it to true results in the virtual environment automatically refering to global package library folder, like so

home = C:\Program Files\Python36
include-system-site-packages = true
version = 3.6.8

Tuesday, December 3, 2019

SharePoint JSOM queries

Accessing SharePoint through JSOM is a very flexible and intuitive way of working with SharePoint.

Its advantages are:

  1. Data can be accessed from any browser, in any application.
  2. Javascript can be modified easily, and hence shorter deployment cycles.
  3. Can be easily embedded in SharePoint hosted apps or even a content query webpart, providing vital ability to customize sharepoint OOB elements (such as menus, styles, links, etc.) without a lot of overhead of development, testing and deployment.

To get started with JSOM the following articles are a great read.






SSL Error - The connection for this site is not secure

 After cloning a git repo of dot net framework website and trying to run it all I could see was this error Turns out the fix was to simply e...