Giter Site home page Giter Site logo

npy_viewer's Introduction

npy_viewer

A bunch of utilities to quickly visualize .npy files

Information

This repository contains pairs of .desktop files and Python scripts, that allow to open .npy files with a double click and quickly visualize the array that it contains, as well as statistics about it. The scripts also work when opening multiple files at once.

The .desktop files follow the Desktop Entry specifications, so they should work for most Linux. It was tested on Ubuntu 16.04.

Requirements

The scripts are written in Python 3. The .desktop files will use the python that python3 refers to in your system.

To change that, simply update the path in the .desktop files. For example: sed -i 's,python3,/usr/local/bin/python3,' NPY*.desktop

Packages

Additionally to numpy and matplotlib, some packages are required for certain scripts:

  • NPYCopyAsCSV: pyperclip csv
Backends

Depending on you system, there might or might not be an exisiting backend that matplotlib can use. It if doesn't find one, it should tell you what to install.

For NPY3DArrayViewer, the TkAgg backend is a little shaky when changing files, so you might want to use a Qt backend, such as Qt4Agg or Qt5Agg.

The TkAgg backend requires the deb package python3-tk. The Qt4Agg backend requires the deb package python3-pyqt4

Installing

After downloading the repository or indivual files to your computer, the paths to the Python scripts need to be updated in the .desktop files.

You can do so:

  • Automagically, by running setup_npy_scripts.sh, which will put them in ~/.local/share/applications
  • Manually by changing the lines in the .desktop files. Exec= python3 /path/to/python/script.py %U

On Ubuntu, the usual directories to put .dekstop files in are :

  • /usr/share/applications/ for all users to access (requires sudo privileges)
  • ~/.local/share/applications/ for a specific user

After that, the application icon should appear in the Open With... menu. You can set it as default to open it with just a double click.

Have fun ! ๐Ÿ˜‰

npy_viewer's People

Contributors

matthieuheitz avatar

Watchers

James Cloos 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.