1–10 | 11–20 | 20–30 |
---|---|---|
6940 | 5839 | 6007 |
6615 | 6957 | 6314 |
6169 | 6877 | 6224 |
6142 | 6324 | 6210 |
6492 | 6685 | 6961 |
6908 | 5964 | 6475 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding=utf-8 | |
# | |
# Generate a list of dnsmasq rules with ipset for gfwlist | |
# | |
# Copyright (C) 2014 http://www.shuyz.com | |
# Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules | |
import urllib2 | |
import re |
The styler gives us a easy way to format the dataframe and maintain the format across different kind of output: html, excel, etc.
However, one of my friends has spot a problem of it, the styler.to_excel() output some how supressed some advanced formating of XlsxWriter. Here is an example:
import pandas as pd
data = pd.DataFrame({"A":list(range(10,12)), "B":["abcdefgafafadf", "afbafafafafadfadfadf"]})
with pd.ExcelWriter("/tmp/test.xlsx") as writer:
data.style.apply(lambda x: ['background-color: red']*2 if x['A']==11 else [None]*2, axis=1).to_excel(writer, index=False)
writer.sheets["Sheet1"].write(3, 1, "Some long text to wrap in a cell")
there is almost NOT legacy iptables command (iptables) on modern OS (RHEL8, ubuntu22, etc) there can still be some lagecy ip_tables module loaded:
lsb_release -d; lsmod | grep tables; iptables -V
Description: Fedora release 38 (Thirty Eight)
nf_tables 368640 1454 nft_compat,nft_chain_nat
nfnetlink 20480 8 nft_compat,nfnetlink_acct,nf_conntrack_netlink,nf_tables,ip_set
Description: Red Hat Enterprise Linux release 8.8 (Ootpa)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
systemctl -T -o verbose daemon-reload | |
systemctl -T -o verbose disable --now test-timer.timer | |
set -e | |
wait_secs=20 | |
run_at_time=$(date -d "+${wait_secs}sec" +"%H:%M:%S") | |
logfile=/tmp/test-timer-output | |
if [ -f ${logfile} ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#btrfs benchmark for daily used desktop OS |