semvec/pypi-packages huggingface dataset:
Pinyiniser 1.0.3
Adds pinyin to lists of chinese strings (utf-8 only)
Requires Python: >=3.9

# Setup

`import pinyiniser as pyer`

## pyer.add_pinyin(zh_string, dict, special={}, do_not_parse=do_not_parse_set)

Adds Pinyin to a utf-8 chinese string.<br/>
returns `string + \n + pinyin + \n`

### special
a dictionary of strings like:

    {
        '卡妮雅': 'Ka3ni1ya3',
        '伊雷米': 'Yi1lei3mi3',
        '乌蕾妮': 'Wu1lei3ni1',
    }

It will search for the keys and output the value of the kvp.</br>
This is a 1:1 mapping, if the string doesn't match the left hand side exactly, it will not match.
This could be more than just a way to map names, any string can be wholly replaced using this method.

### do_not_parse
do_not_parse is a dictionary that default looks like so:

    do_not_parse_set = {
        #Chinese special chars
        '？', '，', '！', '。', '；', '“', '”', '：', '–', '—', '＊',
        '…', '、', '～', '－', '（', '）', '─', '＜', '＞', '．', '《', '》',
        '％', '·', '’', '‘', '……', '【', '】',
        #Standard special chars
        '`', '~', '!', '@', '#', '^', '&', '*', '(', ')', '-', '_',
        '[', ']', '{', '}', '\\', '|', ';', ':', '\'', '"', ',', '<', '.',
        '>', '/', '?',
        #Maths
        '=', '+', '-', '/', '%',
        #Currency chars
        '$', '￥', '£', '€'}

`Jieba` returns a list of words that it has detected. For english words or punctuation, they are returned as well
as an entry in the list.

We cut up the sentence using Jieba to generate a list of characters, we then step through this list
and add the pinyin to the sentence.

we need to add spaces between the elements of the list when they are added to the sentence,
but if it is in do_not_parse it will be added without a space, as punctuation should be.

i.e. ['ni3hao3', '.'], if we don't use this do_not_parse set, becomes:
'ni3hao3 .', with the set: 'ni3hao3.'

so in order to extend this, you can create your own do_not_parse_set (called whatever you like) and union it
with the original do_not_parse_set.

`my_do_not_parse_set = my_do_not_parse_set.union(pyer.do_not_parse_set)`

### zh_dict

`zh_dict = pyer.get_dictionary(True)`

True for numerals - shuo1<br/>
False for diacritics - shuō

Personally I prefer numerals as it makes it harder to read, but depending on your application this may not be
what you want.

#### zh_dict details
`zh_dict` is a dictionary of dictionaries, where the first key is the
character, and the second key is 'pinyin' e.g. `zh_dict[zh_char]['pinyin']`

Any dictionary that has this set of kvp's will work, allowing you flexibility in
what you use, so you can have a dict with English too
`zh_dict[zh_char]['english']`
for further processing.

## pyer.get_pinyin(zh_string, zh_dict, do_not_parse=do_not_parse_set)

Gets pinyin as a list.

`zh_string` is just any utf-8 string of Chinese characters.
miniseed2mat 0.1.7
Analyzing MiniSEED seismic data in MATLAB
Requires Python: >=3.9,<3.11
Keywords: matlab,seismic waveforms,python to matlab,seismology,miniseed

## Analyzing MiniSEED seismic data in MATLAB 

For details on the usage, visit the earthinversion post: https://www.earthinversion.com/utilities/converting-mseed-data-to-mat-and-analyzing-in-matlab/

## Output data structure

- `stats` contains all the meta data information corresponding to each trace, and
- `data` contain the time series data

```
mat_file.mat -> stats, data
stats -> stats_0, stats_1, ...
data -> data_0, data_1, ...
```

## Usage
```
from miniseed2mat.miniseed2mat import convertmseed2mat
mseedfile = "myStream.mseed"
convertmseed2mat(mseedfile, output_mat=None)
```

## Read `mat` file in MATLAB

```
clear; close all; clc;

wdir='./';

fileloc0=[wdir,'myStream'];
fileloc_ext = '.mat';
fileloc = [fileloc0 fileloc_ext];

if exist(fileloc,'file')
    disp(['File exists ', fileloc]);
    load(fileloc);
    
    all_stats = fieldnames(stats);
    all_data = fieldnames(data);
    
        
%     for id=1:length(fieldnames(data))
    for id=1
        stats_0 = stats.(all_stats{id});
        data_0 = data.(all_data{id});

        sampling_rate = getfield(stats_0,'sampling_rate');
        delta = getfield(stats_0,'delta');
        starttime = getfield(stats_0,'starttime');
        endtime = getfield(stats_0,'endtime');
        t1 = datetime(starttime,'InputFormat',"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
        t2 = datetime(endtime,'InputFormat',"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
        datetime_array = t1:seconds(delta):t2;

        %% plot time series
        fig = figure('Renderer', 'painters', 'Position', [100 100 1000 400], 'color','w');
        plot(t1:seconds(delta):t2, data_0, 'k-')
        title([getfield(stats_0,'network'),'-', getfield(stats_0,'station'), '-', getfield(stats_0,'channel')])
        axis tight;
        print(fig,['./',fileloc0, '_ts', num2str(id),'.jpg'],'-djpeg')

%         close all;
    end
end

```

![Output Waveforms](myStream_ts1.jpg)
Somecomfort-Homie-4 0.3.6
Homie 4 for Honeywell Total Comfort North America
Requires Python: >=3.5.*
Keywords: HOMIE,MQTT,Somecomfort,Honeywell

# Somecomfort Homie

Homie 4 implementation of Honeywell Total Connect Comfort for North American models

Uses the somecomfort library (https://github.com/kk7ds/somecomfort)

Install on Raspberry Pi

```
pip3 install Somecomfort-Homie-4
```

To start as a service on raspbian 

Create somecomfort_homie.yml in /etc 

'''
sudo nano /etc/somecomfort_homie.yml
'''

Use the following settings:

```yaml
somecomfort:
  username: 
  password: 

mqtt:
  MQTT_BROKER: Broker
  MQTT_PORT: 1883
  MQTT_USERNAME: null
  MQTT_PASSWORD: null
```

Create somecomfort-homie.service in /etc/systemd/system

'''
sudo nano /etc/systemd/system/somecomfort-homie.service
'''


```service
[Unit]
Description=Somecomfort Homie
After=multi-user.target

[Service]
User=pi
Type=simple
ExecStart=/usr/bin/python3 /usr/local/bin/somecomfort_homie_start.py
Restart=on-abort

[Install]
WantedBy=multi-user.target
```

Copy somecomfort_homie_start.py to /usr/local/bin/