Get current ativity:
dumpsys activity activities | grep mResumedActivity
Uninstall app example:
pm uninstall -k --user 0 com.aura.oobe.samsung.gl
Restore removed app example:
pm install-existing com.aura.oobe.samsung.gl
from argparse import ArgumentParser | |
from concurrent.futures import ThreadPoolExecutor | |
from ipaddress import ip_network | |
import socket | |
try: | |
from paramiko import SSHClient | |
except ModuleNotFoundError: | |
from subprocess import run | |
import sys |
type ~/.ssh/id_rsa.pub | ssh USER@HOST "mkdir -p ~/.ssh && LANG=C sed 's/[\d128-\d255]//g' >> ~/.ssh/authorized_keys && chmod 0600 ~/.ssh/authorized_keys" |
[includeIf "gitdir:~/Projects/work/"] | |
path = .gitconfig_job | |
[includeIf "gitdir:~/Projects/personal/"] | |
path = .gitconfig_personal | |
[pull] | |
rebase = false | |
[filter "lfs"] | |
clean = git-lfs clean -- %f | |
smudge = git-lfs smudge -- %f |
# To use geoip | |
sudo apt install geoip-database libgeoip-dev | |
py_ver=`python -c "from sys import version_info as vi; print(f'{vi[0]}.{vi[1]}')"` | |
sudo apt install python${py_ver}-venv | |
pip install pipx | |
pipx install deluge | |
pipx inject deluge libtorrent GeoIP |
from pathlib import Path | |
import logging | |
import sys | |
def set_logger(error_file: Path, info_file: Path): | |
error_file = Path(error_file).expanduser().resolve() | |
error_file.parent.mkdir(exist_ok=True, parents=True) | |
info_file = Path(info_file).expanduser().resolve() | |
info_file.parent.mkdir(exist_ok=True, parents=True) |
The tutorial Use OpenCL in Android camera preview based CV application show us how we can use the Transparent API to dramatically increase the performance of some expensive operations.
The first step in order to be able to execute the tutorial example is to re-compile opencv with the correct flags:
# Export your NDK, it will be looked for OpenCV to compile your project. In my case
export ANDROID_NDK=~/graffter/libs/android-ndk-r10d/
# Download the necessary code
#!/usr/bin/env python3 | |
from argparse import ArgumentParser | |
from functools import partial | |
from shutil import copy | |
from subprocess import Popen, PIPE | |
from shlex import split | |
import os | |
import re | |
import atexit |
#!/usr/bin/env python3 | |
from pathlib import Path | |
import os | |
import sys | |
from subprocess import Popen, PIPE, getoutput | |
from shlex import split | |
from contextlib import redirect_stdout | |
import argparse |