Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/e-lab/eex
Torch extras from e-Lab
https://github.com/e-lab/eex
Last synced: 6 days ago
JSON representation
Torch extras from e-Lab
- Host: GitHub
- URL: https://github.com/e-lab/eex
- Owner: e-lab
- Created: 2012-09-21T18:46:38.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2016-06-19T02:36:40.000Z (over 8 years ago)
- Last Synced: 2024-03-26T07:05:15.106Z (8 months ago)
- Language: C
- Size: 8.94 MB
- Stars: 3
- Watchers: 40
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# e-lab extra package for Torch7
This package provides extra functions for Torch7 from e-lab, Purdue University
## Install
To install this package, use the following command:
```sh
$ luarocks make
```## Short documentation
### Useful functions
#### ls - unix listing command
In order to add `eex.ls` to the global name space type the following Lua command
```lua
require 'eex'
ls = eex.ls
```Listing the content of the current directory and fetching the number of elements it contains
```
ls()
#ls()
```Listing the content of a specific directory `path` (`path` is a string)
```
ls(path)
```Getting the *full file name* (file name preceded by its parent directories) of the 3rd PNG image contained in a specific directory `path`
```
ls(path .. '/*.png')[3]
```#### eex.datasetsPath - fetches $EEX_DATASETS environment variable
Returns the location of the *datasets* directory on the current machine. Basically it fetches the `$EEX_DATASETS` environment variable if existing, otherwise it prompts the user to input the location of the *datasets* dicrectory. In order to `ls` the content of the *abc-dataset* we can do as follow
```lua
ds = eex.datasetsPath()
print(ls(ds .. '/abc-dataset'))
```### License
MIT