semvec/pypi-packages huggingface dataset:
SSSsnake 0.0.24
IPythonDisplayTurtles edited for my school's python courses
Requires Python: >=3.6

# SSSsnake
IPythonDisplayTurtle with addded functionality for our schools python classes.

How to install from a terminal/command prompt:

	pip install SSSsnake
	
To install from a jupyter notebook cell:

	!pip install SSSsnake

How to use:
```python
# Code adapted from one of the exercises made for my school

from SSSsnake import SSSsnake 
### VVV this segment can be hidden from students!
snake = SSSsnake(homeX = 0, homeY = 7) 
def houseAtXY(x,y):
    return [[x-1,y,3],[x+1,y,1],[x+2,y,4],[x+2,y+1,0],[x+2,y+2,0],[x+2,y+3,5],[x+1,y+3,1],[x,y+3,1],[x-1,y+3,2],[x-1,y+2,0],[x-1,y+1,0]]
walls = [];doors = [];walls.extend(houseAtXY(2,0));doors.append([2,0,1]);walls.extend(houseAtXY(7,1));doors.append([7,1,1]);walls.extend(houseAtXY(12,2));doors.append([12,2,1])
snake.drawLevel(xSize=16, ySize=8, gridSize=25, walls=walls, doors=doors)
snake.speed(10)

snake.pendown() # the snake can do more than you think! It can Draw!

# --------------------- vv Work zone vv --------------------- 

def smartmove(amount):
    for i in range(amount):
        snake.forward()

# TODO: define a function, Hint: you can use the smart move from before here as well!
# Also this snake knows how to turn left :)
### you would leave the function empty for the students to fill!
def drawncolumn(height):
    snake.left()
    smartmove(height)
    snake.right()
    snake.forward()
    snake.right()
    smartmove(height)
    snake.left()
    
    
# TODO: draw 3 collumns of length 3, 2, and 1, under the houses! 
    
smartmove(2)
drawncolumn(3)  
smartmove(4)
drawncolumn(2)  
smartmove(4)
drawncolumn(1) 
smartmove(2)



# --------------------- ^^ Work zone ^^ ---------------------

snake.display()
```

![Example Turtle](Example.png)

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/atahan-git/SSSsnake/master)
hskl 0.0.2
Hyperspectral image analysis with scikit-learn.
Requires Python: >=3.6

# HSKL: Hyperspectral-scikit-learn

Hyperspectral image analysis using *scikit-learn*

## Installation

The package can be installed from `pip`:

`pip install hskl`

## Usage

Training a pixel-level classifier for segmentation:

```python
import os

from hskl.demo import dl_hyrank, load_hyrank
import hskl.classification as classification
import hskl.utils as utils

# Download, unpack, and load HyRANK dataset from current directory.
path = os.getcwd()
if not os.path.exists("HyRANK_satellite"):
    dl_hyrank(path)    
images, labels, _ = load_hyrank(path)

# Dimensional reduction using PCA, retain 99.9% image variance
pca = utils.pca_fit(images[0])
train, _ = utils.pca_apply(images[0], pca, 0.999)
test, _ = utils.pca_apply(images[1], pca, 0.999)
label = labels[0]
test_mask = labels[1]>0

# Train a classifier and predict test image labels
cl = classification.HyperspectralClassifier(
         method_name="LinearDiscriminantAnalysis")
cl.fit(train, label)
prediction = cl.predict(test)

# Visualization of training data, test prediction, and test ground truth
fig_objs_train = utils.overlay(train,label)
utils.save_overlay(fig_objs_train, "hyrank_train.png")

fig_objs_predict = utils.overlay(test,prediction*test_mask)
utils.save_overlay(fig_objs_predict, "hyrank_predict.png")

fig_objs_test = utils.overlay(test,labels[1])
utils.save_overlay(fig_objs_test, "hyrank_test.png")
```
Output:

Training image and ground truth labels:

![Training](examples/hyrank_train.png)

Test image and ground truth labels:

![Testing Ground Truth](examples/hyrank_test.png)

Test image and predicted labels:

![Testing Prediction](examples/hyrank_predict.png)

Notes:
1. Shape of `train` and `test` arrays are (DimX, DimY, SpectralChannels).
2. Shape of `label` and `prediction` arrays are (DimX, DimY).
3. Labeling convention for classifiers:
         (a) Datatype: `label.dtype == np.uint8`.
         (b) Labeled classes start from integer 1. Pixels with `label == 0` are ignored (masked out).
5. Dimension(s) of `train` and `label` must be consistent: `train.shape[0] == label.shape[0]` and `train.shape[1] == label.shape[1]`.
6. Inputs: `train`, `test`, and `label` can also be lists of `np.ndarray`s with each element satisfying the preceeding requirements.

## Planned Features

In the near-term:
* Test scripts and data
* Grid search cross validation

In the long-term, support for:
* Pipelines
* Patch-based featurizer
* Dask-enabled parallelism
* Deep learning (PyTorch) models

## References

Karantzalos, Konstantinos, Karakizi, Christina, Kandylakis, Zacharias, & Antoniou, Georgia. (2018). HyRANK Hyperspectral Satellite Dataset I (Version v001). Zenodo. http://doi.org/10.5281/zenodo.1222202

Some functionalities in this package are provided by Spectral Python (SPy): https://github.com/spectralpython/spectral