惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Spread Privacy
Spread Privacy
P
Palo Alto Networks Blog
P
Proofpoint News Feed
AI
AI
Help Net Security
Help Net Security
S
Securelist
T
Troy Hunt's Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
Cisco Blogs
Scott Helme
Scott Helme
Hacker News - Newest:
Hacker News - Newest: "LLM"
Vercel News
Vercel News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
B
Blog
GbyAI
GbyAI
Recent Commits to openclaw:main
Recent Commits to openclaw:main
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed
S
Security Affairs
Cisco Talos Blog
Cisco Talos Blog
AWS News Blog
AWS News Blog
T
Tenable Blog
H
Help Net Security
NISL@THU
NISL@THU
F
Fortinet All Blogs
博客园_首页
G
GRAHAM CLULEY
L
LINUX DO - 最新话题
P
Privacy International News Feed
G
Google Developers Blog
博客园 - Franky
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Security Archives - TechRepublic
Security Archives - TechRepublic
The Register - Security
The Register - Security
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
T
Tor Project blog
P
Privacy & Cybersecurity Law Blog
量子位
C
Cyber Attacks, Cyber Crime and Cyber Security
Forbes - Security
Forbes - Security
S
Secure Thoughts
Simon Willison's Weblog
Simon Willison's Weblog
D
Docker
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
L
Lohrmann on Cybersecurity
T
Tailwind CSS Blog

博客园 - 拓子

.net编码规则 tensorflow mnist The tensorflow simplest calculate python opencv english opencv 图片识别 从excel 导入数据绘制 散点图 tensor flow 线性回归 一些搞笑,但有意义的图片 基于python玩转人工智能最火框架之TensorFlow人工智能&深度学习介绍 win10 64下anaconda4.2.0(python3.5) PYTHON 爬虫 baidu美女图片 falkonry python hadoop wordcout测试 CENTOS重新安装JDK 搭建Hadoop的环境 目录和权限 centos基本命令
随机概率
拓子 · 2019-11-24 · via 博客园 - 拓子

# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""
import numpy as np
d={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0}
print(d)

ran=np.random.randint(0,10,1000000)
print(ran)

for i in range(10):
print(d[i])

for i in range(1000000):

if ran[i]==0:
d[0]=d[0]+1
elif ran[i]==1:
d[1]=d[1]+1
elif ran[i]==2:
d[2]=d[2]+1
elif ran[i]==3:
d[3]=d[3]+1
elif ran[i]==4:
d[4]=d[4]+1
elif ran[i]==5:
d[5]=d[5]+1
elif ran[i]==6:
d[6]=d[6]+1
elif ran[i]==7:
d[7]=d[7]+1
elif ran[i]==8:
d[8]=d[8]+1
elif ran[i]==9:
d[9]=d[9]+1
else:
print('kon')

for i in range(10):
print(d[i],d[i]/100)