semvec/pypi-packages huggingface dataset:
tf2c 0.0.2
Package to generate C code for tensorflow model.
Requires Python: >=3.6

# tf2c
Python package to generate C code for tensorflow model (keras). The generated code is standalone i.e., only requires basic C library.

## Installation
```
pip install tf2c
```

## Requirements
`tensorflow 2`, `numpy` and `prettytable` packages are required.

## Supported Layers
Currently, `flatten` and `dense` layers are supported.

## Supported Activation
Currently, `sigmoid`, `softmax`, `relu` and `tanh` activation functions are supported.

## Example

```
import tensorflow as tf
from tensorflow import keras
import tf2c


## Model creation
model = keras.models.Sequential()
model.add(keras.layers.Flatten(input_shape=(3, )))
model.add(keras.layers.Dense(5, activation="relu"))
model.add(keras.layers.Dense(5, activation="relu"))
model.add(keras.layers.Dense(1, activation="tanh"))

##
## Write a code to train your model here
## 

## C code generation
tf2c.tf2c(
    model=model, 
    func_name='model_call', 
    file_name='model_file', 
    data_type='float', 
    memory_alloc='static'
    )
```

Running above code will create two files `model_file.c` and `model_file.h` (specified by `file_name` argument). These files contain a function named `model_call` (specified by argument `func_name`). The `data_type` argument can be set to either `float` or `double`. Similarly, `memory_alloc` can be set to either `static` or `dynamic`.

Code for multiple models can also be generated in a single `.c` and `.h` file. To generate code for multiple models. Pass multiple models and corresponding `func_name` as list. For example,

```
model1 = keras.models.Sequential()
model1.add(keras.layers.Flatten(input_shape=(3, )))
model1.add(keras.layers.Dense(5, activation="relu"))
model1.add(keras.layers.Dense(5, activation="relu"))
model1.add(keras.layers.Dense(1, activation="tanh"))

model2 = keras.models.Sequential()
model2.add(keras.layers.Flatten(input_shape=(2, )))
model2.add(keras.layers.Dense(3, activation="relu"))

tf2c.tf2c(
    model=[model1, model2], 
    func_name=['model1_call', 'model2_call'], 
    file_name='modelfile', 
    data_type='float', 
    memory_alloc='static'
    )
```
This will generate two files `model_file.c` and `model_file.h`. These files contain two function named `model1_call` and `model2_call`.
crackme-template 0.0.2
Crackme Template
Requires Python: >=3.9

# Crackme Template

Provided a github access token and a crackme-id (`https://crackmes.one/crackme/{crackme_id}`) as input, a github repository will be setup that intialises the template which includes the binary from the crackme.

## Usage

```sh
pip install crackme-template
crackme_template --crackme-id 5ec1a37533c5d449d91ae535 --github-access-token YOUR_TOKEN
```

Example of initialised repo: <https://github.com/nymann/crackme-baby-ransom/>

Note if `--github-access-token` is omitted the program will try to read it from the `GITHUB_ACCESS_TOKEN` environment variable.

## Development

For help getting started developing check [DEVELOPMENT.md](DEVELOPMENT.md)