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

Image may be NSFW.
Clik here to view.

Minimal, modern embedded V8 for Python

python Mini Racer Minimal, modern embedded V8 for Python. Free software: ISC license Features Unicode support Thread safe Re-usable contexts Binary object is Python agnostic MiniRacer can be easily...

View Article


More Comment-Preserving Configuration Parsers

For the past few weeks I've been on the hunt for a configuration file format with the following three properties: You can use a library to parse the configuration. Most configuration formats allow for...

View Article


Morphex's Blogologue: Fixing up an old blog, transparent PNG embedded in...

Fixing up an old blog, transparent PNG embedded in python code So I've been fixing up on my blog lately, adding some iframe and javascript code, as well as backend code, to make it play my playlist...

View Article

Image may be NSFW.
Clik here to view.

Pokemon Faux: Create Fake Pokemon Go Screenshots with Python, Flask and...

Pokemon Faux: Create Fake Pokemon Go Screenshots with python, Flask and Twilio MMS PokemonGo is awesome and we all want to show off when we catch rare Pokemon. Let’s build a quick hack using Python and...

View Article

Python 201: A multiprocessing tutorial

The multiprocessing module was added to python in version 2.6. It was originally defined in PEP 371 by Jesse Noller and Richard Oudkerk. The multiprocessing module allows you to spawn processes in...

View Article


Image may be NSFW.
Clik here to view.

Businesses stick with Java, Python, and C

Developers may yearn for hot newer languages like Swift, Rust, and Scala, but their employers prefer stalwarts like Java. Yet python, a trendy language that also is gaining momentum in businesses,...

View Article

Python学习笔记3――函数

1.调用函数时,函数名其实就是指向一个函数对象的引用,完全可以把函数名赋给一个变量,相当于给这个函数起了一个“别名” >>> a = abs # 变量a指向abs函数 >>> a(-1) # 所以也可以通过a调用abs函数 1 2.定义函数:使用 def 语句,依次写出函数名、括号、括号中的参数和冒号: ,然后,在缩进块中编写函数体,函数的返回值用return...

View Article

Getting Started With Flask

Over the last year and a half, I’ve been working with Flask on a large project. Flask is a “microframework for python based on Werkzeug, Jinja 2 and good intentions.” I figured it would be a good time...

View Article


一文教会你正确打包Python程序

本文作者为 Gigi Sayfan ,发布在知名编程学习网站 Tutsplus。是 python 翻译组最新发布的一篇译文,希望对大家学习如何打包有帮助。 译者为 ChengPeter,并由 LinkCheng 校对,EarlGrey@编程派定稿。 概述 Python 是一门强大的编程语言。它最大的缺点之一就是打包。在 Python...

View Article


hw-text1

Text 1 测试题 python是什么类型的语言? 解释型语言,是脚本语言 百娘(脚本语言是为了缩短传统的编写-编译-链接-运行(edit-compile-link-run)过程而创建的计算机编程语言。它的命名起源于一个脚本“screenplay”,每次运行都会使对话框逐字重复。早期的脚本语言经常被称为批量处理语言或工作控制语言。 一个脚本通常是解释运行而非...

View Article

Tidbits on Python's virtualenv

python being a mess that it is - *cough* Python 2 vs 3 *cough* - has a thing for virtual dev environments. Virtual dev enviroments or virtualenv solves the mess by creating isolated dev environments....

View Article

Image may be NSFW.
Clik here to view.

PYTHON字符编码

一旦走上了编程之路,如果你不把编码问题搞清楚,那么它将像幽灵一般纠缠你整个职业生涯,各种灵异事件会接踵而来,挥之不去。只有充分发挥程序员死磕到底的精神你才有可能彻底摆脱编码问题带来的烦恼,我第一次遇到编码问题是写JavaWeb相关的项目,一串字符从浏览器游离到应用程序代码中,翻江倒海回归到数据库中,随时随地都有可能踩到编码地雷。第二次遇到编码问题就是学python的时候,在爬取网页数据时,编码问题又...

View Article

Python 201: A Tutorial On Threads

The threading module was first introduced in python 1.5.2 as an enhancement of the low-level thread module. The threading module makes working with threads much easier and allows the program to run...

View Article


Image may be NSFW.
Clik here to view.

Python-Day2 Python基础进阶

>>> list = [1,2,3,4,5]>>> print(list)[1, 2, 3, 4, 5] 2.列表切片 list = [1,2,3,4,5]>>> print(list)[1, 2, 3, 4, 5]>>> list[1:4] #取下标1至下标4之间的数字,包括下标1,不包括下标4[2, 3,...

View Article

Image may be NSFW.
Clik here to view.

利用 Python 进行数据分析NumPy 基础:ndarray 简单介绍

利用 python 进行数据分析NumPy 基础:ndarray 简单介绍 昨天来源:cnblogs 一、NumPy 是什么 NumPy 是 Python 科学计算的基础包,它专为进行严格的数字处理而产生。在之前的随笔里已有更加详细的介绍,这里不再赘述。 利用 Python 进行数据分析(一)简单介绍 二、ndarray 是什么 ndarray...

View Article


Image may be NSFW.
Clik here to view.

Python渗透工具的架构探讨

python渗透工具的架构探讨 昨天来源:CodeSec 本文原创作者:VillanCh,本文属CodeSec原创奖励计划,未经许可禁止转载...

View Article

Image may be NSFW.
Clik here to view.

Getting towards an infix notation for hy

Engineers need infix notation. It's a bold statement I know, but I am an engineer, teach engineers, and write a fair bit of mathematical programs. Your typical engineer is not a programmer, and just...

View Article


Image may be NSFW.
Clik here to view.

werkzeug源码分析(local.py)

有人说flask的上下文机制是整个框架的精华部分,有人说它神奇的g让人费解。werkzeug的local.py就是它的具体实现。这个看似神奇的机制背后加上应用代码也不过两三百行。不过好像坑还是 比较深 的。另外flask的0.1版本才200多行代码。值得瞅一下 直观感受上下文 使用wrk进行压测 wrk -t300 -c300 -d10s http://127.0.0.1:5000 import...

View Article

Python中的Generator的合并

刚学python时看到诸如: book_name_list=(book.name for book in libary) 都觉得是一种顿悟,今天才知道它的原理yield,带有这个东西的都是generator。这么写简洁流畅、语义通顺,缺点是一直不知道怎么合并,用集合的操作符 | 会报错误: unsupported operand type(s) for |: ‘generator’ and...

View Article

Python SDK 支持可选静态类型检查

LeanCloud python SDK 在兼容 Python 3 之后仍然不断改进,现在已经支持 Python 3.5 的最新特性「类型提示」以及通过 Mypy 对 Python 代码进行类型检查了。...

View Article
Browsing all 9596 articles
Browse latest View live