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

Google Boosts Python By Turning It Into Go

An anonymous reader quotes InfoWorld: Grumpy, an experimental project from Google, transpiles python code into Go , allowing Python programs to be compiled and run as static binaries using the Go...

View Article


Image may be NSFW.
Clik here to view.

OCR made easy using tesserocr

There are numerous OCR libraries for python. tesserocr is the only library I found that has a decent, humanly-approachable API. What is it exactly? tesserocr is asimple, Pillow-friendly, wrapper...

View Article


Python Flask使用Nginx做代理时如何获取真实IP

使用 Flask 开发的项目,但部署到线上 Docker 容器中后,因为使用了 Nginx 做代理,所以 Flask 无法获取真实 IP 地址,获取到的都是 192.0.0.1 ,解决方法如下: 首先是 Nginx 的配置,需要在 转发的请求headers中设置好真实IP : location /path { root html; proxy_pass...

View Article

Image may be NSFW.
Clik here to view.

Matplotlib 中文用户指南 3.6 图例指南

3.6 图例指南 原文: Legend guide 译者:飞龙 协议: CC BY-NC-SA 4.0 此图例指南是 legend() 中可用文档的扩展 - 请在继续阅读本指南之前确保你熟悉该文档(见篇尾)的内容。 本指南使用一些常见术语,为了清楚起见,这些术语在此处进行说明: 图例条目 图例由一个或多个图例条目组成。 一个条目由一个键和一个标签组成。 图例键 每个图例标签左侧的彩色/图案标记。...

View Article

Fixing bugs and handling 186k requests/second using Python

Sanic is a python3 framework built using the somewhat newly introduced coroutines, harnessing uvloop and based on Flask. However, it had an issue preventing it from utilizing multiple processes...

View Article


Python高手之路【九】python基础之迭代器与生成器

迭代器与生成器 1、迭代器...

View Article

Origins of Python's “Functional” Features

I have never considered python to be heavily influenced by functional languages, no matter what people say or think. I was much more familiar with imperative languages such as C and Algol 68 and...

View Article

Peter Bengtsson: Autocompeter is Dead. Long live Autocompeter!

About 2 years ago I launched Autocompeter.com . It was two parts: 1) A autocompeter.js pure javascript solution to add autocomplete to a search input field. 2) A REST API where you can submit titles...

View Article


Image may be NSFW.
Clik here to view.

Python全栈之路系列之数字数据类型

上篇文章中我们简单的体验了python语言基本概念与语法,那么在继续深入下去的过程中,不妨先学习几个常见的Python内置数据类型?这也是大部分Python教科书的学习目录,由浅至深,慢慢深入。 Python常用的几种数据类型就是以下几种,其实Python内部的数据类型还是很多的,多归多但是很少有我们用到了,太多了也记不了,把常用的几个玩熟练了就OK了。 那么接下来我们会学到那些内置的数据类型呢?...

View Article


Image may be NSFW.
Clik here to view.

Python高手之路【十】python基础之反射

反射说简单点 --> 就是利用字符串的形式去对象(模块)中操作(寻找/检查/删除/设置)成员。 需求:由用户输入一个模块名,用户输入什么模块名,文件中就导入什么模块: 1:文件都在同一目录下的导入 在同一目录下建立两个文件,index.py , commons.py commons.py文件内容如下: def f1(): return "F1" def f2(): return 'f2'...

View Article

Image may be NSFW.
Clik here to view.

Python第一天――初识Python

python是由荷兰人 Guido van Rossum 于1989年发明的一种面向对象的的解释型计算机程序设语言,也可以称之为编程语言。例如java、php、c语言等都是编程语言。 那么为什么会有编程语言?编程语言的定义是什么? 首先字面上的意思能看出来语言,即人与人之间交流的介质 那么编程语言就是人与计算机之间交流的介质。 编程语言都有哪些?...

View Article

New Python 3.6 Release Addresses a Growing User Base

The coding community got a nice bonus gift under our collective Christmas tree on December 23, 2016,when the python Software Foundation released the latest version of the language, Python 3.6 . While...

View Article

Image may be NSFW.
Clik here to view.

python实现应用程序在右键菜单中添加打开方式

最近项目组开发的一个小工具想要在右键菜单中添加打开方式,以有道云笔记为例进行了需求拆解和代码编写 1.需求拆解: 如何实现手动添加右键菜单的打开方式: Step1 :打开注册表编辑器,Win+R->输入 “regedit” Step2 :在HKEY_CLASSES_ROOT/*/shell (或者HKEY_LOCAL_MACHINE/SOFTWARE/Classes/*/shell...

View Article


Image may be NSFW.
Clik here to view.

Building command line tools in Python with click

Sometimes I get requests from new programmers to help them to learn to develop command line tools . They ask for any easy tutorial and howtos. My answer used to be argparse module, and the official...

View Article

关于python写GUI桌面应用的一些研究结果

研究了一下python开发GUI桌面应用的解决方案,研究结果记录如下: EasyGui:控件极为简单,连个基本的grid、list组件都没有,不适合商用,甚至是普通的应用都不行,放弃! Tkinter:api文档都不全,没啥资料可查,而且最后一次更新于09年,谁敢用? 放弃! wxPython:更新到是挺勤,文档也全,不过老版本不支持py3,放弃,新版本项目名字已经改叫wxPython...

View Article


Image may be NSFW.
Clik here to view.

IEDA翻译神器

安装 TranslationPlugin 兼容除 MPS 外所有产品编译号为 143 以上的 Jetbrains IDE 产品。 支持的 IDE: Android Studio IntelliJ IDEA IntelliJ IDEA Community Edition phpStorm WebStorm PyCharm PyCharm Community Edition RubyMine...

View Article

xlrd初使用

google老半天也没找到复制EXCEL中range的方法,老老实实用for循环写写吧 反正是给统计的,凑合用就行了。 from xlrd import *wb = open_workbook('a.xlsx')sh1 = wb.sheet_by_name('逐梦-箱子')sh2 = wb.sheet_by_name('如梦-箱子')sh3 =...

View Article


Image may be NSFW.
Clik here to view.

The Twitterverse Of Donald Trump in 26,234 Tweets

We wanted to get a better idea of where President-elect Donald Trump gets his information. So we analyzed everything he has tweeted since he launched his campaign to take a look at the links he has...

View Article

Bash-Utils updated

I have several projects on GitHub ( link ) but some of them are either abandoned or outdated. So I want to review and update all of them. I started this process with Bash-Utils . The python 2 codebase...

View Article

Image may be NSFW.
Clik here to view.

入门必读 机器学习六大开发语言

机器学习的初学者,普遍需要面对一个问题: 到底学习哪个 编程语言 ? 答案可能会让你惊讶: 对高手来说,这关系不大 。只要你了解所选语言的机器学习库和工具,语言本身其实没那么重要。相当多的机器学习库支持多种编程语言。当然,取决于你在公司中的开发角色和你需要实现的任务,有些语言、库和工具会比其他的更高效。下面,我们来看看六大主流机器学习语言――R 语言、MATLAB、python、Java...

View Article
Browsing all 9596 articles
Browse latest View live