semvec/pypi-packages huggingface dataset:
python-pySAP 0.0.5
PYthon Sparse data Analysis Package

Antoine Grigis <antoine.grigis@cea.fr>
Samuel Farrens <samuel.farrens@cea.fr>
Jean-Luc Starck <jl.stark@cea.fr>
Philippe Ciuciu <philippe.ciuciu@cea.fr>

Author-email: antoine.grigis@cea.fr
License: CeCILL-B
Description: pySAP
        
        pySAP is a Python package related to sparsity and its application inastronomical or mediacal data analysis.
        This package binds the 'sparse2d' C++ librarythat allows sparse decomposition, denoising and deconvolution.
        
Platform: Linux
Platform: OSX
Classifier: Development Status :: 1 - Planning
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Scientific/Engineering
Provides-Extra: gui
mediaman 0.0.1
MediaMan backs up arbitrary media files to arbitrary cloud services!

# MediaMan
MediaMan is a set of tools to manage the backing up of arbitrary media files
to various cloud services for long-term storage and occasional retrieval.

It places a heavy emphasis on confidentiality, simple storage and retrieval
(including bulk operations), heavy indexing, and user experience.


## Installation
TBD

## Try it out
TBD

## Usage
TBD

## License
TBD

## Personal Setup Guide
- https://cloud.google.com/storage/docs/reference/libraries#client-libraries-install-python
```
pip:
$ pip3 install google-api-python-client
$ pip3 install oauth2client

bash:
$ GOOGLE_APPLICATION_CREDENTIALS="/Users/matthewcotton/Repos/MyRepos/MediaMan/mediaman/drive/credentials/serviceaccount/xxx.json" p


python:
>>> from apiclient.discovery import build
>>> drive = build("drive", "v3")
>>> drive.files().list().execute()
{'files': [{'id': '...',
            'kind': 'drive#file',
            'mimeType': 'application/pdf',
            'name': 'Getting started'}],
 'incompleteSearch': False,
 'kind': 'drive#fileList'}

>>> file_metadata = {'name': 'test.txt'}
>>> media = googleapiclient.http.MediaFileUpload("test.txt")
>>> file_receipt = drive.files().create(body=file_metadata, media_body=media, fields="id").execute()
>>> file_receipt
{'id': '...'}

>>> drive.files().list().execute()
{'files': [{'id': '...',
            'kind': 'drive#file',
            'mimeType': 'text/plain',
            'name': 'test.txt'},
           {'id': '...',
            'kind': 'drive#file',
            'mimeType': 'application/pdf',
            'name': 'Getting started'}],
 'incompleteSearch': False,
 'kind': 'drive#fileList'}
```
gridikjstra 0.1
Python package wrapping scipy's dijkstra with a grid-based interface
Requires Python: >=3.6

# gridijkstra
Python package wrapping scipy's dijkstra with a grid-based interface

```python
>>> import gridijkstra
>>> import numpy as np
>>> costs = np.ones((50, 60))
>>> costs[10:15, :20] = 1e30  # np.inf also works, but is less convenient for plotting
>>> costs[20:25, 25:55] = 1e30
>>> costs[30:40, 30:40] = 1e30
>>> start = (2, 2)
>>> target = (48, 58)
>>> total_cost, path = gridijkstra.plan(costs, start, target, return_path=True)
>>> print(f'Full path length: {total_cost}')
'Full path length: 102.0'
```

Three use cases are shown below. See scripts/examples.ipynb for a notebook with examples

![](scripts/example1.svg)

![](scripts/example2.svg)

![](scripts/example3.svg)
ktg 0.0.9
send telegram message
Requires Python: >=3.5

# ktg
![python_version](https://img.shields.io/static/v1?label=Python&message=3.5%20|%203.6%20|%203.7&color=blue) [![PyPI downloads/month](https://img.shields.io/pypi/dm/ktg?logo=pypi&logoColor=white)](https://pypi.python.org/pypi/ktg)

## Description
send telegram message

## Install
~~~~bash
pip install ktg
# or
pip3 install ktg
~~~~
mdataio 0.1.4
scripts used for meidcal data manipulation

# mdataio  

## What it is
It is a software package that abstracts the representation of the raw CT patient data (e.g. dicom, mhd, niffty etc.), and provides  unified and clean approaches to  manipulate the image together with the corresponding segmentation mask, including data loading, saving and visualization.



## What it contains
- [Visualization](#visualization)
- [Data](#data)
- [Saver](#saver)
- [Common](#common)



## How to install
```shell
$ pip install mdataio
```





## Visualization
This module contains functions for interactive 2D/3D image visualization. It is useful for  1. overlaying mask onto image 2. comparing across a series of images 3. showing the difference of image pairs.

### keyboard shortcuts
```
.: next slice
,: last slice
esc: quit
```

```python
#to visualize prep study in /mnt/SSD_2/final_seg/leftheart_ct_ali_annotation2_cleaned_boundaries/0
#volshow* is to visualize volumes with shape NxHxW
from mdataio.visualization import volshow, volshowpair, volshowlist
img = np.load('0_img.npy')
seg = np.load('0_seg.npy')
volshow(img)
volshowpair(img, seg)
volshowlist([img, img])
```

![](./imgs/volshowpair.gif)


```
#imshow is to visualize 2d images with shape HxW (gray scale image) or shape HxWx3 (RGB image)
from mdataio.visualization import imshow
imshow(img[0,:,:])
```

```
#another 2 useful functions are overlay_image and diff_image, which reflect the 2 most common procedures in debugging:
1. overlaying mask on top of image
2. comparing the difference of two images

from mdataio.visualization import overlay_image, diff_image
img_overlay = overlay_image(img[0,:,:], seg[0,:,:]) # can display the seg as mask (default) or contour (method='contour')
img_diff = diff_image(img[0,:,:], img[20,:,:])
imshow(img_overlay)
imshow(img_diff)
imshowlist([img_overlay, img_diff], title_list=['overylay', 'difference']) 
#all 3 functions support landmarks 
```

![](./imgs/image_diff.png)


## Data
- Load raw image data, currently only supports dicom, niffty, mdh and save to dicoms so that it can be loaded into any dicom image viewer
```python
from mdataio.data import PatientDicom, PatientNifty, PatientMhd
#dicom
pfile = PatientDicom("parent folder path of your dicom images")
#niffty
pfile = PatientNifty("path of your .nii file")
#mdh
#note that the file ending in .mhd is only the ASCII header information.
#the file ended in .raw/.mha contains the actual voxel data and should be put together with the .mhd file
pfile = PatientMhd("path of your .mdh file")

img, spacing = pd.get_data()

pfile.save_as_dicom("path where you want to save the converted dicoms")

```



## Saver
A class that wrapps up the video saving functionality
```python
form ss.saver import VideoSaver
vs = VideoSaver([[img[i,:,:],img[i,:,:]] for i in range(img.shape[0])])
vs.to_video('/home/xin/tmp/test.mp4')
```


## Common