添加菜单方法
cd /home/username/.local/share/nautilus/scripts touch Menu1
刷新文件管理器,打开右键菜单,即会出现名为 脚本>Menu1的菜单
签名
vi GPG-Encrypt
#!/bin/bash
gpg -u YOURUID -a --detach-sign "$@"
加密
vi GPG-Encrypt继续阅读“Ubuntu添加GPG右键菜单”
#!/bin/bash
gpg -r 接收人证书名 -s -e "$@"

xuenhua’s 站点
cd /home/username/.local/share/nautilus/scripts touch Menu1
刷新文件管理器,打开右键菜单,即会出现名为 脚本>Menu1的菜单
vi GPG-Encrypt
#!/bin/bash
gpg -u YOURUID -a --detach-sign "$@"
vi GPG-Encrypt继续阅读“Ubuntu添加GPG右键菜单”
#!/bin/bash
gpg -r 接收人证书名 -s -e "$@"
OpenKeychain helps you communicate more privately and securely. It uses encryption to ensure that your messages can be read only by the people you send them to, others can send you messages that only you can read, and these messages can be digitally signed so the people getting them are sure who sent them. OpenKeychain is based on the well established OpenPGP standard making encryption compatible across your devices and systems. For a list of compatible software for Windows, Mac OS, and other operating systems consult openpgp.org/software/.

LibreOffice 编译时依赖需要 graphite, 而graphite的编译又依赖pkg-config。但是不想使用homebrew或者 MacPorts,喜欢下载源码自己编译。pkg-config编译成功后,并且指定了环境变量。
然而make总是报checking for bogus pkg-config... configure: error: yes, from unknown origin. This *will* break the build. Please modify your PATH variable so that $PKG_CONFIG is no longer found by configure scripts.
排查configure.ac发现pkg-config 检查出错后,就退出了。pkg-config的作用主要是为了编译graphite,而graphite是一种“智能字体”系统,专门为处理世界上鲜为人知的语言的复杂性而开发。
然而,对于中文字体可能影响不大。试试忽略这部分功能。于是修改代码如下:
diff --git a/configure.ac b/configure.ac
index 99ccaf54f748..dbb727422dec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7099,7 +7099,8 @@ if test $_os = Darwin; then
if test -z "$($PKG_CONFIG --list-all |grep -v '^libpkgconf')" ; then
AC_MSG_RESULT([yes, accepted since no packages available in default searchpath])
else
- AC_MSG_ERROR([yes, from unknown origin. This *will* break the build. Please modify your PATH variable so that $PKG_CONFIG is no longer found by configure scripts.])
+ # AC_MSG_ERROR([yes, from unknown origin. This *will* break the build. Please modify your PATH variable so that $PKG_CONFIG is no longer found by configure scripts.])
+ echo here ;
fi
fi
fi
注掉后,执行make,果然成功了。
curl http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz -o pkg-config-0.29.2.tar.gz
tar -xf pkg-config-0.29.2.tar.gz cd pkg-config-0.29.2 ./configure --with-internal-glib make继续阅读“macOS pkg-config编译”
继续阅读“AI视频制作之胖喵年检记”近期胖橘猫的视频火爆网络,紧跟热点新闻话题,胖橘猫扮演多种角色,如做手术的橘猫、少林橘猫、踩缝纫机的橘猫等等,形象可爱,情节紧跟时事,深得网友喜欢。 这种视频是如何制作的呢?下面介绍一下如何制作一个胖橘猫视频。
import numpy as np
import struct
from PIL import Image
import os
path_home='./data/FashionMNIST/raw/'
data_file = path_home+'train-images-idx3-ubyte'
# It's 47040016B, but we should set to 47040000B
data_file_size = 47040016
data_file_size = str(data_file_size - 16) + 'B'
data_buf = open(data_file, 'rb').read()
magic, numImages, numRows, numColumns = struct.unpack_from(
'>IIII', data_buf, 0)
datas = struct.unpack_from(
'>' + data_file_size, data_buf, struct.calcsize('>IIII'))
datas = np.array(datas).astype(np.uint8).reshape(
numImages, 1, numRows, numColumns)
label_file = path_home+'train-labels-idx1-ubyte'
# It's 60008B, but we should set to 60000B
label_file_size = 60008
label_file_size = str(label_file_size - 8) + 'B'
label_buf = open(label_file, 'rb').read()
magic, numLabels = struct.unpack_from('>II', label_buf, 0)
labels = struct.unpack_from(
'>' + label_file_size, label_buf, struct.calcsize('>II'))
labels = np.array(labels).astype(np.int64)
datas_root = 'mnist_train'
if not os.path.exists(datas_root):
os.mkdir(datas_root)
for i in range(10):
file_name = datas_root + os.sep + str(i)
if not os.path.exists(file_name):
os.mkdir(file_name)
for ii in range(numLabels):
img = Image.fromarray(datas[ii, 0, 0:28, 0:28])
label = labels[ii]
file_name = datas_root + os.sep + str(label) + os.sep + \
'mnist_train_' + str(ii) + '.png'
img.save(file_name)