semvec/pypi-packages huggingface dataset:
cepy 1.0.0
Implementation of the connectome embedding workflow.
Requires Python: >=3.5

# cepy

Implementation of the connectome embedding (CE) framework.

Embedding of brain graph or connectome embedding (CE) involves finding a compact vectorized 
representation of nodes that captures their higher-order topological attributes. CE are 
obtained using the node2vec algorithm fitted on random walk on a brain graph. The current
 framework includes a novel approach to align separately learned embeddings to the same 
 latent space. Cepy is tested on Python 3.6, 3.7 and 3.8.

- **Documentation:** https://cepy.readthedocs.io/en/latest/
 
## Installation

`pip install cepy`

## Usage
```python
import cepy as ce
import numpy as np

# Load an adjacency matrix (structural connectivity matrix)
sc_group = ce.get_example('sc_group_matrix')

# Initiate and fit the connectome embedding model
ce_group = ce.CE(permutations = 1, seed=1)  
ce_group.fit(sc_group)

# Extract the cosine similarity matrix among all pairwise nodes
cosine_sim = ce_group.similarity()

# Save and load the model
ce_group.save_model('group_ce.json') 
ce_loaded = ce.load_model('group_ce.json') # load it

# Load two existing CE models  
ce_subject1 = ce.get_example('ce_subject1')
ce_subject2 = ce.get_example('ce_subject2')

# Align the two to the space of the [ce_group]:
ce_subject1_aligned = ce.align(ce_group, ce_subject1)
ce_subject2_aligned = ce.align(ce_group, ce_subject2)

# Extract the node vectorized representations (normalized) for subsequent use - prediction, for example 
w_sbject1 = ce_subject1_aligned.weights.get_w_mean(norm = True)
w_sbject2 = ce_subject2_aligned.weights.get_w_mean(norm = True)
 

```

A set of example interactive Jupyter notebooks are also available [here](https://github.com/GidLev/cepy/tree/master/examples).

### Citing
If you find *cepy* useful for your research, please consider citing the following paper:
    
    Levakov, G., Faskowitz, J., Avidan, G. & Sporns, O. (2021). Mapping structure to function
     and behavior with individual-level connectome embedding. bioRxiv. doi: https://doi.org/10.1101/2021.01.13.426513 

### Contributing
Cepy is an open-source software project, and we welcome contributions from anyone. 
We suggest [raising](https://github.com/GidLev/cepy/issues) an issue prior to 
working on a new feature. 

### Reference
* The node2vec implementation is modeified from the [node2vec](https://github.com/eliorc/node2vec) package by Elior Cohen and the [connectome_embedding](https://github.com/gidonro/Connectome-embeddings) code by Gideon Rosenthal.
* Rosenthal, G., Váša, F., Griffa, A., Hagmann, P., Amico, E., Goñi, J., ... & Sporns, O. (2018). Mapping higher-order relations between brain structure and function with embedded vector representations of connectomes. Nature communications, 9(1), 1-12.
;
nonebot-plugin-bangumi-search 1.0.1
a nonebot2 plugin to help you search anime on bgm.tv and return some information to you
Requires Python: >=3.8.10

# bangumi-search

_:tada::tada::tada:助力你成为二次元婆罗门！:tada::tada::tada:_

## 简介

本插件可以帮你搜索 [bangumi](https://bgm.tv/)上的条目，并且根据你选择的搜索结果给你发送该条目的侧边简介栏和收藏盒。

## 特色功能

bangumi-search是一款以漫研为目的开发的插件。

- 使用[playwright](https://github.com/microsoft/playwright)作为无头浏览器，支持异步，效率更高。
- 使用re库对网页内容进行正则搜索，全面爬取条目链接。
- 方便懒得去打开bangumi网站的人查询番剧的监督、制作公司、放送时间等。

## 安装

- 推荐使用脚手架安装

```
pip install nonebot-plugin-bangumi-search
```

## 功能展示

- 使用 `/bgm` 指令触发机器人。
- 发送搜索内容和搜索类型，机器人会返回搜索结果。
- 再发送想浏览的搜索结果的数字顺序，机器人会返回该条目的侧边简介栏和收藏盒等信息。

## 一些问题

- 虽然做了debug措施，但是搜索结果为空的时候还是可能会继续进行流程。
- bangumi网页的访问不稳定，虽然在代码中做了debug措施 `await page.reload()` ，但还是有概率经常访问不到。
- 没有可以手动或者自动终止流程的命令。
- 图片太长，容易刷屏。
- 不能对搜索结果进行翻页。

## 特别感谢

因为本人是第一次上手写nonebot插件，以及涉及OOP、playwright、异步等等内容的项目，因此找了不少大佬们做好的插件，从中学到了很多。

- [NoneBot2](https://github.com/nonebot/nonebot2)：本插件实装的开发框架。
- [go-cqhttp](https://github.com/Mrs4s/go-cqhttp)：稳定完善的 CQHTTP 实现。
- [HarukaBot](https://github.com/SK-415/HarukaBot)：网页截图的灵感来源。
- [miragetank](https://github.com/RafuiiChan/nonebot_plugin_miragetank)：学习了关于bot事件响应器的部分。

## 支持

大家喜欢的话可以给这个项目点个star

有bug、意见和建议都欢迎提交 [Issues](https://github.com/Ankhyty/nonebot-plugin-bangumi-search/issues) 

## 许可证
本项目使用 [MIT](https://choosealicense.com/licenses/mit/) 作为开源许可证。