semvec/pypi-packages huggingface dataset:
com-digitalruiz-shopify-apis 0.0.3
A custom http client for shopify
Requires Python: >=3.7

# shopify_apis 

My custom shopify apis module

Config file needed at ~/.Shopify-Config.json which will be used by com_digitalruiz_shopify_http_client
```
{
  "shopify_store_name": "YOUR-STORE-NAME",
  "shopify_admin_api_version": "API VERSION",
  "shopify_access_token": "ACCESS TOKEN"
}
```
example use:

```
from com_digitalruiz_shopify_apis import shopify_apis

```
fileLoader 0.0.0
Read files of any format into pandas with just read_file(**kwargs) method
Requires Python: >=3.7

# Code README

## Overview
This Python code provides a `Loader` class that simplifies the process of loading data from various file formats such as CSV, Parquet, and Excel (XLSX) using the pandas library. The code is designed to make it easy to read data from different file formats with a unified interface.

## Prerequisites
Before using this code, make sure you have the following installed:
- Python 3.x
- pandas library

## How to Use
To use the `Loader` class to read data from a file, follow these steps:

1. Import the necessary libraries:
    ```python
    import pandas as pd
    import numpy as np
    ```

2. Create an instance of the `Loader` class by providing the file path as an argument to the constructor:
    ```python
    file_path = "your_data.csv"  # Replace with the path to your data file
    data_loader = Loader(file_path)
    ```

3. Use the `read_file` method to read the data from the specified file. You can pass any keyword arguments that are valid for the corresponding pandas read function (e.g., `pd.read_csv`, `pd.read_parquet`, or `pd.read_excel`):
    ```python
    data = data_loader.read_file()
    ```

4. The `data` variable now contains the loaded data from the file in a pandas DataFrame.

5. You can also specify additional keyword arguments when calling `read_file`. For example:
    ```python
    data = data_loader.read_file(header=0, sep=',')
    ```

## Supported File Formats
The `Loader` class supports the following file formats:
- CSV (Comma-Separated Values)
- Parquet
- Excel (XLSX)

## Error Handling
- If you create a `Loader` instance without providing a file path or with an unsupported file format, it will raise an `AssertionError`.

## Example
Here's an example of how to use the `Loader` class to read a CSV file:

```python
# Import libraries and create a Loader instance
import pandas as pd
import numpy as np
from loader import Loader  # Import the Loader class from your module

file_path = "data.csv"
data_loader = Loader(file_path)

# Read the CSV file
data = data_loader.read_file()

# Now 'data' contains the loaded data in a pandas DataFrame
print(data.head())
particleShield 0.0.4
Package for radiation shielding modelling.
Requires Python: >=3.7

# particleShield

particleShield is a Python library designed to facilitate radiation shielding calculations. It provides a set of functions and utilities to determine the amount of radiation absorbed by different shielding materials for different types of radiation.

## Features

This Python code provides a set of functions to perform various calculations related to radiation physics, including:

- Half-value layer (HVL) calculation
- Buildup factor calculation
- Dose rate calculation
- Radiation attenuation calculation
- Bethe-Bloch equation for energy loss
- Bragg curve generation

## Requirements

- Python 3.7
- NumPy
- Matplotlib

## Installation

1. Make sure you have Python 3.7 installed on your system.

2. Install the required dependencies by running the following command:

   ```shell
   pip numpy as np, matplotlib.pyplot as plt
   ```
   
3. Download the particleShield library and import it in your project.


## Usage

The package can then be imported using:

```python
import particleShield
```
### Ionizing Radiation
particleShield provides multiple functions for calculation of radiation protection and dosimetry for different types of ionizing radiation.

```python
#Calculate the half-value layer
hvl = particleShield.calculate_hvl(initial_intensity, attenuation_factor)

#Calculate the buildup factor
buildup_factor = particleShield.calculate_buildup_factor(penetration_depth, attenuation_factor)

#Calculate the dose rate
dose_rate = particleShield.calculate_dose_rate(intensity, conversion_factor, time, distance)

#Calculate radiation attenuation
attenuated_intensity = particleShield.calculate_attenuation(I0, mu, x)
```
### Beth-Bloch equation
The Bethe-Bloch equation is used to calculate the energy loss of charged particles (e.g., electrons, protons, alpha particles) as they pass through a material. It describes how these particles lose energy through ionization and excitation of atoms in the material.


```python
#Calculate energy loss using the Bethe-Bloch equation for Protons in Air
kinetic_energy = 100  # MeV
charge = 1  # Elementary charge units
atomic_mass = 28.09  # g/mol
atomic_number = 14
ionization_potential = 78  # eV

energy_loss = bethe_bloch(kinetic_energy, charge, atomic_mass, atomic_number, ionization_potential)
print("Energy Loss:", energy_loss, "MeV/cm")
```
Output: Energy Loss: -4.297 MeV/cm

### Bragg Curve
The Bragg curve is a graphical representation that illustrates how the energy deposition of charged particles varies with depth as they traverse a material.

```python
#Generate the Bragg curve for protons in air
alpha = 0.1666  # MeV/(g/cm^2)
p = 1.76        # g/cm^2
shallowest_depth = 10.0  # cm
deepest_depth = 15.0     # cm

generate_bragg_curve(alpha, p, shallowest_depth, deepest_depth)

```
Bragg curve for protons in air:

![](https://github.com/ypragyan/ParticleShield/blob/main/bragcurve.png)