semvec/pypi-packages huggingface dataset:
autodiscjax 0.4.1
python library built on top of jax to facilitate automated exploration and simulation of computational models of biological processes
License: MIT

# AutoDiscJax

*Autodiscjax* is a python library built on top of [jax](https://jax.readthedocs.io/en/latest/index.html) and [equinox](https://github.com/patrick-kidger/equinox) 
to facilitate automated exploration and simulation of computational models of 
biological processes (such as gene, proteins or metabolites networks).
It provides several already-implemented modules and pipelines to organize experimentation on these biological network pathways using
curiosity-driven learning and exploration algorithms.

## Installation
```
pip install autodiscjax
```

## Why use AutoDiscJax?
AutoDiscJax follows two main design principles:
1) Everything is a *module*, where a module is simply a parametrized function that takes inputs and returns outputs (and log_data). All autodiscjax modules `adx.Module` are implemented as equinox modules `eqx.Module`, which essentially allows to represent the function as a callable PyTree (and hence to be compatible with jax transformations) while keeping an intuitive API for model building (python class with a \__call\__ method). The only add-on with respect to equinox is that when instantiating a `adx.Module`, the user must specify the module's outputs PyTree structure, shape and dtype.
2) An experiment *pipeline* defines (i) how modules interact sequentially and exchange information, and (ii) what information should be collected and saved in the experiment *history*.


AutoDiscJax provides a handful of already-implement modules and pipelines to
1) Simulate biological networks while intervening on them according to our needs
2) Automatically organize experimentation in those systems, by implementing a variety of exploration approaches such as random, optimization-driven and curiosity-driven search
3) Analyze the discoveries of the exploration method, for instance by testing their robustness to various perturbations

Finally, AutoDiscJax takes advantage of JAX mains features (just-in-time compilation, automatic vectorization and automatic differentation) which are especially advantageous for parallel experimentation and computational speedups, as well as gradient-based optimization.

## License
The project is licensed under the MIT license.

## Acknowledgements
AutoDiscJax is inspired by:
- the [auto_disc](https://github.com/flowersteam/adtool/tree/prod/libs/auto_disc) library purpose and structure
  (by the FLOWERS team) 
- the [equinox](https://github.com/patrick-kidger/equinox) library module definition (by Patrick Kidger)

## See Also
Library to: [sbmltoodejax]()
ShabiiNetwork 0.0.1
Graphs and Dijkstra's algorithm by Charawi Detphumi
License: MIT
Keywords: Graph,Dijkstra,Charawi,Detphumi

ShabiiNetwork
=============

ShabiiNetwork is a Python library for dealing with Graphs and Dijkstra’s
algorithm.

Installation
------------

Use the package manager `pip <https://pip.pypa.io/en/stable/>`__ to
install ShabiiNetwork.

.. code:: bash

   pip install ShabiiNetwork

Usage
-----

.. code:: python

   from ShabiiNetwork import Digraph,Dijkstra

   graph2 = Digraph()

       #To check add_edge and add_edges functions
       graph2.add_edges([('A','B',0.3),('A','C',0.5),
                        ('B','A',0.3),('B','C',0.9),
                        ('C','A',0.5),('C','D',1.2),
                        ('D','C',1.2)])
       print(graph2.Edict)

       graph2.add_edges([('A','D',45),('A','E',23)])
       print(graph2.Edict)

       #To check remove_edge and remove_edges functions
       graph2.remove_edges([('A','D'),('A','E')])
       print(graph2.Edict)

       #To check add_vertex and add_vertices functions
       graph2.add_vertices(['I','J','K'])
       print(graph2.Edict)

       #To check remove_vertex and remove_vertices functions
       graph2.remove_vertices(['I','J','K'])
       print(graph2.Edict)

       #To check Dijkstra class and its functions
       dijkstra = Dijkstra(graph2, start_vertex='A')
       dijkstra.dijkstra()
       dijkstra.print_result()

       """
       Output:

       {'A': {'B': 0.3, 'C': 0.5}, 'B': {'A': 0.3, 'C': 0.9}, 'C': {'A': 0.5, 'D': 1.2}, 'D': {'C': 1.2}}
       {'A': {'B': 0.3, 'C': 0.5, 'D': 45, 'E': 23}, 'B': {'A': 0.3, 'C': 0.9}, 'C': {'A': 0.5, 'D': 1.2}, 'D': {'C': 1.2}}
       {'A': {'B': 0.3, 'C': 0.5}, 'B': {'A': 0.3, 'C': 0.9}, 'C': {'A': 0.5, 'D': 1.2}, 'D': {'C': 1.2}}
       {'A': {'B': 0.3, 'C': 0.5}, 'B': {'A': 0.3, 'C': 0.9}, 'C': {'A': 0.5, 'D': 1.2}, 'D': {'C': 1.2}, 'I': {}, 'J': {}, 'K': {}}
       {'A': {'B': 0.3, 'C': 0.5}, 'B': {'A': 0.3, 'C': 0.9}, 'C': {'A': 0.5, 'D': 1.2}, 'D': {'C': 1.2}}
       A -> A: ['A'] distance: 0
       A -> B: ['A', 'B'] distance: 0.3
       A -> C: ['A', 'C'] distance: 0.5
       A -> D: ['A', 'C', 'D'] distance: 1.7
       """

Contributing
------------

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

Please make sure to update tests as appropriate.

Author
------

Charawi Detphumi

License
-------

`MIT <https://choosealicense.com/licenses/mit/>`__
text-equivalences 0.1.0
Rule based language modeling
License: MIT
Keywords: FST,Transducers,Regular Expression,Text normalization,graph,language model

# text-equivalences

## Introduction

Introduces a formalism to express easily some sort of regular expressions that caries semantic information.
This could be used to align two versions of a text, or enumerate variations of one.

Take the following examples _First of January of twenty twenty one_, _Jan 1st 2021_, _01/01/2021_ as humans we understand that these are equivalent because we understand the concept behind it. In my experience I saw this problem bein tackled by doing some text replacements before comparing, this helps but it is difficult to track what happened. What if we could compare the different versions directly.


## Language support

The language is defined so that it can give another interpretation to python code.

### Literal input
Text can be quoted with single or double quotes, e.g. `'single'`, `"double"`, strings can be made case insensitive by adding the suffix `i`, e.g. `'he'i will match any of 'He', 'he', 'HE' or 'hE'.

### Equivalence operator `|` 

The `|` denotes equivalence between two inputs

```
      'first' | '1st'
```

If one of the terms in an alternative chain is matched, for two inputs, the inputs are considered equivalent.

### Alternative operator `/`

The `/` makes it possible to distinguish between two inputs

```
    'one' / 'two' / 'three' | '3'
```

### Sequence

Sequences are defined using the `+` operator.
e.g.
```
  'First' + 'of' + 'January'
```

### Quantifiers

Quantifiers are prefix operators that makes it possible to match variable number of occurrencies of the operand
 - `+`: at least one
 - `-`: at most one

This example makes it possible to accept both _millimetre_ and _millimetres_
```
   'millimetre' + -'s'
```

Concatenation with optional terms can be achieved by simply using `-` operator

```
   'milimetre' -'s'
```

Zero or more repetitions can be achieved by with `-+` prefix operator.

### Rule asignment

Grammar can be stored in local variables, e.g.
```
  first = 'first' | '1st'
```


# Ideas for future versions

### Capture groups (python 3.8)

The output a matched pattern can be assigned to different capture groups

```
(day:=Day + 'of'  -'the' (month:=Month)) | ((month:=Month) + (day:=Day))
```
In the above example two date formats are compared, given that the captured groups matches the outputs will be considered equivalent.

### Capture reference

Capture references allows to check the content at a given position against the content on the input in another position

```
size=Number -!unit 'by' Number (unit:=Unit);
```

### Mapping

Alternatively, the input can be mapped to in a more sophisticated ways by means of mapping rules

```
Digit = (('one' >> '1') / ('two' >> '2') / ('three' >> '3') / ('four' >> '4')
Size =   ((w:=Digit) ('by' | 'x') (h:=Digit)) >> (w ' x ' h)
```

This will translate `one by two` to `1 x 2`.