Planet DebugUself

August 23, 2019

自怼圈

Roomer Counter v0 家务计分器 v0

社畜懒癌也希望有个整洁有序之空间.
特设计小工具帮助社畜们苦中作乐.
用家务之努力换取快乐之 quota.

Roomer Counter v0 家务计分器 v0

  • A small tool helps cleaner to count their house-work in the room.
  • 一款帮助懒癌患者记录家务的可爱计分器.

Features 特征

  • Make your own clean-work checklist.
  • Count workload into scores.
  • Simple requirements for Python3.
  • 自定义家务清单.
  • 为你所做的每一样家务打分.
  • 依赖极其简单, 仅需安装 Python3.

Requirements 依赖

  • Python3

How2Use 用法

  • Make a txt to store your clean-work checklist, name it A.txt.
  • Set A.txt absolute path.
  • Run python3 rc0_eng.py on terminal
  • 1 stands for YES, 0 stands for No.
  • 用 txt 设定好你的家务清单, 并把清单命名为 A.txt.
  • 设置好 A.txt 在脚本中的绝对路径.
  • 终端运行 python3 rc0.py
  • 1 代表做了, 0 代表没做.

Demo

rc0eng

rc0chi

Download

Else 插曲

  • You can also enjoy the tool by discuss source code.
  • The tool script adores the pythonic way manipulating list and str.
  • The script made a little twist during the design.
  • 你还可以通过讨论本工具的代码,增加给自己的乐趣.
  • 本工具脚本注重 python 中的 list 和 str 用法.
  • 本工具脚本在构思过程中绕了 1 个弯.

Feedback 反馈

手动将家务得分换为任何让你感到开心的事!
购物/聚餐/运动/旅游...
苦中作乐,乐起来!

Changelog

  • 2019-08-23 熊本 init

August 23, 2019 12:00 AM

August 21, 2019

蠎周刊

Issue 382

原文: PyCoder's Weekly - Issue #382

realpython


This guide will walk you through the decisions you need to make when customizing your development environment for working with Python: shells, terminal emulators, version management (pyenv), virtual environments & pipenv, package management, and more.

(是也乎:

pyenv

pyenv 是正确的开始.

)

Instagram’s back-end is a massive Django app with several million lines of code. This post is about how they’ve used linting and automated refactoring to help manage the scale of their Python codebase.

(是也乎:

这之前 google 已经完成更加大规模静态自动化分析... 只是, 故事主人没怎么说...

)

In this article you’ll learn how to write custom profilers, and in particular profilers that will help you pinpoint the places in your code where it just sits there waiting.

Django, Flask, Pyramid, and many, many others—get an overview of what’s available so you can choose the right Python framework for your web development project.

How to use Python and Sanic to handle webhook events from GitHub in continuous build systems.

PyCon 2020 takes place April 15–23, 2020 in Pittsburgh, PA.

(是也乎:

加油 PyCon2020China , 目测咱们的 11月能上线就是巨大的进步... 以往都是下半年了,才上线当年的...

)

讨论

Discussions

(是也乎:

作者预言国庆之后将超过 20万.

)

(是也乎:

好问题哪...

目测因为其它老语言早已形成了坚固的思想框架,以及对应强大的教育和工具体系, 根本写不出非 JAVA/C 味儿的代码;

当然, 也有另外一个解释, 因为其它语言用户基数更大, 无论写成什么味儿都算它们自己的.

而, Python 为了宣传, 只能创造性发明 Python-style 这种嗯哼来嗯哼

)

文章,教程和嗯哼

Articles, Tutorials and Talks

Learn how to do simplify your data preprocessing work using the Pyjanitor package. More specifically, you’ll learn how to: Add a column to a Pandas dataframe, remove missing values, remove an empty column, and clean up column names.

Get equipped to make production-quality, presentation-ready Python histogram plots with a range of choices and features. It’s your one-stop shop for constructing and manipulating histograms with Python’s scientific stack.

Slack Python SDK v2 is now available to help you build Slack apps faster with less complexity. Built for Python 3, you can now use new features (like type hints and return types) to help you accomplish more while coding less. Looking for a tutorial or migration guide? It all lives here →

(是也乎:

亲测是真的...

)

“You can now use your EV3 Brick to unleash the power of Python programming using MicroPython. Simply install the EV3 MicroPython image onto any micro SD card and boot up your EV3 Brick from it to start programming straight away.”

(是也乎:

LEGO EV3 什么都好, 就是一个受不了 -> 贵

)

Learn how to make a Discord bot in Python and interact with several APIs. See how to handle events, accept commands, validate and verify input, and all the basics that can help you create useful and exciting automations!

(是也乎:

Discord

何时能有 qq/wx bot?

)

“In this article I demonstrate a novel Node.js package named PyNode used to invoke Python code within a Node.js application and, more importantly, receive Python return types in the calling Node.js application.”

(是也乎:

在 wasm 之后, 还有 JS 什么事儿嘛?

)

Python support for Azure Functions is now generally available and ready to host your production workloads across data science and machine learning, automated resource management, and more.

(是也乎:

在 Lambda 支持7年之后?

)

A curated list of practical business machine learning (BML) and business data science (BDS) applications for Accounting, Customer, Employee, Legal, Management and Operations.

(是也乎:

嚓, 商用 ML 列表, 这简直就是 AI 落地姿势索引表...

)

How to give your Python scripts a full-featured Command-Line Interface (CLI) using the click library.

(是也乎:

pocoo 出品必属佳品...

用过, 只是也得看场景, 有大量本地系统工具使用的话, 还是 fabric 以及后续 invoke 方便...

)

Learn how to implement a simple scene boundary and shot transition detector with OpenCV and Python.

Explains a simple implementation of a switching hub using software defined networking with Python.

How far along has Mozilla come in the Python 3 migration?

(是也乎:

Mozilla 工程中有 3500+ Python 脚本,都是 Py2 的... 已经努力很久了, 但是, 目测还得一年才可能安全迁移到 Py3...

)

(是也乎:

好问题哪...

等等, 谁能定义一下什么是:真的写的好?

The Architecture of Open Source Applications

书中实锤过的好工程列表...

回答中 Django/Flask 直接开始 PK...好象都偏离了问题.

)

(是也乎:

那什么...

)

(是也乎:

Flutter/Eletron 外来了,也就没 Qt 什么事儿了.

)

好物

Interesting Projects, Tools and Libraries, Projects & Code

(是也乎:

嗯哼, 首次见 mypy 被这个领域进入哪...

看来, 大家等不了 Py 本番变得安全了...

)

(是也乎:

嗯哼, 首次见 mypy 进入这种领域哪...

)

(是也乎:

等等, 那为什么不直接用 Py 代码? 明白了, 又是安全问题...

)

(是也乎:

等等,叒一个安全? 到底大家撞上了什么, 都触发了不安全事件?

)

(是也乎:

NB , 非常需要, 刚需...

)

(是也乎:

效果:

Line #    Mem usage  Increment   Line Contents
==============================================
     3                           @profile
     4      5.97 MB    0.00 MB   def my_func():
     5     13.61 MB    7.64 MB       a = [1] * (10 ** 6)
     6    166.20 MB  152.59 MB       b = [2] * (2 * 10 ** 7)
     7     13.61 MB -152.59 MB       del b
     8     13.61 MB    0.00 MB       return a

其实...对大型项目没什么用哪...

)

📆🐍 活动/大会

Events, MeetUp 真的是全球线下活动组织中心

(是也乎:

老爹盛赞过的活动...

)

DAMA

❤️ Happy Pythonic ;-(大妈私人无责任播报)

进入 ch4, 下期 190901 左右发布.

本周准备上线 写作入门班

(是也乎:

Do With Py

总是永远有人问这个问题... 当然, 这个问题任何一个技术社区都有人在问...

其实, 本质上并不是对应技术是否有什么能力, 而是相反...

)

Jobs:

必须 Pythonic 相关

...

是也乎

  • 190821 Zoom.Quiet(大妈) 用时 42 分钟 完成快译
  • 190821 Zoom.Quiet(大妈) 用时 17 分钟 完成格式转抄.

NN 3746

by Zoom.Quiet at August 21, 2019 03:42 AM

August 14, 2019

蠎周刊

Issue 381

原文: PyCoder's Weekly - Issue #381

realpython


In this course on face detection with Python, you’ll learn about a historically important algorithm for object detection that can be successfully applied to finding the location of a human face within an image.

(是也乎:

Face Detection

当然, 现在 BAT 都有自己云 AI 了, 直接调用, 就不用本地生撸了...

)

Inversion of Control, in which code delegates control using plugins, is a powerful way of modularising software. It may sound complicated, but it can be achieved in Python with very little work. This article examines three different techniques for handling IOC in Python.

(是也乎:

IoC ~ 委托控制插入...

模块化软件的有效手段, 其实就是插件技术, 只是在代码层面上的...

大约是:

依赖注入,注册,猴补丁, 这几个思路.

)

“The 1.17.0 release contains a number of new features that should substantially improve its performance and usefulness. The Python versions supported are 3.5-3.7, note that Python 2.7 has been dropped.”

(是也乎:

爱过...

)

Learn all there is to know about the print() function in Python and discover some of its lesser-known features. Avoid common mistakes, take your “hello world” to the next level, and know when to use a better alternative.

(是也乎:

深挖灵魂40层, 当问打印合理无.

print

)

An opinionated guide to tooling in Python covering pyenv, poetry, black, flake8, isort, pre-commit, pytest, coverage, tox, Azure Pipelines, sphinx, and readthedocs.

(是也乎:

每年这种文章都得更新一下, 非常值得对比检验自己武器库是否合理的:

Python 工具全景图

)

(是也乎:

叕一则从0 开始, 手撸框架, 只为了嗯哼明白到底什么是重要的

)

讨论

Discussions

(是也乎:

云队友工具?

I have surveyed various cloud-based services:

+ PythonAnywhere: Py3.6, used them in London (UK) perhaps one decade 
ago, team/"education" facility appears to work. Am checking with them...

+ ShiftEdit: have been awaiting promised credentials-email all day...

+ CodeAnywhere: 7-day trial free

and tomorrow will be experimenting with:

+ AWS Cloud9: (apparently will run on a small, free, cloud-server)

Then there is the possibility of installing a multi-user editor on my 
VPS or in an OpenStack PublicCloud instance:

+ Codiad: its need for PHP puts me off (haven't used/configured that 
language for >10yrs)

and tomorrow will be reviewing:

+ Koding: (no longer offer their own server/services so looks-like I'll 
have to dredge-up my inner-SysAdmin - small children should look away now!)

简单说, 没有... 不如用 zoom.us 持续开着屏幕共享, 相互用另外一个屏幕, 看对方在干什么...

有个真人陪伴的感觉就好...

)

(是也乎:

当然是隔壁 PHP 程序猿了

)

(是也乎:

糟点太多, 大家总结不过来了...

当然, 整体上主要就是非要将 Python 写成 C/C++/JAVA/PHP/... 引发各种不舒

)

(是也乎:

外国一样喜欢标题党, 这两天这个话题很激荡...

在 Hacker New 中也引发了上百页的回复讨论...

也算证明了 Pythoneer 数量真心不少了...

)

文章,教程和嗯哼

Articles, Tutorials and Talks

In this step-by-step tutorial, you’ll learn about inheritance and composition in Python. You’ll improve your object oriented programming skills by understanding how to use inheritance and composition and how to leverage them in their design.

(是也乎:

真蟒教材

OOP

能不用就嫑用...

)

Flake8 is a style guide enforcement tool for Python that you can use in place of PyLint to help you find errors in your code and more closely follow PEP8. This article shows you how to get up and running with Flake8.

(是也乎:

至今 Python 代码静态分析市场还没完成统一...

)

PythonPune is a meetup group in Pune India. This blog post is about how the author got involved in organizing the meetup and what the process looks like.

(是也乎:

简单说 MeetUP 已经考虑到线下组织活动的所有方面, 按照应用提供的功能和指示来就好...

关键是 meetUP 在印度几乎就是 QQ 在中国的状态, 网速又能保证... 简直太 easy 了...

)

A beginner-friendly guide on using Keras to implement a simple Convolutional Neural Network (CNN) in Python.

(是也乎:

本家毕业前, 目测将持续将自己自学过程嗯哼为科普文章...

)

“These are a few of the things I wish they were teaching at university instead of pure theory.”

(是也乎:

防脱发技能...

)

“Computer vision + music = life-sized rhythm games”

(是也乎:

早年 好看薄 创始人, Alex 在周游世界定居 NZ 初期创业项目就是类似的白噪音服务, 基于 github 整体 commit/fork/merge/... 真随机事件, 作为数据源来生成无限心流音乐...

可惜09年就停止运营了.

)

(是也乎:

民科代码?

)

好物

Interesting Projects, Tools and Libraries, Projects & Code

“The most interesting use of Austin is probably in conjunction with FlameGraph to profile Python applications while they are running, without the need of instrumentation. This means that Austin can be used on production code with little or even no impact on performance.”

(是也乎:

austin

结合各种分析工具的可视化运行时分析, 也支持火焰图

)

(是也乎:

Black

自动 pprint 式代码排版... 不过, 对于大数据样本, 一样会卡...

)

(是也乎:

每年都会推荐的 FFmpeg 包装补品

)

Parses Python 3.7 source code as a CST tree that keeps all formatting details (comments, whitespaces, parentheses, etc). It’s useful for building automated refactoring (codemod) applications and linters.

(是也乎:

ins. 开源作品

)

(是也乎:

叕一则 CLI 图表库

from chart import bar

x = [500, 200, 900, 400]
y = ['marc', 'mummify', 'chart', 'sausagelink']

bar(x, y)

       marc: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇             
    mummify: ▇▇▇▇▇▇▇                       
      chart: ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇
sausagelink: ▇▇▇▇▇▇▇▇▇▇▇▇▇

好用. )

(是也乎:

TOTP => Time-Based One-Time Password

囧...通过 QR 码进行检验.

)

(是也乎:

PyPy 也在 Rust 化?

)

(是也乎:

叕一个包更新管理工具

)

(是也乎:

叕一个包及运行时管理工具, 基于 toml 管理依赖/版本关系.

和 conda 类似都要代理运行,

)

(是也乎:

scalpl

专注多层嵌入字典的使用

)

📆🐍 活动/大会

Events, MeetUp 真的是全球线下活动组织中心

DAMA

❤️ Happy Pythonic ;-(大妈私人无责任播报)

进入 ch3, 下期 190901 左右启动...

本周准备上线 写作入门班

(是也乎:

Do With Py

总是永远有人问这个问题... 当然, 这个问题任何一个技术社区都有人在问...

其实, 本质上并不是对应技术是否有什么能力, 而是相反...

)

Jobs:

必须 Pythonic 相关

...

是也乎

  • 190814 Zoom.Quiet(大妈) 用时 42 分钟 完成快译
  • 190814 Zoom.Quiet(大妈) 用时 17 分钟 完成格式转抄.

NN 3739

by Zoom.Quiet at August 14, 2019 03:42 AM