semvec/pypi-packages huggingface dataset:
psydapt 0.1.3.0
Bindings for psydapt (https://github.com/aforren1/psydapt)

Python bindings to https://github.com/aforren1/psydapt.

To install, either install from PyPI (`pip install psydapt`), or find the latest wheels under "Artifacts" here: https://github.com/aforren1/psydapt-py/actions. Windows users _may_ need the Microsoft Visual C++ runtime DLLs. One easy way to acquire those is via `pip install msvc-runtime`.

For now, see the C++ documentation for details: https://aforren1.github.io/psydapt/index.html

See the demos/ folder for examples.

```python
from psydapt import Scale
import psydapt.questplus as qp
from psydapt.staircase import Staircase
from psydapt.questplus import Weibull

x = Staircase(
    start_val=0.5,
    n_reversals=3,
    step_sizes=[0.01, 0.001],
    n_trials=20,
    n_up=4,
    n_down=3,
    apply_initial_rule=True,
    stim_scale=Scale.Linear,
    min_val=0
)

intensities = [-3.5, -3.25, -3, -2.75, -2.5,
               -2.25, -2, -1.75, -1.5, -1.25,
               -1, -0.75, -0.5]
y = Weibull(
    stim_scale=Scale.Log10,
    intensity=intensities,
    threshold=intensities,
    slope=[0.5, 4.125, 7.75, 11.375, 15],
    lower_asymptote=[0.01, 0.1325, 0.255, 0.3775, 0.5],
    lapse_rate=[0.01],
    stim_selection_method=qp.StimSelectionMethod.MinEntropy, # only MinEntropy for now
    param_estimation_method=qp.ParamEstimationMethod.Mean, # currently unused
    n=5, # currently unused
    max_consecutive_reps=2, # currently unused
    random_seed=1 # currently unused
)


```
mcvariable 0.1.0
Monte Carlo(random) Variable Object
Requires Python: >=3.6

# MonteCarlo Variable object


This python object is a Monte Carlo variable. 

- It is initialized with a central value, uncertainty and (optionnaly)
distribution law
- It stores a value according to this probability distirbution
- The value is returned when converted to `float` or `int` 
- The MC value is renewed only when calling `mcvariable.refresh()` 
- The module also includes a generator function to geneate multiple 
outcome of the random variable.

## `MCVariable` usage:

The object is initialized with 
```python
MCVariable(parameters: Sequence[Number], 
           law: Callable[..., Number],
           keep_positive: bool = True, 
           non_zero: bool = True,
		   replace_zero_with: float = 1e-20)
```

With the parameters: 
- `parameters`: parameters of the probability law.  
                As a tuple or list of numbers/
- `law` : Distribution law of the random variable  
          As a callable taking `*parameters` as arguments  
		  and returning a number/
- `keep_positive` (`bool`) = True : keep the value >=0
- `non_zero` (`bool`) = True    : prevent the value to be exactly 0.0000
- `replace_zero_with` (`float`) = 1e-20 : if the previous parameters is True,  
                                         replace all 0 by this value.


To be used, it is recommended to convert explicitely the variable 
as `int` or `float`:

```python
mcv = mcvariable.MCVariable((0., 1.))
print(f"{int(mcv)}")
```

## Default probability laws

The module includes two probability law by default:

- `mcvariable.law_gaussian` which takes two parameters: `(`mean`, `stddev`)`
- `mcvariable.law_flat` whic takes to parameters: `(`central`, `delta`)`
 (and retruns a value within the (central - delta, central + delta) range.

## Generator

To obtain a series of realization of the random variable, 
use the `mcvariable.MCGenerator` function that returns a generator.

```python

mcvariable.MCGenerator(mcv: MCVariable,
                       nmax: Number = math.inf,
					   variable_type: type = float)
```

The parameters are :
- `mcv` the MCVariable instance to use to generate the values
- `nmax` number of elements to return (by defaultl infinite)
- `variable_type`: the type of value to return (`float` by default, 
  can be changed to `int`).
  
## Testing

The module comes with a test script `test_mcvariable.py`. 

# Authors

* **Greg Henning** - ghenning&#8203;*.at.*&#8203;iphc&#x2024;cnrs&#x2024;fr


# License

This project is licensed under the CeCILL FREE SOFTWARE LICENSE AGREEMENT.

See [LICENSE](LICENSE) for more.
gemlog-from-rss 0.1.0
A package that allows for converting RSS feeds into Gemlogs (Gemini blogs).
Requires Python: >=3.8
Keywords: gemini gemlog rss converter gemini-protocol xml

# Gemlog-from-RSS
A simple RSS to Gemlog (Gemini log) converter. 

The original version is developed for [SPIP](https://www.spip.net/en_rubrique25.html), but I am going to also work on a
version for WordPress. 

## Usage (SPIP)
A working example for the SPIP version of this library can be ran
using the [example.py](example.py) class. It also allows for a quick preview of the code without having to go into
[gemlog_from_rss/examples.py](gemlog_from_rss/examples.py).

### (Main) file structure - minimum working code

To run this code the following structure is required:
```python
from gemlog_from_rss.spip import MainPage, Page
import xml.etree.ElementTree as ET
import shutil

from pathlib import Path
Path("resources").mkdir(parents=False, exist_ok=True)
main_page = MainPage(feed="https://url.to.feed")
Path(main_page.root).mkdir(parents=True, exist_ok=True)

tree = ET.parse("resources/all_posts.xml")
root = tree.getroot()
main_page.root = root

# Adding those pages is optional!
page = Page()
page.download_html("http://url.to.html.resource/file.html")
page.fetch_content()

page_2 = Page()
page_2.download_html("http://url.to.html.resource/file.html")
page_2.fetch_content()

main_page.add_page(page)
main_page.add_page(page_2)
# alternatively:
main_page.add_pages([page, page_2])

main_page.add_posts()

main_page.create_files()
with open(f"{main_page.root_dir}/index.gmi", "w") as f:
    f.write(main_page.make_main_page())

    # Remove temporary resources directory
try:
    shutil.rmtree('resources')
except OSError as e:
    print("Error: %s : %s" % ('resources', e.strerror))
```

### Running the server
To run the Gemini server, please use Gemini server software. 
This package doesn't come with a Gemini server, but I recommend [agate](https://github.com/mbrubeck/agate). 
It is super easy to install and run, and you can make this library work with it by outputting the articles and index.gmi
to a directory used by agate. 

Please make sure that the files outputted by *gemlog_from_rss* are either located in the root directory of your Gemini 
server or that they are linked to from your main Gemini page.

## Contributing and further development

This library **will** be developed further. If you want to contribute to development, please fork this repository
and start a pull request when you are ready to submit.