semvec/pypi-packages huggingface dataset:
psims 1.3.5
Writers and controlled vocabulary manager for PSI-MS's mzML and mzIdentML standards
Requires Python: >3.8

# psims
Prototype work for a unified API for writing Proteomics Standards Initiative standardized formats
for mass spectrometry:

1. mzML
2. mzIdentML
3. mzMLb

See the [Documenation](https://mobiusklein.github.io/psims) for more information

## Installation
With pip:
```sh
pip install psims
```

With conda:
```sh
conda install -c bioconda -c conda-forge -c defaults psims
```

## mzML Minimal Example

```python
from psims.mzml.writer import MzMLWriter

# Load the data to write
scans = get_scan_data()

with MzMLWriter(open("out.mzML", 'wb'), close=True) as out:
    # Add default controlled vocabularies
    out.controlled_vocabularies()
    # Open the run and spectrum list sections
    with out.run(id="my_analysis"):
        spectrum_count = len(scans) + sum([len(products) for _, products in scans])
        with out.spectrum_list(count=spectrum_count):
            for scan, products in scans:
                # Write Precursor scan
                out.write_spectrum(
                    scan.mz_array, scan.intensity_array,
                    id=scan.id, params=[
                        "MS1 Spectrum",
                        {"ms level": 1},
                        {"total ion current": sum(scan.intensity_array)}
                     ])
                # Write MSn scans
                for prod in products:
                    out.write_spectrum(
                        prod.mz_array, prod.intensity_array,
                        id=prod.id, params=[
                            "MSn Spectrum",
                            {"ms level": 2},
                            {"total ion current": sum(prod.intensity_array)}
                         ],
                         # Include precursor information
                         precursor_information={
                            "mz": prod.precursor_mz,
                            "intensity": prod.precursor_intensity,
                            "charge": prod.precursor_charge,
                            "scan_id": prod.precursor_scan_id,
                            "activation": ["beam-type collisional dissociation", {"collision energy": 25}],
                            "isolation_window": [prod.precursor_mz - 1, prod.precursor_mz, prod.precursor_mz + 1]
                         })
```

## Citing

If you use `psims` in an academic project, please cite:

    Klein, J. A., & Zaia, J. (2018). psims - A declarative writer for mzML and mzIdentML for Python. Molecular & Cellular Proteomics, mcp.RP118.001070. https://doi.org/10.1074/mcp.RP118.001070
django-polls-507 0.2
A Django app to conduct web-based django_polls.
Requires Python: >=3.10

============
django-polls
============

django-polls is a Django app to conduct web-based django_polls. For each
question, visitors can choose between a fixed number of answers.

Detailed documentation is in the "docs" directory.

Quick start
-----------

1. Add "polls" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
        ...,
        "django_polls",
    ]

2. Include the polls URLconf in your project urls.py like this::

    path("polls/", include("django_polls.urls")),

3. Run ``python manage.py migrate`` to create the models.

4. Start the development server and visit the admin to create a poll.

5. Visit the ``/polls/`` URL to participate in the poll.
proxycycle 2.0.1
A Library to easily load/fetch proxy servers.
Requires Python: >=3.10

# ProxyCycle

[![PyPI - Version](https://img.shields.io/pypi/v/proxycycle.svg)](https://pypi.org/project/proxycycle)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/proxycycle.svg)](https://pypi.org/project/proxycycle)

-----

**Table of Contents**

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)

## Installation

```console
pip install proxycycle
```

## Usage

```python
######  Simple  ######

import proxycycle as pc
from proxycycle import filters as pcfilters
import requests

# Fetch proxies
pset = pc.ProxyScrape.fetch_proxyset(50, scheme = pc.Scheme.HTTP, timeout=300)

# Filter proxies
pset_filtered = pcfilters.DummyUseCheck(timeout=10).run(pset)
# Some checks support asyncio:
# pset_filtered = asyncio.run(pcfilters.DummyUseCheck(timeout=10).run_async(pset))

# Loop from start to end, then exit the loop
for proxy in pset_filtered:
    proxy_dict = {
        "http": proxy.toString(),
        "https": proxy.toString()
    }

    # request through proxy
    resp = requests.get(url, proxies = proxy_dict)

# Loop from start to end, forever, exit the loop only if/when there are no more proxies
for proxy in pset_filtered.cycle():
    proxy_dict = {
        "http": proxy.toString(),
        "https": proxy.toString()
    }
    resp = requests.get(url, proxies = proxy_dict)


###### Advanced ######

### Initialize a proxy object
from proxycycle.Proxy import Proxy
proxy1 = Proxy("127.0.0.1", 8080)
proxy2 = Proxy.fromString("127.0.0.1:8080")
proxy3 = Proxy.fromString("http://127.0.0.1:8080")

### Initialize a proxyset (manually)
from proxycycle.ProxySet import ProxySet
ps1 = ProxySet([proxy2, proxy3])

### Initialize a proxyset (from file)
with open('file.txt', 'r') as f:
    ps2 = ProxySet.fromFile(f)

### Initialize a proxyset (automatically)
from proxycycle.api.proxyscrape import ProxyScrape
ps3 = ProxyScrape.fetch_proxyset(limit = 50)

# Add a proxy to a proxyset
ps4 = ProxySet()
ps4.set_proxy(proxy1)

# Extend proxyset with other proxysets (ps4 = ps4 + ps1 + ps2 + ps3)
ps4.extend_with_proxysets(ps1, ps2, ps3)

# Filtering (Using .filter())
ps5 = ps4.filter(lambda p: p.scheme == Scheme.HTTP)

# Filtering (Using .filter_async())
import asyncio
async def check(p):
    import aiohttp
    try:
        async with aiohttp.ClientSession(proxy = p.toString()) as c:
            async with c.get(url) as resp:
                return True
    except Exception:
        return False
ps6 = asyncio.run(ps4.filter_async(check))
```

## License

`proxycycle` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.