semvec/pypi-packages huggingface dataset:
BaseballFaker 0.0.3
A small example package
Requires Python: >=3.7

# ![image](https://github.com/JKolodny/BaseballFaker/assets/24982246/a964ab4e-bf43-41b7-9c41-0b8a5e2379e9)

![image](https://github.com/JKolodny/BaseballFaker/assets/24982246/b6762139-61eb-44d4-a7c3-2762ed5c9659)

## Motivation

* Lately, when trying to work on sports analytics projects, I realize that a big
bottleneck (at least for me) is getting my hands on data. In effect, this makes it so that when I want to start a project, I try to re-learn a little about web scraping for a day or two, and then quit soon after that. 

* The value I'm trying to create here is the ability to generate simple, probably not great, but reasonable fake data for use in projects before committing to developing web scraping pipelines.

## Usage 
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1i2MNvq7QqfESSEbhTfe1WYn05_WtMeK-?usp=sharing)

```
from baseballfaker.baseball import batting

batting(CAREER_LENGTH=10, 
        skill_level=.9)
```

* Example Output:
    * see __example.ipynb__:
      * ![image](https://github.com/JKolodny/SportFaker/assets/24982246/6578c484-5247-41e9-9d7f-9cd22233bb80)

## License

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
tkoplus 0.1
tkoplus
Requires Python: >=3.11

A package for Windows 11 users who use the Tkinter framework.
With the help of this package, you will be able to change the title bar color of your software in Windows 11.
Example:
     To change the color of the toolbar:
     from tkoplus import wind11
     wind11.titlebar.bg(master,color="cyan")

     To change the color of the text in the title bar:
     from tkoplus import wind11
     wind11.titlebar.title(master,color="cyan")


Note that color codes cannot be used in the "color" field.

To display the available colors in tkoplus:
rom tkoplus import colors
print(colors)
toronto-open-data-alexwaolson 0.1.0
A package for easily accessing Toronto Open Data
Requires Python: >=3.7

# TorontoOpenData Python Package

## Overview

The `TorontoOpenData` package provides a Python interface to interact with the Toronto Open Data portal. It allows users to list, search, and download datasets, as well as load specific resources.

## Installation

To install the package, run:

```bash
pip install toronto-open-data
```

## Dependencies

- `pandas`
- `wget`
- `tqdm`
- `ckanapi`

## Usage

### Initialization

Initialize the `TorontoOpenData` class:

```python
from TorontoOpenData import TorontoOpenData
tod = TorontoOpenData(api_key='your_api_key_here') # API key is optional
```

### List All Datasets

List all available datasets:

```python
datasets = tod.list_all_datasets()
```

### Search Datasets

Search datasets by keyword:

```python
search_results = tod.search_datasets('parks')
```

### Download Dataset

Download a specific dataset:

```python
tod.download_dataset('dataset_name')
```

### Load Dataset

Load a specific file from a dataset:

```python
file_path = tod.load('dataset_name', 'file_name.csv', smart_return=False)
```

Load a specific file, returning an object if supported (default behaviour):

```python
file_object = tod.load('dataset_name', 'file_name.csv', smart_return=True)
```

## Methods

- `list_all_datasets(as_frame=True)`: List all datasets.
- `search_datasets(query, as_frame=True)`: Search datasets by keyword.
- `search_resources_by_name(name, as_frame=True)`: Get dataset by name.
- `download_dataset(name, file_path='./cache/', overwrite=False)`: Download resource.
- `load(name, filename, file_path='./cache/', reload=False, smart_return=True)`: Load a file from the dataset.

## Smart Return File Types

The package supports smart return for the following file types:

- csv
- docx
- gpkg
- geojson
- jpeg
- json
- kml
- pdf
- sav
- shp
- txt
- xlsm
- xlsx
- xml
- xsd

## License

MIT License
SportFaker 0.0.1
A small example package
Requires Python: >=3.7

# ![image](https://github.com/JKolodny/BaseballFaker/assets/24982246/a964ab4e-bf43-41b7-9c41-0b8a5e2379e9)

![image](https://github.com/JKolodny/BaseballFaker/assets/24982246/b6762139-61eb-44d4-a7c3-2762ed5c9659)

## Motivation

* Lately, when trying to work on sports analytics projects, I realize that a big
bottleneck (at least for me) is getting my hands on data. In effect, this makes it so that when I want to start a project, I try to re-learn a little about web scraping for a day or two, and then quit soon after that. 

* The value I'm trying to create here is the ability to generate simple, probably not great, but reasonable fake data for use in projects before committing to developing web scraping pipelines.

## Usage 
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1i2MNvq7QqfESSEbhTfe1WYn05_WtMeK-?usp=sharing)

```
from baseballfaker.baseball import batting

batting(CAREER_LENGTH=10, 
        skill_level=.9)
```

* Example Output:
    * see __example.ipynb__:
      * ![image](https://github.com/JKolodny/SportFaker/assets/24982246/6578c484-5247-41e9-9d7f-9cd22233bb80)

## License

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
hql-parser 0.0.7
Parsing DDL files of HIVE
Requires Python: >=3.4
Keywords: parser;sql;hive;ddl

# hql_parser

A parser package which extracts fields, types and comments from a HIVE DDL. For instance, given the next `ddl.sql` file

```sql
CREATE TABLE `school.student`(
  `dni` varchar(100) COMMENT 'Identificator National Number', 
  `first_name` varchar(10) COMMENT 'First name', 
  `second_name` varchar(50) COMMENT 'Second name', 
  `age` int COMMENT 'How old is this student', 
  `nickname` varchar(30) COMMENT 'Nickname', 
  `flg_estado` smallint COMMENT 'Flag (1 - Active, 0 - No Active)')
CLUSTERED BY (dni) 
INTO 1 BUCKETS
ROW FORMAT SERDE 
  'org.apache.hadoop.hive.ql.io.orc.OrcSerde' 
STORED AS INPUTFORMAT 
  'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat' 
OUTPUTFORMAT 
  'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
LOCATION
  'hdfs://nnha/data/environment/datalake/school/student'
TBLPROPERTIES (
  'last_modified_by'='root', 
  'last_modified_time'='1662590768', 
  'numFiles'='1600', 
  'totalSize'='1913197', 
  'transactional'='true', 
  'transient_lastDdlTime'='1666985788')

```

It can be parsed as followed:

```py
from hql_parser import DDL_Handler
ddlh = DDL_Handler()
obj = ddlh.file_parser('ddl.sql')
print(obj)
```

The result is a three-items list:

- Position 0: schema name

- Position 1: table name

- Position 2: a list of table field with following the format `{'field': '', 'ttype': '', 'comment': ''}`


This example prints the next output
```py
[
  'school', 
  'student', 
  [
    {'field': 'dni', 'ttype': 'varchar(100)', 'comment': 'Identificator National Number'}, 
    {'field': 'first_name', 'ttype': 'varchar(10)', 'comment': 'First name'}, 
    {'field': 'second_name', 'ttype': 'varchar(50)', 'comment': 'Second name'}, 
    {'field': 'age', 'ttype': 'int', 'comment': 'How old is this student'}, 
    {'field': 'nickname', 'ttype': 'varchar(30)', 'comment': 'Nickname'}, 
    {'field': 'flg_estado', 'ttype': 'smallint', 'comment': 'Flag (1 - Active, 0 - No Active)'}
  ]
]
```

On the other hand, we can parse a content variable as next:

```py
obj = ddl_parser(ddl_content_str)
```
aws-hcs-cli 6.4.1
AWS CLI authenticator via ADFS - small command-line tool to authenticate via ADFS and assume chosen role
Requires Python: >=3.7,<4.0
Keywords: aws,adfs,console,tool

aws-hcs-cli
Python script for CLI and SDK access to AWS via ADFS while requiring MFA access using https://duo.com/

History and Purpose
Harman used to use "the Legendary" aws-adfs CLI tool to login to our AWS accounts. It worked great, especially the DUO 2FA support. Eventually, I decided to write my own similar tool but make it Harman-specific so that we could tailor it to our needs. Since this tool will be used by Harman employees only I had that option. I then morphed it a little more for our use cases.

DUO 2FA Requirements
In order for Duo 2FA to work properly Automatic Push needs to be enabled.

Installation
Python 3.6+ is recommended as python2 is EOL January 2020.
It is highly recommended to use an application like Pipx to install and use python cli applications.
Follow the pipx installation documentation then simply run pipx install aws-hcs-cli
Experimental Binaries are available on the releases page. These are new and in testing Releases
See the installation options For additional options page for step by step instructions for installing in various environments
cs.ratelimit 1.3.1
Ratelimit components
Requires Python: >=3.8

![CrowdStrike cs.ratelimit](https://raw.githubusercontent.com/CrowdStrike/cs.ratelimit/main/docs/img/cs-logo.png)

# cs.ratelimit

This provides a threadsafe configurable rate limiter to a Python callable.

It's easy to create a rate limited function
```python
>>> from datetime import datetime, timedelta
>>> from cs import ratelimit
>>> @ratelimit.ratelimited(max_count=1, interval=timedelta(seconds=1), block=False)
... def my_func():
...     pass
>>> my_func()
>>> try:
...     my_func()
... except ratelimit.RateLimitExceeded:
...     print(u"Too fast!")
Too fast!
```
We can just as easily make it a blocking rate limiter
```python
>>> @ratelimit.ratelimited(max_count=1, interval=timedelta(seconds=1), block=True)
... def my_func():
...     pass
>>> my_func()
>>> my_func() # blocks, doesn't raise

```

It's also easy to create a class-level rate limited method
```python
>>> class MyClass1:
...     @ratelimit.ratelimitedmethod(max_count=1, interval=timedelta(seconds=1), block=False)
...     def my_method(self):
...         pass
>>> instance1 = MyClass1()
>>> instance2 = MyClass1()
>>> instance1.my_method()
>>> try:
...     instance2.my_method()
... except ratelimit.RateLimitExceeded:
...     print(u"Too fast!")
Too fast!
```

A more advanced use case is per-instance limiters
```python
>>> from operator import attrgetter
>>> class MyClass2:
...     def __init__(self):
...         self.rl = ratelimit.RateLimitProperties(max_count=1,
...                                       interval=timedelta(seconds=1),
...                                       block=False)
...     @ratelimit.ratelimitedmethod(attrgetter('rl'))
...     def my_method(self):
...         pass
>>> instance1 = MyClass2()
>>> instance2 = MyClass2()

The rate limiters in these instances are independent
>>> instance1.my_method()
>>> instance2.my_method()
>>> try:
...     instance1.my_method()
... except ratelimit.RateLimitExceeded:
...     print(u"Too fast!")
Too fast!
```
They can also be updated at any time
```python
>>> with instance2.rl.rlock: #needed in threaded environments
...     instance2.rl.max_count = 2
>>> instance2.my_method()

```


---

<p align="center">
  <img src="https://raw.githubusercontent.com/CrowdStrike/cs.ratelimit/main/docs/img/cs-logo-footer.png"><br/>
  <img width="300px" src="https://raw.githubusercontent.com/CrowdStrike/cs.ratelimit/main/docs/img/alliance_team.png">
</p>
<h3><p align="center">WE STOP BREACHES</p></h3>