自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Shawn的博客

Here is Shawn

  • 博客(33)
  • 资源 (1)
  • 收藏
  • 关注

原创 Kotlin入门实例大全(完结)

Kotlin Cases(更新中)ShawnIDE: IntelliJ IDEA 2018.2.3Kotlin: 1.2.71JDK: 1.8.0_161强烈推荐Kotlin官方文档代码见github注: 本文中实例部分参考于 runoobJava实例Kotlin入门实例Kotlin Cases(更新中)1 字符串1.1 字符串比较 StringCompare1.2 查...

2018-10-23 16:25:32 6228 1

原创 快速入门(完整):Python实例100个(基于最新Python3.7版本)

Python3 100例 原题地址: http://www.runoob.com/python/python-100-examples.html git地址: https://github.com/RichardFu123/Python100Cases 原例为Python2.7版本 重写过程中有不少是随意发挥的 重写运行版本:Python3.7总...

2018-08-10 16:01:27 386942 83

原创 工资条: Main部分部分

Main.pyShawn11/28/2018这部分就是软件的主体.将Reader和Sender实例. 之后将Reader获取到的每一份数据用TableMaker包装, 用Sender发送.软件本体见 https://blog.csdn.net/weixin_41084236/article/details/84325652import EmailSenderimport Rea...

2018-11-28 09:28:30 991 5

原创 工资条: EmailSender部分

EmailSender.pyShawn11/27/2018用于发送email.发送email最容易出错的不是程序,而是搞定发送的email邮箱.发送email的更多知识见: http://www.runoob.com/python3/python3-smtp.html软件本体见 https://blog.csdn.net/weixin_41084236/article/detail...

2018-11-27 10:57:34 4102

原创 工资条: OneEmailInfo部分

OneEmailInfo.pyShawn11/26/2018这个类用于传递ReadXLSX获取的数据.专门编写一个类可以将数据打包得更人性化.虽然可以直接用一个数组来传递,但是谁又愿意专门写一个文档去标注索引和信息的对应关系呢?软件本体见 https://blog.csdn.net/weixin_41084236/article/details/84325652class On...

2018-11-26 13:51:55 2167

原创 工资条: ReadXLSX部分

ReadXLSX.pyShawn11/23/2018这个类负责读取excel表格的内容.根据需求就是读取xlsx文件.这个类实现的是根据关键字确定所需信息区域,.然后根据读取的每个人的信息分别打包成制作单个邮件所需要的全部数据的数据包软件本体见 https://blog.csdn.net/weixin_41084236/article/details/84325652openpy...

2018-11-23 10:28:19 515

原创 工资条: TableMaker部分

TableMaker.pyShawn11/22/2018这个类负责生成邮件的内容, 为了方便所以我选择直接用html格式来实现工资表.为了方便使用所以就直接写成了工具类.软件本体见 https://blog.csdn.net/weixin_41084236/article/details/84325652html相关的知识详见这里 @staticmethod de...

2018-11-22 11:27:42 1093

原创 工资条邮件分发 : 读取excel并单独用email发送

工资条邮件发送软件 v1.0作者: ShawnPython 3.7代码地址: https://github.com/RichardFu123/pythonTools/tree/master/SalaryEmailSenderMain.py为程序主入口本软件用于读取符合test.xlsx的工资表表格文件,并将读取的工资条通过邮箱发送.发送的邮件为html格式, 这部分在Ta...

2018-11-21 16:44:08 6292

原创 Android 使用Lottie的三个小技巧

Android 使用Lottie的三个小技巧Shawn文章目录Android 使用Lottie的三个小技巧I 开启硬件加速II 通过添加AnimatorListener来控制动画行为III 通过设置播放速度来实现动画倒放I 开启硬件加速开启硬件加速是个提升lottie动画表现效果的一个好办法,在我的老手机上,不开硬件加速就跟幻灯片一样. final LottieAn...

2018-10-25 10:45:50 8589 1

原创 bodymovin输出Json动画为黑白的解决方案

bodymovin输出为黑白的解决方案ShawnAE CC2018bodymovin 5.3.4预计其他bodymovin版本的解决方法相同最近工作原因,需要AE的bodymovin输出json动画.但bodymovin输出的json渲染出来的动画全是黑白的.在Lottie的github里这类问题全部出现于非英文环境.最后,在一个issue里,找到了最靠谱的解决方案:将AE...

2018-10-18 14:09:10 10036 2

原创 用python快速制作xml文件

用python快速制作xml文件Shawnpython 3.7因为工作需要, 要用到xml文件,所以用python写了个类,以实现快速制作xml文件.from xml.dom.minidom import Document# import xml.dom.minidomclass XmlMaker: def __init__(self,txtpath,xmlpat...

2018-10-17 11:33:06 14696

原创 Python中的max以及min: 朴素内建函数惊艳的一面

Python的max以及minpython3.7文档:https://docs.python.org/3/library/functions.html#maxhttps://docs.python.org/3/library/functions.html#minhttps://blog.csdn.net/weixin_41084236/article/details/81875451...

2018-09-29 13:46:55 730

原创 Python中的与或非以及逻辑短路

Python中的与或非以及逻辑短路python3.7Shawn文档:https://docs.python.org/3/library/stdtypes.html#boolean-operations-and-or-not文章目录Python中的与或非以及逻辑短路与或非逻辑短路与或非关于Python中真值判断的例子可以参见Python对象真值判定逻辑粗解与简明例子pytho...

2018-09-19 11:44:38 29340 1

原创 Python对象真值判定逻辑粗解与简明例子

Python的真值判定 python3.7 文档: https://docs.python.org/3.7/library/stdtypes.html#truth-value-testingpython中有很多时候可以直接将对象用在if和while中.但是在功能上,这些位置是需要通过Boolean来进行判断的.这就牵扯到Python对于True和False的设计...

2018-09-17 14:51:23 915

原创 打字练习:Learn Python 3 The Hard Way

Learn Python 3 The Hard Way相当不错的一本python入门书籍,值得新手用学小学语文的精神去认真看.更重要的是:将书中所有代码都敲一遍,运行一遍.英语与打字能力对于编程跟数学一样重要. code: https://github.com/RichardFu123/HardWayLearnTyping ebook: https://download...

2018-09-13 15:48:20 3690 4

原创 Python字符串格式化快速入门实例(自3.7官方文档)

Python字符串格式化例子 Shawn python3.7 文档: https://docs.python.org/3/library/string.html#formatstrings完整功能介绍见官方文档.本文可用于快速查找Python字符串格式化基本实例.Python字符串格式化例子format参数调用按位置调用参数按名称调用参数按方法...

2018-08-31 11:51:49 2307

原创 海龟绘图:Python3.7的turtle模块

小海龟历险记 Shawn python3.7 文档: https://docs.python.org/3/library/turtle.html想象一下,把一个小海龟扔到沙滩上.小海龟爬啊爬,沙滩上留下来一道道痕迹,这就是turtle模块.小海龟历险记小海龟的动作爬行前进:forward/fd后退:back/bk/backward右拐(顺时针...

2018-08-30 11:13:51 18667 3

原创 企鹅核心技术:Python3.7的copy模块

拷贝模块copy 作者:Shawn python3.7 文档: https://docs.python.org/3/library/copy.htmlPython的拷贝模块提供的功能不是很多,但不代表不重要.copycopy.copy(x)返回一个浅拷贝.deepcopycopy.deepcopy(x)返回一个深拷贝....

2018-08-24 17:18:43 1123

原创 Python排序技巧详解

Python:如何排序 python3.7 本文参考、翻译自Andrew Dalke and Raymond Hettinger的《Sorting HOW TO》(Release-0.1) 原文地址: https://docs.python.org/3/howto/sorting.htmlPython:如何排序基本操作扩展功能与operator模块的结合...

2018-08-20 18:04:06 1511

原创 更多,更多的容器:Python3.7的collections模块

collections模块 Python3.7 文档: https://docs.python.org/3/library/collections.htmlpython中的collections模块中有一些特殊的容器类型,有事会很方便。collections模块deque:长度固定的双向队列Counter:计数器defaultdict:不会因为键值不存在...

2018-08-16 11:02:51 778

原创 花式迭代器:Python3.7的itertools模块

迭代器模块:itertools python3.7 文档: https://docs.python.org/3/library/itertools.htmlitertools中有许多有意思的功能,使用得当可以节约大量生命。迭代器模块:itertools无限迭代器count()cycle():复读机一号repeat():复读机二号终止于最短输入的...

2018-08-13 11:32:30 3444 1

原创 备胎模块:Python3.7的operator模块

操作函数模块operator python3.7 文档: https://docs.python.org/3/library/operator.html这个模块为常规的python运算操作符提供了对应的函数。各函数本身功能与运算符一致,但在一些特殊情况下依然需要调用这个模块。调用情况常见于使用某些迭代器中。操作函数模块operator常用对照速查表成员...

2018-08-08 15:39:15 4432

原创 统计模块:Python3.7的statistics模块

统计模块statistics python3.7 https://docs.python.org/3/library/statistics.html统计模块statistics方法介绍statistics.mean(data)statistics.harmonic_mean(data)statistics.median(data)statistics.media...

2018-08-07 16:00:37 7337

原创 数学运算模块:Python3.7的math模块与cmath模块

数学运算模块:math与cmath python3.7 文档: https://docs.python.org/3/library/math.html https://docs.python.org/3/library/cmath.html数学运算模块:math与cmathmath模块常规部分math.ceil(x)math.copysign(x, y)...

2018-08-07 13:53:54 5105

原创 随机数:Python3.7的random模块详解

随机数模块random python3 手册 https://docs.python.org/3/library/random.html#module-random 部分图片转自wiki常用函数random.random()random.random()* 随机产生一个[0,1.)数字。>>&a

2018-08-06 17:38:15 30501 12

原创 LeetCode Python 292 Nim Game

You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be the...

2018-08-03 16:14:20 303

原创 LeetCode Python 065 Valid Number

Validate if a given string is numeric.Note: It is intended for the problem statement to be ambiguous. You should gather all requirements up front before implementing one.Example:"0" => true"...

2018-08-01 11:52:57 186

原创 LeetCode Python 796 Rotate String

We are given two strings, A and B.A shift on A consists of taking string A and moving the leftmost character to the rightmost position. For example, if A = ‘abcde’, then it will be ‘bcdea’ after one...

2018-07-26 14:45:18 213

原创 LeetCode Python 290 Word Pattern

Given a pattern and a string str, find if str follows the same pattern.Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str.Exampl...

2018-07-25 15:37:43 327

原创 摸鱼小帮手:Python的itertools模块

itertools模块 python 3.6.5itertools模块能够快速创建迭代器。itertools模块里由一堆奇奇怪怪的东西: 无限迭代器 countcyclerepeat终止于最短输入序列的迭代器 chaincompressifilter和ifilterfalsezip_longest组合生成器 productpermutationscomb...

2018-07-24 11:14:29 617

原创 LeetCode Python 532 K-diff Pairs in an Array

Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an integer pair (i, j), where i and j are both numbers in...

2018-07-24 10:08:48 342

原创 LeetCode Python 665 Non-decreasing Array

Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element.We define an array is non-decreasing if array[i] <= array[i + 1] holds for e...

2018-07-20 17:47:55 328

原创 LeetCode Python 001 TwoSum

Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same ...

2018-07-20 17:00:46 222

(完整版)learn python 3 the Hard Way

完整版的learn python 3 the Hard Way,再也不用忍受只有23章还卖30积分的辣鸡删节版了!!

2018-09-06

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除