semvec/pypi-packages huggingface dataset:
faker_airtravel 0.4
AirTravel Faker Community Provider


# Airtravel provider for Faker


## Acknowlegements


`faker_airtravel` is a provider for the `Faker` Python package, and a fork of https://github.com/kennethwsmith/faker_vehicle.  I would like to thank the maintainer of that repository, since I used the structure to create this one.


## Description

`faker_airtravel` provides airtravel related fake data for testing purposes.  The definition of "fake" in this context really means "random," as the airport codes, cities, and locations are real.  However, I make no claims about accuracy, so do not use this as location data!


## Installation

Install with pip:

``` bash
pip install faker_airtravel

```

Add as a provider to your Faker instance:

``` python

from faker import Faker
from faker_airtravel import AirTravelProvider
fake.add_provider(AirTravelProvider)

```

If you already use faker, you probably know the conventional use is:

```python
fake = Faker()

```


### Airport Object

``` python
>>> fake.airport_object()
{'Airport': 'Tocumen International Airport',
'iata': 'PTY',
'icao': 'MPTO',
'City': 'Tocumen',
'State': 'Panama',
'Country': 'Panama'}

>>> fake.airport_name()
'Lisbon Airport'

```

### Airport Codes (IATA and ICAO)

``` python
>>> fake.airport_iata()
'LSC'

>>> fake.airport_icao()
'KOKC'
```

### Airlines
```
>>> fake.airline()
'Sichuan Airlines'

```

### Flight

The flight object is an example of how the data might be combined to create larger structures, and may not be the exact format you need.
However it does have the advantage that it will never choose the same 'origin' and 'destination' object.

```
>>>fake.flight()

{'airline': 'Maya Island Air',
 'origin': {'Airport': 'Noi Bai Airport',
  'iata': 'HAN',
  'icao': 'VVNB',
  'City': 'Hanoi',
  'State': 'Ha Noi',
  'Country': 'Vietnam'},
 'destination': {'Airport': 'Geneva Airport',
  'iata': 'GVA',
  'icao': 'LSGG',
  'City': 'Geneva',
  'State': 'Canton of Geneva',
  'Country': 'Switzerland'},
 'stops': 'non-stop',
 'price': 641}
 ```
sonya-library 1.0
библиотека по обработке текстов
Requires Python: >=3.6

SONYA_PROGECT library

Author S.A.Galinovskaya


This code is intended for text processing, namely, 
determining the number of certain particles, plotting the length of sentences.

    def __init__(self, name, particle, quantity):
        self.quantity = quantity
        self.particle = particle
        self.name = name
        try:
            self.doc = codecs.open(self.name, 'r', 'utf-8').read()
        except:
            self.doc = codecs.open(self.name, 'r', 'cp1251').read()

    def sentences_word_length(self):
        sentences = nltk.sent_tokenize(self.doc)
        sentences_word_length = [len(sent.split()) for sent in sentences]
        return sentences_word_length

    @staticmethod
    def text_sentences_length(sentences_word_length):
        average_sentences_word_length = (sum(sentences_word_length) / len(sentences_word_length))
        return average_sentences_word_length

    def tokenize(self):
        word = nltk.word_tokenize(self.doc)
        remove_punctuation = str.maketrans('', '', string.punctuation)
        tokens_ = [x for x in [t.translate(remove_punctuation).lower() for t in word] if len(x) > 0]
        return tokens_

    @staticmethod
    def words_length(tokens_):
        words = set(tokens_)
        word_chars = [len(word) for word in words]
        return word_chars

    @staticmethod
    def text_lexical(tokens_):
        lexical_diversity = (len(set(tokens_)) / len(tokens_)) * 100
        return lexical_diversity

    @staticmethod
    def word_mean_length(word_chars):
        mean_word_len = sum(word_chars) / float(len(word_chars))
        return mean_word_len

    def commas_in_text(self):
        tokens = nltk.word_tokenize(self.doc)
        dist = nltk.probability.FreqDist(nltk.Text(tokens))
        commas_per_quantity = (dist[self.particle] * self.quantity) / dist.N()
        return commas_per_quantity

    @staticmethod
    def visual_thinks(sentences_word_length):
        x_list = list(range(0, len(sentences_word_length)))
        y1_list = list(sentences_word_length)
        plt.plot(x_list, y1_list)
        plt.ylabel("Длина предложений", fontsize=14, fontweight="bold")
        plt.show()
smoking-simulation 0.0.1
Simulation of smoking spreading in society.
Requires Python: >=3.6

<img src="img/cigarette.png" align="right" width=200 />

# Smoking Simulation

Smoking Simulation is an app to simulate the spreading of smokers and non-smokers, their interactions and population during certain amount of time.


## Description

The application allows users to observe simulation of spreading smokers and their behavior among given population parameters (3 different cases provided). Simulation rules and scenarios are based on real-life researches on smokers in the USA, EU and Ukraine. After closing the simulation window, users can inspect 4 different plots showing the amount of smokers in different age categories during the period of simulation.

The main engine of the project is finite state machine algorithms that run the logical part of the application. All the visuals are provided with Python libraries Matplotlib and Seaborn. 

## Visuals

The simulation process looks like this:

![Simulation](img/1.png)

When the simulation is over, you can watch statistics plots representing data collected during simulation

![Result](img/2.png)

## Usage

To run the application, clone this repository locally and run the main module:
```bash
python3 main.py
```

## Support

In case you need some help, feel free to visit an issue tracker, a chat room, or connect us via [email address](hello@smoking-simulation.com).


## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## Authors and acknowledgment

The project was developed by:
* [Karyna Volokhatiuk](https://github.com/karyna-volokhatiuk)
* [Oleksandra Stasiuk](https://github.com/oleksadobush)
* [Vira Salieva](https://github.com/vsaliievaa)
* [Bohdan Ruban](https://github.com/iamthewalrus67)
* [Roman Kulyk](https://github.com/kkulykk)

## License
[MIT](LICENSE)