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

CPython实现 - 整型对象 - 编译验证

修改python整数对象的 int_print 方法 static int values[10]; static int refcounts[10]; /* ARGSUSED */ static int int_print(PyIntObject *v, FILE *fp, int flags) /* flags -- not used but required by interface */ {...

View Article


CPython实现 - 列表对象

Cpython list typedef struct { PyObject_VAR_HEAD PyObject **ob_item; Py_ssize_t allocated; } PyListObject; PyListObject对应list对象 PyObject对应python对象 ob_item为list元素的所有指针,数据类型为数组(非链表!)...

View Article


Image may be NSFW.
Clik here to view.

Python入门教程(3)

人生苦短,我学Pyhton python(英语发音:/paθn/), 是一种面向对象、解释型 计算机程序设计语言 ,由 Guido van Rossum 于1989年底发明,第一个公开发行版发行于1991年,Python 源代码同样遵循 GPL(GNU General Public...

View Article

Image may be NSFW.
Clik here to view.

Python 正则表达式之四:re 模块

最最基本的用法就是re.search了,在前面的三篇文章中,我们也已经见过多次,这里就不再赘述了。 re.sub 使用正则表达式进行查找替换,正是re.sub的功能。 例如,下面这个例子,将格式化列与之间逗号的用法: >>> row = "column 1,column 2, column 3" >>> re.sub(r',\s*', ',', row)...

View Article

Using Borg in Parallel and Serial with a Python Wrapper

Simulation and optimization are frequently used to solve complex water resources and environmental systems problems. By itself, a simulation model begs the question “what to simulate?” Similarly, by...

View Article


Image may be NSFW.
Clik here to view.

12 Reasons to Learn Python Programming

You will grasp that easily It is always a difficult task to learn a new language, but this is not with python. Python is designed to be easily grasped by a novice programmer. The python codes are...

View Article

Django Weblog: Django 1.11 beta 1 released

Django 1.11 beta 1 is an opportunity for you to try out the medley of new features in Django 1.11. Only bugs in new features and regressions from earlier versions of Django will be fixed between now...

View Article

Image may be NSFW.
Clik here to view.

Out of this world! 5 stellar NASA software freebies

Earlier this week, NASA opened up a bunch of its internal software to the public : physics simulations, operational management, embedded systems control, and many other tasks you'd associate with the...

View Article


Position Independent Source Code

Postion Independent Source Code PISC is a stack-based programming language that is primarily inspired by factor, TCL, bash and a little bit of python, written in go. It's currently a study in how far...

View Article


Python Testing 101: Introduction

python is an amazing programming language. Loved by beginners and experts alike, it is consistently ranked as one of the mostin-demand languages today. At PyData Carolinas 2016 , Josh Howes, a senior...

View Article

python 集合(set)

1.集合的创建 集合是一个无序不重复元素的集。基本功能包括关系测试和消除重复元素。 创建集合: 大括号或 set() 函数可以用来创建集合。注意:想要创建空集合,你必须使用 set() 而不是 {}, 后者用于创建空字典。大括号也不可以创建元素含有字典与列表的集合。 1 a={'a','b','c','d'} 2 b=set('abcdefabcd') 3 c=set({'a':1,'b':2})...

View Article

[DSP] Site survey: Simple encryption case

Yesterday evening I decided to take a look at a bunch of technologies I took under consideration to write myGet Noticed! project. Before, I was looking into how easy it would be to use Qt in them. It...

View Article

Image may be NSFW.
Clik here to view.

Practical Pytorch

Learn PyTorch with project-based tutorials. These tutorials demonstrate modern techniques with readable code and use regular data from the internet. Tutorials Series 1: RNNs for NLP Applying recurrent...

View Article


Image may be NSFW.
Clik here to view.

Mike Driscoll: PyDev of the Week: Dan Bader

This week we welcome Dan Bader ( @ dbader_org ) as our PyDev of the Week. Dan does a weekly python Tricks newsletter / blog that’s a fun read. He has also authored a Python Tricks book. I always like...

View Article

Image may be NSFW.
Clik here to view.

Anwesha Das: My bunnyuncle

PyCon Pune devs sprint hardware room time 10 AM The room was full with engineering students, professional engineers, hardware guys. And among them there was me, a lawyer and I do not understand a...

View Article


Image may be NSFW.
Clik here to view.

Importing with ctypes in Python: fighting overflows

Introduction On some cold winter night, we've decided to refactor a few examples and tests for python wrapper in Themis , because things have to be not only efficient and useful, but elegant as well....

View Article

The pattern python module - part 001.

This is a very short presentation of pattern python module. This python module is full of options and features. I will try to show you some parts useful for most python users. About pattern python...

View Article


Image may be NSFW.
Clik here to view.

How to Add reCAPTCHA to a Django Site

Google’s reCAPTCHA is a very popular solution to protect your application or website against bots and spam. It is fairly simple to implement. In this tutorial you will find a working example using...

View Article

Setup OSX for R

This is a rather details documentation of my OSX setup for R usage using homebrew. You can get away with a lot less than what I have installed below, but this is fairly comprehensive and I have also...

View Article

Image may be NSFW.
Clik here to view.

一个Python小白的5个小时爬虫经历

一个python小白的5个小时爬虫经历 一点号复旦大数据昨天 复旦大数据 ID:FuDanBigData 前言 最近业余在做一个基于.NETCore的搜索项目,奈何基层代码写好了,没有看起来很华丽的数据供测试。很巧的也是博客搜索,于是乎想到了博客园。C# 也能做做页面数据抓取的,不过在博客园看到的大部分都是python实现,所以就临时想了一下看看python到底是什么东东。...

View Article
Browsing all 9596 articles
Browse latest View live