semvec/pypi-packages huggingface dataset:
mwng-Emojipypi 0.0.1
MediaWiki API for Python 3
Requires Python: >=3.6

`mwng` (MediaWiki API NG) is a MediaWiki API library for Python 3.

## MediaWiki API
We will use `mw` to call `mwng` in this document. `import mwng as mw`!
### `API = mw.API(api_php)`
Create an `mw.API` instance.
* `api_php`: URL to the `api.php`, usually at `$SITEROOT/w/api.php`.
### `API.login(username,botpassword)`
Login via botpassword.
* `username`: the username supplied by Special:Botpasswords
* `botpassword`: the passowrd supplied by Special:Botpasswords
As of MediaWiki 1.27, using the main account for login is not supported. Obtain credentials via Special:BotPasswords or use clientlogin method. We have no plan to introduce clientlogin, so you have to use a botpassword, or do it yourself via raw `API.get` and `API.post` requests.
### `API.edit(page,content,[token,timestamp])`
Edit a page, by its ID or title.
* `page`: either the page ID or the page title
* `content`: either a dictionary or a string, if it is a string, replace the entire page with `content`.
* `token`: (Optional) the `csrf` token, can be obtained via the first returned value of `API.csrf()`, or generated by the library itself.
* `timestamp`: (Optional) a valid timestamp for detecting edit confident, can be obtained via the second returned value of `API.csrf()`. Not detecting edit confident by default.
### `API.token(type)`
Get a action token.
* `type`: The token type, can be one of these: `createaccount`, `csrf`, `deleteglobalaccount`, `login`, `patrol`, `rollback`, `setglobalaccountstatus`, `userrights`, `watch`
#### `API.logintoken()`
Get a login token (type: `login`).
#### `API.csrf()`
Get a CSRF token (type: `csrf`).
### `API.get(body)` and `API.post(body)`
Do RAW API requests, by GET or POST.
* `body`: the request parameters
## Error handling
### `mw.MWAPIError`
The father of all MediaWiki Error Class. The following data are given:
* `dump`: the RAW JSON data, in case you have to do more things to the data
* `codes`: List of error codes
* `message`: The error description text (if there are only one), or human-readable list of error codes (if there are more than one)
### `mw.MWLoginError`
Error during login. There are no error codes (an empty list), only `dump` and `message` are given.
### `mw.MWEditError`
Error during editing, the exact same as `mw.MWAPIError`.
rawproxy 0.0.8
a githubusercontent proxy tool
Requires Python: >=3.6

# Rawproxy

a tiny proxy server for raw.githubusercontent.com

It's so hard to fetch script from `https://raw.githubusercontent.com` sometimes.
So I create this proxy server to map `https://raw.githubusercontent/path/to/some/scripts` to `https://myhost/raw.githubusercontent/path/to/some/scripts`.
and deploy it on cloud. Accessibility improvements will make your life easier!

## Example



## Deploy to ubuntu server

```commandline
python3 -m pip install rawproxy
sudo ln -s $(python3 -m site --user-site)/rawproxy/rawproxy.service /etc/systemd/system/rawproxy.service
sudo systemctl daemon-reload
sudo systemctl start rawproxy.service
```
VRAresultsTest 0.1.0
Set of tools to measure and run test laid out by the 1982 Voting Rights Amendment
Requires Python: >=3.6, <4

VRA Results Tests
====

## Voter Power Indexes

Vote Power Index provides tools to run both Banzhaf Power Index and Shapley–Shubik Index to analyse 2 party poltical geographies like US Congresstional Districts to see if the reapproation process maintained Mintorities communties to elect their candidate of choice

### Usage
```python
 power_index(df, OtherPopCol, TargetPopCol, Party1, Party2, vIndex=None, filename=None)
```
#### Parameters 

df - Pandas Dataframe

OtherPopCol - Majority community 

TargetPopCol - Minority community

OtherParty - None colitlition party of choice

ColilitionParty - Colitlition party of choice

vIndex (ssi/bpi/none): 
- **None** both indexes 
- **ssi** Shapley–Shubik Index
- **bpi** Banzhaf Power Inde

filename - optional


## Racial Block Voting Tools

### Homogeneous Precinct Analysis
```python
 Homogeneous_Precinct(df, MajorityPopCol, MinorityPopCol, TotalPopCol, MajorityParty, MinorityParty)
 ```
### Ecological Regression Analysis
```python
 Ecological_Regression(df, TotalPopCol, MinorityPopCol, MajorityParty, MinorityParty)
```
df - pandas Dataframe 

MajorityPopCol - Column name for column that has Majority population

MinorityPopCol - Column name for column that has Minority population

TotalPopCol - Column name for column that has Total population

MajorityParty - Column name for column that has Majority Vote

MinorityParty - Column name for column that has Minority Vote