semvec/pypi-packages huggingface dataset:
factiva-country-code-mapping 1.0.2
A utility to simplify mapping Factiva country codes
Requires Python: >=3.6

# Factiva Country Code Mapping

This utility simplifies mapping between country names, DJII region codes, and ISO Alpha 2 country codes. There were two approaches explored in this implementation: the first was to create a list containing lists for each mapping of country name to DJII RC to ISO Alpha 2 code, and the second was to create three separate dictionaries with each of the various data type as keys. This was both a simple exercise to compare O(n) between searching the underlying data using lists vs dictionaries, as well as to actually transform data files being used with the Factiva search engine.

## Installation

To install this library, run the following commands.

    $ pip install -i factiva-country-code-mapping

## Usage

The utility can be run by adding csv files to the 'process' folder; the input files should contain a newline ('\n') delimited list of country codes, DJII region codes, or ISO Alpha 2 country codes that are to be mapped to either of the other two data types. I've included some sample inputs and outputs in the 'process' folder - both inputs should be uploaded there and outputs will be displayed there. This utlity will output the other two data types by running the following command.

    python -m country_code_mapping <input file> [method-options] [output-options]
    
*<*input file*>* - filename of input file located in the 'process/input' folder

*[method-options]* - method of parsing with the below values

            l = list approach (slower)
            d = dictionaries approach (faster)

*[output-options]* - preferred output format with the below values

            0 = standard country names
            1 = DJII region codes
            2 = ISO Alpha 2 country codes
expand-string 0.0.2
A helper package for expanding strings
Requires Python: >=3

# expand_string

This library provides functions that allow you to expand a string
that contains parenthesis with numeric-values, and then expands that
into an actual string value.


# Installation

````bash
$ pip install expand_string
````

# Usage

Simple example:

````python
from expand_string import expand_string

expand_string('N3(S)N2(E3(NW))')
````

Would result in the output:

```bash
NSSSNENWNWNWENWNWNW
```
Shell example:
```bash
python -m expand_string 'N3(S)N2(E3(NW))'
```

Would result in the output:

```bash
NSSSNENWNWNWENWNWNW
```

For more details see the `expand_string` docstring.
geot-cluster 0.9.29
Reasearch project on clustering clients from transaction history

*********************************************
Geographical Transctions clustering algorithm
*********************************************

Name of the module stands for geographical transactions clustering. This module is an implementation of the method, developed for the third course project in HSE University. It takes dataframe with clients transactions history of the
specified format and returns list of clusters.

For the record, it was intended to be for public usage in this form, as it is a research project seeking to find a way to deal with the described problem

Installation
############

Run the following to install:

'''python

    pip install geot_cluster'''


Usage
#####

Before using make sure, that your dataset corresponds with requirements. Csv file must contain the following columns in order to work correctly

* user_id   :   string type, example: "423156821"
* event_dt  :   string type, example: "20190312"
* event_time:   string type, example: "2019-03-12 06:24:00.279"
* lattitude :   float  type, example: 49.862621
* longtitude:   see lattitude

Workflow::


    import geot_cluster

    import markov_clustering as mc
    import matplotlib.pyplot as plt
    import networkx as nx


    path = [path to file with data]
    data, names = geot_cluster.data_load(path)


    %matplotlib notebook
    base = [path to the folder, where to store libs with information about clients]

    archivate = True
    libs= True
    graph_f = True
    cluster_f = True


    if(archivate):
        geot_cluster.archivate_maps(data, names, levels=4)

    if(libs):
        lib = geot_cluster.graph_preparation(data, names, base) 
        prob_lib = geot_cluster.znakomstvo_by_lib(lib,data)

    lib, prob_lib = load_libs(base = base)

    if(graph_f):
        graph = geot_cluster.graph_forming(lib, prob_lib, treshold=0.9)

    if(cluster_f):
        result = mc.run_mcl(graph,pruning_threshold=0.7, inflation=2,expansion=2) 
        clusters = mc.get_clusters(result)

        clust_0 = clusters_to_ids(lib=lib, prob_lib=prob_lib, clusters = clusters, number = 0)
        maps = get_cluster_maps(data = data, clust = clust_0)
        print("Number of clusters", len(clusters))

        plt.figure(figsize=(10,10))
        mc.drawing.draw_graph(result, clusters, edge_color="red",node_size=15,width = 1, with_labels=True, font_size = 8)
trunner 1.0.4
runner于运行job的py package 封装
Requires Python: >=3

# trunner

runner 运行job python封装

## 使用

`pip install trunner>=1.0.3`

- tbase
    - [x] train: `python3 -m trunner.tbase --alg ddpg --codes 000001.SZ --seed 0`
    - [x] eval: `python3 -m trunner.tbase --eval --alg ddpg --codes 000001.SZ --seed 0`
    - [x] infer: `python3 -m trunner.tbase --infer --alg ddpg --codes 000001.SZ --seed 0`
    - 详细参数: [tbase args](https://github.com/tradingAI/tbase/blob/fbbab069d3594a1d11e3cc1b80ad14adb98a7d86/tbase/common/cmd_util.py#L112)
filefetcher 0.1.2
Find, download, and build versioned assets
Requires Python: >=3.5

# File Fetcher

## Purpose

Many bioinformatics pipeline tasks rely on large data files, often pre-processed in such a way as to support fast 
lookups. To make libraries re-usable, it should be easy to create the files programmatically, and to download 
pre-made versions from a remote server. (rather than spending hours generating data structures on first install).

Additionally, it should be possible to get the newest versions based on some automated server process.  

This library abstracts the tasks of locating, downloading, or creating the necessary pieces, as appropriate. 


## Usage
```python
from filefetcher import AssetCLI, AssetManager
from filefetcher.exceptions import AssetAlreadyExists

# For routine use, instantiate a manager. It will locate cached copies of asset files. 
manager = AssetManager('mylib', 'https://downloader-server.example/mylib/')  # site hosts a manifest.json file
manager.locate('snp_to_rsid', genome_build='GRCh38')

# If the file has not yet been downloaded, it can be automatically fetched or built (from a known recipe)
manager.locate('snp_to_rsid', genome_build='GRCh38', auto_fetch=True, auto_build=True)

# Alternately, the asset can be manually fetched or built as a one-time operation during installation.
manager.download('snp_to_rsid', genome_build='GRCh38')
manager.build('snp_to_rsid', genome_build='GRCh38')

# The manager can build assets according to pre-defined recipes (a callable that accepts arguments).
def a_build_func(manager, item_type, temp_build_folder, **kwargs):
    # A build function has access to the manager (so it can check for existing files), and returns metadata calculated 
    #   during the build that will be stored as additional asset tags
    if manager.locate(item_type, auto_build=False, auto_fetch=False, **kwargs):
        # Raise a special exception class to interrupt the build without performing extra steps
        raise AssetAlreadyExists
    # ...do stuff that results in creating a file called filename.txt, and return extra metadata about the file version built
    return 'filename.txt', {'db_snp_build': 'b153'}

manager.add_recipe('snp_to_rsid', a_build_func, label='fast rsID lookups', genome_build='GRCh37')

# With an additional helper, your package can expose a CLI to handle these asset operations. 
#   (this is especially useful as a package entrypoint script, so that filefetcher provides a convenient install 
#   experience for your large data assets)
cli = AssetCLI(manager)
if __name__ == '__main__':
   cli.run()



```



## Development
Install dependencies + unit tests

`pip install -e .[test]`
magick-tweet-preprocessor 0.0.1
Small (magickal) Tweet Processor
Requires Python: >=3.6

# Magick Tweet Preprocessor Vihaus Ljovan

Magick Tweet processor is a small program that does some NLP-magick on tweet-strings.
It comes with a cli-interface on which the language (english or spanish) can be chosen
as well as what kinds of modifications on the original string (tokenisation,
hiding URLs, hiding @-mentions etc.) the program should undertake.

We used the MIT Licence because "I want it simple and permissive" sounded
perfect for our usecase. Also we read through the LICENSE.txt and it sounded
good to us.

Example: processing tweets in file 'tweets.txt' without emoji-removal but with
stopword-, hashtag- and url-removal as well as anonymization of mentions:

`tpp --file tweets.txt --no_emoji_removal`

All possible flags:

```
  -h, --help                 Show this help message and exit
  -f, --file                 Use file(s) instead of string.
  -u, --no_url_removal       Process without url-removal
  -E, --no_emoji_removal     Process without emoji-removal
  -H, --no_hashtag_removal   Process without hastag-removal
  -a, --no_anonymize         Process without anonymization
  -S, --no_stopword_removal  Process without stopword-removal
  -e, --english              Set Language to english (already default)
  -s, --spanish              Set Language to spanish
```
slack-notifications-datateam 0.0.9
Small package to send slack notifications
Requires Python: >=3.6

# Slack notifitacions
Slack callback function to send alerts to any channel. It can be use for various errors on critical pieces of data pipelines. 

## Install 
To install it is neccessary python 3.6 or greater, so review it 
`python3 --version`
Then just need to type this
`pip3 install slack-notifications-datateam`

## Test it
To test it you can use the following code `test_slack.py`, just need to replace **webhook_url** and **text** values
```python
from slack_notifications import slack_messages

webhook_url = 'https://hooks.slack.com/services/T00XXXXXX/B000XXXXXXX/XXXxxXXXXxXX0'
text = "Testing slack package. No need to investigate"

slack_messages.send_message(webhook_url=webhook_url,text=text)
```

And the just execute it