Call Stored Procedure using Python
This tutorial will show you how to call stored procedure using python programming language. Here we will use mysql database server to store the data for this example. You may also want to read How to...
View Article使用Python这么多年,才发现Python还有这些实用的功能和特点
在使用python多年以后,我偶然发现了一些我们过去不知道的功能和特性。一些可以说是非常有用,但却没有充分利用。考虑到这一点,我编辑了一些你应该了解的Python功能特色。 带任意数量参数的函数 你可能已经知道了Python允许你定义可选参数。但还有一个方法,可以定义函数任意数量的参数。 首先,看下面是一个只定义可选参数的例子 现在,让我们看看怎么定义一个可以接受任意参数的函数。我们利用元组来实现。...
View ArticlePython学习之路34-迭代器和生成器
如果做严格区分,迭代器(iterator)和生成器(generator)是两个概念。迭代器是用于从集合中挨个获取元素,要求数据已存在;而生成器则是“凭空”生成元素,最典型的就是斐波那契数列。但是在python中,大多数时候迭代器和生成器被视作同一概念。从Python2.2开始,可以使用 yield 关键字构建生成器,其作用和迭代器一样。在Python3中,生成器有了更广泛的用途,比如...
View Article浅谈深度学习训练中数据规范化(Normalization)的重要性
前言 数据规范-Normalization 是深度学习中我们很容易忽视,也很容易出错的问题。我们训练的所有数据在输入到模型中的时候都要进行一些规范化。例如在pytorch中,有些模型是通过规范化后的数据进行训练的,所以我们在使用这些预训练好的模型的时候,要注意在将自己的数据投入模型中之前要首先对数据进行规范化。 在pytorch附带的模型中我们可以选择 预训练模型 : import...
View ArticleWhat is Object oriented programming, classes and objects in Python
Object oriented programming or OOP is a computer programming paradigm where data and related functions are encapsulated together. This is the first part of my OOP section. Checkout the full course:...
View ArticleMultiTracker : Multiple Object Tracking using OpenCV (C++/Python)
In this post, we will cover how to use OpenCV’s multi-object tracking API implemented using the MultiTracker class. We will share code in both C++ and python. Before we dive into the details, please...
View ArticlePyDev of the Week: Thea Flowers
This week we welcome Thea Flowers ( @theavalkyrie ) as our PyDev of the Week! Thea is a maintainer of packaging.python.org and the urllib3 package. Thea also is very active in the Python community and...
View Article干货 | 20个最有用的Python数据科学库
核心库与统计 1. NumPy(提交:17911,贡献者:641) 一般我们会将科学领域的库作为清单打头,NumPy 是该领域的主要软件库之一。它旨在处理大型的多维数组和矩阵,并提供了很多高级的数学函数和方法,因此可以用它来执行各种操作。 在过去一年,开发团队对该库进行了大量改进。除了错误修复和解决兼容性问题之外,关键的变更还包括样式改进,即 NumPy...
View ArticlePyOhio 2018 Reflections
PyOhio 2018 was a free python conference hosted at Ohio State University in Columbus, OH from July 28-29. I had the pleasure of not only attending but also speaking at PyOhio, and my company,...
View Article从 Mac 下的包管理和安装工具说起
先说点别的。 可能很多人和我一样,最开始习惯使用的是 windows,后来开始接触 linux,再后来,接触到 Mac,几周以后,一发不可收拾。 如果说,在 Windows 下面,基本上习惯了便捷友好的图形化界面,以及经历了对“系统在干什么”一无所知的恐惧之后,那么接下来 Linux 就带来了另一个极端的体验,知道系统在做什么,但是总是觉得不那么便捷而友好(刚开始很长一段时间都没有接触 Linux...
View ArticleLearn Python programming the easy way with EduBlocks
If you are you looking for a way to move your students (or yourself) from programming in Scratch to learning python , I recommend you look into EduBlocks . It brings a familiar drag-and-drop graphical...
View Article丧尸目标检测:和你分享Python 非极大值抑制方法运行得飞快的秘诀
雷锋网 (公众号:雷锋网) 按:本文为AI研习社编译的技术博客,原标题 (Faster) Non-Maximum Suppression in python,作者为 Adrian Rosebrock。 翻译 | 陶玉龙 校对|吴桐 整理 | MY 我有一个困惑:我不能停止对目标检测的思考。...
View ArticleUse Gstreamer and Python to rip CDs
In a previous article, you learned how to use the MusicBrainz service to provide tag information for your audio files, using a simple python script. This article shows you how to also script an...
View ArticlePython监控服务器利器--psutil
服务器的监控通过安装一些常用的监控软件之外,有时也需要运行一些shell或python脚本;shell下可以使用系统自带的ps/free/top/df等shell命令,Python可以调用subprocess等模块来运行shell命令,不过这么做就比较麻烦。这里有一个比较好用的第三方模块:psutil。...
View ArticleScrapy:根据目录来下载github上的文件
最近在学习python的语法,刷刷LeetCode什么的。熟悉之后,就想着写一个爬虫实际运用一下。 如何入门 Python 爬虫? - 高野良的回答 - 知乎 知乎了一下,然后看了scrapy的文档 ,就开始动手了。 那么爬什么呢:question:...
View Article带你入门Python爬虫,8个常用爬虫技巧盘点
python作为一门高级编程语言,它的定位是优雅、明确和简单。 我 学用python 差不多一年时间了 ,用得最多的还是各类爬虫脚本:写过抓代理本机验证的脚本,写过论坛中自动登录自动发贴的脚本,写过自动收邮件的脚本,写过简单的验证码识别的脚本。 这些脚本有一个共性,都是和web相关的,总要用到获取链接的一些方法, 故 累积 了 不少爬虫抓站的经验,在此总结一下,那么以后做东西也就不用重复劳动了。...
View Article11 Ways to Make Python a Dangerous Language For Data Science
11 Ways to Make python a Dangerous Language For DataScience People are still crazy about Python after twenty-five years,which I find hard tobelieve. WordCloud Python has numerous applications ― web...
View ArticleIntroducing Kit Hunter, a phishing kit detection script | Salted Hash, Ep. 40
Today's post is a bit different, personal really. Over the last few months, I've attempted to learn something new, and I selected python to be that thing. It's a slow process. So, what's my point?...
View ArticlePython scales language popularity charts
python continues to build momentum, approaching the Top 3 in the Tiobe language popularity index after having already scaled to the top of language ratings from IEEE and PyPL. Python, which has become...
View ArticleWhy not print () in Python 3.2 seems to be in ...
I'm writing scripts to clean up unicode text files (stored as UTF-8), and I chose to use python 3.x (3.2) rather than the more popular 2.x because 3.x is supposed to default to UTF-8. Maybe I'm doing...
View Article