semvec/pypi-packages huggingface dataset:
petchou-pathfinder 0.0.4
Path finding library for your projects
Requires Python: >=3.9,<4.0

# pathfinding

## Table of content
- [table of content](#Table-of-content)
- [Installation](#Installation)
- [Note](#Note)
    - [Known issues](#Known-issues-)
- [Use](#Use)
    - [Create an instance](#Create-an-instance)
    - [Steps to find a path](#Steps-to-find-a-path)
    - [Display the path](#Display-the-path)

## Installation
You can install the package by running the following command :
```python3 -m pip install --upgrade PathFinder``` 

## Note 
**Please note** that the package is currently in **beta** version and may encounter **bugs** or **unexpected behaviours** for which **I am not responsible**.

#### Known issues : 
- No cartesian coordinates for grid display available (only alphabetical coordinates)
- Grid display is not centered and might not work in every terminal
- The `find_path` method is not optimized and might take a long time to find a path

## Use 

### Create an instance 
Simply import the `pathfinding` object from the package into your script and start use it.

```py
from pathfinding import PathFinder as pf

 # From Asynconf 2022 - https://asynconf.fr/
map = """
O___O_OO__OO__VO_O_O
__O___O_OOO_OO_____O
OO___O___OOO_OOOOO_O
__OO__X__OO_O___O__O
_OO___OO______O___OO
""".split("\n")

pathfinder = pf(
                        map,         # map to use (list or str)
                "X",                 # start point (str)
                "V",                 # end point (str)
                walkable="_",        # walkable tiles (str)
                non_walkable="O",    # non walkable tiles (str)
                debug_mode=False     # display processing informations (bool)
)
```

### Steps to find a path
1. Make a graph from the map
```py
graph = pathfinder.make_graph()
```
2. Get the first path found
```py
path = pathfinder.find_path()
```
3. Optimize the path
```py
optimized_path = pathfinder.optimize_path(path)
```
4. use the path
```py
print(pathfinder.get_path(alphanumeric=True))
print(pathfinder.get_path(alphanumeric=False))

##################################################
['G4', 'H4', 'I4', 'I5', 'J5', 'K5', 'L5', 'M5', 'N5', 'N4', 'O4', 'P4', 'P5', 'Q5', 'R5', 'R4', 'S4', 'S3', 'S2', 'R2', 'Q2', 'P2', 'O2', 'O1']
[(6, 3), (7, 3), (8, 3), (8, 4), (9, 4), (10, 4), (11, 4), (12, 4), (13, 4), (13, 3), (14, 3), (15, 3), (15, 4), (16, 4), (17, 4), (17, 3), (18, 3), (18, 2), (18, 1), (17, 1), (16, 1), (15, 1), (14, 1), (14, 0)]
```
### Display the path
```py
print(pathfinder.show_path(show_grid=True, animate=False))

##################################################
# displays the path on the map. If animate is True, the path will be displayed step by step and the screen will be cleared after each step
```
compcate 0.0.3
Identify and categorise corporate competitors
Keywords: corporate competitors,strategic groups



This package allows you to identify competitors based on co-mentions (this could be co-mentions in news articles, social media etc.)

## Examples of How to Calculate Co-Mention-Based Similarity and Categorise Firms

```sh

import compcate.comention as como 

comention_df = como.random_comention_df()
comention_simi_df = como.comention_similarity(comention_df)
comention_group_df = como.community_detection(comention_simi_df)
genevector-nceglia 0.0.1
Single Cell GeneVector Library
Requires Python: >=3.7

![alt text](https://github.com/nceglia/genevector/blob/main/logo.png?raw=true)
## Vector representations of gene co-expression in single cell RNAseq.

![alt text](https://github.com/nceglia/genevector/blob/main/framework.png?raw=true)

https://www.biorxiv.org/content/10.1101/2022.04.22.487554v1

### Install:

Prerequisite software:
 - Torch: https://pytorch.org/get-started/locally/ 
```
python3 -m venv gvenv
source gvenv/bin/activate
python3 pip install -r requirements.txt
python3 setup.py install
```

Software has been tested on Macbook (M1 Pro/M1/Intel)

Install time: < 20 min (dependent on what you have installed.).

### Example Tutorial (see "example")

1. PBMC workflow: Identification of interferon stimulated metagene and cell type annotation.
2. TICA workflow: Cell type assignment.
3. SPECTRUM workflow: Vector arithmetic for site specific metagenes.
4. FITNESS workflow: Identifying increasing metagenes in time series.

Data:
[H5ads and Pre-built Embeddings](https://drive.google.com/drive/folders/1ZRsdnlu9MSaRm4t_w_glD5XTqrY6CnIY?usp=sharing)

Launch `jupyter notebook` inside /example directory after installing GeneVector.

Runtime: ~2 min for data loading and ~8 min for training (Macbook M1 Pro)


### Basics

#### Loading scanpy dataset into GeneVector.
```
from genevector.data import GeneVectorDataset
from genevector.model import GeneVectorTrainer
from genevector.embedding import GeneEmbedding, CellEmbedding

import scanpy as sc

dataset = GeneVectorDataset(adata, device="cuda")
```

#### Training gene vectors.
```
cmps = GeneVector(dataset,
                  output_file="genes.vec",
                  emb_dimension=100,
                  initial_lr=0.1,
                  threshold=1e-6,
                  device="cuda")
cmps.train(200) # run for 200 iterations or loss delta below 1e-6.
```

#### Loading results.
```
gembed = GeneEmbedding("genes.vec", dataset, vector="average")
cembed = CellEmbedding(dataset, gembed)
```

#### Compute gene similarities.
```
gembed.compute_similarities("CD8A")
```

#### Batch Correct and Get Scanpy AnnData Object
```
cembed.batch_correct(column="sample")
adata = cembed.get_adata()
```

#### Get Gene Embedding and Find Metagenes
```
gdata = embed.get_adata()
metagenes = embed.get_metagenes(gdata)
```