semvec/pypi-packages huggingface dataset:
cpp-source-extractor 0.1
A python library for extracting C++ function implementations from source code

# C++ Source Extractor

C++ Source Extractor is a Python library designed to extract C++ function implementations from source code files using the Clang `cindex` module.

## Features

- Extract functions by name
- Extract functions using regular expressions
- Extract functions by line number

## Installation

To use this library, ensure you have Python installed along with the `clang` library. You can install `clang` using pip:

```bash
pip install clang
```

## Usage

### Extract a Function by Name

You can extract a typical C-style function by specifying its name.

```python
from cpp_source_extractor import extract_function_by_name

code = extract_function_by_name("main", "main.cpp")
print(code)
```

### Extract a Function by Line Number

If you have the line number (from a debugger or stack trace) where the function is located, you can extract it using this method. This is recommended as it avoids issues like name mangling.

Note: The line number can be within the body of the function, not necessarily the line where the function is defined.

```python
from cpp_source_extractor import extract_function_by_line_number

code = extract_function_by_line_number(10, "main.cpp")
print(code)
```

### Add semantic information

Extracting functions wrapped in preprocessor directives can be challenging, as shown in the example below:

```c
#ifdef __os_linux__
void foo() {
    // ...
}
#elif __os_macos__
void foo() {
    // ...
}
#endif
```

Here, the function foo is defined differently based on the operating system configuration. To ensure you extract the correct version of the function, you have two options:

1. **Use Compile Arguments**: Specify the relevant macro definitions as compile arguments (e.g., `-D__os_linux__` or `-D__os_macos__`) when extracting functions:

```python
code = extract_function_by_name("foo", "main.cpp", extra_args=["-D__os_linux__"])
print(code)
```

2. **Use a Compilation Database**: Provide the path to a [JSON Compilation Database](https://clang.llvm.org/docs/JSONCompilationDatabase.html), which contains the necessary build information:

```python
code = extract_function_by_name("foo", "main.cpp", database="/path/to/compile_commands.json")
print(code)
```

You can generate a compilation database using CMake:

```bash
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .
```

Or, for Make-based projects, you can use [bear](https://github.com/rizsotto/Bear) to generate the compilation database.

## Contributing

Contributions are welcome! If you have suggestions or improvements, feel free to open an issue or submit a pull request.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
timesheet-tool 0.2.0
This is intended to be used every week to compile your time in Jira and Clockify.
Requires Python: >=3.12

# ⏰ Timesheet tool
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)

This is intended to be used every week to compile your time in Jira and Clockify.


## Authors
- [@RosaliePerron](https://github.com/RosaliePerron/)


## Installation
```bash
pip install timesheet_tool
```


## Configuration
Start by creating a copy of the environment file like so `cp .env.example .env`.
You are now ready to configure the program, here is a little explainer for every variable. 

**TOGGL_TOKEN**

This is the token from your Toggl account, retrieve it by going to https://track.toggl.com/profile, scrolling all the way down to *API Token*.

**TICKET_PREFIX**

This is the prefix used in your Jira project for the tickets you will be working on. With a ticket format that looks like this: `XXX-240`, set this variable to `XXX`.

**HOURS_IN_DAY**

This is the number of hours you will be working every day. This should be a `float`.

**MEETING_TICKET**

This is the ticket number for your ticket that englobes every "meeting" type tasks.

**JIRA_EMAIL**

The email linked to your Jira account.

**JIRA_TOKEN**

This is the token from your Jira account, retrieve it by going to https://id.atlassian.com/manage-profile/security/api-tokens. Once there, click on `Create API token`, name it however you like. Click on `Create` and set this variable to the resulting token. 

**JIRA_URL**

This is the root url of your Jira project.

**CLOCKIFY_API_KEY**

This is the API key from your Clockify account, retrieve it by going to https://clockify.me/user/settings.

**CLOCKIFY_USER_ID**

This is the user id from your Clockify account.


## How to use
1. Clone this repo somewhere on your computer.

    `git clone git@github.com:SamuelPerron/timesheet-tool.git`
2. Go into the new cloned directory.

    `cd ./timesheet-tool`
3. Configure the program by following the steps into the ***Configuration*** section.
4. Install the dependencies.

    `uv sync`
5. Invoke the script by passing it the start and end date.
    `python ./app/main.py -s {start_date} -e {end_date}`
6. The script is gonna parse through your logged time from Toggl and extract time spent working on Jira tickets. It will then output a list of the compiled times. If happy with the result, continue by inputting `y`.
7. The script will send the computed times to Jira as Jira Worklogs, make sure everything is correct and, if so, input `n` to exit the program. If an error as occured or you changed your mind and want to cancel, input `y` and all previously created Jira Worklogs will be deleted.
cuda-py 1.0.2
A very simple python wrapper for running code on CUDA devices.
Requires Python: >=3.8

# cuda-py

A very simple python wrapper for running code on CUDA devices.

```python
@cuda.run
def myCudaFunc():
    print("Look! I'm running on the GPU!")

myCudaFunc() # Run the function normally.
```

If no CUDA device is found, the code will run normally on the CPU and `WARN: No CUDA device found!` will be printed.
raincolor 0.1.4
A versatile Python module for terminal color and style formatting, allowing easy customization of text appearance in command line applications.
Requires Python: >=3.6
Keywords: terminal colors ANSI styles text formatting CLI

# Rain Colors

**Rain Colors** is a versatile Python module designed for formatting terminal output with colorful text and styles. This module simplifies the process of customizing the appearance of text in command-line applications, allowing developers to easily implement colorful interfaces.

## Features

- **Color Management**: Easily apply both foreground and background colors to text using 8-bit and 24-bit RGB options.
- **Text Styles**: Utilize various text styles like bold, italic, underline, and more.
- **Themed Messages**: Predefined styles for success, warning, and error messages for consistent UX.
- **Utility Functions**: Functions for progress bars, RGB blending, and more.

## Installation

Install the package with pip:

```bash
pip install raincolor
streamlit-iframe 0.1.0
Render an HTML iframe within a Streamlit app
Requires Python: >=3.7

# Streamlit IFrame Component

This component is an iframe wrapper that allows you to render an HTML iframe component and receive data posted using `window.parent.postMessage` in the `src` URL.

## Features

- Render an HTML iframe within a Streamlit app.
- Capture and return data posted from the iframe using `window.parent.postMessage`.

## Usage

Install streamlit-iframe with pip

```sh
pip install streamlit-iframe
```

Use the component in your Streamlit app:

```python
import streamlit as st
from streamlit_iframe import streamlit_iframe

event = streamlit_iframe({
    "src": "https://www.example.com",
    "height": "500px",
    "width": "600px",
})
```

## Development

To set up the development environment, follow these steps:

1. Create a virtual environment:
    ```sh
    python3 -m venv .venv
    source .venv/bin/activate
    ```

2. Install the required dependencies:
    ```sh
    pip install streamlit
    ```

## Running the Example

To run the example Streamlit app, use the following command:
```sh
streamlit run ./example.py
```
infernet-client 1.4.0
Infernet Node v0.3.0 REST client
Requires Python: >=3.9

# Infernet Client

Welcome to the Infernet Client, a lightweight Python library and CLI tool that streamlines interaction with the [Infernet Node](https://github.com/ritual-net/infernet-node) and the [Infernet Router](https://github.com/ritual-net/infernet-router). The Infernet Node provides robust computational capabilities through a well-defined API, while the Router allows for discovering nodes and containers running remotely, across the Infernet network.

This client aims to provide developers with a simple, efficient way to integrate and automate tasks using the Infernet [Node](#node) and [Router](#router).

## Features

- **Simple**: Streamlined methods for interacting with the Infernet Node and Router APIs.
- **Asynchronous**: Built-in async capabilities for improved performance.
- **Typed**: Complete type annotations for better editor support and reduced bugs.

## Documentation & Usage

See [infernet-client.docs.ritual.net](infernet-client.docs.ritual.net) or refer to `infernet_client/docs`.