码迷,mamicode.com
首页 > 其他好文 > 详细

博客插入 jupyter notebook样式

时间:2020-05-03 12:18:24      阅读:69      评论:0      收藏:0      [点我收藏+]

标签:pos   lock   参考   class   gap   col   galaxy   before   isp   

普通代码测试

raw_data_X = [[3.393533211, 2.331273381],
              [3.110073483, 1.781539638],
              [1.343808831, 3.368360954],
              [3.582294042, 4.679179110],
              [2.280362439, 2.866990263],
              [7.423436942, 4.696522875],
              [5.745051997, 3.533989803],
              [9.172168622, 2.511101045],
              [7.792783481, 3.424088941],
              [7.939820817, 0.791637231]
             ]
raw_data_y = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
X_train = np.array(raw_data_X)
y_train = np.array(raw_data_y)

jupyter notebook代码测试

raw_data_X = [[3.393533211, 2.331273381],
              [3.110073483, 1.781539638],
              [1.343808831, 3.368360954],
              [3.582294042, 4.679179110],
              [2.280362439, 2.866990263],
              [7.423436942, 4.696522875],
              [5.745051997, 3.533989803],
              [9.172168622, 2.511101045],
              [7.792783481, 3.424088941],
              [7.939820817, 0.791637231]
             ]
raw_data_y = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
X_train = np.array(raw_data_X)
y_train = np.array(raw_data_y)
X_train
array([[ 3.39353321,  2.33127338],
       [ 3.11007348,  1.78153964],
       [ 1.34380883,  3.36836095],
       [ 3.58229404,  4.67917911],
       [ 2.28036244,  2.86699026],
       [ 7.42343694,  4.69652288],
       [ 5.745052  ,  3.5339898 ],
       [ 9.17216862,  2.51110105],
       [ 7.79278348,  3.42408894],
       [ 7.93982082,  0.79163723]])

技术图片

实现方法(仅供参考)

#cnblogs_post_body{
  counter-reset: section;
}

.in:before{
    counter-increment: section;
    min-width:60px;
    display:block;
    content:"in [" counter(section) "] :";
    display:block;
    color:#303F9F
}

.out:before{
    counter-increment: section;
    min-width:60px;
    display:block;
    content:"out [" counter(section) "] :";
    display:block;
    color:#d84329
}

.in,.out{
    display:grid;
    grid-template-columns:auto 1fr;
    grid-gap:10px;
}

.in pre,.out pre,
.in pre code.hljs,.out pre code.hljs,
.in .pre-numbering, .out .pre-numbering{
	background:var(-)!important;
}

.out pre,
.out pre code.hljs,
.out .pre-numbering{
	background:var(--background-color-base)!important;
	
}

编写时 在markdown外部包裹<div class="in"></div><div class="out"></div>

博客插入 jupyter notebook样式

标签:pos   lock   参考   class   gap   col   galaxy   before   isp   

原文地址:https://www.cnblogs.com/gshang/p/12821316.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!