Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Exact Critical Coulomb Wedge - Graphical User Interface: tools to compute and display the exact solution of any parameter of Critical Coulomb Wedge
|ECCW-GUI| ##########
ECCW and ECCW-GUI allow to compute the exact solution of any parameter of critical Coulomb wedge (as Dahlen 1984 and Yuan et al. 2015). They allow to draw any of these solutions in the β vs α domain (basal slope against surface slope). Are availables compressive or extensive geological context and fluid pore pressure.
ECCW and ECCW-GUI are under GNU GPL-v3 license.
General informations ++++++++++++++++++++
Calculator App ++++++++++++++
|Screen copy of calculator-app|
Plot App ++++++++
|Screen copy of plot-app|
|Screen copy of plot-app's plot window|
Windows +++++++
.. note :: Only tested on Windows 7.
Install a python3 distribution. The miniconda distribution from https://conda.io/miniconda.html is a good choice.
Download the proper installer (the 64-bit version should be appropriated).
Run the downloaded .exe
;
Intall ECCW.
Open a shell that can access your python3 distribution, such as the Windows Power Shell.
If you choosed to install miniconda, you should use the Anaconda Prompt.
You can access it by typing anaconda
in the main Windows menu.
In the shell, type the following command::
pip install --upgrade pip
pip install eccw-gui
ECCW is then available from the main Windows menu by taping eccw
or from a shell by taping python -m eccw_gui
.
Optionally, you can run the eccw_windows_install
command in a shell to install menu and desktop shortcuts.
To remove these shortcuts, run the eccw_windows_remove
command.
Linux +++++
.. note :: Only tested on Ubuntu 18.04.
Install python3 with pip and tk. On Debian family distributions, you can install these packages using the following command::
$ sudo apt-get install python3 python3-pip python3-tk
Install ECCW with the following command::
$ pip3 install --upgrade pip $ pip3 install eccw-gui
ECCW is then available from the main menu under the name eccw.
GUI usage +++++++++
Simply type eccw
in a shell to launch eccw.
The GUI should also be available from the main menu.
To obtain help with text based mode, type::
$ eccw -h
You can access an off-line documentation using the button 'Documentation' in the GUI. Alternatively, you can use the following command, without the GUI::
$ eccw -d
You can launch the GUI with the -m
option of python using the canonic syntax::
python -m eccw_gui
Python library usage ++++++++++++++++++++
You can import and use the core objects for computing and plotting Critical Coulomb Wedge from a python session as discribed in what follows.
This the core object that compute the solutions of the CCW problem. ::
>>> from eccw import EccwCompute
>>> foo = EccwCompute(phiB=30, phiD=10, beta=0)
>>> foo.show_params()
{ context : 'Compression'
beta : 0.0
alpha : nan
phiB : 30.0
phiD : 10.0
rho_f : 0.0
rho_sr : 0.0
delta_lambdaB : 0.0
delta_lambdaD : 0.0
}
>>> foo.compute("alpha")
((3.4365319302835018,), (23.946319406533199,))
The result obtained with the compute
method is always a tuple of two tuples.
The first tuple contains results in inverse fault mechanism, while the second tuple contains results in normal fault mechanism.
These tuples can each contain 0, 1 or 2 values, with a total always equal to 0 or 2.
Here some more examples with computation of beta parameter
::
::
>>> foo.alpha = 3.436532
>>> foo.compute("beta")
((-1.0516746372768912e-07,), (69.6779628783264,))
>>> foo.alpha = 20
>>> foo.compute("beta")
((), (-3.580929608343892, 43.25889259183777))
>>> foo.alpha = -20
>>> foo.compute("beta")
((36.74110740816224, 83.58092960834391), ())
>>> foo.alpha = -35
>>> foo.compute("beta")
((), ())
Have a look on the plot obtained in next section to understand these results.
This the core object that plot the solutions of the CCW problem. This object inherits from EccwCompute
.
::
>>> from eccw import EccwPlot
>>> foo = EccwPlot(phiB=30, phiD=10)
>>> foo.add_curve(inverse={'color':(1,0,0,1), 'label':'inverse'},
normal={'color':(0,0,1,1), 'label':'normal'})
>>> foo.add_point(alpha=3.436532)
>>> foo.add_point(alpha=20, style='*', size=10)
>>> foo.add_point(alpha=-20, style='s')
>>> foo.add_legend()
>>> foo.show()
|Screen copy of EccwPlot's plot|
Additional dependancies +++++++++++++++++++++++
Some softwares are needed to convert Qt specific files into python code:
pyuic5
is used to convert form .ui
files into python code calling PyQt;pyrcc5
is used to convert Qt ressources files .qrc
into python module.Both are found in following dependancies (ubuntu / debian):
| pyqt5-dev-tools
If you want to install Qt-designer for Qt5 on Ubuntu/debian, this app is included in the following package:
| qttools5-dev-tools
Informations for developpers ++++++++++++++++++++++++++++
Convert .ui
files created using Qt-Designer into python files::
$ pyuic5 -x xxx.ui -o xxx_Viewer.py
Some bash scripts located in eccw_gui/*/viewers
folders named make_viewers.sh
automatise this process.
Some custom corrections of Qt objects dimensions are also embedded in some of these script.
Convert Qt ressources .qrc
files created using Qt-Designer into python files::
$ pyrcc5 xxx.qrc -o xxx_rc.py
These ressources files are a smart way to embed images into source code and solve the access path to these images problem after desktop installation.
All graphical object (Qt-derived) get the following methods:
getParams:
return an OrderedDict that describe the state of the object.
setParams:
set the object with a dict obtained from getParams.
getSelect: return an OrderedDict that describe the selected parameters to treat (equal to getParams if the paramters gets single state).
.. _eccw: https://github.com/bclmary/eccw.git
.. _eccw-gui: https://github.com/bclmary/eccw_gui.git
.. |ECCW-GUI| image:: ./eccw_gui/images/eccw-gui_title.png :alt: ECCW :height: 200
.. |Screen copy of calculator-app| image:: eccw_gui/images/screen-copy_calculator-app.png :alt: screen copy of calculator app :width: 600
.. |Screen copy of plot-app| image:: eccw_gui/images/screen-copy_plot-app.png :alt: screen copy of plot app :width: 600
.. |Screen copy of plot-app's plot window| image:: eccw_gui/images/screen-copy_plot-app_plot.png :alt: screen copy of plot window of plot app :width: 600
.. |Screen copy of EccwPlot's plot| image:: eccw_gui/images/EccwPlot_example.png :alt: screen copy of matplotlib window containing ECCW plot :width: 600
FAQs
Exact Critical Coulomb Wedge - Graphical User Interface: tools to compute and display the exact solution of any parameter of Critical Coulomb Wedge
We found that eccw-gui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.