Quantcast
Channel: CodeSection,代码区,Python开发技术文章_教程 - CodeSec
Browsing all 9596 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

码云推荐|SaltStack 和 Django 开发的运维平台 SaltOps

saltops [系统开发中~请不要用于生产系统] 目标 SaltOps是一个基于SaltStack和Django开发的运维平台, 平台的主要功能包括:CMDB、包发布管理、工具系统、最终作为包发布和工具系统的接色 与Jenkins、Zabbix等系统进行整合 系统会具备什么功能 CMDB:这个也是没办法的事情,资产信息还是要的。。而且Salt的Agent非常适合采集这些基础信息...

View Article


Image may be NSFW.
Clik here to view.

[Python] 知乎多线程爬虫

知乎多线程爬取问题: 有哪些可以单曲循环一星期的歌曲值得推荐? 那些单曲循环过的歌,有哪些句子打动了你? ) 自寒假以来,我就一直想把系统的学习一遍python爬虫的知识。因为以前只是零碎的学习,造成许多东西都只是一知半解。...

View Article


Image may be NSFW.
Clik here to view.

PentestBox入门实战教程

PentestBox不同于运行在虚拟机或者双启动环境的linux渗透测试发行版。它打包了所有的安全工具,并且可以在windows系统中原生地运行,有效地降低了对虚拟机或者双启动环境的需求。在新闻报道中有提到该工具,详细请看之前 不试你可能会后悔,Windows渗透测试利器Pentest Box 安装 PentestBox安装很简单,首先你需要下载(百度网盘) pentestbox [2g62]...

View Article

Anaconda 4.3.0,Python 科学计算软件包发行版

Anaconda 4.3.0 发布,Anaconda 是一个用于科学计算的 python 发行版,软件支持 linux, Mac, windows, 整合众多流行的科学计算、数据分析等 Python 包。 更新记录如下: 重要更新: The Anaconda3 installers are based on Python 3.6. Anaconda 4.3 supports Python 2.7,...

View Article

Image may be NSFW.
Clik here to view.

使用Python的turtle(海龟)模块画图

使用python的 turtle(海龟) 模块画图 第一步:让Python引入turtle模块,引入模块就是告诉Python你想要用它。 import turtle 第二步:创建画布。调用turtle中的Pen函数。 t = turtle.Pen() 第三步:移动海龟。 t.forward(50) forward的中文意思是“向前地;促进”。所以这行代码的意思是海龟 向前移动50个像素 :...

View Article


Image may be NSFW.
Clik here to view.

Pythonistas (and a Python!) at PyCon Jamaica

This past November marked the first PyCon Jamaica . Held in the capital, Kingston, the conference began on November 17th with a day of tutorials followed by a single track of talks on November 18th. I...

View Article

Image may be NSFW.
Clik here to view.

Python中的高级turtle(海龟)作图

在python里,海龟不仅可以画简单的黑线,还可以用它画更复杂的几何图形,用不同的颜色,甚至还可以给形状填色。 一、从基本的正方形开始 引入 turtle模块 并创建 Pen对象 : >>> import turtle >>> t = turtle.Pen() 前面我们用来创建正方形的代码如下: >>> t.forward(50)...

View Article

Writing Python Extensions in Rust

In December Ispent few days with Rust. I wrote few lines of code and was trying to get in touch with the syntax and feeling of the language. One of the major things in my TODO list was figuring out...

View Article


Image may be NSFW.
Clik here to view.

Visual Studio Code搭建python开发环境

开发python的环境有很多,原来已经在vs2013上面搭建好python的开发环境了,但是vs2013每次启动都占太多内存(太强大了吧),这下出了vs code,既轻量又酷炫,正好拿来试一试开发python, 点击visual studio code1.9安装教程 下面直接上搭建Python环境步骤: 1.打开vs code,按按 F1 或者 Ctrl+Shift+P 打开 命令行 ,然后输入...

View Article


Image may be NSFW.
Clik here to view.

Python中的高级turtle(海龟)作图(续)

四、填色 color函数有三个参数。第一个参数指定有多少红色,第二个指定有多少绿色,第三个指定有多少蓝色。比如,要得到车子的亮红色,我们用 color(1,0,0),也就是让海龟用百分之百的红色画笔。 这种红色、绿色、蓝色的混搭叫做 RGB(Red,Green,Blue) 。因为红绿蓝是色光上的三原色,任何颜色都可以通过改变三原色的比重来调配出来。...

View Article

A Unique Slug Generator for Django

Using the [Random String Generator](https://www.codingforentrepreneurs.com/blog/random-string-generator-in-python/), we create unique slugs for any given model. ``` from django.utils.text import...

View Article

Image may be NSFW.
Clik here to view.

BrandPost: Python: High Performance or Not? You Might Be Surprised

The concept of an “accelerated python” is relatively new, and it’s made Python worth another look for Big Data and High Performance Computing (HPC) applications. Thanks to some Python aficionados at...

View Article

Image may be NSFW.
Clik here to view.

Open Source Load Testing Tool Review

(Version 1.0) Benchmarking & Comparing Open-Source Load Testing Tools Ragnar Lnn There are tons of load testing tools, both open- and closed-source. Open-source tools are growing in popularity, and...

View Article


Image may be NSFW.
Clik here to view.

Choropleth Maps in Python

Choropleth maps are a great way to represent geographical data. I have done a basic implementation of two different data sets. I have used jupyter notebook to show the plots. World Power Consumption...

View Article

Image may be NSFW.
Clik here to view.

These 2 Cheap Bundles of Courses Will Help You Learn Python

Are you thinking about learning to program? python is a fantastic starter language, and we have two huge bundles of courses available on MakeUseOf Deals that’ll get you up and running! It’s the perfect...

View Article


Kracekumar Ramaraju: Return Postgres data as JSON in Python

Postgres supports JSON and JSONB for a couple of years now. The support for JSON-functions landed in version 9.2. These functions let Postgres server to return JSON serialized data. This is a handy...

View Article

Image may be NSFW.
Clik here to view.

从头开始:用Python实现带随机梯度下降的线性回归

许多机器学习算法的核心是优化。优化算法用于在机器学习中为给定训练集找出合理的模型参数设置。机器学习最常见的优化算法是随机梯度下降(SGD:stochastic gradient descent)。 本教程将指导大家用 python 实现随机梯度下降对线性回归算法的优化。通过本教程的学习,你将了解到: 如何用随机梯度下降估计线性回归系数 如何对多元线性回归做预测...

View Article


从头开始:用Python实现随机森林算法

拥有高方差使得决策树(secision tress)在处理特定训练数据集时其结果显得相对脆弱。bagging(bootstrap aggregating 的缩写)算法从训练数据的样本中建立复合模型,可以有效降低决策树的方差,但树与树之间有高度关联(并不是理想的树的状态)。 随机森林算法(Random forest algorithm)是对 bagging...

View Article

Python Flask静态目录

在创建了Flask项目之后,如果不想用到模板引擎,想做前后端分离的项目时,就需要用到静态目录了。Flask的静态目录规定是static,也就是说所有的静态文件需要放到static文件夹下才能访问到。如下目录: - app.py - static - index.html 要访问index.html,需要通过Url: http://localhost:5000/static/index.html...

View Article

Python之路【第二十二章】:Django 缓存

缓存 由于Django是动态网站,所有每次请求均会去数据进行相应的操作,当程序访问量大时,耗时必然会更加明显,最简单解决方式是使用:缓存,缓存将一个某个views的返回值保存至内存或者memcache中,5分钟内再有人来访问时,则不再去执行view中的操作,而是直接从内存或者Redis中之前缓存的内容拿到,并返回 Django中提供了6种缓存方式: 开发调试 内存 文件 数据库...

View Article
Browsing all 9596 articles
Browse latest View live