semvec/pypi-packages huggingface dataset:
wynn.py 0.1.0
A Python wrapper for the Wynncraft public API

# wynn.py

[![Documentation Status](https://readthedocs.org/projects/wynnpy/badge/?version=latest)](https://wynnpy.readthedocs.io/en/latest/?badge=latest)
[![PyPI](https://img.shields.io/pypi/v/wynn.py)](https://pypi.org/project/wynn.py/)

A Python wrapper for the Wynncraft public API

## Basic usage

API wrappers are found under the `wynn` package. To fetch a player's
data, for example, you can use

```python
wynn.player.get_player('playerName')
```
i3wins 0.0.4
Yet another i3 window switcher

# i3wins/i3lasts

As the name might suggest, this is a wrapper to rofi acting as a window-switcher.

I found `-show window` option to be quite slow, and would often get in the way. On another topic, I use i3 in an XFCE environment (for the PM and such)… and the virtual desktops would conflicts, and be generally weird.

i3wins is fast and won't get in the way.

i3lasts is also a window-switcher, but it keeps track of your focused windows through time. It's insanely effective if you go back and forth a lot. It comes as a server (which need to be running at all time) / client as i3 won't keep track of those.

# Pre-requisites

- i3
- rofi
- a working python3 environment can help
- libi3ipc (`libi3ipc-glib` on ubuntu/debian)

# Installation

I recommand using some virtual environments.

```bash
python3 -m venv new_folder
source new_folder/bin/activate
pip install i3wins
deactivate
```

If you're a more yolo-oriented person : `pip install --user i3wins`

You can now run : `new_folder/bin/i3wins`

# Help !

No help. All options you give to i3wins are directly sent to rofi. 

Check rofi manpage.

# Settings

Here's a snippet from my i3 config:

## i3wins

```
bindsym Mod1+Tab exec "/home/fuzzy/.local/share/virtualenvs/i3switch/bin/i3wins -kb-row-down 'Down,Control+n,Alt+Tab' -kb-accept-entry '!Alt+Tab,!Alt_L,!Alt+Alt_L,Return'"
```

## i3lasts

```
bindsym Mod1+space exec "/home/fuzzy/.local/share/virtualenvs/i3switch/bin/i3lastc"
[...]
exec --no-startup-id "/home/fuzzy/.local/share/virtualenvs/i3switch/bin/i3lasts -kb-row-down 'Down,Control+n,Alt+space,space' -kb-accept-entry '!Alt+space,!Alt_L,!Alt+Alt_L,Return'"
```

Feel free to use it as-is. Or modify it into oblivion.

# Some explanation on the i3 config

Long story made short :
- Faster mode : Hold Alt, then press Tab as many times as needed, when you're where you want : release Tab *then* Alt.
- Not so fast : Hold Alt, then press Tab and release Alt while still holding Tab : the window will stay there, you can search text, scroll, validate with a single press on Alt, or the good'ol Enter key

(the spacebar has the same behavior)

You'll get used to it.

# More swag

## Keys

Have you noticed desktops are displayed with d1, d2, d3, … And that windows are numbered in the relevant order with 'w' ?

Have you noticed how close d and w are close to the tab key ?

… just saying.

## Eyes

- Current desk is pink
- Current window is yellow
- I think you're cool
- Have a mojito.

Colors are hardcoded and were set by yours truly for ecstatic co-workers' high-fives and maximum swaginess in every situation. But they're still designed for darker themes of rofi.

# Todo

- Handles URGENCY,
- tags Fullscreen windows as such,
- deal with vim-marks and more i3-specific concepts (tree depth for examples).
- show current desktop windows in the right order (they are in reverse currently)
- Support for rofi 1.5.4 (allows icons in dmenu mode)
imperium 0.0.11
Imperium is a python package that allows you to easily evaluate python expressions

# Imperium
> Imperium is a python package that allows you to easily evaluate python expressions

## Installation
```bash
pip install imperium
```

## Usage
```python
from imperium.evaluator import Expression

obj = {
    'name': 'iPhone',
    'model': '11 Pro',
    'price': 1299.90,
    'state': 'new'
}

expr = Expression()
if expr.evaluate('$subject.state == "new"', obj): # "$subject" is a reserved key
    # Your logic
```
To access the data in the given subject, use the "$subject" key as shown above.

### Check if the subject has an attribute
```python
from imperium.evaluator import Expression

obj = {
    'name': 'iPhone',
    'model': '11 Pro',
    'price': 1299.90,
    'state': 'new'
}

someother_obj = {
    'name': 'John Doe'
}

expr = Expression()
res = expr.evaluate('exists("$subject.price", $subject)', subject=obj, source=someother_obj) # REMINDER: "$subject" key let's you access the object that you passed to the evaluate method (obj in this case)
print(res) # Output: True
```

### Testing regular expressions
```python
from imperium.evaluator import Expression

obj = {
    'name': 'iPhone',
    'model': '11 Pro',
    'price': 1299.90,
    'state': 'new'
}

buyer = {
    'fullname': 'John Doe'
}

# Passing the name attribute of the subject
# REMINDER: "$subject" let's you access the object/subject passed to the evaluate method (obj in this case)
# and "$source" let's you access the optional source object passed to the evaluate method 
expression = "exists('$subject.name', $subject) && matches('IPHONE', $subject['name'], 'i')"

expr = Expression()
res = expr.evaluate(expression, subject=obj, source=buyer)
print(res) # Output: True
```

**Imperium** has built-in functions to simplify certain actions/verifications.

Function            |   Argument(s)                                             |   Description
--------------------|-----------------------------------------------------------|----------------
**exists()**        | key (Ex: $subject.price), $subject                        | Checks if the given attribute/key exists in the given subject.
**matches()**       | regex, value, flag (**i** or **m**)                       | Tests a regular expression
**date()**          | datestring, format                                        | **datestring** and **format** are both optional, provide them to the function if you want to convert a date string to date object. <br> If these two arguments are left emtpy, the function returns date object with current date and time.
**date_modify()**   | date, operation (**+** \| **-**), valuetype (**days** \| **months** \| **years**), value: **int**  | This function can add and subtract days, months and years from a date object.
bmp-280 0.1.2
Python3 I2C Driver & Application for BMP280 Pressure Sensor
Requires Python: >=3.6

# BMP280 Digital Pressure Sensor Driver for Python3

BMP280 is a digital pressure sensor manufactured by Bosch Sensortec. With this driver, you can use BMP280 with Python3 over I2C.

## Dependencies
Only smbus2 other than Python. 

## Installation
```bash
pip3 install bmp-280
```

## Usage
```bash
run-bmp280
```
or
```python
from bmp_280 import BMP280
from time import sleep

bmp = BMP280(port=1, mode=BMP280.FORCED_MODE, oversampling_p=BMP280.OVERSAMPLING_P_x16, oversampling_t=BMP280.OVERSAMPLING_T_x1,
            filter=BMP280.IIR_FILTER_OFF, standby=BMP280.T_STANDBY_1000)

pressure = bmp.read_pressure()
temp = bmp.read_temperature()

print("Pressure (hPa): " + str(pressure))
print("Temperature (°C): " + str(temp))
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)
lis3dh 0.2
Python3 I2C Driver & Application for LIS3DH Accelerometer
Requires Python: >=3.6

# LIS3DH Accelerometer I2C Driver for Python3

LIS3DH is an accelerometer manufactured by ST Microelectronics. With this driver, you can use LIS3DH with Python3 over I2C.

## Dependencies
Only smbus2 other than Python. 

## Installation
```bash
pip3 install lis3dh
```

## Usage
From command line;
```bash
run-lis3dh
```
From Python script;
```python
from lis3dh import LIS3DH, device
from time import sleep

registers = device()
lis = LIS3DH(port=1, scale=registers.CTRL_REG4.SCALE_4G, data_rate=registers.CTRL_REG1.ODR_10Hz)

data = lis.read_dummy_register()
print("DUMMY REG CHECK ERROR: " + str(data)) # 0: No Error, -1: Error

lis.enable_axes(registers.CTRL_REG1.Xen | registers.CTRL_REG1.Yen | registers.CTRL_REG1.Zen)

while lis.read_data_ready_register() == lis.ERROR:
    sleep(0.25)

data = lis.read_all_axes()
print("x(g): {}, y(g): {}, z(g): {}".format(data[0], data[1], data[2]))
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)