- Homebrew
- Python 2.7
- Git
There's an issue with cairo 14.x that results in the axis fonts on the graphs being HUUUUUGE. Downgrading to 12.6 helps:
input { | |
redis { | |
host => "127.0.0.1" | |
type => "redis-input" | |
# these settings should match the output of the agent | |
data_type => "list" | |
key => "logstash" | |
# We use json_event here since the sender is a logstash agent | |
message_format => "json_event" | |
} |
There's an issue with cairo 14.x that results in the axis fonts on the graphs being HUUUUUGE. Downgrading to 12.6 helps:
_ = ( | |
255, | |
lambda | |
V ,B,c | |
:c and Y(V*V+B,B, c | |
-1)if(abs(V)<6)else | |
( 2+c-4*abs(V)**-0.4)/i | |
) ;v, x=1500,1000;C=range(v*x | |
);import struct;P=struct.pack;M,\ | |
j ='<QIIHHHH',open('M.bmp','wb').write |
Git 比较不同版本文件差异的常用命令格式:
git diff 查看尚未暂存的文件更新了哪些部分
git diff filename 查看尚未暂存的某个文件更新了哪些
git diff –cached 查看已经暂存起来的文件和上次提交的版本之间的差异
git diff –cached filename 查看已经暂存起来的某个文件和上次提交的版本之间的差异
#!/usr/bin/env python | |
import curses | |
import curses.textpad | |
import time | |
stdscr = curses.initscr() | |
#curses.noecho() | |
#curses.echo() |
import org.apache.flink.api.common.functions.MapFunction; | |
import org.apache.flink.api.java.tuple.Tuple3; | |
import org.apache.flink.streaming.api.TimeCharacteristic; | |
import org.apache.flink.streaming.api.datastream.DataStream; | |
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; | |
import org.apache.flink.streaming.api.functions.timestamps.AscendingTimestampExtractor; | |
import org.apache.flink.table.api.Table; | |
import org.apache.flink.table.api.TableEnvironment; | |
import org.apache.flink.table.api.java.StreamTableEnvironment; | |
import org.apache.flink.types.Row; |
#用正则简单过滤html的<>标签 | |
import re | |
str = "<img /><a>srcd</a>hello</br><br/>" | |
str = re.sub(r'</?\w+[^>]*>','',str) | |
print str |
version: "3.9" | |
services: | |
db: | |
image: mysql/mysql-server:5.7 | |
environment: | |
MYSQL_DATABASE: 'db' | |
MYSQL_ROOT_PASSWORD: 'secret-pw' | |
MYSQL_ROOT_HOST: '%' | |
ports: | |
- '3306:3306' |
Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv
instead. If you are looking for the previous version of this document, see the revision history.
$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10
$ pyenv install 2.6.9
#!/usr/bin/env python | |
''' | |
Send an multipart email with HTML and plain text alternatives. The message | |
should be constructed as a plain-text file of the following format: | |
From: Your Name <your@email.com> | |
To: Recipient One <recipient@to.com> | |
Subject: Your subject line | |
--- |