<commit_before>PyCA – Python C extension Assistant
====================================

Generates Python C API code in order to aid in C extension development.

Copyright (c) 2009 <NAME>.
Licensed under MIT.

Commands
--------

mk
^^^^^^

usage: pyca mk func|meth|smeth SIGNATURE...

The ``mk`` command generates code for functions (``mk func``), methods (``mk meth``) and static methods  (``mk smeth``). A ``SIGNATURE`` looks like a regular Python *def* with the addition of *types*. The symbol used to express type are the same used for ``PyArg_Parse``. See http://docs.python.org/c-api/arg.html for a detailed overview.

**Example:**
  
  #!/bin/sh
  $ ./pyca mk meth 'mymod.SomeClass.echo(s msg, i times=3, s# prefix = "")'
  > docs/source/mymod.SomeClass.echo.rst:
      .. method:: echo(msg, times=3, prefix="")

  > src/mymod_SomeClass.h:
    /**
     * @param const char *msg
     * @param int times = 3
     * @param const char *prefix = ""
     */
    PyObject *mymod_SomeClass_echo(PyObject *self, PyObject *args, PyObject *kwargs);

  > src/mymod_SomeClass.c:
    /**
     * mymod.SomeClass.echo(s msg, i times=3, s# prefix = "")
     */
    PyObject *mymod_SomeClass_echo(PyObject *self, PyObject *args, PyObject *kwargs) {
      const char *msg = NULL;
      int times = 3;
      const char *prefix = "";
      int prefix_length = 0;
      static char *kwlist[] = {"msg", "times", "prefix", NULL};
    
      /* Parse arguments */
      if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|is#:echo", kwlist,
        &msg, &times, &prefix, &prefix_length))
      {
        return NULL;
      }
    
      /* TODO: implementation */
      PyErr_SetString(PyExc_NotImplementedError, "helloworld.echo");
      return NULL;
    }
<commit_msg>trying to fix the broken github rst stuff<commit_after>PyCA – Python C extension Assistant
====================================

Generates Python C API code in order to aid in C extension development.

Copyright (c) 2009 <NAME>.
Licensed under MIT.

Commands
--------

mk
^^^^^^

::

  usage: pyca mk func|meth|smeth SIGNATURE...

The *mk* command generates code for functions (*mk func*), methods (*mk meth*) and static methods  (*mk smeth*). A *SIGNATURE* looks like a regular Python *def* with the addition of *types*. The symbol used to express type are the same used for *PyArg_Parse*. See http://docs.python.org/c-api/arg.html for a detailed overview.

**Example:**

::
  
  $ ./pyca mk meth 'mymod.SomeClass.echo(s msg, i times=3, s# prefix = "")'
  > docs/source/mymod.SomeClass.echo.rst:
      .. method:: echo(msg, times=3, prefix="")

  > src/mymod_SomeClass.h:
    /**
     * @param const char *msg
     * @param int times = 3
     * @param const char *prefix = ""
     */
    PyObject *mymod_SomeClass_echo(PyObject *self, PyObject *args, PyObject *kwargs);

  > src/mymod_SomeClass.c:
    /**
     * mymod.SomeClass.echo(s msg, i times=3, s# prefix = "")
     */
    PyObject *mymod_SomeClass_echo(PyObject *self, PyObject *args, PyObject *kwargs) {
      const char *msg = NULL;
      int times = 3;
      const char *prefix = "";
      int prefix_length = 0;
      static char *kwlist[] = {"msg", "times", "prefix", NULL};
    
      /* Parse arguments */
      if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|is#:echo", kwlist,
        &msg, &times, &prefix, &prefix_length))
      {
        return NULL;
      }
    
      /* TODO: implementation */
      PyErr_SetString(PyExc_NotImplementedError, "helloworld.echo");
      return NULL;
    }

{'fraction_non_alphanumeric': 0.16107000569151964, 'fraction_numerical': 0.005691519635742743, 'mean_word_length': 2.9717514124293785, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1908339', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1131, 'n_words': 346}