semvec/pypi-packages huggingface dataset:
coffeece 1.1.0
Python useful classes for office work automation
Requires Python: >=3.6

# Coffeece
Python useful classes for office work automation.
Currently working on Python 3.


# Install
You can install this package using pip:
```pip install coffeece```


## Popup
Tkinter popup functions to:
* show_info(title, message) -> shows a popup with the title and message provided.
* ask_file(admitted_file_extensions='any') -> Ask user for a file. Optional: pass admitted file extensions as a list of strings argument. Returns path as string.
* ask_directory() -> popup asks for a directory through file explorer. Returns path as string.
* ask_yes_no(title, message) -> shows a popup with the title and message provided and ask yes-no. If yes returns 'True'.


## SQLiteDB
A class to manage SQLite3 databases. Now it could:
* create_connection(self) -> Connect with sqlite3 DB (create it if there isn't). Returns conection object.
* create_cursor(self) -> Create cursor to communicate with DB. Returns cursor.
* create_table(cursor, table_name, table_columns) -> Create a table with the name (string) columns and column types (dictionary) given by the user.
* insert_row(cursor, table_name, row_items) -> Inserts row into DB with the cursor (cursor), table name (string), and items (list) given by the user.
* commit_changes(self) -> Save DB changes.
* close_connection(self) -> Close connection to DB.
* export_table_to_excel(self, table_name) -> Exports table to excel using ```Pandas``` library.


## System
System navigation and recursion functions:
* list_all_files(src_directory) -> Make a list of all the files in the given directory. Returns list.
* list_all_files_recursively(src_directory) -> Make a dictionary of all the files in the given directory recursively. Returns dictionary = root: { dirs: {} , files: {} }
* list_files_by_type(src_directory, file_extension) -> Make a list of all the files with the given file extension in the given directory. Returns list.
* extractall_zipfile(filepath, password=None) -> Opens zip file and extracts all its content.


## Excel
All Excel-related functions:
* xls_to_xlsx(src_filename,output_filename) -> Converts .xls file to .xlsx file format.


## Scripts
Scripts with utilities:

### venv_cleaner
Delete all virtual environments inside the active directory tree. Usage:
* From Python shell:
```
>>> from coffeece.scripts import venv_cleaner
>>> venv_cleaner.main()
```
* As a script file:
```
python venv_cleaner.py
```
You can delete venvs with different name than 'venv' using the optional argument -vn or --venvname.

## Why Coffeece?
The main reason behind this little classes is that a huge part of the mechanical work at a job office can be automated through this kind of objects.
The other reason to use this is to make office scripts cleaner with an — even more — simplified dependency management.
numtostring 0.1.2.1
A simple int-to-string converter to covert numbers like 10 to strings like ten
Keywords: number to text,conversion

# numtostring
 Numtostring(or numbertostring, as the import name is) is a tool for converting numbers/ints like 10 to pieces of text like ten!
## Example of usage
```python
import numbertostring as numtostring
print(numtostring.convert(245))
# Output: two hundred and forty five
```
fastpredict 0.0.6
A few helper utilities to make it simpler to perform fastai inference/prediction
Requires Python: >=3.0

# fastpredict

Has the following benefits over using fastai directly:
- cleaner API for batch prediction
- takes care of using CPU or GPU if you specify in the constructor

How to use:

```python
from fastpredict import FastPredictBool
f = FastPredictBool.from_path('/path/to/learner.pkl')
score = f.predict_path('/path/to/image.jpg')
scores = f.batch_predict_paths(['/path/to/image1.jpg', '/path/to/image2.jpg'])
```

To prune a model:
```python
from fastpredict import FastPredict
from fastai.vision.all import load_learner
learn = load_learner('/path/to/current/learner.pkl')
new_learn = FastPredict.clean_learner(learn)
new_learn.export('/path/to/new/learner.pkl')
```
sentiment-analysis-spanish 0.0.25
Sentiment analysis for sentences in spanish

# sentiment-spanish


[![PyPI version](https://badge.fury.io/py/sentiment_analysis_spanish.svg)](https://badge.fury.io/py/sentiment_analysis_spanish)

# How does it work?

sentiment-spanish is a python library that uses convolutional neural networks to predict the sentiment of spanish sentences. The model was trained using over *800000* reviews of users of the pages *eltenedor, decathlon, tripadvisor, filmaffinity and ebay*.
This reviews were extracted using web scraping with the project [opinion-reviews-scraper](https://github.com/sentiment-analysis-spanish/opinion-reviews-scraper)

Using the rate in the user reviews we trained the model to learn from the language in them. For that we use the libraries Keras and Tensorflow. We achieved a validation accuracy (accuracy over fresh data, no used for training) of 88%.
For more details regarding the training of the neural network model check the repo [sentiment-analysis-model-neural-network](https://github.com/sentiment-analysis-spanish/sentiment-analysis-model-neural-network) 

# Why?

I believe there are not many solutions to sentiment analysis **in spanish** based on neural networks.


# Install and use

First to install the package

```
pip install sentiment-analysis-spanish
```

You will also need keras and tensorflow

```
pip install keras tensorflow
```

Import the package

```
from sentiment_analysis_spanish import sentiment_analysis

```

run the sentiment analysis:

```
sentiment = sentiment_analysis.SentimentAnalysisSpanish()
print(sentiment.sentiment("me gusta la tombola es genial"))

```

you will see that it outputs 

```
1
```
For instance if you use the text 

```
sentiment = sentiment_analysis.SentimentAnalysisSpanish()
print(sentiment.sentiment("me parece terrible esto que me estás diciendo"))

```

you will see that it outputs 

```
9.460418e-14s
```

which as you see is very close to 0.

## Output and meaning
The function ``sentiment(text)`` returns a number between 0 and 1. This is the probability of string variable  ``text`` of being "positive". Low probabilities mean that the text is negative (numbers close to 0), high probabilities (numbers close to 1) mean that the text is positive. The space in between corespond to neutral texts.