Weekly #17
@Date : 2019-12-29 11:17:16
@Author : Lewis Tian (taseikyo@gmail.com)
@Link : github.com/taseikyo
@Range : 2019-12-29 - 2020-01-04
Table of Contents
review
This post teaches you how to write a Makefile.
how to pass arguments to makefile:
# Makefile:
schedule_flight_to_krakow:
echo $(krakow_date) > schedule_flight_to_krakow
$ make schedule_flight_to_krakow krakow_date=01/01/2020
$ cat schedule_flight_to_krakow
01/01/2020
It is essential to not attempt to define all of the commands up front. Updating and refining the Makefile is part of the development workflow itself; things change, and so does the Makefile over time. Because the Makefile is general and flexible, these changes are usually quite simple to implement.
YES!
tip
- How to use gitbook
Here is a simple intro and book.json config.
The follow is a simple GitBook structure. book.json is like a config file, including title, author, plugins etc.
.
├── book.json
├── README.md
├── SUMMARY.md
├── chapter-1/
| ├── README.md
| └── something.md
└── chapter-2/
├── README.md
└── something.md
To install plugins, you need to put the plugins into the plugins field of the book.json file and then run gitbook install
cmd.
{
"title": "Gitbook Use",
"author": "Lewis Tian",
"description" : "My daily tasks desc.",
"language": "en",
"links": {
"sidebar": {
"Home": "https://github.com/taseikyo"
}
},
"plugins": [
"mathjax",
"splitter",
"github-buttons",
"copy-code-button",
"-search",
"search-plus",
"expandable-chapters-small",
"anchor-navigation-ex",
"code",
"advanced-emoji"
]
}
Suppose the text is what we want to draw on the image. Use textwrap.wrap to split the text into a list of lines, the maximum width of which is specified by width.
import textwrap
lines = textwrap.wrap(text, width=40)
y_text = h
for line in lines:
width, height = font.getsize(line)
draw.text(((w - width)/2, y_text), line, font=font, fill=FOREGROUND)
y_text += height
share
Researchers at the University of North Texas have found that two oak tree species, post oak and live oak, that are widespread across the U.S. South remove black carbon from the urban atmosphere.
The results, published in the journal Environmental Science & Technology, show that post oak trees capture approximately twice as much black carbon as live oak trees.
The findings may offer a natural way to improve climate and air quality.
Exokernel: An Operating System Architecture for Application-Level Resource Management
http://www.cs.cornell.edu/Info/Courses/Spring-97/CS614/exo.html