Two Years as a High School Mentor
Over the past two years I’ve been mentoring a high school student, Dan Kelly, in software development though my workplace mentoring program . It’s been one of the most rewarding experiences in my...
View ArticleSICP Python 描述 2.7 泛用方法
2.7 泛用方法 来源: 2.7 Generic Operations 译者:飞龙 协议: CC BY-NC-SA 4.0 这一章中我们引入了复合数据类型,以及由构造器和选择器实现的数据抽象机制。使用消息传递,我们就能使抽象数据类型直接拥有行为。使用对象隐喻,我们可以将数据的表示和用于操作数据的方法绑定在一起,从而使数据驱动的程序模块化,并带有局部状态。...
View ArticleGrant Rettke: Best Way To Transliterate Unicode to ASCII? Python Help Needed...
For creating audio-books I use a text-to-speech engine. One problem is that the application dies on Unicode text. The documents that I encode are too long to correct manually so I want it automated....
View Article黑马程序员:Python时代已到来!此时不学更待何时?
黑马程序员:python时代已到来!此时不学更待何时? 一点号传智播客3天前 一、 人生苦短,我用Python! 程序员的江湖中一直流传着这样一句话“人生苦短,我用Python!”别看它是中文的,它已经火遍全球了!请看下图: php?url=0EMVsWWEC7" alt="黑马程序员:Python时代已到来!此时不学更待何时?"...
View Article水箱水位控制程序
程序仿真的系统结构如下 软件界面如下 第一张图为执行机构的输出u的变化曲线(第一个水箱的进水量) 第二张图为第一个水箱(上水箱)的水位变化曲线 第三张图为第二个水箱(下水箱)的水位变化曲线 控制面板如下 设定值默认为10 默认为自动控制,点击手动控制按钮后,控制对象的输入u不会自动变化。 手动控制切换自动控制未作无扰切换处理 输入有限幅0~20,有抗积分饱和处理...
View Articlegolang encoding/csv: Reading is slower than python
$ go version go version go1.7 linux/amd64 Reading of csv files is, out of the box, quite slow (tl;dr: 3x slower than a simple Java program, 1.5x slower than the obvious python code). A typical example:...
View ArticleCopying
I’m on my way back from try! Swift , which was fantastic. Of course it had those obvious things I’d hope for. Interesting talks, friendly people. Making new friends, and reuniting with old ones. But...
View ArticlePython 2.7 still reigns supreme in pip installs
The python 2 vs. Python 3 divide has long been a thorn in the Python community’s side. On one hand, Python package developers face the challenge of supporting two incompatible versions of Python,...
View ArticleSICP Python 描述 第三章 计算机程序的构造和解释 3.1 引言
3.1 引言 来源: 3.1 Introduction 译者:飞龙 协议: CC BY-NC-SA 4.0...
View ArticlePython精选阅读 0x01期
专题:python的各种黑魔法 用各种generator/iterator/descriptor等黑魔法,加上各种函数编程方法的使用,Python总能使用很短的代码完成很复杂的事情,下面集中放一些这方面的文章 知乎问答 Python 有哪些让你相见恨晚的技巧 Quora What are some cool Python tricks? Python的各种奇技淫巧 Python Tips and...
View ArticlePython开发【第七章】:Python面向对象进阶
1、静态方法 通过@staticmethod装饰器即可把其装饰的方法变为一个静态方法,什么是静态方法呢?其实不难理解,普通的方法,可以在实例化后直接调用,并且在方法里可以通过self.调用实例变量或类变量,但 静态方法是不可以访问 实例变量 或 类变量 的,一个不能访问实例变量和类变量的方法 ,其实相当于跟类本身已经没什么关系了,它与类唯一的关联就是需要通过类名来调用这个方法 #静态方法class...
View Articlereadthedocs切换到mkdocs
之前把学习笔记用 sphinx 生成然后托管在 github 上,然后用 readthedocs 的 webhook 自动 build 文章数量渐多感觉排版拥挤.于是google了一下找了个替代品,那就就是这篇文章的主角 mkdocs 简介 mkdocs 是一个支持 markdown 语法的项目文档管理工具,结构很简单,一个 yml 配置文件管理文档结构和主题信息, docs...
View ArticlePython初学者(五)
十四、正则表达式 正则表达式是用于处理字符串的功能强大的工具,但它并不是python所独有的,许多编程语言都支持正则表达式,用法也都区别不大; Python中的正则表达式在re模块中;...
View ArticlePython: Run daemon process
What is a daemon? Except for nature spirit, a daemon is also a process running in the background,meaning it’s anon-interactive program. It’s detached from the terminal of an interactive user. There is...
View ArticleHow to Best Tune Multithreading Support for XGBoost in Python
The XGBoost library for gradient boosting uses is designed for efficientmulti-core parallel processing. This allows it to efficiently use all of the CPU cores in your system when training. In this post...
View ArticleToolsmith Tidbit: Will Ballenthin's Python-evtx
Andrew Case ( @attrc ) called out Will Ballenthin's ( @williballenthin ) python-evtx on Twitter, reminding me that I'm long overdue in mentioning it here as well. Will's Python-evtx description from...
View ArticleNow Dock
Description: This is a plasmoid for Plasma 5 which is trying to mimic the plank or mac way of task management. Features: -- zoom tasks on hover -- various animations for several cases (e.g. adding,...
View ArticlePython之字符串
0X00 如何定义一个字符串 python不需要定义其实就是这样的。。在Python中的字符串通常这么写 >>> str1 = 'hello,world' >>> str2 = "It's work" >>> str3 = """ Jack:"oh shit" """ str1 的声明方式是最普通的声明方式 str2...
View ArticleMicroPython如何嵌入汇编
Micropython 包涵可内联的汇编,允许用户使用汇编语言作为 Python 的子程序,且你可以像正常使用函数般使用它们。 1、返回值 内联汇编函数用特定的函数装饰器标示。我们从最简单的例子下手: @micropython.asm_thumb def fun(): movw(r0, 42) 你可以在脚本或是解释器里边使用该函数。该函数没有任何参数且返回数值42 。r0...
View Article分分钟学会用python爬取心目中的女神――Scrapy
作者:战神王恒 本博文将带领你从入门到精通爬虫框架Scrapy,最终具备爬取任何网页的数据的能力。本文以 校花网 为例进行爬取,让你体验爬取校花的成就感。 Scrapy,python开发的一个快速,高层次的屏幕抓取和web抓取框架,用于抓取web站点并从页面中提取结构化的数据。Scrapy用途广泛,可以用于数据挖掘、监测和自动化测试。...
View Article