semvec/pypi-packages huggingface dataset:
cbirds 0.1.0
Combinatory Birds
Requires Python: >=3.7
Keywords: cbirds,combinator,birds,combinator birds,logic

# cbirds

![](https://github.com/jotaalvim/cbirds/blob/main/cbirds_logo.png?raw=true)

---
## Combinator Birds

> This is a port of the haskell package [Data.Aviary.Birds](https://hackage.haskell.org/package/data-aviary-0.4.0/docs/Data-Aviary-Birds.html). Please check this out if you want to see more details about the birds.

``cbirds`` is a module intended for demonstration purposes rather than functional or practical use. The objective is to
support the **combinator birds** in a pointfree style programming.

The only way to make sense of function combinators in python would be in a pointfree context. 
Lucky for us, there is a [pointfree](https://pypi.org/project/pointfree/)
module that allows us, e.g., to compose functions smoothly and enable partial application of functions and methods. 

Pointfree style has a few downsides. I'm afraid this is an unsuccessful attempt to join python pointfree and the 
use combinator birds. It is just a matter of time before it becomes an unreadable mess.

## Examples

Let's define a function keephalf, keephalf is a function that return the first half of a list. 
```
>>> keephalf([1,2,3,4,5,6,7,8,9,10])
[1, 2, 3, 4, 5]
```

I'll start by defining our own (@pointfree) version of length, integer division and and take, 
these functions are going to useful in the making of keephalf.

```python
@pointfree
def pflen(l): return len(l) 
@pointfree
def div(a,x): return a // x
@pointfree
def take(n,l): return l[0:n]
```

Although the code below does not look like python I can guarantee you that it is!
In the examples bellow the * symbol means function composition (from the ``pointfree`` module). For the ones wanting to
reach the highest level of bird use, there's a combinator that composes functions: the **bluebird** but for reasons of
readability we'll use * ,for now. 

The most intuitive birds to use in the making of keephalf is the **phoenix**.
The phoenix passes a single value through two different functions, 
and pass the results to a two-parameter function. We'll also use the **idiot** bird, that is the identity function.

```python
#phoenix x y z w = x (y w) (z w)
#idiot x = x

keephalf = phoenix (take, cardinal (div,2) * pflen, idiot)
```

Let's try different birds now, let's use the **starling** and the **cardinal** .
The starling passes a value straight and also through a function to another function of arity 2, and the
cardinal that swaps the argument order.

```python
#starling = x y z = x z (y z)
#cardinal x y z = x (z y)

keephalf2 = starling (cardinal (take), cardinal (div,2) * pflen)
```

We can also use the **warbler** and the **cardinal__**. The warbler is a elementary duplicator, the cardinal__
pass first argument straight, and second argument through a function,
to a two-parameter function

```python
#cardinal_ x y z w = x (y w) z
#warbler x y = x y y
keephalf3 = warbler (cardinal_ (take , cardinal(div, 2) * pflen))
```
sisyphus-control 3.1.3
Control your Sisyphus kinetic art tables (sisyphus-industries.com)
Requires Python: >=3.8
Keywords: sisyphus

====================
``sisyphus-control``
====================

Control your `Sisyphus Kinetic Art Table <https://www.sisyphus-industries.com>`_
from Python 3.6 with ``asyncio``!

This initial release is mainly targeting the functionality needed for basic integrations with home automation systems such as `Home Assistant <https://www.home-assistant.io/components/sisyphus/>`_:

* Status queries (playing/paused/current playlist/current/track/brightness/speed)
* Play controls (play/pause/shuffle/loop/set playlist/set track)
* Table controls (movement speed, LED brightness)

*************
Usage example
*************

Finding tables on your network
==============================
To find the IP addresses of all tables on your local network. This is a very naive search; it assumes your subnet
mask is ``255.255.255.0``::

  from sisyphus_control import Table

  ip_addrs = await Table.find_table_ips()

Once you know the IP address, connect to the table::

  async with await Table.connect(ip_addr) as Table:
    # Do stuff here

Change notifications
====================
Register for state change notifications::

  table.add_listener(my_listener)

Basic controls
==============
In addition to a bunch of properties for querying the current state of the table, ``Table`` has several methods that
allow simple control::

  await table.set_brightness(1.0)  # Set maximum LED brightness
  await table.set_speed(0.5)  # Set half speed
  await table.play()  # Resume playing (if not already playing)

Working with playlists and tracks
=================================
``Playlist`` and ``Track`` objects represent playlists and tracks, respectively. The following code will start playing
the Default Playlist, beginning at the track named "Hep" (note that neither playlists nor tracks are required to be
uniquely named)::

  default_playlist = table.get_playlists_named("Default Playlist")[0]
  hep_track = default_playlist.get_tracks_named("Hep")[0]
  await hep_track.play()

********************
Future opportunities
********************

The following features would be reasonable to include; I'll happily accept pull requests:

* Playlist editing
* Upload tracks to table
* Track thumbnail rendering
* Table administration (wifi settings, etc.)
* Interactions with Sisyphus cloud
pmag-tilt 1.0.0
This code package contains functions to perform the analysis needed for continental marginal tilt and as supplementary material to Mirzaei et al. (2023). However, it can also be used for the following applications: converting unit vectors from XYZ to polar coordinates and vice versa, finding the angle between vectors (directions), APWP interpolation, and wherever the goal is to find the amount of tilt (or folding) by comparing paleomagnetic directions.
Requires Python: >=3.7

This code package contains functions to perform the analysis needed for continental marginal tilt and as supplementary material to Mirzaei et al. (2023). However, it can also be used for the following applications: converting unit vectors from XYZ to polar coordinates and vice versa, finding the angle between vectors (directions), APWP interpolation, and wherever the goal is to find the amount of tilt (or folding) by comparing paleomagnetic directions.

For more details about each function please refer to description part of each function.