semvec/pypi-packages huggingface dataset:
Unsupervised-Feature-Importances 0.0.2
Unupservised Feature Importances
Requires Python: >=3.8.5



# Dependencies 
### Make sure you have install the sklearn ~ Kmeans,scikit-learn


### Install the package
```
pip install package_name
```


### Import the package 
```
from feature_importances import feat_imp
```

### Call the package function
```
feat_impo,accuracy_report= feat_imp.compute(dataframe)
```
Statis.Co 0.1.1
Processing functions module
Requires Python: >=3.9

![logo](https://github.com/H3cth0r/statis.co/blob/main/resources/logo.png)

## What is Statis.Co?
[Statis.Co](https://github.com/H3cth0r/statis.co) is a Python module encompassing diverse financial tools and functionalities, 
including indicators, statistical calculations, and connections to data sources. 
The module is crafted in pure C, seamlessly integrated with Numpy's API, and 
employs parallelization tools such as OpenMP. The primary goal is to facilitate 
blazing-fast calculations and empower the module to adeptly handle substantial workloads.
To ensure robust memory management and prevent memory leaks, we utilize tools such as 
Valgrind and Bloomberg's Memray for in-depth analysis of memory usage.


## Why Statis.Co?
In today's finance industry, there's a growing demand for optimized tools to handle 
massive workloads swiftly. As financial data complexity rises, cutting-edge technologies 
play a pivotal role in processing, analyzing, and deriving insights for market analysis, 
risk assessment, and investment strategies. Staying competitive in finance now hinges on 
the ability to make informed decisions at unprecedented speeds. Notably, we've achieved 
over a 70% optimization in execution time compared to pure Python NumPy calculations.


## Installation
From PyPi. Check the [PyPi](https://pypi.org/project/Statis.Co/) repo:
```
pip install statisco
```

From source:
```
python setup.py sdist bdist_wheel
```

## To develop and Test from the source
```
python3 statisco/c_src/setup.py build_ext --inplace
```
If you'd like to contribute, please contact me via GitHub.

## Requirements
To compile the C extension, the primary requirements include the installation of Numpy and GCC.


## Usage
This is a usage example:
```python
from statisco.statistics import closingReturns, mean

msft["MyCloseReturns"] = closingReturns(msft["Adj Close"])
myMean = mean(msft["MyCloseReturns"])

print(f"myMean: {myMean}")
msft.head()
```
For a more in-depth understanding of usage, refer to the detailed examples provided in the 
[test notebook](https://github.com/H3cth0r/statis.co/blob/main/test.ipynb).
We'll be working on developing a documentation site.

## TODO
This is what I’ll be working on:
- Documentation
- More indicators
- Automatization Classes
- Basic ML models integration

## LICENSE
[Statis.Co](https://github.com/H3cth0r/statis.co) by [Hector Miranda](https://github.com/H3cth0r) is licensed under [Attribution-ShareAlike 4.0 International](http://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1) ![CC](https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1) ![BY](https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1) ![SA](https://mirrors.creativecommons.org/presskit/icons/sa.svg?ref=chooser-v1).
logkk 0.7.0
日志组件
Requires Python: >=3.7

# Logkk

**易于使用**且**线程安全**的日志模块

### 安装
```shell
pip install logkk
```

### 基础使用：
```python
from logkk import LogManager

log_manager = LogManager()
log_manager.info("this is a info log")
log_manager.warn("this is a warn log")

logger = log_manager.get_logger(name="hello")
logger.info("this is a info log")
logger.warn("this is a warn log")
```

### 使用文件记录日志：

```python
from logkk import LogManager, Level
from logkk.handlers import FileHandler

fmt = "[{datetime}] [{level}] [{name}] {message}"
handler = FileHandler(filepath="/var/log/demo.log")
log_manager = LogManager(level=Level.INFO, fmt=fmt, handlers=[handler])
logger = log_manager.get_logger(name="hello")
logger.info("this is a info log")
logger.warn("this is a warn log")
```

### 作为函数装饰器使用
给每个函数添加装饰器，打印函数的参数和返回值，在程序调试阶段是非常好用的。
```python
def log_required(f):

    def func(f2):

        @wraps(f2)
        def decorated(request, *args, **kwargs):
            name = f"{f.__module__}:{f.__name__}"
            logger = log.get_logger(name=name)
            logger.info(f"{request.method} {request.path}")
            logger.info("params=", request.body)
            setattr(request, "logger", logger)
            r = f(request, *args, **kwargs)
            if isinstance(r, BaseResponse):
                logger.info("response=", r.result)
            else:
                logger.info("response=", r)
            return r

        return decorated

    return func(f)


@log_required
def UpdateMyInfoHandler(request: HttpRequest):
    # ...
    return {"code": 0, "message":"OK"}
```

### 技术方案说明
写日志文件主要有两种方式：
1. 每次写日志时打开文件，写完后关闭文件；
2. 保持一个文件句柄，每次写日志时直接写入文件；

很明显，第二种方式效率更高，但是一直保持一个打开的文件对象，会不会有问题呢？  
查询了一些资料后发现，并没有什么问题，因为：
> 当进程退出时，不管是正常退出还是异常退出，亦或是进程被强制杀掉，操作系统都会回收给进程分配的资源，
也就是说系统会关闭这个文件句柄。

当进程异常退出时，为了保证我们写的日志不丢失，每次写日志时需要调用flush将日志落盘。因为write只是将内容写到系统缓冲区，并没有写到磁盘上，
当进程异常退出时，系统缓冲区的数据会丢失，而flush就是将系统缓冲区的内容写到磁盘上，并清空系统缓冲区。

另外，如果多线程写日志，会出现写入混乱的情况，所以需要加锁，虽然这样会影响效率，但是更加安全可靠。
adi-parser 0.1.1
This is a simple utility package, originally to parse .adi files from LoTW, but now from anywhere.
Requires Python: >=3.12

# adi_parser
This is a simple utility package, originally to parse 
[.adi files](https://wikitia.com/wiki/Amateur_Data_Interchange_Format_(ADIF)#ADI_.28.adi_file_extension.29) 
from [LoTW](https://lotw.arrl.org/), but now from anywhere.

By default, adi_parser parses [LoTW .adi arguments](#parsing-in-lotw-adi-format). 
You can optionally parse
[all arguments as a python dictionary](#parsing-all-arguments-from-a-adi).


## Examples
### Parsing in LoTW .adi format
```py
from adi_parser import parse_adi

adi_header, qso_reports = parse_adi("path/to/your_data.adi")
```
Where `adi_header: Header` and `qso_reports: list[QSOReport]`. 
These are dataclasses, which are defined in `adi_parser.dataclasses`.

All dataclass values are assumed to be missing by default.

Both `GRIDSQUARE` and `MY_GRIDSQUARE` are converted to lat/lat with
[maidenhead](https://github.com/space-physics/maidenhead).

### Parsing all arguments from a .adi
```py
from adi_parser import parse_adi

result = parse_adi("path/to/your_data.adi", return_type=dict)
```
Where the result dictionary follows this format:
```py
result = {
    "header": {
        "full_text": str,
        "argument_1": str,
        "argument_2": str,
        ...
    },
    "qso_reports": [
        {
            "full_text": str,
            "argument_1": {
                "value": str,
                "length": int,
                "type": str | None,
                "comment": str | None,
            },
            "argument_2": {
                ...
            },
            ...
        },
        ...
    ]
}
```