package com.moxi.wc; import static java.lang.Math.random; /** * @author Mr.Wang * @version 1.0 * @since 1.8 */ public class StaticDemo { public static ...
分类:
其他好文 时间:
2021-02-18 13:18:25
阅读次数:
0
###about 将平日里遇到的一些实用、有意思的python代码收集起来,以备后用 ####python案例 # ex_1.py # 生成随机字符 import random, string def GenPassword(length): numOfNum = random.randint(1, ...
分类:
编程语言 时间:
2021-02-18 13:14:12
阅读次数:
0
概率论研究那些受到随机事件(random events)影响的现象,它们具有很大的不确定性。 基础定义 讨论概率时,最重要的就是不确定性的思想,我们需要引入一个足够宽泛的、用于处理不确定性的概念。偶然性试验(chance experiment)或随机试验(random experiment)是产生不 ...
分类:
其他好文 时间:
2021-02-17 15:12:51
阅读次数:
0
from pandas import Series import numpy as np data = Series(np.random.randn(10), index=[['a','a','a','b','b','b','c','c','d','d'], [1,2,3,1,2,3,1,2,2,3 ...
分类:
其他好文 时间:
2021-02-17 15:05:05
阅读次数:
0
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import string import random num=int(sys.argv[1]) #随机生成一个MAC地址 def creat_mac(): MAC='41-AF' hex_nu ...
分类:
系统相关 时间:
2021-02-17 14:53:26
阅读次数:
0
Copy List with Random Pointer (M) 题目 A linked list is given such that each node contains an additional random pointer which could point to any node in ...
分类:
其他好文 时间:
2021-02-15 11:52:08
阅读次数:
0
Security and Cryptography in Python - Block Cipher(2) Double DES from pyDes import * import random message = "01234567" key_11 = random.randrange(0, 2 ...
分类:
编程语言 时间:
2021-02-10 13:31:04
阅读次数:
0
import random import string # 生成大于0小于1的数,小数 print(random.random()) # 1-3之间的整数 print(random.randint(1,3)) print( random.choice('tomorrow') ) # 从序列中随机选取 ...
分类:
其他好文 时间:
2021-02-08 12:35:35
阅读次数:
0
通过python可以调用smtp第三方邮件服务接口,这使得我们可以通过python直接来发送邮件。在这个功能基础上,我们可以结合Linux的定时任务服务Crontab,来开发一些有意思的项目,比如爬虫等。这里我们就只简单演示一个定时播报随机数的任务示例,很好的结合了crontab定时任务、pytho... ...
分类:
编程语言 时间:
2021-02-08 12:06:32
阅读次数:
0
模型正则化 Regularization 岭回归实现 import numpy as np import matplotlib.pyplot as plt np.random.seed(42) x = np.random.uniform(-3.0, 3.0, size=100) X = x.resh ...
分类:
其他好文 时间:
2021-02-04 12:23:51
阅读次数:
0