Monero XMR mining via termux ;ubuntu
- install ubuntu in termux command; (ubuntu is optional)
pkg install update && upgrade
apt install git
apt install wget
apt install proot
Monero XMR mining via termux ;ubuntu
pkg install update && upgrade
apt install git
apt install wget
apt install proot
#coding=utf8 | |
import itchat | |
# tuling plugin can be get here: | |
# https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling | |
from tuling import get_response | |
@itchat.msg_register('Text') | |
def text_reply(msg): | |
if u'作者' in msg['Text'] or u'主人' in msg['Text']: | |
return u'你可以在这里了解他:https://github.com/littlecodersh' |
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
# coding: utf8 | |
''' | |
对于图片相似度比较有很多方法,我们这以RGB直方图为例。 | |
我们以一种规则,使得每个图片生成一组描述的特征向量。 | |
opencv的直方图比较函数我们可以巧妙的利用,其有若干比较规则,但只支持直方图的数据结构,我们可以将特征向量拟合成直方图的数据结构,然后使用其的相似度比较函数。 | |
具体的数学计算方法有兴趣的可以看opencv的官方教程,这里我们期望生成百分比形式的相似度参数,所以使用CV_COMP_CORREL | |
以下是代码,以python编写 | |
''' | |
import cv2.cv as cv |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!