semvec/pypi-packages huggingface dataset:
fluffysnips 0.0.3
Various useful CLI tools
License: MIT
Requires Python: >=3.7

# Fluffy Snips

CLI tools that I find useful

## Installation

```bash
pip install fluffysnips
```

## Commands

### mvscreenshot

Move your most recent screenshot to a destination

```bash
Usage: mvscreenshot [OPTIONS] DESTINATION

Arguments:
  DESTINATION  [required]

Options:
  -m      Print markdown to use image  [default: False]
  --help  Show this message and exit.
```

Example
```bash
$ mvscreenshot pictures/example_1
Screenshot from 18 hours ago
Move to: /home/user/current/directory/pictures/example_1.png
Confirm [Y/n]: y
```

### tablefix

Reformat your markdown tables so each column is aligned to the largest cell


#### Usage

```
Usage: tablefix [OPTIONS] TARGET

Arguments:
  TARGET  [required]

Options:
  -i, --inline     Change the file  [default: False]
  -r, --recursive  If targeting a directory, format all markdown files in the
                   directory  [default: False]

  --help           Show this message and exit.
```

#### Example

Before:

```markdown
### Diff

| Flag | Description |
| ---- | ----------- |
| -y   | Side by side |
| -r   | Recursive (directory) |
```

After:
```markdown
### Diff

| Flag | Description           |
| ---- | --------------------- |
| -y   | Side by side          |
| -r   | Recursive (directory) |
```
simplega 1.0.2
A simple implementation of Genetic Algorithm
License: MIT

# simplega

```simplega``` is a simple python implementation of genetic algorithm and it is available through PyPI.

## Install
```shell
python3 -m pip install simplega
```

## Usage

Import the package
```python
from simplega import Chromosome, Population, GA, GAHelper
# or
from simplega import *
```

Create a fitness function that suits your problem
```python
def maximize(chromosome):
    return sum( [ ord(gene) for gene in chromosome.dna ] )
```

Create a new instance of GA specifying the fitness function to be used
```python
ga = GA(maximize)
```

Perform the steps of the genetic algorithm and retrieve the fittest chromosome
```python
ga.run()
print(ga.get_fittest())
```

All the script - really simple:
```python
from simplega import *

def maximize(chromosome):
    return sum( [ ord(gene) for gene in chromosome.dna ] )
    
ga = GA(maximize)
ga.run()
print(ga.get_fittest())
```

### Advanced usage

You can customize your instance of GA, replacing any or all of its default values
```python
ga = GA(fitness_function, 
  genes =  [ chr(n) for n in range(65,91) ], 
  chromosome_size =  10, 
  population_size =  100, 
  generations =  100, 
  crossover_points =  1, 
  elitism_rate =  0.05, 
  crossover_rate =  0.85, 
  mutation_rate =  0.01, 
  )
```

You can print the fittest chromosome of each generation with ```ga.run(True)```

## Contributing

Please submit bugfixes, enhancements, unit tests, usecases and examples with a pull request.