Git Product home page Git Product logo

binglide's People

Contributors

wapiflapi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

binglide's Issues

IndexError on opening file

I've just installed binglide on Debian 4.18 (specifically, Kali Linux) and am having an error whenever I try to open a file. Binglide opens fine, and I can click the Open button and select a file, but as soon as I try to load the file I get the following error message in the console.

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/binglide/gui.py", line 108, in open_file
    self.read_file(f)
  File "/usr/local/lib/python3.6/dist-packages/binglide/gui.py", line 102, in read_file
    self.update_data()
  File "/usr/local/lib/python3.6/dist-packages/binglide/gui.py", line 116, in update_data
    self.calc_entropy.set_data(self.data)
  File "/usr/local/lib/python3.6/dist-packages/binglide/calcs.py", line 241, in set_data
    calc_entropy(data, self.s, shannon, hist, window, increments, decrements)
  File "/usr/local/lib/python3.6/dist-packages/binglide/calcs.py", line 201, in calc_entropy
    ent += increments[fo]
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

I'm not entirely convinced this isn't related to issue #8, but I'm also not convinced it is. They're both errors on startup, but applying the patch in PR #11 didn't help me. I'd be happy to open a PR to fix this, but I'm not quite familiar enough with binglide to do so.

handle resize

We should do our best to maintain the region sizes through window resizes.
Currently they are being "pushed" when the window becomes smaller, and they keep their size when the window grows.

Ubuntu 16.04 -- numba JIT type errors in calc.py and BadDrawable error in gui.py

Running binglide with any file as input results in numba JIT type errors:

Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 14 (X_GetGeometry)
Resource id: 0x4600015
/usr/local/lib/python3.5/dist-packages/numba/init.py:75: UserWarning: llvmlite version format not recognized!
warnings.warn("llvmlite version format not recognized!")
Traceback (most recent call last):
File "/usr/local/bin/binglide", line 7, in
binglide.main()
File "/usr/local/lib/python3.5/dist-packages/binglide/init.py", line 21, in main
binglideui.read_file(args.file)
File "/usr/local/lib/python3.5/dist-packages/binglide/gui.py", line 102, in read_file
self.update_data()
File "/usr/local/lib/python3.5/dist-packages/binglide/gui.py", line 116, in update_data
self.calc_entropy.set_data(self.data)
File "/usr/local/lib/python3.5/dist-packages/binglide/calcs.py", line 241, in set_data
calc_entropy(data, self.s, shannon, hist, window, increments, decrements)
File "/usr/local/lib/python3.5/dist-packages/numba/dispatcher.py", line 277, in _compile_for_args
return self.compile(tuple(real_args))
File "/usr/local/lib/python3.5/dist-packages/numba/dispatcher.py", line 495, in compile
cres = self._compiler.compile(args, return_type)
File "/usr/local/lib/python3.5/dist-packages/numba/dispatcher.py", line 76, in compile
flags=flags, locals=self.locals)
File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 696, in compile_extra
return pipeline.compile_extra(func)
File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 369, in compile_extra
return self.compile_bytecode(bc, func_attr=self.func_attr)
File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 378, in compile_bytecode
return self._compile_bytecode()
File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 662, in _compile_bytecode
res = pm.run(self.status)
File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 257, in run
raise patched_exception
File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 249, in run
stage()
File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 466, in stage_nopython_frontend
self.locals)
File "/usr/local/lib/python3.5/dist-packages/numba/compiler.py", line 807, in type_inference_stage
infer.propagate()
File "/usr/local/lib/python3.5/dist-packages/numba/typeinfer.py", line 613, in propagate
raise errors[0]
numba.errors.TypingError: Failed at nopython (nopython frontend)
Internal error at <numba.typeinfer.IntrinsicCallConstraint object at 0x7fbcb48bbf60>:
--%<-----------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/numba/typeinfer.py", line 114, in propagate
constraint(typeinfer)
File "/usr/local/lib/python3.5/dist-packages/numba/typeinfer.py", line 384, in call
self.resolve(typeinfer, typeinfer.typevars, fnty=self.func)
File "/usr/local/lib/python3.5/dist-packages/numba/typeinfer.py", line 344, in resolve
sig = context.resolve_function_type(fnty, pos_args, kw_args)
File "/usr/local/lib/python3.5/dist-packages/numba/typing/context.py", line 112, in resolve_function_type
res = defn.apply(args, kws)
File "/usr/local/lib/python3.5/dist-packages/numba/typing/templates.py", line 185, in apply
sig = generic(args, kws)
File "/usr/local/lib/python3.5/dist-packages/numba/typing/arraydecl.py", line 162, in generic
out = get_array_index_type(ary, idx)
File "/usr/local/lib/python3.5/dist-packages/numba/typing/arraydecl.py", line 68, in get_array_index_type
% (ty, idx))
TypeError: unsupported array index type float64 in [float64]
--%<-----------------------------------------------------------------
File "../../../usr/local/lib/python3.5/dist-packages/binglide/calcs.py", line 206

Setting environment variable NUMBA_DISABLE_JIT to diagnose the error gets a bit farther, but the program then fails with the BadDrawable error in gui.py

documentation & instructions

We should update the readme and add installation instruction for most use cases.

Especially for the requirements since they can be hard to install.

How to upload file or open file

Hi,
I followed all steps as you mentioned in Readme. I run the setup.py and it successfully executed but i did not get any option like where to load file or open file to see the result which you shown in your demo images to see the result 3G, 2G, data.

Invalid syntax

Installing on Kali, latest version:

Traceback (most recent call last):
File "/usr/local/bin/binglide", line 7, in
binglide.main()
File "/usr/local/lib/python3.2/dist-packages/binglide/init.py", line 9, in main
import binglide.gui
File "/usr/local/lib/python3.2/dist-packages/binglide/gui.py", line 6, in
from binglide import renderers, levelers, projectors, painters, mixers, calcs
File "/usr/local/lib/python3.2/dist-packages/binglide/renderers.py", line 67
yield from cls.get_known(cls.known_levelers, src)
^
SyntaxError: invalid syntax

TypeError: Cannot cast ufunc add output from dtype('float64') to dtype('uint8

I just installed binglide on a variant of Ubuntu, but I get the following error message when trying to open files. I have yet to install numba but from what I gathered from the instructions it was optional?

Set data for <binglide.calcs.identity object at 0x7fb912d58eb8>
Set data for <binglide.calcs.shannon object at 0x7fb912d58e80> (ignore next shannon, its me.)
Set data for <binglide.calcs.shannon object at 0x7fb912d58e80>
Set data for <binglide.calcs.bigrams object at 0x7fb912d58e48>
11.59 blocks: 11.59*262144(16383) = 189907. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
Set data for <binglide.calcs.trigrams object at 0x7fb912d58e10>
11.59 blocks: 11.59*262144(246421) = 2856280. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
Set data for <binglide.calcs.identity object at 0x7fb912d58ef0>
Set data for <binglide.calcs.identity object at 0x7fb912d58f28>
Data is set, update!
Updating <binglide.gui.BinglideUI object at 0x7fb91f7bb288>
Updating <binglide.renderers.Renderer2D object at 0x7fb912d631f8>
cliping: 0 255
coefs= [1.0, 1.0, 1.0, 0]
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/binglide/gui.py", line 108, in open_file
    self.read_file(f)
  File "/usr/local/lib/python3.4/dist-packages/binglide/gui.py", line 102, in read_file
    self.update_data()
  File "/usr/local/lib/python3.4/dist-packages/binglide/gui.py", line 125, in update_data
    self.do_update()
  File "/usr/local/lib/python3.4/dist-packages/binglide/gui.py", line 258, in do_update
    self.scale1.do_update()
  File "/usr/local/lib/python3.4/dist-packages/binglide/renderers.py", line 214, in do_update
    colored = painter(colored, leveled, mixers, coefs)
  File "/usr/local/lib/python3.4/dist-packages/binglide/painters.py", line 11, in paint_values
    mixer(colored, data, coefs)
  File "/usr/local/lib/python3.4/dist-packages/binglide/mixers.py", line 18, in __call__
    colored[..., c] += data * coefs[c]
TypeError: Cannot cast ufunc add output from dtype('float64') to dtype('uint8') with casting rule 'same_kind'

OpenGL.GL attribute error

binglide fails to run for me indicating a module error. This is on Ubuntu 16.04 with the most recent version of all packages updated.

Traceback (most recent call last):
File "/usr/local/bin/binglide", line 7, in
binglide.main()
File "/usr/local/lib/python3.5/dist-packages/binglide/init.py", line 9, in main
import binglide.gui
File "/usr/local/lib/python3.5/dist-packages/binglide/gui.py", line 6, in
from binglide import renderers, levelers, projectors, painters, mixers, calcs
File "/usr/local/lib/python3.5/dist-packages/binglide/renderers.py", line 6, in
import pyqtgraph.opengl as gl
File "/usr/local/lib/python3.5/dist-packages/pyqtgraph/opengl/init.py", line 1, in
from .GLViewWidget import GLViewWidget
File "/usr/local/lib/python3.5/dist-packages/pyqtgraph/opengl/GLViewWidget.py", line 2, in
from OpenGL.GL import *
File "/usr/lib/python3/dist-packages/OpenGL/GL/init.py", line 3, in
from OpenGL.GL.VERSION.GL_1_1 import *
File "/usr/lib/python3/dist-packages/OpenGL/GL/VERSION/GL_1_1.py", line 10, in
from OpenGL import platform, constants, constant, arrays
File "/usr/lib/python3/dist-packages/OpenGL/arrays/init.py", line 22, in
formathandler.FormatHandler.loadAll()
File "/usr/lib/python3/dist-packages/OpenGL/arrays/formathandler.py", line 28, in loadAll
cls.loadPlugin( entrypoint )
File "/usr/lib/python3/dist-packages/OpenGL/arrays/formathandler.py", line 35, in loadPlugin
plugin_class = entrypoint.load()
File "/usr/lib/python3/dist-packages/OpenGL/plugins.py", line 14, in load
return importByName( self.import_path )
File "/usr/lib/python3/dist-packages/OpenGL/plugins.py", line 28, in importByName
module = import( ".".join(moduleName), {}, {}, moduleName)
File "/usr/lib/python3/dist-packages/OpenGL/arrays/vbo.py", line 430, in
def mapVBO( vbo, access=GL.GL_READ_WRITE ):
AttributeError: module 'OpenGL.GL' has no attribute 'GL_READ_WRITE'

auto "all"

When a file is loaded we should show the whole region by default instead of having the user press "all".

luminosity slider

Add a slider to artificially increase luminosity. On some screens the current interface isn't usable enough because everything is too dark.

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.