semvec/pypi-packages huggingface dataset:
giovanni 0.0.2
Simulate the odds/time required to SR for a shiny
Requires Python: >=3.7

# giovanni

A CLI tool used to calculate the likelihood of a shiny Pokemon encounter for a
given number of resets, or simulate the distribution of required SRs for a given
generation of Pokemon.


### Encounter odds:

Compute the probability of encountering a shiny in Gen 4 with a single encounter:

```
$ python -m giovanni odds --gen 4 --verbose
[INFO] 2020-12-22 16:07:54 [giovanni.cli.odds] - Probability of shiny encounter after 1 soft reset: 0.012%
```

The probability of encountering a shiny in Gen 6 with 5000 SRs and a shiny charm equipped:

```
$ python -m giovanni odds --gen 6 --soft_resets 5000 --charm
[INFO] 2020-12-22 16:07:57 [giovanni.cli.odds] - Probability of shiny encounter after 5,000 soft resets: 91.301%
```


### Montecarlo simulation:

A simulation of Gen 6 soft resets required to encounter a shiny:

```
$ python -m giovanni simulate --gen 6 -n 5000
simulation: 100%|██████████████████████████████████████████████████████████████████| 5000/5000 [00:13<00:00, 365.02it/s]
[INFO] 2020-12-22 15:53:43 [giovanni.cli.simulate] - Montecarlo simulation results --
Average     3980.136
Std Dev     3983.669
Max        32989.000
Min            1.000
Name: Required encounters (gen=6, num_trials=5000, swarm_size=1), dtype: float64
```

To simulate, e.g., SS/HG soft resets required to encounter a shiny starter use
the `swarm_size` argument:

```
python -m giovanni simulate --gen 4 -n 5000 --swarm_size 3
simulation: 100%|██████████████████████████████████████████████████████████████████| 5000/5000 [00:15<00:00, 329.87it/s]
[INFO] 2020-12-22 15:51:01 [giovanni.cli.simulate] - Montecarlo simulation results --
Average     2737.669
Std Dev     2717.707
Max        22760.000
Min            1.000
Name: Required encounters (gen=4, num_trials=5000, swarm_size=3), dtype: float64
```

### Notes

* No considerations are made around [shiny locks](https://pokemon-shiny-hunting.fandom.com/wiki/Shiny_Locks).
  Make sure that you are aware whether the 'Mon you're hunting can be found in shiny form.
  
* This project only covers the main titles in the game series. It does not cover offshoots or
  mobile games in the series.
  
* The current implementation only takes into account base shiny rates by generation (see **future work**)


### Future work

A list of things that would be cool to implement:

* Considerations around encounter method:
    * Wild/SR
    * Masuda
    * Chaining
    * Etc.
    
* Gen 8

## Installing

### Installing from PyPi:

giovanni is available on public PyPi:

```bash
$ pip install giovanni
```

### Get setup for local dev:

Set up by cloning and building from Git:

```bash
$ git clone https://github.com/tgsmith61591/giovanni.git
$ cd giovanni
$ make requirements lint-requirements testing-requirements
```

Run a quick test to make sure everything is copacetic:

```bash
$ make test
```
BayesianLinearRegression 0.1.2
Fits Linear and Logistic Regression Models using MCMC.

# BayesianLinearRegression

This project was for me to gain a better understanding of the Metropolis-Hastings algorithm and work on my object-oriented programming skills. If you need to do any Bayesian modeling in Python, I recommend using PyMC3 (https://docs.pymc.io/). 

#### -- Project Status: [Completed]

## Project Intro/Objective

The purpose of this project was for me to work with the Metropolis-Hastings algorithm and get comfortable with object-oriented programming.

### Methods Used

* Generalized Linear Models
* Bayesian Statistics
* Metropolis-Hastings Markov Chain Monte Carlo
* Object-Oriented Programming

### Technologies

* Python (NumPy, SciPy, tqdm)

## Project Description

I created a class called MetropolisHastingsLinearModel, which is the parent class of the GaussianModel, LaplacianModel, and LogisticModel classes. It has  methods to calculate the log-prior (assuming normal priors for the distributions of the coefficients in the model), the log-posterior, fit the model/simulate the posteriors of the coefficients, burn the first x% the simulated distribution, set credible intervals, and predict for new data. For the GaussianModel and LaplacianModel classes, I only needed to add a log-likelihood method corresponding to those distributions. For the LogisticModel class, I added a method implementing the inverse-logit transformation for use in calculating the log-likelihood of the coefficients given the data and for predicting the probabilities of new observations. In addition to the method for predicting probabilities, I implemented a method for predicting the classes of new observations.
local-ci-hooks 0.1.1
Install a Local CI engine
Requires Python: >=3.8

# Local CI Hooks

This script adds Git hooks to your repository to run the tests automatically
while pushing commits to your remotes. The idea is to avoid pushing broken
code to your remotes, automatising the process of verification.

## Installation

```bash
pip install local_ci_hooks
```

## Usage

Run the script in a repository:

```bash
local_ci_hooks --install
```

This will install the pre-push hook for you. Also, it will create a file
named `.local_ci.sh` with a dummy test. You can set your test commands
in this file.

To uninstall the hook:

```bash
local_ci_hooks --uninstall
```

## Example scripts

For modifying the CI, please, take into consideration the following
`.local_ci.sh` example files.

NodeJS:

```bash
#!/bin/bash
npm install || exit 1
npm run test || exit 1
exit 0
```

Python:

```bash
#!/bin/bash
pip install --prefix ./build . || exit 1
export PATH="./build/bin:$PATH"
export LD_LIBARY_PATH="./build/lib:$LD_LIBRARY_PATH"
pytest . || exit 1
pip uninstall <your project>
exit 0
```

Version: 0.1.1