semvec/pypi-packages huggingface dataset:
profilerpy 0.2
A simple code profiling library.
Requires Python: >=3

# Profiler

A python package providing simple profiling tools and reports.

## Installation

Run

```bash
pip install profilerpy
```

or

```bash
pip install git+https://github.com/Rahgooy/profiler.git@master
```

## Usage

### Methods

Profiler can be used as a wrapper for the files. For example:

```python
from profilerpy import profile
@profile
def add(a, b):
  return a + b
```

### Code blocks

Another usage is for profiling a block of code:

```python
from profilerpy import default_profiler
# Some line of code
default_profiler.start('Price calculator')
# Price calculator codes
default_profiler.finish('Price calculator')
```

### Print summary

Finally you can print the profiling summary

```python
default_profiler.print_profile()
```

### Multiple profilers

This package uses `dafult_profiler` by default. However, you can use multiple instances of the profiler class.
For example:

```python
from profilerpy import Profiler, profile
priceProfiler = Profiler() # Profile the codes related to calculating price
userProfiler = Profiler() # Profile the codes related to the user management

# Some lines of code
userProfiler.start('Find user')
# Find user codes
userProfile.finish('Find user')

# ...
default_profiler.start('Price calculator')
# Price calculator codes
default_profiler.finish('Price calculator')

@profile('update_user', profiler=userProfiler)
def update_user(user):
  pass
```

### Functions with custom names

```python
@profile('FancyName')
def method1():
  pass
```
easytensor-kamalaldin 0.0.3
The official python cient of EasyTensor
Requires Python: >=3.6

# EasyTensor

This is the official python client for EasyTensor.

## Examples

#### Requirements
- Tensorflow 2. TF2 currently (early 2021) [requires a python version 3.5-3.8](https://www.tensorflow.org/install). You will have to install a compatible version of python.
- virtualenv
- jupyter notebook


##### For Mac
```
brew install python@3.8
```

##### For Ubuntu
```
sudo apt install python3.8 python3.8-dev
```

To run the examples, create a python virtual env, and install jupyter notebook.
```bash
# install virtualenv
pip3 install virtualenv

# create a virtualenv with python3.8 in ~/virtualenv-3.8
virtualenv --python=$(which python3.8) ~/virtualenv-3.8

# activate the virtual env
source ~/virtualenv-3.8/bin/activate

# install jupyter notebook and necessary widgets
pip install notebook ipywidgets

# run jupyter notebook
jupyter notebook 
```
onetrick 2.1.1
one module, one call
Requires Python: ~=3.5

If your project exposes a module 
--------------------------------
`mymodule.py`:
```python
import onetrick

@onetrick(__name__)
def myfunction():
    print("Hello world!")
```
Then it can be called from elsewhere:
```python
import mymodule

#Either like this
mymodule() # (Hello world!)

#Or like this
mymodule.myfunction() # (Hello world!)
```

If your project exposes a package
---------------------------------
```
.
+-- mypackage
|   +-- __init__.py
|   +-- mymodule.py
```
`mymodule.py`:
```python
import onetrick

@onetrick
def myfunction():
    print("Hello world!")
```
`__init__.py`:
```python
from .mymodule import myfunction

myfunction.onetrick(__name__)
```
Then it can be called from elsewhere:
```python
import mypackage

#Either like this
mypackage() # (Hello world!)

#Or like this
mypackage.myfunction() # (Hello world!)
```