View xiguashipin.py
import pytesseract
import time
from PIL import Image
import os
import webbrowser
path = "/home/find/d/filerecv/xigua.png"
import subprocess
def get_screen_shot(path):
# 这里获取截图,目前的方法太慢了
View x265-arm patch
diff -urN a/source/CMakeLists.txt b/source/CMakeLists.txt
--- a/source/CMakeLists.txt 2015-02-10 14:15:13.000000000 -0700
+++ b/source/CMakeLists.txt 2015-02-12 06:25:01.334927114 -0700
@@ -46,10 +46,18 @@
set(X64 1)
add_definitions(-DX86_64=1)
endif()
+elseif(${SYSPROC} MATCHES "armv5.*")
+ message(STATUS "Detected ARMV5 system processor")
+ set(ARMV5 1)
View vectoradd.cu
__global__ void add_vectors(
const int* a,
const int* b,
int *c,
const int n)
{
const int idx = blockIdx.x * blockDim.x + threadIdx.x;
if (idx >= n) return;
View matrixMul.cu
#include <stdio.h>
#include <assert.h>
#include <cuda_runtime.h>
template <int BLOCK_SIZE> __global__ void
matrixMulCUDA(float *C, float *A, float *B, int wA, int wB)
{
// Block index
int bx = blockIdx.x;
int by = blockIdx.y;
// Thread index
View update_hosts.sh
```
ipv6=$1
work_path="/home/find/ddown"
rm $work_path/hosts*
cp /etc/hosts $work_path/._backhosts
if [ $ipv6 == '4' ];then
#wget https://coding.net/u/onekeyhosts/p/text/git/raw/master/hosts -O hosts
wget https://coding.net/u/scaffrey/p/hosts/git/raw/master/hosts-files/hosts -O $work_path/hosts
# wget https://raw.githubusercontent.com/sy618/hosts/master/FQ -O hosts
else
View cloudflare_email_decoder_python
```python
def decode(encode_email):
k = int(encode_email[:2], 16)
ans = ''
for i in range(2, len(encode_email)-1, 2):
a = int(encode_email[i:i+2], 16)
a ^= k
ans += chr(a)
print(ans)
View gist:eddd5bf354e44d0eb7df0c838535ba4a
package main
import (
"bytes"
"strconv"
)
func cf(a string) (s string) {
var e bytes.Buffer
r, _ := strconv.ParseInt(a[0:2], 16, 0)
View 匹配ls -l结果中的文件或文件夹名
linux下ll命令部分结果,以文件名有引号的特殊举例:
```
drwxr-xr-x 2 find find 4096 2月 15 13:10 "hello wo"
-rw-r--r-- 1 find find 0 2月 15 13:10 "list无名 fd"
```
匹配的正则表达式
```
[drwx-]{10}\s+?\d{1,2}\s+?\w+?\s+?\w+?\s+?\d+?\s+?[\d\w\u4e00-\u9fa5]+?\s+?\d+?\s+?[\d:]+?\s+?(.*)
```
同样对于ftp中的dir命令结果也是如此
View git ignore文件 android studio
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
View python判断字符串里的数字等
s为字符串
s.isalnum() 所有字符都是数字或者字母
s.isalpha() 所有字符都是字母
s.isdigit() 所有字符都是数字
s.islower() 所有字符都是小写