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

Ned Batchelder: A tale of two exceptions, continued

In my last blog post, A tale of two exceptions , I laid out the long drawn-out process of trying to get a certain exception to make tests skip in my test runner. I ended on a solution I liked at the...

View Article


Image may be NSFW.
Clik here to view.

Java, Python FTP Injection Attacks Bypass Firewalls

Newly disclosed FTP injection vulnerabilities in Java and python that are fueled by rather common XML External Entity (XXE) flaws carry the potential to expose sensitive systems to attack. Details...

View Article


python函数的5种参数【原创】

(1) 位置参数,调用函数时按位置传入参数 (2)...

View Article

Image may be NSFW.
Clik here to view.

Token-Based Authentication with Flask

This tutorial takes a test-first approach to implementing token-based authentication in a Flask app using JSON Web Tokens (JWTs). Objectives By the end of this tutorial, you will be able to… Discuss...

View Article

Image may be NSFW.
Clik here to view.

Slacking Off With Komodo

As a relatively new developer, and a complete lightweight when compared to the rest of the Komodo development team, I find myself sharing snippets, errors and diffs for review quite often. Since I...

View Article


Image may be NSFW.
Clik here to view.

How to Save an ARIMA Time Series Forecasting Model in Python

The Autoregressive Integrated Moving Average Model, or ARIMA, is a popular linear model for time series analysis and forecasting. The statsmodels library provides an implementation of ARIMA for use in...

View Article

Image may be NSFW.
Clik here to view.

How to Rotate Images in Python Using a Horizon Detection Algorithm

When we look at an image, it’s fairly easy to detect the horizon line. For computers, this task is somewhat more difficult: they need to understand the basic structure of the image, locate edges which...

View Article

Image may be NSFW.
Clik here to view.

Managing Push Subscriptions

This article is a continuing series about using and working withWebPush and Mozilla’s WebPush service. This article is not meant to be a general guide, but instead offer suggestions and insight into...

View Article


Image may be NSFW.
Clik here to view.

Gensim ―― 主题模型 Python 工具包

Gensim是一个相当专业的主题模型python工具包。在文本处理中,比如商品评论挖掘,有时需要了解每个评论分别和商品的描述之间的相似度,以此衡量评论的客观性。评论和商品描述的相似度越高,说明评论的用语比较官方,不带太多感情色彩,比较注重描述商品的属性和特性,角度更客观。gensim就是 Python 里面计算文本相似度的程序包。 示例代码:...

View Article


Image may be NSFW.
Clik here to view.

Vasudev Ram: Perl-like "unless" (reverse if) feature in Python

By Vasudev Ram Flowchart image attribution I was mentally reviewing some topics to discuss for a python training program I was running. Among the topics were statements, including the if statement . I...

View Article

Image may be NSFW.
Clik here to view.

Jean-Luc PYcARD is a Pocketable Python Development Platform

It’s a good thing that a ridiculous pun and a screenprint of Jean-Luc Picard on the bottom of the board is enough to qualify for the 2017 Hackaday Sci-Fi Contest , because [bobricius]’s...

View Article

Image may be NSFW.
Clik here to view.

Python开发【Django】:CMDB开发

浅谈ITIL TIL即IT基础架构库(Information Technology Infrastructure Library, ITIL,信息技术基础架构库)由英国政府部门CCTA(Central Computing and Telecommunications Agency)在20世纪80年代末制订,现由英国商务部OGC(Office of Government...

View Article

轻松理解python中的闭包和装饰器 (下)

在上篇我们讲了python将函数做为返回值和闭包的概念,下面我们继续讲解函数做参数和装饰器,这个功能相当方便实用,可以极大地简化代码,就让我们go on吧! 能接受函数做参数的函数我们称之为高阶函数,例如filter, map, reduce这些函数 可以定义一个函数作为高阶函数例如: def func(x, y, f): return f(x)+f(y)...

View Article


Implementing Stack using List in Python Python Programming Essentials

Intro Stack is a collection of objects inserted and removed in a last-in first-out fashion (LIFO). Objects can be inserted onto stack at any time but only the object inserted last can be accessed or...

View Article

Python多进程并行编程实践-mpi4py的使用

python多进程并行编程实践-mpi4py的使用 一点号复旦大数据2小时前 复旦大数据 ID:FuDanBigData 前言...

View Article


Image may be NSFW.
Clik here to view.

Django实现用户注册登录

学习Django中:试着着写一个用户注册登录系统,开始搞事情 =====O(∩_∩)O哈哈~===== ================= Ubuntu python 2.7.12 Django 1.10.4 IDE:Pycharm Bootstrap(其实没怎么用~~) ================= 新建项目:(我是直接用pycharm直接生成的) 使用终端:...

View Article

Image may be NSFW.
Clik here to view.

Facebook开源大规模预测工具Prophet:支持Python和R

今天,Facebook 宣布开源了一个可以通过 python 和 R 语言使用的预测工具 Prophet。以下是 Facebook 研究博客对该工具的介绍,后面还附有机器之心对该开源项目 README.md 文件和相关论文摘要的编译介绍。 Prophet 项目地址:https://github.com/facebookincubator/prophet...

View Article


Image may be NSFW.
Clik here to view.

真是个撩人的小妖精!谈谈python的编码问题

上两天编写了个小工具程序,读取文件信息并输出适当数据到控制台。程序本身没什么难度,但是编码问题确实恶心到我了。同样的程序,在mac下跑没问题,在windows下跑就有问题;在pycharm上面的终端上跑没问题,到系统自带的terminal上面跑又有问题。真是哔了狗了呀! 简单搜索下就可以发现在python下面确实很多人遇到或者曾经遇到过python的这个编码问题。...

View Article

Image may be NSFW.
Clik here to view.

LinuXatUSIL Previas 2 for #LinuxPlaya

Yesterday, we did a workshop to start in GTK and python in charge of Damian Nohales. We first check the libraries go and sqlite since the original idea was to do a simple form. Todraw widgets that are...

View Article

AI学习之路(8): 定义张量变量

在前面,我们已经学习到生成训练数据,接着下来就要开始进行训练TF的神经网络了。但是我们从TensorFlow的名称就知道要使用张量来表示数据结构,并且让张量沿着不同的边进行流动,才可以产生神经元出来,也就是权重值。直接使用python的数据结构可行吗?肯定不行,否则就不会创建张量这个单词出来了。因为张量是一维到多维的向量,它的维度可能很高,达到数万个维度,远远超过目前人类所能理解的维数。因此在TF里...

View Article
Browsing all 9596 articles
Browse latest View live