wapiflapi / binglide Goto Github PK
View Code? Open in Web Editor NEWVisual reverse engineering tool. Veles is better, use it. Don't use this.
License: MIT License
Visual reverse engineering tool. Veles is better, use it. Don't use this.
License: MIT License
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.
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.
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
We should update the readme and add installation instruction for most use cases.
Especially for the requirements since they can be hard to install.
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.
I love this work. Absolutely fascinating. Would you please include the original image/data files you used to generate the samples? I specifically interested in the source of this example: https://raw.githubusercontent.com/wapiflapi/binglide/master/samples/rgb2_24b.bmp_3g.png
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
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'
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'
When a file is loaded we should show the whole region by default instead of having the user press "all".
Add a slider to artificially increase luminosity. On some screens the current interface isn't usable enough because everything is too dark.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.