PrimerPyhttps://www.primerpy.com/
Recent content on PrimerPyHugo -- gohugo.ioen-usisaaczhou85@gmail.com (Isaac Zhou)isaaczhou85@gmail.com (Isaac Zhou)Sat, 02 Mar 2019 00:38:33 -0500Array|数组https://www.primerpy.com/post/datastructure/array/
Sat, 02 Mar 2019 00:38:33 -0500isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/datastructure/array/定义 把数据码成一排进行存放 In Java, all data must be of the same type In Python, we can store different data types Index, usually start from 0 (R starts from 1) 数组支持for, forEach因为它具有可迭代，可遍历的能力 (iterable) 二次封装属于我们自己的数组 数组最大的优点：快速查询 索引最好有语义 并非所有有语义的索引都适用于数组 比如ID号，开辟的空间大，可能会浪费 制作属于我们自己的数组类 索引没有语义，如何表示没有元素？ 如何添加元素？如何删除元素？ 增删改查 向指定位置添加元素 确定数组中有足够的空间：size &lt; capacity
确定插入的位置合法：index &gt;= 0 并且 index &lt;= capacity
Dynamic Array Code 用Java实现动态数组
public class DynaArray { private int[] data; private int size; // 构造函数， 传入数组的容量capacity构造DynaArray public DynaArray(int capacity) { data = new int[capacity]; size = 0; } // 无参数的构造函数，默认容量capacity为10 public DynaArray() { this(10); } // 获取数组中的元素个数 public int getSize() { return size; } // 获取数组的容量 public int getCapacity() { return data.JSON in Pythonhttps://www.primerpy.com/post/python/json/json-in-python/
Fri, 08 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/json/json-in-python/What is JSON Definition JSON is Javascript Object Notation. JSON is a light weight data exchange format. JSON string is a string that satisfies JSON format.
{&quot;name&quot;: &quot;Isaac Zhou&quot;} {'name': 'Isaac Zhou'} The above is a typical JSON string. JSON has several benefits:
easy to read easy to analyze efficient with the network transaction It can transfer data across different languages Deserialize JSON in Python The original format of JSON is a string, we need to deserialize it in Python.Regex: Generalhttps://www.primerpy.com/post/python/regex/regex-general/
Fri, 08 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/regex/regex-general/Table of Contents Regex: General What is regex? Using Built-in Python Function Use Regex module Special char vs. Regular char Using Regex Special string char General char Counts match fixed length match a ranged length Greedy vs. Non-Greedy Search Greedy Non-greedy Matching Times Matching 0 or infinite times Use * Matching 1 or infinite times, Use + Matching 1 or 0 time, use ?Regex: Search and Matchhttps://www.primerpy.com/post/python/regex/regex-search-match/
Fri, 08 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/regex/regex-search-match/Table of Contents search Check the returned value match Check the returned value match only once group There are two more methods in regex: search and match, however I don&rsquo;t think they are as handy as .sub or .findall. Assume we have a string s=&ldquo;A8C3721D86&rdquo;
search
Check the returned value .search returns a re object, search will search for the whole string until the pattern failsRegex: Subhttps://www.primerpy.com/post/python/regex/regex-sub/
Fri, 08 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/regex/regex-sub/Table of Contents Introducing re.sub the power of re.sub function as a parameter For regex, there are more than just find. Here I will discuss replacement
Introducing re.sub re.sub matches first then replace the matched string
import re lang = &quot;PythonC#PHPC#C#C#C#&quot; # replace C# with GO r = re.sub(&quot;C#&quot;, &quot;GO&quot;, lang, 0) r 'PythonGOPHPGOGOGOGO' The 4th parameter 0 means to replace C# infinitly. If we change 0 to 1, C# will be replaced only onceInit Methodhttps://www.primerpy.com/post/python/oop/init-method/
Wed, 06 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/oop/init-method/__init__ method define __init__ function class User(): name = &quot;&quot; pwd = &quot;&quot; def __init__(self): print(&quot;user&quot;) def sign_up(self): print(&quot;User Sign Up&quot;) __init__ will be invoked automatically when instantiating a class
user = User() # __init__ is seldom called this way user.__init__() user user user.sign_up() User Sign Up Only return None __init__ function can only return a None
class Org(): def __init__(self): return &quot;This is Org&quot; org = Org() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) &lt;ipython-input-4-06eab282d464&gt; in &lt;module&gt;() 3 return &quot;This is Org&quot; 4 ----&gt; 5 org = Org() TypeError: __init__() should return None, not 'str' How to take parameters __init__ function can take parameters, for example __init__ will be invoked automatically # This is the wrong way to define the class class Org(): name = &quot;&quot; org_type = &quot;&quot; country = &quot;&quot; def __init__(self, name, org_type, country): # initialize the object attribute name = name org_type = org_type country = country print(&quot;{} was successfully created!Class Definitionhttps://www.primerpy.com/post/python/oop/class-definition/
Tue, 05 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/oop/class-definition/Object Oriented Programming (OOP) We need to write meaningful OOP codes, merely having classes doesn&rsquo;t mean it&rsquo;s oop. Defining a class Class: defined by class ClassName class Student(): pass Define variables, functions/methods
To use a class, we need to instantiate it first
See examples below
# define a class class Student(): name = &quot;&quot; age = 0 def print_file(): print(&quot;name: {} \n age: {}&quot;.Class and Objecthttps://www.primerpy.com/post/python/oop/class-and-object/
Tue, 05 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/oop/class-and-object/Class and Object Class: a mapping between computer programs and the entities from real/thinking realm. It&rsquo;s a blueprint that defines a set of attributes that will characterize any object that is instantiated from this class.
Class encapsulates data (variables) and operations (methods) on those data
A good class design depends on behavior (method) and attribute (variables). Behaviors need to be relevant with the class
For example, for the class definition below, method print_file shouldn&rsquo;t belong to Student, rather it should belong to PrinterClosurehttps://www.primerpy.com/post/python/advanced-python/closure/
Mon, 04 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/advanced-python/closure/Everything is an Object In other languages, function is just an executable codes, but in Python everything is an object. So function is a type of object. In python, a function is an object, moreover, a function can be an argument in another function or a function can be a result returned from another function def test(): pass a = test print(type(a)) &lt;class 'function'&gt; 1.1 What is a closure?Decoratorhttps://www.primerpy.com/post/python/advanced-python/decorator/
Mon, 04 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/advanced-python/decorator/Decorator 1.1 Modifying the function decorator is more of a design pattern for exmaple # f1 prints a simple sentence def f1(): print(&quot;This is a function&quot;) Now, f1 doesn&rsquo;t fit my need, I want to print out time as well import time def f1_old(): print(time.time()) print(&quot;This is a function&quot;) # it prints out a Unix timestamp and sentence f1_old() 1549295628.544087 This is a function 1.Decorator Side Effectshttps://www.primerpy.com/post/python/advanced-python/decorator-side-effects/
Mon, 04 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/advanced-python/decorator-side-effects/Decorator Side Effects 1.1 Decorator might change the function name In this post, we will deep-dive the side effects of decorators. recall our example before, print Unix Time everytime we run the function import time def decorator(func): def wrapper(): print(time.time()) func() return wrapper @decorator def f1(): print(&quot;This is a function&quot;) f1() 1549311820.0338516 This is a function # Now if f1 is defined without decorator, I want to print out f1's name import time def decorator(func): def wrapper(): print(time.Filterhttps://www.primerpy.com/post/python/advanced-python/filter/
Mon, 04 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/advanced-python/filter/ Filter Sometimes, we want to conduct some filtering on certain lists. In Python, there&rsquo;s a really convenient way of doing it: filter
1. Definition Filter out elements not meeting our requirements Takes two parameters: a function or None; an iterable import numpy as np # generate a random list of 50 ints between -100 and 100 # filter out the negative numbers list_x = np.random.randint(-100,100,50) print(list_x) [ 84 80 -16 69 21 -60 11 -77 -84 88 70 13 -77 60 -100 28 -86 39 10 -14 -24 92 93 -67 98 -55 27 -91 -31 -35 -10 -57 66 23 -36 -63 34 3 62 -29 81 -80 61 -46 36 -83 -77 -69 -40 -97] list_x_pos = list(filter(lambda x: True if x &gt; 0 else False, list_x)) print(list_x_pos) [84, 80, 69, 21, 11, 88, 70, 13, 60, 28, 39, 10, 92, 93, 98, 27, 66, 23, 34, 3, 62, 81, 61, 36] # It can be used in a simpler version list_x_neg = list(filter(lambda x: x &lt; 0, list_x)) print(list_x_neg) [-16, -60, -77, -84, -77, -100, -86, -14, -24, -67, -55, -91, -31, -35, -10, -57, -36, -63, -29, -80, -46, -83, -77, -69, -40, -97] Iterator and Generatorhttps://www.primerpy.com/post/python/pythonic/iterator-generator/
Mon, 04 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/pythonic/iterator-generator/Iterator and generator 1.1 Iterator Iterables include list, tuple and set iterator is a class
regular class is not iterable class A: pass # class A is not iterable - we can use iterator to make a class iterable # For Book class, there's no need to be iterable class Book: pass # For a collection of books, e.g. BookCollection, it should be iterable class BookCollection: pass to make a class iterable, we need to methods __iter__ and __next__ class BookCollection: def __init__(self): self.Lambda Expressionhttps://www.primerpy.com/post/python/advanced-python/lambda-expression/
Mon, 04 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/advanced-python/lambda-expression/Lambda Expression 1. Definition Functional programming is a way of thinking. When using lambda, we don&rsquo;t need to give a function name. It&rsquo;s very similar to the arrow functions in Javascript (ES6+) lambda would be good for some simple expression in a function, it will not be useful for large chunk of blocks in function # old way of defining a function def add(x,y): return x ** y # lambda parameter_list: expression lambda x, y : x ^ y &lt;function __main__.List Comprehensionhttps://www.primerpy.com/post/python/pythonic/list-comprehension/
Mon, 04 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/pythonic/list-comprehension/List Comprehension Create a new list from another list x is a int list between -100 and 100 get a new list of x square There are at least 3 ways: 1.1 Three methods in Python List comprehension [expression(v) for v in iterables] import matplotlib.pyplot as plt %matplotlib inline x = list(range(-100, 100)) x_square = [v**2 for v in x] plt.Maphttps://www.primerpy.com/post/python/advanced-python/map/
Mon, 04 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/advanced-python/map/1. Map 1.1 Map Definition map is a class in python, it accepts two parameters, the first one is a function, the second one is an iterable object, e.g. a list, tuple etc. map is usually used converting a list to another list via a function # define a curve list_x = list(range(-100,100)) def curve(x): return x ** 2 list_y = map(curve, list_x) print(list_y) &lt;map object at 0x000002393EB7CEF0&gt; Note that list_y is not a list yet, it&rsquo;s a map object, we need to apply list on list_y to convert it to a list objectReducehttps://www.primerpy.com/post/python/advanced-python/reduce/
Mon, 04 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/advanced-python/reduce/1. Reduce 1.1 Definition Reduce is another important function for functional programming Unlike map, which is a global class, reduce should be imported from functools library reduce takes three parameters: a function (which must takes 2 parameters), a sequence and an initial value reduce conducts a continuous calculation by invoking the function Initially, reduce will take x = 1, y = 2 calculate x + y = 3, then assign 3 to x for the next iteration take the 3rd value 3 and assign to y Loop from functools import reduce result = reduce(lambda x, y: x + y, list(range(1,9))) # 1 + 2 # 1 + 2 + 3 # 1 + 2 + 3 + 4 # .Switch in Pythonhttps://www.primerpy.com/post/python/pythonic/switch-in-python/
Mon, 04 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/pythonic/switch-in-python/Switch in Python Python doesn&rsquo;t have switch, which is common in other languages For example, switch in javascript switch(expression) { case x: // code block break; case y: // code block break; default: // code block } In python, we can use if...elif...elif...else A more pythonic way would be using dictionary day = 0 switcher = { 0: &quot;Sunnday&quot;, 1: &quot;Monday&quot;, 2: &quot;Tuesday&quot;, 3: &quot;Wednesday&quot;, 4: &quot;Thursday&quot;, 5: &quot;Friday&quot;, 6: &quot;Saturday&quot;, } day_name = switcher[day] print(day_name) print(switcher[7]) # this would raise error because we don't have default Sunnday --------------------------------------------------------------------------- KeyError Traceback (most recent call last) &lt;ipython-input-5-ebfdce520e28&gt; in &lt;module&gt; 11 day_name = switcher[day] 12 print(day_name) ---&gt; 13 print(switcher[7]) # this would raise error because we don't have default KeyError: 7 As mentioned above, there&rsquo;s no default, so the above method might raise error A even more pythonic way, using get(day, default_value) day_name = switcher.Tenary Conditional Expressionhttps://www.primerpy.com/post/python/advanced-python/tenary-conditional-expression/
Mon, 04 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/advanced-python/tenary-conditional-expression/1. Ternary Conditional Operator In simple words, it is just an if-else statement in expression format, it exists in many other languages with a different format, e.g. we want to compare two numbers x, y.
For example in javascript
x &gt; y ? x : y however, in python it&rsquo;s a bit different. The syntax looks like this:
(return result if condition is true) (if condition else) (return result if condition is false)Functional Programminghttps://www.primerpy.com/post/python/advanced-python/functional-programming/
Sun, 03 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/advanced-python/functional-programming/Imperative Programming vs. Functional Programming So far, we&rsquo;ve encountered two types of programming paradigm: Imperative and Functional.
Imperative Programming However hard the logic may be, all the process can be realized with the following three types of objects:
function (def) condition (if else) loop (for) obviously, with OOP, there are objects and modules, but here we just want to focus on the essential imperative programming.
Functional Programming There are four key concepts for functional programming:Class Methodhttps://www.primerpy.com/post/python/oop/classmethod/
Sat, 02 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/oop/classmethod/We can add binary numbers together, just like we can with base 10 numbers
In the example below:
a is in base 10 &ndash; because we have 10 possible digits, the highest value we can represent with one digit is 9 When we want to represent a value one higher, we need to add another digit. a now has two digits &ndash; we incremented the invisible leading digit, which was 0 and is now 1, and set the last digit back to zero.Enumerationhttps://www.primerpy.com/post/python/advanced-python/enumeration/
Sat, 02 Feb 2019 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/python/advanced-python/enumeration/Enumeration vs. Class Enumeration is a very common data structure used to define &ldquo;Type&rdquo; data, e.g. what types of VIP classes are there for a membership program.
1. Define an Enumeration It&rsquo;s very easy to define an Enumeration class in Python with enum module, just import as from enum import Enum
from enum import Enum class VIP(Enum): YELLOW = 1 GREEN = 2 BLACK = 3 RED = 4 print(VIP.Advanced Javascript Array Methodshttps://www.primerpy.com/post/others/advanced-array-methods/
Thu, 02 Nov 2017 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/others/advanced-array-methods/forEach Iterates through an array Runs a callback function on each value in the array always returns &ldquo;undefined&rdquo; var arr = [1,2,3,5] arr.forEach(function(d,i,arr){ console.log(d,i); }); How does forEach work var forEach = (arr, callback) =&gt; { for(var i = 0; i &lt; arr.length; i++) { callback(arr[i],i,arr); } } Using forEach in a function var halfValues = (arr) =&gt; { let newArr = []; arr.JS Closurehttps://www.primerpy.com/post/others/js-closure/
Thu, 02 Nov 2017 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/others/js-closure/Definition A closure is a function that makes use of variables defined in outer functions that have previously returned We have to &ldquo;return&rdquo; the inner function for this to work We can either call the inner function right away by using an extra () or we can store the result of the function in a variable Closure only exists when an inner function makes use of variables defined from an outer function that has returned.Big Image Samplehttps://www.primerpy.com/post/others/2017-03-07-bigimg-sample/
Tue, 07 Mar 2017 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/others/2017-03-07-bigimg-sample/<p>The image banners at the top of the page are refered to as &ldquo;bigimg&rdquo; in this theme. They are optional, and one more more can be specified. If more than one is specified, the images rotate every 10 seconds. In the front matter, bigimgs are specified using an array of hashes.</p>
<p></p>Math Samplehttps://www.primerpy.com/post/others/2017-03-05-math-sample/
Sun, 05 Mar 2017 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/others/2017-03-05-math-sample/<p>KaTeX can be used to generate complex math formulas server-side.</p>
<p>$$
\phi = \frac{(1+\sqrt{5})}{2} = 1.6180339887\cdots
$$</p>
<p>Additional details can be found on <a href="https://github.com/Khan/KaTeX">GitHub</a> or on the <a href="http://tiddlywiki.com/plugins/tiddlywiki/katex/">Wiki</a>.
</p>Code Samplehttps://www.primerpy.com/post/others/2016-03-08-code-sample/
Tue, 08 Mar 2016 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/others/2016-03-08-code-sample/<p>The following are two code samples using syntax highlighting.</p>
<p></p>Flake it till you make ithttps://www.primerpy.com/post/others/2015-02-26-flake-it-till-you-make-it/
Thu, 26 Feb 2015 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/others/2015-02-26-flake-it-till-you-make-it/Under what circumstances should we step off a path? When is it essential that we finish what we start? If I bought a bag of peanuts and had an allergic reaction, no one would fault me if I threw it out. If I ended a relationship with a woman who hit me, no one would say that I had a commitment problem. But if I walk away from a seemingly secure route because my soul has other ideas, I am a flake?Test markdownhttps://www.primerpy.com/post/others/2015-02-20-test-markdown/
Fri, 20 Feb 2015 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/others/2015-02-20-test-markdown/You can write regular markdown here and Jekyll will automatically convert it to a nice webpage. I strongly encourage you to take 5 minutes to learn how to write in markdown - it&rsquo;ll teach you how to transform regular text into bold/italics/headings/tables/etc.
Here is some bold text
Here is a secondary heading Here&rsquo;s a useless table:
Number Next number Previous number Five Six Four Ten Eleven Nine Seven Eight Six Two Three One How about a yummy crepe?To behttps://www.primerpy.com/post/others/2015-02-13-hamlet-monologue/
Fri, 13 Feb 2015 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/others/2015-02-13-hamlet-monologue/To be, or not to be&ndash;that is the question: Whether &lsquo;tis nobler in the mind to suffer The slings and arrows of outrageous fortune Or to take arms against a sea of troubles And by opposing end them. To die, to sleep&ndash; No more&ndash;and by a sleep to say we end The heartache, and the thousand natural shocks That flesh is heir to. &lsquo;Tis a consummation Devoutly to be wished. To die, to sleep&ndash; To sleep&ndash;perchance to dream: ay, there&rsquo;s the rub, For in that sleep of death what dreams may come When we have shuffled off this mortal coil, Must give us pause.Dear diaryhttps://www.primerpy.com/post/others/2015-01-27-dear-diary/
Tue, 27 Jan 2015 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/others/2015-01-27-dear-diary/What is it with that Mary girl? Dragging me to school every day. As if I had a choice. What you don&rsquo;t hear in those nursery rhymes is that she starves me if I don&rsquo;t go to school with her; it&rsquo;s the only way I can stay alive! I&rsquo;m thinking about being adopted by Little Bo Peep, sure I may get lost, but anything is better than being with Mary and those little brats at school (shudder, shudder).Soccerhttps://www.primerpy.com/post/others/2015-01-19-soccer/
Mon, 19 Jan 2015 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/others/2015-01-19-soccer/From Wikipedia:
Association football, more commonly known as football or soccer,[2] is a sport played between two teams of eleven players with a spherical ball. It is played by 250 million players in over 200 countries, making it the world&rsquo;s most popular sport.[3][4][5][6] The game is played on a rectangular field with a goal at each end. The object of the game is to score by getting the ball into the opposing goal.Pirates arrrrhttps://www.primerpy.com/post/others/2015-01-15-pirates/
Thu, 15 Jan 2015 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/others/2015-01-15-pirates/Piracy is typically an act of robbery or criminal violence at sea. The term can include acts committed on land, in the air, or in other major bodies of water or on a shore. It does not normally include crimes committed against persons traveling on the same vessel as the perpetrator (e.g. one passenger stealing from others on the same vessel). The term has been used throughout history to refer to raids across land borders by non-state agents.First post!https://www.primerpy.com/post/others/2015-01-04-first-post/
Mon, 05 Jan 2015 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/post/others/2015-01-04-first-post/This is my first post, how exciting!About PrimerPyhttps://www.primerpy.com/page/about/
Mon, 01 Jan 0001 00:00:00 +0000isaaczhou85@gmail.com (Isaac Zhou)https://www.primerpy.com/page/about/PrimerPy Primerpy provides a primer on python and related data science topics. It covers all the prerequisites for Deep Learning, Machine Learning, and Artificial Intelligence. It is designated for tech stacks and programming languages used in data science.
So what are those?
Python Python is a clear winner in data science. We cover not only the native Python features, such as loops, functions and objects, but also important libraries such as Numpy, Pandas, Matplotlib, Bokeh, scikit-learn, statsmodels and sqlalchemy etc.