semvec/pypi-packages huggingface dataset:
trollformatter 1.0.2
A troll code formatter for C, C++ and Java to make your compsci teacher angry.
Keywords: troll code-formatter formatter c c++ java

# Trollformatter: Troll your fellow devs and compsci teachers

Ever wanted to troll someone by formatting your C/C++/Java code like this?

![ew.jpg](https://external-preview.redd.it/P1B98VFlL6po1QqQRepzJc0O7npbCjUAZTGPh4Leh3A.png?auto=webp&s=de0b625451dca744131e9ede0af65ec858e8580b)

Well now you can.

## What is this? ##
Trollformatter is a formatter inspired by the image above. It basically moves all your semicolons,
braces, etc. to the edge of the file to make it appear to not have semicolons or braces. The
generated code looks much cleaner (/s), and still runs the same as the original file.

DISCLAIMER: DO NOT USE THIS IN ANY KIND OF PRODUCTION ENVIRONMENT. THE TROLLFORMATTER PROGRAM
IS IN ALPHA AND IS NOT GUARANTEED TO WORK PROPERLY AT ALL TIMES. THE DEVELOPERS OF THIS
PROGRAM ARE **NOT** RESPONSIBLE IF YOU LOSE YOUR JOB OR GET A FAILING GRADE BECAUSE
YOU USED THIS.

## How do I run Trollformatter? ##

**HEADS UP! Trollformatter is now available on PyPI!**
To install via PyPI (recommended):
1. Get Python.
2. Get the `pip` package manager.
3. Run `pip3 install trollformatter`.

To install via source (for development or latest version):
1. Get Python.
2. Run `python3 setup.py install`. (you may need `sudo` or `--user`).

To run:
1. Get your code.
2. Run `trollformatter file.java` (or `.c` or `.cpp`)
3. Check the `file_troll.java` file. If you are satisfied
with the result, you may remove the original and rename this
one.
4. Watch your compsci teacher explode.

## Sounds interesting. How can I contribute? ##

If you want to help out the trollformatter project,
check out the issues board on Gitlab (or test the program
and log undiscovered issues). You can assign an
issue to yourself, fork the project, and send
in a merge request when you're ready to merge your
code.
dycow 0.1.0.0
A tiny web-server app with a configuration file, NO NEED TO CODE
Requires Python: >=3.6

# Dynamic Command WebServer (dycow)

[![Downloads](https://pepy.tech/badge/dycow)](https://pepy.tech/project/dycow)
[![PyPI version](https://badge.fury.io/py/dycow.svg)](https://badge.fury.io/py/dycow)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A tiny web-server app with a configuration file, NO NEED TO CODE

![dycow-demo](https://raw.githubusercontent.com/Sanix-Darker/dycow/master/img/dycow.png)

## Introduction

This project is a small webserver that just have to get a port and a configuration file to perform preconfigurated commands.

## Disclaimer

This was a test-research project for a specific user-case on my raspberry-pi, therefore, i configurated only two methods (GET and POST)

## Why use dycow

- It's fast
- Simple to configure, you just have to create a conf file to be ready to start
- It's lightweight (The wheel is ~5Kb)

## Requirements

- Python (3.x recommend)

## How to install

You just have to run :
```shell
pip install dycow
```

## How to use

```shell
$ dw -h

[-] dycow v0.0.9.7.
[-] Help center !
[x] Run : dw <port> <conf-file> 
[x] Documentation online https://github.com/sanix-darker/dycow
```

You have to create a file, for example `conf` and set actions, for example :

![dycow-demo](https://raw.githubusercontent.com/Sanix-Darker/dycow/master/img/conf.png)

`- GET`(or `- POST`) is the type of the request, just after it the endPoint (`/save`, `/callme?name&content`). \
`cmd` is the command line that will be executed on a request. \
`res`[NOT REQUIRED] is the response to the request. \
`var` is to specify POST variables. \

Variables like `#content#` means, the content variable will be replace with the input value as parameter.

- Then run the server application:
```shell
# dw <port> <configuration-file>
dw 3000 conf
```

It will start a small server on port `3000` and following rules you specified in the configuration file.

- You can access [API-DOC here](https://documenter.getpostman.com/view/2696027/TVmV6ZS2) .

## Tests

To run rest-api tests, i made a bash file in `./tests` directory.\
you just have to run `bash ./tests/rest-api-test.sh`
```
$ bash ./tests/rest-api-test.sh 
[-] Running Endpoints tests on dycow.
[✓] GET / passed.
[✓] GET /list passed.
[✓] GET /callme?name=darker passed.
[✓] POST /save passed.
- - -
[-] Tests run :
[-] 4 tests succeed !
[-] 0 tests failed !
[-] Stopping tests Endpoints on dycow.
```

## Author

- [d4rk3r](https://github.com/sanix-darker)

## LICENSE

- [MIT](./LICENSE.txt)
text-based-clusterer 0.0.2
A package that clusters python objects based on a chosen string attribute
Requires Python: >=3.6

Text Based Clusterer
======

Allows you to cluster python objects based on chosen string attributes.

## Installation

To install, use `pip install text-based-clusterer`.

## Usage

### Instantiation

You can import the Clusterer class with the line below.
``` python
    from text_based_clusterer import Clusterer
```
To use the clusterer, first create a python class with a string attribute or use an existing python class with a string attribute.
``` python
    class TestClass:
        __init__(self, string1: str, string2: str):
            self.string1 = string1
            self.string2 = string2
```
Then instantiate the Cluster object. There is an optional parameter `cluster_threshold` that defines how textually similar objects should be to be clustered together. `cluster threshold` ranges from 0 (completely different) to 1 (exactly the same) and is set to a default of 0.3.
``` python
    clusterer = Clusterer(cluster_threshold = 0.3)
```

### Basic Clustering

Use the `add_objects` method to cluster objects. You will need to pass in a list of python objects as well as a list of strings representing the attributes used for clustering. You can retrieve a list of clusters using `get_objects`.
``` python
    test_class_1 = TestClass('dog', 'cat')
    test_class_2 = TestClass('cat', 'dog')

    test_classes = [test_class_1, test_class_2]


    single_string_clusterer = Clusterer()

    single_string_clusterer.add_objects(test_classes, ['string_1'])

    single_string_clusterer.get_objects() # returns [[test_class_1], [test_class_2]]


    multi_string_clusterer = Clusterer()

    clusterer.add_objects(test_classes, ['string_1', 'string_2'])

    multi_string_clusterer.get_objects() # returns [[test_class_1, test_class_2]] 
```

### Adding to Existing Clusters

Use the `add_clusters` method to add an initial set of clusters in the form of nested lists. Note that this method should only be used when there are no existing clusters within the `Cluster` object because calling `add_clusters` does not perform clustering.


``` python
    test_class_1 = TestClass('dog', 'cat')
    test_class_2 = TestClass('cat', 'dog')

    initial_cluster = [[test_class_1], [test_class_2]]

    clusterer = Clusterer()

    clusterer.add_clusters(initial_cluster, ['string_1'])

    clusterer.add_objects([test_class_1], ['string_1'])

    clusterer.get_objects() # returns [[test_class_1, test_class_1], [test_class_2]]
```
## Sources Used

This package implements a text based incremental clustering algorithm from the research paper [Incremental Clustering of News Reports](https://www.researchgate.net/publication/258028563_Incremental_Clustering_of_News_Report).