semvec/pypi-packages huggingface dataset:
django-madval 0.0.3
A django package to use either persian numbers or comma separated persian numbers in djanog. You can also translate weekdays to persian and use persian name for months!
Requires Python: >=3.9

# django_madval
A django package to use either persian numbers or comma separated persian numbers in djanog. You can also translate weekdays to persian and use persian name for months!


# How to use? (چگونه استفاده کنیم؟)

##### To use this package, do the following
##### جهت استفاده از این پکیج، مراحل زیر را انجام دهید.

```bash
pip install django_madval
```

##### In the next step, install the app in your settings.py
##### در مرحله بعد، در فایل settings.py، اپ را اضافه کنید.

```bash
INSTALLED_APPS = [
    # ...
    'django_madval',
    # ...
]
```

##### Load madval_persian_translation file in your templates to use translation filters.
##### برای استفاده از تمپلیت فیلترهای مربوط به تبدیل اعداد به فارسی، فایل madval_persian_translation را لود کنید.

sample in a template file named order_detail.html:
```bash
...
{% load madval_persian_translation %}
...
```

##### Defined filters so far are "pn" "pnf" "cspn" "p_weekday"
**pn** stands for **p**ersian_**n**umbers

**pnf** stands for **p**ersian_**n**umbers_**f**loat

**cspn** stands for **c**omma_**s**eparated_**p**ersian_**n**umbers

**p_weekday** stands for **p**ersian_**weekday**

##### فیلترهای تعریف شده فعلی، "pn" "pnf" "cspn" "p_weekday" ها هستند.

sample usage in order_detail.html:
```bash
{{ order.phone_number|pn }}
{{ order.items.count|pn }}
```
 جهت نمایش ارقام به فارسی و به صورت جدا نشده
<hr>

```bash
{{ order.get_total_price|cspn }}
```
جهت نمایش ارقام به فارسی و ۳ رقم ۳ رقم جدا شده
<hr>

در صورت نیاز می توانید به فیلتر "cspn" ورودی بدهید تا اعداد را به مقدار دلخواه شما جدا کند. مثلا کد زیر اعداد را ۵ رقم ۵ رقم جدا میکند.
```bash
{{ order.get_total_price|cspn:5 }}
```
<hr>

در صورتی که روز هفته را به صورت میلادی (مثلا Tuesday یا Tue) دارید، می توانید با فیلتر p_weekday آن را به سه‌شنبه تبدیل کنید. در مثال زیر از پکیج  [جلالی] نیز استفاده شده است که برای نصب آن باید به مستندات مربوطه مراجعه کنید.
```bash
{{ order.datetime_created|to_jalali:'%A'|p_weekday }}
```
پس از فیلتر "to_jalali:'%A'" که اسم روز هفته را گرفتیم، با استفاده از فیلتر "p_weekday" آن را به روز معادل فارسی تبدیل کردیم.


[جلالی]: https://github.com/a-roomana/django-jalali-date/tree/master
cnspy-csv2dataframe 0.2.3
CSV to pandas.Dataframe converter
Requires Python: >=3.6

# cnspy_csv2dataframe


The class [CSV2DataFrame](./cnspy_csv2dataframe/CSV2DataFrame.py) is intended to load [CSV-files](https://en.wikipedia.org/wiki/Comma-separated_values) into a `pandas.DataFrame`. The CSV files need to match known formats (defined by their header in the first line) according to those defined in the package [spatial_csv_formats]().
  
In case no format is specified, it tries to match the first line of the CSV-File with known headers from [cnspy_spatial_csv_formats](https://github.com/aau-cns/cnspy_spatial_csv_formats) and loads the data in that format. 

There a some specialization of  [CSV2DataFrame](./cnspy_csv2dataframe/CSV2DataFrame.py) that support different operations on the data:
* [PoseCovCSV2DataFrame](./cnspy_csv2dataframe/PosOrientCovCSV2DataFrame.py)
* [PoseWithCov2DataFrame](./cnspy_csv2dataframe/PosOrientWithCov2DataFrame.py)
* [TimestampCSV2DataFrame](./cnspy_csv2dataframe/TimestampCSV2DataFrame.py)
* [TUMCSV2DataFrame](./cnspy_csv2dataframe/TUMCSV2DataFrame.py)

## Installation

Install the current code base from GitHub and pip install a link to that cloned copy
```
git clone https://github.com/aau-cns/cnspy_csv2dataframe.git
cd cnspy_csv2dataframe
pip install -e .
```
or the [official package](https://pypi.org/project/cnspy-csv2dataframe/) via
```commandline
pip install cnspy-csv2dataframe
```

## Dependencies

It is part of the [cnspy eco-system](hhttps://github.com/aau-cns/cnspy_eco_system_test) of the [cns-github](https://github.com/aau-cns) group.  

* [numpy]()
* [pandas]()
* [cnspy_spatial_csv_formats](https://github.com/aau-cns/cnspy_spatial_csv_formats)
* [cnspy_numpy_utils](https://github.com/aau-cns/cnspy_numpy_utils)


## License


Software License Agreement (GNU GPLv3  License), refer to the LICENSE file.

*Sharing is caring!* - [Roland Jung](https://github.com/jungr-ait)
Cirron 0.4
Cirron measures how many CPU instructions and system calls a piece of Python code executes.
Requires Python: >=3.6

# Cirron

Cirron measures a piece of Python code and report back several performance counters: CPU instruction count, branch misses, page faults and time spent measuring. It uses the Linux perf events interface or @ibireme's [KPC demo](https://gist.github.com/ibireme/173517c208c7dc333ba962c1f0d67d12) on OSX.

It can also trace and modify syscalls using `strace`, Linux only!

## Prerequisites

- Linux with perf events support / Apple ARM OSX
- C++
- Python 3.x

## Installation

### Python

```bash
pip install cirron
```

The wrapper automatically compiles the C++ library (cirronlib.cpp) on first use.

## Usage

### Performance Counters

```
$ sudo python
>>> from cirron import Collector
>>> 
>>> # Start collecting performance metrics
>>> with Collector() as collector:
>>>     # Your code here
>>>     print("Hello")
>>> 
>>> # Retrieve the metrics
>>> print(collector.counters)
Counter(time_enabled_ns=144185, instruction_count=19434, branch_misses=440, page_faults=0)
```

### Tracing Syscalls

```
$ sudo python
>>> from cirron import Tracer, to_tef

>>> with Tracer() as tracer:
>>>     # Your code here
>>>     print("Hello")
>>> 
>>> # Retrieve the trace
>>> print(tracer.trace)
>>> [Syscall(name='write', args='1, "Hello\\n", 6', retval='6', duration='0.000043', timestamp='1720333364.368337', pid='2270837')]
>>> 
>>> # Save the trace for ingesting to Perfetto
>>> open("/tmp/trace", "w").write(to_tef(tracer.trace))
```

### Tampering with Syscalls

Available tampering actions are:
`error`: Inject a fault with the specified errno.
`retval`: Inject a success with the specified return value.
`signal`: Deliver the specified signal on syscall entry.
`delay_enter`: Delay syscall entry by the specified time.
`delay_exit`: Delay syscall exit by the specified time.
`poke_enter`: Modify memory at argN on syscall entry.
`poke_exit`: Modify memory at argN on syscall exit.
`syscall`: Inject a different syscall instead.

The `when` argument can be used to specify when to perform the tampering.

See the Tampering section of the [strace manual page](https://man7.org/linux/man-pages/man1/strace.1.html) for more detailed explanaition of the arguments.

```
$ sudo python
>>> from cirron import Injector

>>> injector = Injector()
>>> injector.inject("openat", "error", "ENOSPC")
>>> injector.inject("openat", "delay_enter", "1s", when="2+2")
>>> with injector:
>>>     # Open now fails with "No space left on device" and every
>>>     # other call to `openat` will be delayed by 1s.
>>>     f = open("test.txt", "w")
```