Understanding the underscore( _ ) of Python
The underscore (_) is special in python. While the underscore (_) is used for just snake-case variables and functions in most languages (Of course, not for all), but it has special meanings in Python....
View ArticleNetwork Programmability with NX-OS & Python First Steps
Network Programmability with NX-OS & python FirstSteps 01/15/2017 Leave a comment *Note:Some basic introductory knowledge of Python will be assumed for these blogposts. If you’re new to Python, I...
View ArticlePython 解方程的三种方法
新年第一篇,搞起. 这回写一个好久之前想做,一直搁着没做的东西―― python 解方程(其实是放假回家,趁着家里电脑重装 LOL 的时间过来写一篇). 咱这回用三种不同的方法,来应对平常碰到的简单方程. Numpy 求解线性方程组 例如我们要解一个这样的二元一次方程组: x + 2y = 3 4x + 5y = 6 当然我们可以手动写出解析解,然后写一个函数来求解,这实际上只是用 Python...
View Article用Python列表实现括号匹配
假设我们有一些复杂的表达式,里边包含了多种括号的嵌套,这个时候去肉眼判断括号匹配是一件非常令人蛋疼的事情,那么,怎么用python来进行基本的判断呢,答案很简单,就是用python中的list来模拟栈结构进行判断。 举个例子来说加入我们的文件中有类似一下多重嵌套的算式: rows = ['([<^>x[...
View Article如何解读特朗普的“推文”?看BuzzFeed用Python做示范
如何解读特朗普的“推文”?看BuzzFeed用python做示范 一点号全球深度报道网昨天 php?url=0FTNizNdMs" alt="如何解读特朗普的“推文”?看BuzzFeed用Python做示范" />美国当地时间周三早上,特朗普召开当选总统后的首场记者会,会上亮点之一,莫过于他炮轰CNN“专门报道假新闻”,直斥BuzzFeed是“一堆失败的垃圾”(failing pile of...
View ArticleRecurrent Neural Network系列2--利用Python,Theano实现RNN
Recurrent Neural Network系列2--利用python,Theano实现RNN 5小时前来源:cnblogs 本文翻译自 RECURRENT NEURAL NETWORKS TUTORIAL, PART 2 IMPLEMENTING A RNN WITH PYTHON, NUMPY AND THEANO 。 github地址...
View ArticleUdacity发布无人驾驶汽车工程师纳米学位项目:在模拟器中克隆人类行为
Udacity 无人驾驶车工程师纳米学位(Nanodegree)系列计划第三个项目 项目地址: https://github.com/upul/behavioral_cloning 行为克隆:模拟(人类)驾驶汽车 概述...
View ArticleWeld: A common runtime for high performance data analytics
Weld: A common runtime for high performance data analytics Palkar et al. CIDR 2017 This is the first in a series of posts looking at papers from CIDR 2017. See yesterday’s post for myconference...
View ArticlePython inherit and super
又学习了一个 python 的继承。有很多帖子都有介绍,比如 理解 Python super , python super() 。 先看一个例子,这个是第一个文章里面的。 classRoot(object): def__init__(self): print("this is Root") classB(Root): def__init__(self): print("enter B")...
View ArticleDjango Function Based View(FBV)和Class Based View (CBV)对比
一、FBV处理过程 首先来看一下FBV逻辑过程: 1.简单过程(借用官方示例): 1 urls: 2 from django.conf.urls import url 3 4 from . import views 5 6 urlpatterns = [ 7 url(r'^$', views.index, name='index'), 8 ] 9 10 views: 11 from...
View Articlepython 异步任务
月月都有坑,这个月坑最多。吐槽一下,自己最近在利用saltstack 做自动化部署,salt 支持ssh 连接然后执行model 进行初始化,这点很nice, 然后我就啪啪的写代码,用django 调用salt-api,感觉非常赞,easy, 查查发现salt 的ssh 模块有个cmd_async 支持异步调用,结果发现空的,心碎。只能借助于celery...
View Article通俗 Python 设计模式 : 通俗 Python 设计模式――外观模式
外观模式是一种在日常开发中经常用到的设计模式,它与之前提到过的 适配器模式 有一定的相似之处,但理念是不一样的。 外观模式的核心在于将复杂的内部实现包装起来,只向外界提供简单的调用接口。类似现实世界中的电脑,开机按钮可以说就是一个简单的调用接口,帮用户屏蔽了复杂的内部电路。...
View Article巧用“搜索”解决自学编程遇到的难题
引言:相信每个自学编程的人,入门之路都经历了许多坎坷。不过我们身边藏着很多“良师”,多以利用总是能够带来惊喜。善用“搜索”就是其中一位。 本文选自《一路编程》,如何通过搜索解决自学编程中遇到的问题。 假如你在做一个 javascript项目,其中你得到了一个字符串格式的日期(比如, ’2014-10-08’),你想要计算下一天的日期是什么。我们可以用...
View ArticleGetting Started with Bandit
One of the many benefits of using and working with python is its ability to introspect itself. This empowers us to write and use tools to analyze the projects we use and write. Tools written in Python...
View ArticleTutorial: Deep Learning in PyTorch
This Blogpost Will Cover: Part 1: PyTorch Installation Part 2: Matrices and Linear Algebra in PyTorch Part 3: Building a Feedforward Network (starting with a familiar one ) Part 4: The State of...
View ArticlePython 开发微信公众号后台(三)
\ k 段晓晨,写过一点爬虫,写过几篇文章。能力虽有限,会尽量把想说的东西讲清楚。 知乎ID: 段小草 小段同学的杂记, https://zhuanlan.zhihu.com/666666 ― ― 提要: 这篇文章里我们会写: 1、如何对一个聊天机器人进行抓包分析接口; 2、如何将现成的聊天机器 API 部署到自己的公众号上; 3、如何实现接收语音消息并调用聊天机器人 API 自动回复文字;...
View ArticleImage Mosaics With Python, Part II
In the second part of the series on image mosaics, we explore creating mosaics with a stochastic method. (In the first part, we explored other methods. There's also good background on the terms used in...
View Article2017年计划
2017年过了好几天了, 看了一下2016年计划 , 感觉整整一年过得还是蛮懵逼的, 仅以此文总结一下 2016总结 原有目标 数据库没有怎么碰, 由于产品用的是RDS, 好像也就是写SQL 6了一点 目前只在 withdata这个项目里用到了spring的技术栈, 多多少少是清楚了一些基础的东西, 但是关于spring的高阶玩法,...
View ArticleNim language draws from best of Python, Rust, Go, and Lisp
New languages emerge to fill niches that the existing ones don't satisfy.Google's Go combined the speed of C with the rapid development cycles of interpreted languages like python.Rust came about...
View Articlepython实现神经网络
声明:本文是 A Neural Network in 11 lines of python 学习总结而来,关于更详细的神经网络的介绍可以参考从感知机到人工神经网络。 如果你读懂了下面的文章,你会对神经网络有跟深刻的认识,有任何问题,请多多请教 Very simple Neural Network 首先确定我们要实现的任务: 输出的为样本为...
View Article