semvec/pypi-packages huggingface dataset:
chinaunicom 1.0.12
中国联通软件研究院专用python工具包

基础工具包
============

| 适合新手快速部署一些基础工具

如何安装
------------

python setup.py install

~~~~~~~~~~~~

此工具依赖的其他包:

-  MySQLdb see https://github.com/farcepest/MySQLdb1
-  DBUtils see https://cito.github.io/DBUtils/


如何使用
~~~~~~~~~~~~

例1
-------

         # 申请资源
	mysql = Mysql()

	#执行语句
	sqlAll = "SELECT * FROM BMS_ROLE"

	#返回结果
	result = mysql.getAll(sqlAll)

	#打印
	print ("mysql")

例2
-------
	配置说明:

	PROJECT_NAME = 项目根目录
    LOG_PATH_DIR = 日志位置
    LOG_FORMATTER = 日志格式化
    LOG_LEVEL = 日志级别
    LOG_SPLIT_TIMES = 日志分割：D:按天分割；H:按小时分割；M:按分钟分割
    CONFIG 为上述配置的字典形式

         #加载日志

	m_logger=MyLogger(CONFIG)

	#打印日志
	m_logger.ERRORLog("自定义内容")





Licence
-------

GPL v3 or any later version

Author
------

wangruomeng
longleding-push-service-sdk 0.2.2
Longleding Push Service SDK
Requires Python: >=3.6

Longleding Push Service SDK

# Supported Python Versions

Python >= 3.6

# Installation

longleding-push-service-sdk is available for Linux, macOS, and Windows.

```shell script
$ pip install longleding-push-service-sdk
```

# Basic Usage

```python
# -*- coding: utf-8 -*-
from sdk import push_service

push_service_endpoint = "localhost:80"
source_name = "demo"

push_service.init_service(endpoint=push_service_endpoint, source=source_name)


def send_sms_register_code():
    push_service.send_sms_register_code("xxxxxxxxxxx", "xxxxxx")


def send_sms_login_code():
    push_service.send_sms_login_code("xxxxxxxxxxx", "xxxxxx")


def send_sms_change_password_code():
    push_service.send_sms_change_password_code("xxxxxxxxxxx", "xxxxxx")


def send_sms_follow_up_login_code():
    push_service.send_sms_follow_up_login_code("xxxxxxxxxxx", "xxxxxx")


def send_sms_follow_up_login_notification():
    push_service.send_sms_follow_up_login_notification("xxxxxxxxxxx", "xxx", "xxx", "xxxxxxx")


def send_sms_follow_up_login_notification_wechat():
    push_service.send_sms_follow_up_login_notification_wechat("xxxxxxxxxxx", "xxx", "xxx", "xxxxxxx", "xxxxxxx")


def send_sms_general_verification_code():
    push_service.send_sms_general_verification_code("xxxxxxxxxxx", "xxxxxx")


def send_email_register_code():
    push_service.send_email_register_code("xxxxxxxxxxx", "xxxxxx")


def send_email_login_code():
    push_service.send_email_login_code("xxxxxxxxxxx", "xxxxxx")


def send_email_change_password_code():
    push_service.send_email_change_password_code("xxxxxxxxxxx", "xxxxxx")


def send_email_general_verification_code():
    push_service.send_email_general_verification_code("xxxxxxxxxxx", "xxxxxx")


if __name__ == '__main__':
    send_sms_register_code()

```

# Troubleshoot

If you encounter error messages similar to the following:

```shell script
...
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "common.proto":
  common.proto: A file with this name is already in the pool.
```

Setting an environment variable the following before running:

```shell script
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION='python'
```

See also
- [[Python] A file with this name is already in the pool.](#https://github.com/protocolbuffers/protobuf/issues/3002)
- [Python Generated Code](#https://developers.google.com/protocol-buffers/docs/reference/python-generated)
ftrace 0.0.1
library for reading ftrace data
Requires Python: >= 3.5

# Python ftrace Library

`ftrace` is a python library to read ftrace data from the Linux Kernel.

At this time it is only compatible with Kernel Version <=4!


## Installation

`pip install ftrace`


## Example

When a new process is created the name, pid and parent pid will be printed.

```python
import ftrace

def main():
    processes = {}

    ftrace = ftrace.FTrace()
    ftrace.tracer = ftrace.tracers.NopTracer()
    ftrace.reset()
    ftrace.setup()
    ftrace.tracer.syscalls = [
        ftrace.syscalls.Sys_Execve(),
        ftrace.syscalls.Sched_Process_Fork()
    ]

    print("pid  ppid: name")

    try:
        for data in ftrace.get_output():
            if (data is not None and data["kname"] == "sys_execve_kprobe"):
                print("{} {}: {}".format(data["caller_pid"], processes[data["caller_pid"]] if (data["caller_pid"] in processes) else "----", data["filename"]))
            elif (data["kname"] == "sched_process_fork"):
                processes[data["called_pid"]] = data["caller_pid"]
    except KeyboardInterrupt:
        print("\nstopping...")

    ftrace.reset()


if __name__ == "__main__":
    main()
```