sudo apt install openjdk-8-jdk-headless
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
Error: | |
$ adb devices | |
List of devices attached | |
52003c2b58b445db no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html] | |
Fix: | |
1> sudo usermod -aG plugdev $LOGNAME (https://developer.android.com/studio/run/device) | |
2> lsusb | |
3> sudo vi /etc/udev/rules.d/51-android.rules |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
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
""" | |
MIT License | |
Copyright (c) [year] [fullname] | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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
#如果没有root的话(gateway没法设, dns也没法设), 则不使用系统的usb tethering而是使用gnirehtet而更简单些: | |
https://github.com/Genymobile/gnirehtet | |
sudo iptables -t nat -A OUTPUT -p udp ! -d 127.0.0.1 --dport=53 -j DNAT --to 192.168.0.25:53 | |
./gnirehtet run | |
(可以设置unbound.conf的verbosity: 3<\n> logfile: unbound.log<\n> log-queries: yes 来观察是否生效, log文件位置可以用lsof -c unbound看到) | |
用来收android的更新包非常快, 打google voice也是这个gnirehtet+iptables可以用, 用手机上的lantern或wireguard应用都不行 | |
#手机usb线连pc并启用tether | |
(manual switch on: settings/network & internet/hotspot & tethering/usb tethering | |
default on: settings/system/developer/networking/select usb configuration/rndis(usb ethernet) |
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
import sys | |
import numpy | |
import cv2 | |
def comic(img): | |
# do edge detection on a grayscale image | |
gray = cv2.cvtColor(img, cv2.COLOR_BGRA2GRAY) | |
edges = cv2.blur(gray, (3, 3)) # this blur gets rid of some noise |