• MIT人工智能实验室
  • 大数据分析平台
  • 游戏开发《骑马与砍杀》
  • 量化金融分析
  • python爬虫
  • python django web框架
MIT人工智能实验室 大数据分析平台 游戏开发《骑马与砍杀》 量化金融分析 python爬虫 python django web框架
  • python json pickle

    auto 2019-08-11 11:27:38 python

    1458°

    20

    Python中用于序列化的两个模块json 用于【字符串】和 【python基本数据类型】 间进行转换pickle 用于【python特有的类型】 和 【python基本数据类型】间进行转换Json模块提供了四个功能:dumps、dump、loads、loadpickle模块提供了四个功能:dumps、dump、loads、loadimport
  • python中的shell操作

    auto 2019-08-11 11:27:38 python

    1319°

    20

    python中的shell操作 首先介绍一个函数: os.system(command) 这个函数可以调用shell运行命令行command并且返回它的返回值。试一下在python的解释器里输入os.system(”ls -l”),就可以看到”ls”列出了当前目录下的文件。可以说,通过这个函数,python就拥有
  • python使用reduce,lambd

    auto 2019-08-11 11:27:38 python

    1363°

    20

    reduce是递归的数字lambda是表达式>>> l = range(1,101) #定义l的数值范围1-100>>> reduce(lambda x,y:x+y,l) #l数字传递给lamdba表达式,并reduce递归运算。5050#!/usr/bin/python n = 0 for i in range(1,101): n += i p
  • python数字类型

    auto 2019-08-11 11:27:38 python

    1301°

    20

    在python中,数据采用了对象的形式(无论是python内置对象还是使用python工具和像C语言自行创建的对象)。Python数字类型工具:整数和浮点数复数固定精度的十进制数有理分数集合布尔类型无穷的整数类型各种数字内置函数和模块python数字类型在程序中的显示方式之一是作为常量(还有一个是调用模块使用函数):数字&nb
  • python django系列(三)

    auto 2019-08-11 11:27:38 python

    1096°

    20

    数据库,里面有各种宝贝,一个没有数据库的网站,提供的功能非常有限连接数据库mysql是最常用的数据库,这里将django和mysql连接。安装:easy_install MySQL-python 或 pip install MySQL-python 登陆数据库 建库: CREATE DATABASE villa DEFAULT CHARSET=utf8; 授权: GRANT SELECT, IN
  • Python - 关于Python的变量

    auto 2019-08-11 11:27:38 python

    1171°

    20

    Python的变量是动态的,不需要预先申明,当赋值时自动创建变量,并且Python变量存储的是对象的引用(非变量本身)。Python变量的命名规则与C语言相似,并且在日常使用中一般会遵循以下一些规则:A. 一般不以单下划线“_”开头,因为以单下划线开头的变量不能被from module import *所导入;B. 前后有双下滑线是系统定义的变量名,对解释器有特殊的意义,所以一般不以双下划线开始和
  • Python3实现求质因数

    auto 2019-08-11 11:27:12 python

    2107°

    20

    编写函数,接受一个整数,返回改数的所有质因子。调用该函数进行求解测试。import math x = ...
  • python3自动化实践2之第一个测试脚

    auto 2019-08-11 11:27:12 python

    1238°

    20

    场景设计: 1.... 测试场景 打开Baidu 输入selenium 点击搜索按钮 关闭浏览器#-*- encoding:utf-8 -*-...
  • Python List 删除元素

    auto 2019-08-11 11:27:12 python

    1504°

    20

    1. 使用del删除指定元素li = [1, 2, 3, 4] del li[3] print(li) # Output [1, 2, 3]2. 使用list方法pop...
  • Python破解ZIP或RAR文件密码

    auto 2019-08-11 11:27:12 python

    1689°

    20

    基本原理在于Python标准库zipfile和扩展库unrar提供的解压缩方法extractall()可以指定密码,这样的话首先...
  • Python能用来做什么?以下是Pyth

    auto 2019-08-11 11:27:12 python

    1202°

    20

    如果你想学Python,或者你刚开始学习Python,那么你可能会问:“我能用Python做什么?”这个问题不好回答,...
  • python遍历数组的两种方法

    auto 2019-08-11 11:27:12 python

    1866°

    20

    python遍历数组的两种方法 第一种,最常用的,通过for in遍历数组 [cpp] view plain copy colours = ...
  • 基于python的简单HTTP服务器实现

    auto 2019-08-11 11:27:12 python

    1305°

    20

    这段时间,学习了一些相关的知识,因为对C++的多线程和网络编程不是很熟悉,先用python实现了...
  • 用Python编写WEB服务器压力测试工

    auto 2019-08-11 11:27:12 python

    1352°

    20

    前言最近在编写一个简单的...想想这种压力测试实际上没啥技术含量,就自己用Python来编写了小段测试代码。使
  • Python 中文转Unicode字符串

    auto 2019-08-11 11:27:12 python

    1907°

    20

    Python 3.6代码:# -*- coding: utf-8 -* def to_unicode(string): ret = '' for v in string: ret = ret ...
  • python3 闭包

    auto 2019-08-11 11:27:12 python

    1272°

    20

    闭包1. 函数引用def test1(): print("--- in test1 func----") #调用函数 test1() #引用函数 ret = ...
  • python中assert的使用

    auto 2019-08-11 11:26:28 python

    1354°

    20

    在python程序中,如果想要确保程序中的某个条件一定为真才会继续执行的话,而可以使用assert来实现。 例如:>>> age = 10 >>> assert 0>> assert age>20 Traceback (most recent call last):
  • Python-工具安装

    auto 2019-08-11 11:26:28 python

    1291°

    20

    Python 常用工具的安装
  • python读文件

    auto 2019-08-11 11:26:28 python

    1304°

    20

    文件 1 内容如下 #some words Sometimes in life, You find a special friend; Someone who changes your life just by being part of it. Someone who makes you laugh until you can't stop; Someone who m
  • Python 数值计算

    auto 2019-08-11 11:26:28 python

    1395°

    20

    print "Welcome to run" print "Please input num" print "1 stand for 矩形" print "2 stand for 圆" print "3 stand for 正方形" s=int(input("Please inp