semvec/pypi-packages huggingface dataset:
millilensing 0.0.1
Millilensing
License: MIT
Requires Python: >=3.5

## Millilensing 
Millilensing- a python package for gravitational-wave millilensing analysis within bilby framework. 

## Why millilensing?
Currently most widely used lens models assume a spherically symmetric lens isolated from any astrophysical objects which, in general, is physically unrealistic. The framework developed here presents a phenomenological approach to gravitational-wave millilensing analysis, which allows for a physically realistic description of millilenses, relaxing the isolated lens assumption and taking into account gravitational effects from galaxy shear and surrounding lenses. In particular, the following assumptions are taken into account:
- no lens model assumed 
- lens mass range (of order 1000 Msun) corresponding to geometrical optics approximation 
\(no wave optics effects)
- gravitational shear effects taken into account
- arbitrary integer number of images allowed

The waveform models can be found in source.py which comprises three separate millilensing waveforms for the case of 2, 3 and 4 images (`binary_black_hole_millilens_two_images`, `binary_black_hole_millilens_three_images`, `binary_black_hole_millilens_four_images`), as well as a multi-image waveform `multi_image_Kmax` (currently under development).  

## Multi-image waveform 
Multi-image waveform `multi_image_Kmax` allows to account for a different integer number of images within one waveform model. Maximum number of images is specified by an integer value (1 to 10) for `MAX_KMAX` provided in `__init__.py`. 

The lens parameters introduced for this waveform are: magnification, relative time delay, Morse phase and number of images. For the last two parameters, discrete prior distirbutions are used, which can be found in `prior/lensing.py`. 



## Installation 
1. clone the repository 
2. cd into the repository directory 
3. Enter: 
```sh 
python setup.py install 
```
bhavcopy 3.0
Download NSE Bhavcopy Data
License: MIT
Keywords: Bhavcopy

bhavopy Python Package

This package provides a Python interface to download National Stock Exchange (NSE) bhavcopy data for Equities, Indices and Derivatives. The package provides functions to download daily bhavcopy data in CSV format, store the data in local storage, and update the data for any missing dates.

Basically it creates csv file for equities, indices and derivatives,
If the file already exist on assigned directory, then the code attempts to figure out missing dates and update the same file.
all you have to do is update the start and end date.

and all this can be done by simply providing following arguements:

pip install bhavcopy

import bhavcopy

# Place data need to be stored.

data_storage = "D:\\bhav_data"

# Define working directory, where files would be saved

os.chdir(data_storage)

# Define start and end dates, and convert them into date format

start_date = datetime.date(2023, 3, 1)

end_date = datetime.date(2023, 3, 21)

# Define wait time in seconds to avoid getting blocked

wait_time = [1, 2]

# Instantiate bhavcopy class for equities, indices, and derivatives

nse = bhavcopy("indices", start_date, end_date, data_storage, wait_time)

nse.get_data()

nse = bhavcopy("equities", start_date, end_date, data_storage, wait_time)

nse.get_data()

nse = bhavcopy("derivatives", start_date, end_date, data_storage, wait_time)

nse.get_data()
mgzip2 0.2.6
A multi-threading implementation of Python gzip module
License: MIT
Requires Python: >=3.6

# mgzip
A multi-threading implement of Python gzip module

Using a block indexed GZIP file format to enable compress and decompress in parallel. This implement use 'FEXTRA' to record the index of compressed member, which is defined in offical GZIP file format specification version 4.3, so it is fully compatible with normal GZIP implement.

This module is **~25X** faster for compression and **~7X** faster for decompression (limited by IO and Python implementation) with a *24 CPUs* computer.

***In theoretical, compression and decompression acceleration should be linear according to the CPU cores. In fact, the performance is limited by IO and program language implementation.***

## Usage
Use same method as gzip module
```python
import mgzip

s = "a big string..."

## Use 8 threads to compress.
## None or 0 means using all CPUs (default)
## Compression block size is set to 200MB
with mgzip.open("test.txt.gz", "wt", thread=8, blocksize=2*10**8) as fw:
    fw.write(s)

with mgzip.open("test.txt.gz", "rt", thread=8) as fr:
    assert fr.read(len(s)) == s
```

## Performance
### Compression:
![Compression Performance](https://raw.githubusercontent.com/vinlyx/mgzip/master/CompressionBenchmark.png)

### Decompression:
![Decompression Performance](https://raw.githubusercontent.com/vinlyx/mgzip/master/DecompressionBenchmark.png)

*Brenchmarked on a 24 cores, 48 threads server (Xeon(R) CPU E5-2650 v4 @ 2.20GHz) with 8.0GB FASTQ text file.*

*Using parameters thread=42 and blocksize=200000000*

## Warning
**This package only replace the 'GzipFile' class and 'open', 'compress', 'decompress' functions of standard gzip module. It is not well tested for other class and function.**

**As the first release version, some features are not yet supported, such as seek() and tell(). Any contribution or improvement is appreciated.**