麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 學院 > 開發設計 > 正文

利用ForgeryPy生成虛擬數據

2019-11-11 05:04:39
字體:
來源:轉載
供稿:網友

在程序研發過程中,我們往往需要大量的虛擬實驗數據。Python中有多個包可以用于生成虛擬數據,其中功能較為完善的是ForgeryPy。

0x01 安裝

采用pip進行安裝:

pip install ForgeryPy

0x02 模塊

打開源碼

# -*- coding: utf-8 -*-# Copyright (C) 2012 by Tomasz Wójcik <[email protected]>## Permission is hereby granted, free of charge, to any person obtaining a copy# of this software and associated documentation files (the "Software"), to deal# in the Software without restriction, including without limitation the rights# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell# copies of the Software, and to permit persons to whom the Software is# furnished to do so, subject to the following conditions:## The above copyright notice and this permission notice shall be included in# all copies or substantial portions of the Software.## THE SOFTWARE IS ForgeryPy包括了地理位置、日期、網絡、名稱等大量虛擬生成算法,非常方便我們用來生成虛擬數據。

0x03 例子

#coding:utf-8#導入模塊import forgery_py#地理信息(城市)city=forgery_py.address.city()print city#隨機顏色color=forgery_py.basic.hex_color()print color#時間data=forgery_py.date.date(True)print data#電子郵箱email=forgery_py.internet.email_address()print email#姓名name=forgery_py.name.full_name()print name#公司company=forgery_py.name.company_name()print company#簡介about=forgery_py.lorem_ipsum.sentence()print about

其中一次的運行結果:

Paso [email protected] KingZoomloungeMaecenas leo odio, condimentum id, luctus nec, molestie sed, justo.
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 久久污| 国产91精品久久久久久久 | 91福利社在线 | 一区二区三区欧美在线观看 | 欧美黄色大片免费观看 | 99精品视频在线观看免费播放 | 露脸各种姿势啪啪的清纯美女 | 日本a大片| 日韩在线欧美在线 | 欧美成人国产va精品日本一级 | 亚洲欧美aⅴ | 日日做夜夜操 | 免费在线观看中文字幕 | 大学生a级毛片免费视频 | 亚洲天堂ww | 黄色网电影| 国产精品久久久不卡 | 亚洲第五色综合网 | a一级黄色大片 | 国产一级毛片高清 | 牛牛碰在线 | 精品国产一区二区亚洲人成毛片 | av在线视| 日韩精品一二三区 | 色婷婷一区二区三区 | 久草在线最新免费 | 五月天堂av91久久久 | 一区播放| 欧美大逼网| 日本在线视频一区二区三区 | 91免费视频版| 日韩毛片网| 成人在线视频播放 | 国产精品久久久久av | 久久亚洲精品国产一区 | 九九热免费精品 | 在线免费观看毛片视频 | 亚洲午夜国产 | 特黄一级小说 | 亚洲va在线 | 国产亚洲精品久久777777 |