NumPy is the fundamental package for scientific computing with Python. It contains among other things: a powerful N-dimensional array object; import numpy as np T = np.array([ [[1,2,3], [4,5,6], [7,8,9]], [[11,12,13], [14,15,16], [17,18,19]], [[21,22,23], [24,25,26], [27,28,29]], ]) print(T.shape) # (3,3,3) print(T.ndim) # 3 print(T.size) # 27 print(T) Each … [Read more...] about Tensor in NumPy and what may be useful to know about tensor shapes
This program is simple post and get request implementation. Since Python works almost anywhere this is a handy code to have. ''' This is a comment, If you see this, CGI is not working ''' import sys import urllib2 import urllib '''Pickling is the process converting object into a byte stream, and unpickling is the inverse operation.''' try: import cPickle as … [Read more...] about Post and Get requests in Python
Take this file to any web server to have the consistent VIM interface. " Set 'nocompatible' to ward off unexpected things that your distro might " have made, as well as sanely reset options when re-sourcing .vimrc set nocompatible " Attempt to determine the type of a file based on its name and possibly its " contents. Use this to allow intelligent auto-indenting for each … [Read more...] about The VIM configuration file .vimrc
There are many ways to install Sublime text editor, but the official way from the official webiste https://www.sublimetext.com/docs/3/linux_repositories.html is what I wanted to set also in here, since I am using that. Step 1: Install the GPG key wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg |sudo apt-key add - Step 2: Ensure apt can work with https. sudo … [Read more...] about Official way to install Sublime text editor on Ubuntu
You may use these Easy Engine commands: ee site update example.co --letsencrypt=off ee site update example.co --letsencrypt=on ee site update example.co --letsencrypt=renew but only the last one is actually needed to renew the certificate. If you do not have letsencrypt from some reason you can intall it with apt-get install letsencrypt but always good to use the US … [Read more...] about Renew letsencrypt with easy engine, the proper way.