semvec/pypi-packages huggingface dataset:
pytutor 0.1
An interface to run Phillip Guo's Python Tutor
License: MIT
Keywords: tracing,education,okpy,python tutor

Generate traces via Python Tutor locally (and visualize them in browser) 

Usage: 

```
from pytutor import generate_trace 

modules = {'helper': 'foo = 1'}
setup_code = "y = 4"
trace = generate_trace.run_logger('x = 1 + y' , setup_code , modules)
trace_dict = json.loads(trace)

# To visualize in browser
# from pytutor import server
# server.run_server(trace)
```

More info: 
https://github.com/okpy/pytutor
cdmc 0.1.1
Tools for using the Cinco De Mayo Calendar
License: MIT
Keywords: novelty-calendars

====
CDMC - Cinco De Mayo Calendar tools
====

See the chat logs. ( at https://tilde.town/~minerobber/cdmc.txt )

Includes 2 scripts:
* cdmdate - the date in the CDM Calendar
* cdmcdateconv - A date converter to convert "plebian" normal dates into the "obviously superior" CDM format.

The module, "cdmc", includes methods:
* today() - get today in the CDM calendar
* specific_day(y,m,d) - get day y-m-d in the CDM Calendar

As well as the class Date, which has a constructor that takes a datetime.date object (defaults to datetime.date.today()) and a datetime.date object respresenting the Cinco de Mayo you want to use as a reference point, (defaults to the Cinco de Mayo that is coming up from the datetime.date.today() date) and gives you a CDM date object.
guac 1.0.0
Hakell-inspired monadic do-notation in Python
License: MIT
Keywords: monad,monadic,coroutine,generator,pypy,backtracking

Monadic Do-Notation
-------------------

Guac provides monadic do-notation, inspired by Haskell, in Python. Monads provide "programmable semicolons" by which the behavior of programs can be changed. A common, useful monad is the list monad, which represents non-deterministic computations. The list monad makes it very easy to write backtracking searches.

Requirements
-------------

Guac requires an implementation of Python 3 that supports ``copy.deepcopy`` on generator functions. The most common distribution, CPython, is lacking this feature, but pypy implements it!

Example
--------

Here's an example that computes all the possible ways you can give $0.47 change with pennies, nickels, dimes, and quarters:

.. code:: python

   from guac import *
   
   @monadic(ListMonad)
   def make_change(amount_still_owed, possible_coins):
       change = []
       
       # Keep adding coins while we owe them money and there are still coins.
       while amount_still_owed > 0 and possible_coins:
       
           # "Nondeterministically" choose whether to give anther coin of this value.
           # Aka, try both branches, and return both results.
           give_min_coin = yield [True, False]
           
           if give_min_coin:
               # Give coin
               min_coin = possible_coins[0]
               change.append(min_coin)
               amount_still_owed -= min_coin
           else:
               # Never give this coin value again (in this branch!)
               del possible_coins[0]
               
       # Did we charge them the right amount?
       yield guard(amount_still_owed == 0)
       
       # Lift the result back into the monad.
       yield lift(change)
       
   print(make_change(27, [1, 5, 10, 25]))

Running this program will print a list of lists, each list containing a different set of numbers that add up to 27. You can imagine lots of cool ways this could be used, from unification to parsing!

To learn more, check out the README.