Python_1_Iterable Iterator Generator.ipynb
: generator, iterator, iterable. See Chinese Notes, 中文解读.Python_2_list comprehension.ipynb
: list comprehension. See Chinese Notes, 中文解读.Python_3_property decorator.ipynb
: property decorator. See Chinese Notes, 中文解读.Python_4_tricks.md
: pip image, find package infomation, encoding etc.Python_5_Cartesian_product.ipynb
: Cartesian product to substitute nested-for loop for hyper-parameter evaluating
Numpy_1_ndarray shape.ipynb
: ndarray shape. See Chinese Notes, 中文解读
Pandas_1_Series_DataFrame.ipynb
: introduction ofSeries
andDataFrame
Pandas_2_DataFrame operations.ipynb
:DataFrame
operations
spark.md
: frequently functions
Excel.md
: frequently operations
Docker_notes.md
: frequently commands
PyTorch.md
: frequently functions
image_src = 'teset.svg'
with open(image_src, "rb") as f:
data = f.read()
# to serialize in JSON, here decode("utf8") is needed
a = {'status': base64.b64encode(data).decode("utf8")}
a = {'status':'csfdfdere'}
image_decode = base64.b64decode(a['status'].encode("utf8"))
image_res = open('/Users/test.svg', 'wb')
image_res.write(image_decode)
image_res.close()