测试从Notepad++导出HTML格式的code

以下为从Notepad++中将code导出(export)为html格式文件的测试案例,如显示符合预期,则表明markdown支持完整HTML语法!

import

dmlib

as

dm

import

numpy

as

np

def

group_func
(
x
):

return

x

%

8

def

task_func
(
x
):

return

x

%

3

+

1

def

test_dm_map_reduce
():

mr

=

dm
.
MapReduce
()

# generate test input

input_dim

=

(
1024
,

16
)

x

=

np
.
random
.
rand
(
input_dim
[
0
],

input_dim
[
1
])

num_group_keys

=

8

mr
.
map
(
x
,

group_func
,

num_group_keys
)

y

=

mr
.
reduce
(
task_func
)

print
(
y
)

if

__name__

==

‘__main__‘
:

test_dm_map_reduce
()