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

Generate carry in Carry-lookahead adder

Recently, I am implementing an 8-bit Carry-lookahead adder . But unfortunately, almost all materials in the Internet only provide the formula to get C1 to C4 , so I write a simple python script to...

View Article


Image may be NSFW.
Clik here to view.

Linux / Unix: “-bash: python: command not found” error and solution

I am a new user and trying to run python program. I have a cloud based VM/VPS and when I type python mycode.py at the terminal of my server, I get the following error: -bash: python: command not found...

View Article


Talk Python to Me: #94 Guarenteed packages via Conda and Conda-Forge

Have you ever had trouble installing a package you wanted to use in your python app? Likely it contained some odd dependency, required a compilation step, maybe even using an uncommon compiler like...

View Article

Image may be NSFW.
Clik here to view.

How to choose your first programming language

How to choose your first programming language Posted 11 Jan 2017 Kojo Idrissa Feed 1 up Image by : opensource.com The reasons for learning to program are as a varied as the people who want to learn....

View Article

Image may be NSFW.
Clik here to view.

Python NLTK学习6(创建词性标注器)

发表于:6天前阅读:76 本系列博客为学习《用python进行自然语言处理》一书的学习笔记。 默认标注器 默认标注器为每个单词分配同样的标记,尽管很平庸,但它也是有作用的,先看示例: import nltk raw = "You are a good man, but i don't love you!" tokens = nltk.word_tokenize(raw) default_tagger...

View Article


Image may be NSFW.
Clik here to view.

[scrapy]scrapy源码分析 数据是如何处理的

下载中间件(Download MiddleWare)是如何加载的 Spider MiddleWare是如何加载的 配置文件是如何起作用的 整体的执行流程是怎样的 扩展件是如何工作的 数据是怎么处理的 我们之前经常会写yield Request ,yield Item 这种东西,到底yield 是做什么用的?返回的item又是如何处理的,好了我们今天先看数据是数据处理的。...

View Article

Image may be NSFW.
Clik here to view.

Lambdascript adds functional programming to Python

Lambdascript,a pure functional language built atop python 3, provides a bridge between Python and functional programming, in yet another nod to a software development paradigm that has been attracting...

View Article

Webinar: Adding a REST API to a Django Application

Calvin Hendryx-Parker (CTO of sixfeetup, and founder of the Indianapolis-based IndyPy user group) hosted a webinar for us where he showed how to add a REST API to a Django application. In the webinar,...

View Article


PYTHON open/文件操作

[注]虽是转载,但会在原文上有些修改! open/文件操作 f=open('/tmp/hello','w') #open(路径+文件名,读写模式) #读写模式:r只读,r+读写,w新建(会覆盖原有文件),a追加,b二进制文件.常用模式 如:'rb','wb','r+b'等等 读写模式的类型有: rU 或 Ua 以读方式打开, 同时提供通用换行符支持 (PEP 278) w以写方式打开,...

View Article


PyCon: PyCon Startup Row 2017 Applications Are Now Open!

Starting at the 2011 conference in Atlanta, the PyCon Expo Hall has offered a special event for startups: “Startup Row,” a row of booths that features interesting startups built with python. We’re...

View Article

前两篇转载别人的精彩文章,自己也总结一下python split的用法吧!

前言:前两篇转载别人的精彩文章,自己也总结一下吧! 最近又开始用起py,是为什么呢? 自己要做一个文本相似度匹配程序,大致思路就是两个文档,一个是试题,一个是材料,我将试题按每题分割出来,再将每题的内容与材料中进行文本相似度匹配。 所以先首先要做的是将试题把每道题作为一个字符串切割开来,存放到字典中。 程序入下: # -*- coding:utf-8 -*- import re #正则模块 f =...

View Article

Extending Templates

Recently at work, I had a quite long code review from a very young, very rushed co-worker. Let many such reviews (my own included) there were several instances of copy-paste coding, where the same...

View Article

Image may be NSFW.
Clik here to view.

PyTennessee: PyTN Profiles:Kevin Najimi and Wingware

Speaker Profile: Kevin Najimi ( @kevin_najimi ) Kevin is a huge fan of coding in python and finance. He wants everyone to enjoy programming in Python at least as much as he does. He cares deeply about...

View Article


Image may be NSFW.
Clik here to view.

Thomas Wiecki on Probabilistic Programming with PyMC3

A rolling regression with PyMC3 : instead of the regression coefficients being constant over time (the points are daily stock prices of 2 stocks), this model assumes they follow a random-walk and can...

View Article

Image may be NSFW.
Clik here to view.

PyTennessee: PyTN Profiles:A. Jesse Jiryu Davis and Level12

Speaker Profile: A. Jesse Jiryu Davis ( @jessejiryudavis ) Staff Engineer at MongoDB in New York City specializing in C, python, and async. Lead developer of the MongoDB C Driver libraries libbson and...

View Article


Image may be NSFW.
Clik here to view.

[人工智能]机器学习的框架偏向于Python原因

前言 主要有以下原因: 1. python是解释语言,程序写起来非常方便 写程序方便对做机器学习的人很重要。 因为经常需要对模型进行各种各样的修改,这在编译语言里很可能是牵一发而动全身的事情,Python里通常可以用很少的时间实现。 举例来说,在C等编译语言里写一个矩阵乘法,需要自己分配操作数(矩阵)的内存、分配结果的内存、手动对BLAS接口调用gemm、最后如果没用smart...

View Article

Image may be NSFW.
Clik here to view.

Python时代到来,你准备好了么?

python时代到来,你准备好了么? 一点号it黑马程序员14小时前 php?url=0FRXMSy7e8" alt="Python时代到来,你准备好了么?" />求职 地图 网页 应用 关键词:Python就业前景怎么样? 1. Python上手容易,入门简单<<<...

View Article


转]python 结巴分词(jieba)学习

源码下载的地址:https://github.com/fxsjy/jieba 演示地址:http://jiebademo.ap01.aws.af.cm/ 特点 1,支持三种分词模式: a,精确模式,试图将句子最精确地切开,适合文本分析; b,全模式,把句子中所有的可以成词的词语都扫描出来, 速度非常快,但是不能解决歧义;...

View Article

New year, new Python: Python 3.6

python 3.6 was released in the tail end of 2016. Read on for a few highlights from this release. New module: secrets ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Python 3.6 introduces a new module in the standard...

View Article

New in Python: Underscores in Numeric Literals

python 3.6 added some interesting new features. The one that we will be looking at in this article comes from PEP 515: Underscores in Numeric Literals . As the name of the PEP implies, this basically...

View Article
Browsing all 9596 articles
Browse latest View live