Giter Club home page Giter Club logo

tile-and-traverse's Introduction

Tile and Traverse

Tile Image

Generate and save a tiled image from an input image. Command line inputs:

  • path to an image file as input
  • number of tiles to be generated
  • path to output the tiled image

       

Traverse directory and gzip

Display all gzipped files under the directory at any level (file can be gzipped regardless of having .gz suffix in the filename). Gunzip the files inplace:

  • gzipped files with .gz suffix in filename to be gunzipped to without .gz suffix in the end, overwriting any existing files
  • gzipped files without .gz suffix in the filename to be gunzipped to same path, replacing the original file

Command line input:

  • path to a directory
  • --dryrun flag to just display gzipped files with out extracting the files

Requirements

pip install -r requirements.txt

Usage

The project is written in python 3.7.

Tile Image

The num_tiles parameter is taken in float format and repeats the input image as many times as possible.

python tile_image.py <--inp_path INP_PATH> <--out_path OUT_PATH> <--num_tiles NUM_TILES>

Traverse Directory

Assumption: Files are gunzipped regardless of whether they are already gunzipped. This can potentially be avoided by doing a check first.

python traverse_directory.py <--dir_path DIR_PATH> [--dryrun]

Help

python tile_image.py --help
python traverse_directory.py --help

tile-and-traverse's People

Contributors

piyush-jaiswal avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.