semvec/pypi-packages huggingface dataset:
dttools 0.1.2
A simple library for common date and time manipulations
Requires Python: >=3.6

# dttols

A simple library for common date and time manipulations.

## Installation

```bash
pip pip install dttools
```

## Usage

```py
# Adding Business Days
from dttools import add_business_days
from datetime import datetime

start_date = datetime(2023, 11, 10)
new_date = add_business_days(start_date, 5)
print(new_date)  # Output: A date 5 business days from the start_date, skipping weekends

```

```py
# Calculating Business Days Between Dates
from dttools import days_between_in_business_days
from datetime import datetime

start_date = datetime(2023, 11, 1)
end_date = datetime(2023, 11, 10)
business_days = days_between_in_business_days(start_date, end_date)
print(business_days)  # Output: The count of business days between the two dates

```

```py
# Formatting Relative Dates
from dttools import format_relative_date
from datetime import datetime, timedelta

some_date = datetime.now() - timedelta(days=3)
relative_format = format_relative_date(some_date)
print(relative_format)  # Output: "3 days ago"

```

```py
# Converting to a Specific Time Zone
from dttools import to_timezone
from datetime import datetime

utc_time = datetime.utcnow()
new_york_time = to_timezone(utc_time, "America/New_York")
print(new_york_time)  # Output: The datetime converted to New York time


```
rdlocrand 1.0.5
Local Randomization Methods for RD Designs
Requires Python: >=3.8

# rdlocrand: Local Randomization Methods for RD Designs

## Description
The regression discontinuity (RD) design is a popular quasi-experimental design for causal inference and policy evaluation. Under the local randomization approach, RD designs can be interpreted as randomized experiments inside a window around the cutoff. The `rdlocrand` package provides tools to analyze RD designs under local randomization:

- `rdrandinf` to perform hypothesis testing using randomization inference.
- `rdwinselect` to select a window around the cutoff in which randomization is likely to hold.
- `rdsensitivity` to assess the sensitivity of the results to different window lengths and null hypotheses.
- `rdrbounds` to construct Rosenbaum bounds for sensitivity to unobserved confounders.

For more details, and related Stata and R packages useful for the analysis of RD designs, visit [https://rdpackages.github.io/](https://rdpackages.github.io/).

## Author
Matias Cattaneo, Princeton University. Email: cattaneo@princeton.edu

Rocio Titiunik, Princeton University. Email: titiunik@princeton.edu

Ricardo Masini, UC Davis. Email: rmasini@ucdavis.edu

Gonzalo Vazquez-Bare, UC Santa Barbara. Email: gvazquez@econ.ucsb.edu

## Installation

To install/update use pip
```
pip install rdlocrand
```

# Usage
```
from rdlocrand import rdrandinf, rdwinselect, rdsensitivity, rdrbounds
```

## References

For overviews and introductions, see [rdpackages website](https://rdpackages.github.io).

- Cattaneo, M.D., B. Frandsen, and R. Titiunik. (2015). [Randomization Inference in the Regression Discontinuity Design: An Application to Party Advantages in the U.S. Senate](https://rdpackages.github.io/references/Cattaneo-Frandsen-Titiunik_2015_JCI.pdf). *Journal of Causal Inference* 3(1): 1-24.

- Cattaneo, M.D., R. Titiunik, and G. Vazquez-Bare. (2016). [Inference in Regression Discontinuity Designs under Local Randomization](https://rdpackages.github.io/references/Cattaneo-Titiunik-VazquezBare_2016_Stata.pdf). *Stata Journal* 16(2): 331-367.

- Cattaneo, M.D., R. Titiunik, and G. Vazquez-Bare. (2017). [Comparing Inference Approaches for RD Designs: A Reexamination of the Effect of Head Start on Child Mortality](https://rdpackages.github.io/references/Cattaneo-Titiunik-VazquezBare_2017_JPAM.pdf). *Journal of Policy Analysis and Management* 36(3): 643-681.

- Rosenbaum, P. (2002). *Observational Studies*. Springer.

<br><br>