semvec/pypi-packages huggingface dataset:
safarireadinglist 0.1.1
Safari reading list
Requires Python: >=3.6

# Safari reading list in Python

`safarireadinglist` is a Python package to load your Safari reading list into Python, and to export it, including thumbnail icons.

<img src="https://github.com/smrfeld/export-safari-reading-list/blob/main/readme_imgs/reading_list.jpg?raw=true" alt="drawing" width="400"/>

## Sample results

<img src="https://github.com/smrfeld/export-safari-reading-list/blob/main/readme_imgs/json.png?raw=true" alt="drawing" width="700"/>

<img src="https://github.com/smrfeld/export-safari-reading-list/blob/main/readme_imgs/csv.png?raw=true" alt="drawing" width="700"/>

## Installation

Install the `safarireadinglist` package from PyPI:

```bash
pip install safarireadinglist
```

Note: before using, you need to give the terminal full disk access in the system preferences. Go to `Settings/Security & Privacy/Full Disk Access`. Navigate to `/Applications/Utilities/` folder and choose the `Terminal` app. If you are launching the command from VS Code you will need to add this as well.

*Alternative local installation:*

```bash
pip install -e .
```

Note: `setuptools` is the only requirement. For dev purposes, you may want to install the exact versions in `pip install -r requirements.txt`.

## Usage

In the command line, execute:

```bash
export-safari-rl export
```

The reading list will be in `reading_list.json`. You may also provide other options: `export-safari-rl --help`.

You can also export the icons from the reading list:

```bash
export-safari-rl export-icons
```

The icons will be in the `reading_list_icons` folder.

See also the [README](examples/README.md) in the [examples](examples) folder for more examples.

### Python package

The package is a Python package and can also be used as such. See [example_python.py](examples/example_python.py) for an example.

### Example of output format

See [reading_list.json](reading_list.json). The format is a list of dictionaries, where each dictionary conforms to the `safarireadinglist.ReadingListItem` dataclass.

### Website

To generate the website from the `website` folder, run:
```
cd website
python website.py reading_list.json reading_list_icons
```
The output is in the `website_out` folder.

<img src="https://github.com/smrfeld/export-safari-reading-list/blob/main/readme_imgs/website.png?raw=true" alt="drawing" width="800"/>

## Known errors & solutions

If you are getting some error like this:
```bash
cp: /Users/XXX/Library/Safari/Bookmarks.plist: Operation not permitted
```
You need to give the terminal full disk access. Go to `Settings/Security & Privacy/Full Disk Access`. Navigate to `/Applications/Utilities/` folder and choose the `Terminal` app. If you are launching the command from VS Code you will need to add this as well.
homegit 0.1.4
Utility to interact with bare git repos in the home directory.
Requires Python: >=3.7

# homegit

A utility to manage bare git repos in your home directory

See also [Dotfiles: Best way to store in a bare git repository](https://www.atlassian.com/git/tutorials/dotfiles)

## Usage

Once a repo is initialized or cloned, use `homegit` as you would `git`.

### Local repo
```bash
cd $HOME
homegit init
echo "this is a file" > file.txt
homegit add file.txt
homegit commit
homegit log
```

### Remote repo
```bash
homegit clone https://github.com/notwillk/test-homegit.git
cat ~/test_file.txt
```

### Additional repo
```bash
HOMEGIT_REPO=identifier homegit clone https://github.com/notwillk/test-homegit.git
cat ~/test_file.txt
```

### Environment variables
| Variable       | Default value               | Description                                                                                                               |
| -------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| HOME           | *none*.                     | The path to the user's home directory                                                                                     |
| GIT_EXECUTABLE | *the output of `which git`* | The location of the `git` command to execute                                                                              |
| HOMEGIT_DIR    | `$HOME/.homegit`            | The path to the directory containing the [git dir](https://git-scm.com/docs/git#Documentation/git.txt---git-dirltpathgt)s |
| HOMEGIT_REPO   | default                     | The identifier for the source repo                                                                                        |
huggingbutt 0.0.5
Client library to download and publish environments, agents on the huggingbutt.com hub
Requires Python: <=3.10.8,>=3.9.0

# HuggingButt
Client library to download and publish reinforcement learning environments/agents on the huggingbutt.com hub

## Installation
The base dependency mlagents-envs has been update to version 1.0.0. However, this version may rise an error [Issue 5996](https://github.com/Unity-Technologies/ml-agents/issues/5996)(on Windows 10). So I specified mlagents-envs==0.30.0, NumPy==1.21.2 in this project. I did not found this issue on MacOS.

Create a new python environment using anaconda/miniconda. Only Python 3.9!!
```shell
conda create -n hb python==3.9.18
```

activate the new python environment.
```shell
conda activate hb
```

install huggingbutt from pypi
```shell
pip install huggingbutt==0.0.5
```
or from source code
```shell
git clone -b v0.0.5 https://github.com/huggingbutt/huggingbutt.git
cd huggingbutt
python -m pip install .
```

If there is no error message printed during the installation, congratulations, you have successfully installed this package. Next, you need to apply an access token from the official website https://huggingbutt.com.

Register an account and login, just do as shown in the image below.

![image](https://raw.githubusercontent.com/huggingbutt/media_store/main/huggingbutt_readme/tokens_link.png)

Click new token button generate a new token. This access token is mainly used to restrict the download times of each user, as the server cost is relatively high.

![image](https://raw.githubusercontent.com/huggingbutt/media_store/main/huggingbutt_readme/new_tokens_buttong.png)

Congratulations, you now have an access token!

![image](https://raw.githubusercontent.com/huggingbutt/media_store/main/huggingbutt_readme/copy_your_token.png)

Just put the generated token in the task code and you're gooooood to go.

Here is a simple training code:
```python
from huggingbutt import Env, Agent, set_access_token

if __name__ == '__main__':
    set_access_token('YOUR_TOKEN')
    env = Env.get("huggingbutt/juggle", 'mac', startup_args=['--time_scale', '10'])

    agent = Agent(
        env=env,
        algorithm='PPO',
        policy='MlpPolicy',
        batch_size=64
    )
    agent.learn(total_timesteps=10000)
    agent.save()
    env.close()
```
Inference:
```python
from huggingbutt import Env, Agent, set_access_token

if __name__ == '__main__':
    set_access_token('YOUR_TOKEN')
    env = Env.get("huggingbutt/juggle", 'mac', startup_args=['--time_scale', '1'])
    agent = Agent.get(15, env)

    obs = env.reset()
    for i in range(100):
        act, _status_ = agent.predict(obs)
        obs, reward, done, info = env.step(act)
        if done:
            obs = env.reset()
    env.close()
```

# todo
1. Support more types learning environment, such as native game wrapped by python, pygame, class gym...
2. Develop a framework, user can customize the observation, action and reward of the environment developed under this framework. I hope this makes it easier for everyone to iterate the environment's agent.
3. There are still many ideas, I will add them later when I think about them...