semvec/pypi-packages huggingface dataset:
wake 0.11.0
�� Making Wikipedia and Wikidata Processing Easy, Like Eating a Piece of Cake
Keywords: python,wiki,wikidata,wikipedia

# wake
�� Making Wikipedia and Wikidata Processing Easy, Like Eating a Piece of Cake

# installation
`pip3 install wake` or `pipenv install wake`

# methods
### get_wikidata_entities
Stream Wikidata Entities
```python
from wake import get_wikidata_entities

for entity in get_wikidata_entities():
    print(entity)
```

You can also filter entities by their type.  For example, to get all entities that are humans (Q5) run:
```python
from wake import get_wikidata_entities

for human in get_wikidata_entities(instance_of="Q5"):
    print(human)
```

### clean_title
takes in a title of a Wikipedia page as a string and escapes and cleans it of weird characters, so it can be put in a normal database

### download_if_necessary
dowloads a url to the system's temp directory if a file by its name isn't already there

### get_most_recent_available_dump
figures out what Wikipedia dump has certain subdumps complete

### tokenize
pass in the page text from a dump and get a list of tokens in return

### get_links
get links in an article(i.e. what's between '[[' and ']]')

# test
```
python3 -m unittest wake.test
```

# license
CC0-1.0 / Public Domain

# contact
Post an issue! Thank you!
hehey 1.0.0
hehey是一个python web 站点工具框架

# hehey web 框架

## 介绍
- hehey是一个python web 站点工具框架

## 依赖以及版本要求
- python >= 3.5


## 安装
- 直接下载:
```

```
- 命令安装：
```
pip install hehey
```
## 基础文件以目录
git2gitee 0.9.6
import github repo to gitee, then clone to local
Requires Python: >=3.6

# git2gitee

从github导入仓库到gitee
解决github下载速度慢的问题
由于码云不提供导入的api，只能JS逆向码云登陆，导入仓库


### 安装

```bash
pip install git2gitee
```

### 使用

```bash
# git2gitee -u {gitee_username} -k {gitee_password} github_repo_url
git2gitee -u mikele -k password https://github.com/toyourheart163/git2gitee
```


### 加密方法

>进入登陆页面时会加载一个encrypt开头的js文件

#### python 使用公钥加密的方法, 使用`pycryptodome`

```python
# git2gitee/util.py
from base64 import b64encode

from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_v1_5

def encrypt_pwd(password, public_key):
    rsa_key = RSA.import_key(public_key)
    encryptor = PKCS1_v1_5.new(rsa_key)
    cipher = b64encode(encryptor.encrypt(password.encode('utf-8')))
    return cipher.decode('utf-8')
```

### 解决csrf-token 的问题

```python
import re

result = re.search('<meta content="(.*?)" name="csrf-token"', response.text)
token = result.group(1)
```