semvec/pypi-packages huggingface dataset:
social-content 0.0.1a0
Social Content Analysis
License: MIT
Requires Python: >=3.6, <4
Keywords: social network,social content,text analysis,weibo,twitter

## Social Content Parser
A toolkit to parse and analyze contents from social media. 

### Intro

Example 1: Parse Weibo text
```python
from social_content import *
# remove topic tags, links and emoji
text="#1000公里续航新能源车能出吗#  中科院院士欧阳明高表示，如果有人告诉你，这个车能跑1000公里，几分钟能充满电，还很安全，成本又很低。以目前的技术来讲，他一定是骗子！中科院院士的这番言论似乎有所指。蔚来ET7前脚宣布1000公里续航，广汽埃安这几天就向外界公布了全新动力电池科技海报。这几天， ​  展开c"
content=get_plain_text(text)
print(content)
```

Example 2: Evaluate Weibo comment text with emoji
```python
from social_content.weibo import *
'''
    Evaluate sentiment scores based on Weibo user's emoji list
'''
# 1. Chinese comment text
comment="那不也是新能源？如果真想要新能源指标，至于摇号那么久么[中国赞]"
# clean text
comment_cleaned=clean_weibo_text(comment)

# 2. load a list of all possible emojis
happy_emoji,neutral_emoji,sad_emoji=create_emoji_list()

# 3. extract an emoji list in the comment text
list_comment_emoji=extract_emoji(comment)
print("Emoji list:",list_comment_emoji)

# 4. evaluate emoji sentiment based on emoji dictionary and
happy,sad,neutral=sentiment_emoji(happy_emoji,neutral_emoji,sad_emoji,list_comment_emoji)
print(f"Sentiment preference:{happy}\t{sad}\t{neutral}")

# 5. evaluate a combined sentiment, two types of sentiment
avg_sentiment_real,avg_sentiment_grade = get_avg_sentiment_with_all(text=comment_cleaned,list_emoji=list_comment_emoji)
print("Average sentiment by continual value:",avg_sentiment_real)
print("Average sentiment by discrete value: ",avg_sentiment_grade)
```

Example 3: Clean twitter text
```python
from social_content.twitter import *
text='''
#CatBoy called #SafeCatGirl !
https://t.co/CZgF6SJ2RQ
https://t.co/pay2uVyvxL
https://t.co/WeUom7jtEr
#BSCGems #BSCGem #NFT #NFTs #GameFi #ElonMusk #altcoins #bitcoin  
#crypto #ethereum #btc #altcoin #Binance #ripple 
#ETH #shiba #MXS #BNB #dogecoin #Metaverse #BSC #DeFi https://t.co/CHhdHVBuDe https://t.co/fMhOYH1rlO
'''
text=remove_hashtag_mention(text)
text=remove_urls(text)
print(text.strip())
```

### License

The `social-content` toolkit is provided by [Donghua Chen](https://github.com/dhchenx) with MIT License.
Rh-s-Tool 1.0.0
School project tools of Skaha
License: MIT
Requires Python: >=3.10

# 目录

### cp_lookup

- ###### cp_trans:
  
  省级行政区与地级行政区的对应关系

- ###### Inverse_dic( ):
  
  反转dic对象的key和value

- ###### ptwoc( ):
  
  根据省级行政区域名（及其简称）给出下辖所有地级行政区域名单

- ###### ctwop( ):
  
  根据地级行政区域名（及其简称）给出所属省级行政区名

- ###### fiilup_city( ):
  
  对单个地级行政区名单进行名称补完

---

### add_ll

- ###### pro_info( ):
  
  返回两个值：省级行政区的经度与纬度

- ###### city_info( ):
  
  返回两个值：地级行政区的经度与纬度

---

### critic

- ##### Critic:
  
  对pd.dataframe对象进行Critic类的实例化。pd.dataframe对象的前三列不能为指标
1. **variablity( )**：获取指标变异性数据
2. **conflict( )**：获取指标冲突性数据
3. **weights( )**：得到指标critic权重数据

---

### rsr

- ##### Rsr
  
  对pd.dataframe对象进行Rsr类的实例化。pd.dataframe对象的前三列不能为指标
1. **score_matrix1(bv_list)**：计算整次秩和比法得分。bv_list是由各指标正向最佳贡献值构成的列表

2. **score_matrix2(bv_list)**：计算非整次秩和比法得分。bv_list是由各指标正向最佳贡献值构成的列表
   
   注：所谓正向最佳贡献值，指的是从正面考虑指标贡献度时的最佳值。比如用不同指标合成金融风险指数(相较于“安全”而言“风险”是一个负面形容)，因此从正面考虑时对于正向指标其最佳值便是最低值，负向指标最佳值是最高值，适度指标由文献或前人研究来确定。

---

### NonDimension

+ ###### tiny_cinvert(mode, change_list):

将数组中极小值指标转化为极大值指标。change_list为存放需转化指标索引的列表；mode = "0"时采用倒数转换法，mode = "1"时采用被最大值相减的方法。

- ###### middle_convert(change_list, best_value):

将数组中中间型指标转化为极大值指标。change_list为存放需转化指标索引的列表；best_value为存放中间值指标最佳值的列表。

- ###### moderate_convert(change_list, low_limit, high_limit):

将数组中适度型指标转化为极大值指标。change_list为存放需转化指标索引的列表；low_limit与high_limit分别为存放适度下界与上界的列表。

- ###### toone(mode):

将数组矩阵归一化。mode = "0"时进行标准归一化， mode= "1"时进行平均归一化；mode = "2"时进行Z-score规范化；mode = "3"时进行向量归一化。

---

### topsis

- ##### **Topsis**
  
  对pd.dataframe对象进行Topsis类实例化
1. **score_matrix(weights)**：计算得分矩阵，weights为权重矩阵。得分越低越优秀。

---
toolsgram 0.0.1
Python toolbox for Telegram bots development
License: MIT
Requires Python: >=3.10

# Toolsgram

Python toolbox for Telegram bots development.

[![PyPI](https://img.shields.io/pypi/v/toolsgram?color=%231182C2&label=PyPI)](https://pypi.org/project/toolsgram/)
[![Python](https://img.shields.io/badge/Python->3.10-%23FFD140)](https://www.python.org/)
[![License](https://img.shields.io/badge/License-MIT-%23e83633)](https://github.com/sergioteula/toolsgram/blob/main/LICENSE)

This monorepo is intended solely for my personal use, since breaking changes will be
applied without any advice. So you are free to use it, but please don't ask for changes
or backwards compatibility with previous versions. Bug fixes and improvements are
welcome.