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

Image may be NSFW.
Clik here to view.

超详细的Python自学项目收集!

超详细的python自学项目收集! 一点号w3cschool3小时前 Python是一种解释型、面向对象、动态数据类型的高级程序设计语言。Python的发明者是Guido van Rossum,发明时间是1989年底,第一个公开发行版发行于1991年。如果你想从零开始学习Python编程语言,或者你想对Python的应用有更深入的了解,W3Cschool资深用户收集的Python自学项目非常适合您。...

View Article


Image may be NSFW.
Clik here to view.

教程:Docker 部署 Python 应用

I try to code as much as possible these days at work, but recently I had a story assigned to where I needed to deploy a python web service I had written within a Docker container. I tried to claim a...

View Article


Image may be NSFW.
Clik here to view.

Python Versions Used in Commercial Projects, 2016 Edition

In October we shared data on which versions ofRuby andNode.js developers use to get the job done. Next up is a report on python, for which the main question is binary ― is it Python 2 or 3 that...

View Article

Import Python: ImportPython Issue 99 - Introduction to airflow becoming pdb...

A Practical Introduction to Airflow Airflow is a popular pipeline orchestration tool for python that allows users to configure complex (or simple!) multi-system workflows that are executed in parallel...

View Article

Image may be NSFW.
Clik here to view.

使用Python实现Mean Shift算法

前文介绍的K-Means算法需要指定K值(分组数),本文实现的MeanShift聚类算法不需要预先知道聚类的分组数,对聚类的形状也没有限制。 为了更好的理解这个算法,本帖使用python实现Mean Shift算法。 MeanShift算法详细介绍: https://en.wikipedia.org/wiki/Mean_shift scikit-learn中的MeanShift import...

View Article


字符串格式化总结

>>>print'this is %d'%2 this is2 可以替换number,或者能返回number的函数 %s 替换字符串或全部类型 >>>print'this is %s'%2 this is2 >>>print'this is %s'%'a' this isa defsum(a, b): returna + b print'1 +...

View Article

Image may be NSFW.
Clik here to view.

Pyhon 内存问题:提示和技巧

python 打算删除大量涉及像C和C++语言那样的复杂内存管理。当对象离开范围,就会被自动垃圾收集器回收。然而,对于 由 Python 开发的 大型且长期运行的系统来说,内存管理是不容小觑的事情。 在这篇博客中,我将会分享关于减少 Python 内存消耗的方法和分析导致内存消耗/膨胀根源的问题。这些都是从实际操作中总结的经验,我们正在构建Datos IO 的 RecoverX...

View Article

Image may be NSFW.
Clik here to view.

强强联手:快捷简易,利用 Python+PHP 搭建妹子图

老司机最近浏览了很多妹子图网站,简直是流连忘返,给大家分享下效果: 这引发了老司机的思考,自己要是做包含如此美妙内容的网站,需要多长时间了呢? 白想不如一弄(好邪恶的样子),老司机做了个调研,发现其实没有很难,决定挑战自己,看看一个小时可以完成不!!!!!结果当然是可以啦,老司机最后完成的网站效果: http://ioreq.com 是不是自己浏览起来非常的方便了。 下面记录了挑战过程: 选择CMS...

View Article


Org Mode and Python

If you're a python user and like to put Python snippets in source blocks in an Org mode file, John Kitchin has some very nice enhancements for you. Kitchin, as Irreal readers surely know by now, is a...

View Article


Web Scraping with Beautiful Soup

<!DOCTYPE html> <html class="no-js" lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#"> <head> <title> Legislative Alerts...

View Article

5 Useful value unpacking and * (star) operator idioms in python

Value unpacking is a very useful feature in python. It helps make the code readable and more chic The idiomspresented here are the most common ways to use unpacking in Python and are intended to help...

View Article

Python内置函数(52)――range

英文文档: range ( stop ) range ( start , stop [, step ] ) Rather than being a function,is actually an immutable sequence type, as documented in Ranges andSequence Types ― list, tuple, range. 说明: 1....

View Article

pycapsicum - sandbox your Python code on FreeBSD

pycapsicum Pycapsicum is a python interface to Capsicum (sandboxing for FreeBSD). It works on FreeBSD10, but not FreeBSD9 (an earlier version supports 9) I would recommend you understand capsicum in C...

View Article


Image may be NSFW.
Clik here to view.

How to implement Slack like Magic Link Login in Django

Slack Magic Link (Passwordless) Login Slack has this feature “Magic link” which allows user to login into the slack app without password. This Passwordless login system is very convenient for end...

View Article

Image may be NSFW.
Clik here to view.

How to Implement Random Forest From Scratch in Python

Decision trees can suffer from high variance which makes their results fragile to the specific training data used. Building multiple models from samples of your training data, called bagging, can...

View Article


Image may be NSFW.
Clik here to view.

[英] 如何写一个 Python 文档生成器

How to write your own python documentation generator Introspection with the inspectmodule In my early days with Python, one of the things that I really liked was using the built-in help function to...

View Article

Image may be NSFW.
Clik here to view.

matplotlib知识点整理

本文作为学习过程中对matplotlib一些常用知识点的整理,方便查找。 强烈推荐ipython 无论你工作在什么项目上,IPython都是值得推荐的。利用 ipython --pylab ,可以进入PyLab模式,已经导入了matplotlib库与相关软件包(例如Numpy和Scipy),额可以直接使用相关库的功能。 这样IPython配置为使用你所指定的matplotlib...

View Article


Image may be NSFW.
Clik here to view.

基于nginx和uWSGI在Ubuntu上部署Django

启动、停止和重启 $ nginx $ nginx -s stop $ nginx -s reload 2. uWSGI安装 用python的pip安装最简单: apt-get installpython-dev#不安装这个,下面的安装可能会失败 pip installuwsgi 3. 基于uWSGI和nginx部署Django 1. 原理 Web Client <===>Web...

View Article

Image may be NSFW.
Clik here to view.

004-python基础-字符编码与转码

一、三种编码方式 ASCII:是基于拉丁字母的一套电脑编码系统,主要用于显示现代英语和其他西欧语言,其最多只能用 8 位来表示(一个字节),即:2**8 = 256-1,所以,ASCII码最多只能表示 255 个符号。 Unicode(统一码、万国码、单一码):是一种在计算机上使用的字符编码,规定所有的字符和符号最少由 16 位来表示(2个字节),即:2 **16 = 65536。 UTF-8:...

View Article

005-python基础-用户输入与模块初认识

一、注释 当前行注释:# 被注释内容 多行注释:""" 被注释内容 """ 二、用户输入 1 #!/usr/bin/env python 2 #_*_coding:utf-8_*_ 3 #name = raw_input("What is your name?") #only on python 2.x 4 name = input("What is your name?") 5...

View Article
Browsing all 9596 articles
Browse latest View live