Category: Blog

  • xournalpp

    Xournal++

    Build Status Join the chat at https://gitter.im/xournalpp/xournalpp

    Translations

    Would you like to see Xournal++ in your own language? Translators are welcome to contribute to Xournal++.

    You can contribute translations on Crowdin

    Interested in translating a new language? Discuss on Gitter or create a new issue to unlock the language on Crowdin.

    Thanks in advance!

    Features

    Xournal++ (/ˌzɚnl̟ˌplʌsˈplʌs/) is a hand note-taking software written in C++ with the target of flexibility, functionality and speed. Stroke recognizer and other parts are based on Xournal Code, which you can find at SourceForge.

    Xournal++ features:

    • Supports pressure-sensitive styluses and digital pen tables (e.g. Wacom, Huion, XP Pen, etc. tablets)
    • Paper backgrounds for note-taking, scratch paper, or whiteboarding
    • Annotate on top of PDFs
    • Select text from the background PDF, copy, highlight or underline it or strike it through
    • Follow links from the background PDF
    • Export to a variety of formats including SVG, PNG and PDF, both from the GUI and command line
    • Different drawing tools (e.g. pen, highlighter) and stroke styles (e.g. solid, dotted)
    • Shape drawing (line, arrow, circle, rectangle, spline)
    • Use the set-square and compass tools for measurements or as a guide for drawing straight lines, circular arcs and radii
    • Fill shape functionality
    • Shape resizing and rotation
    • Rotation and grid snapping for precise alignment of objects
    • Input stabilization for smoother writing/drawing
    • Text tool for adding text in different fonts, colors, and sizes
    • Enhanced support for image insertion
    • Eraser with multiple configurations
    • LaTeX support (requires a working LaTeX installation) with customizable template and a resizable editor with syntax highlighting
    • Sidebar containing page previews with advanced page sorting, PDF bookmarks and layers (can be individually hidden/edited)
    • Allows mapping different tools/colors etc. to stylus/mouse buttons
    • Customizable toolbar with multiple configurations, e.g. to optimize toolbar for portrait/landscape
    • Custom color palette support using the .gpl format
    • Page template definitions
    • Bug reporting, auto-save, and auto backup tools
    • Audio recording and playback alongside with handwritten notes
    • Multi language support (over 20 languages supported)
    • Plugins using Lua scripting

    Mobile & web app

    From mid 2020 to May 2021, a Flutter-written mobile app for Android, Chrome OS and iOS (unreleased) and the web has been developed, which supports the file format and most of the basic features of Xournal++. Unfortunately development has stalled and we have lost contact to the (single) developer. The web app is no longer available. You can still check out the separate repository on GitLab or Get it on Google Play

    GNU/Linux

    Windows 10

    macOS Catalina

    Xournal++ Mobile on Chromium OS

    Toolbar / Page Background / Layer

    Multiple page background, easy selectable on the toolbar

    Layer sidebar and advanced layer selection

    Multiple predefined and fully customizable toolbars

    User Manual and FAQ

    For general usage, consult the User Manual. Answers to some common questions can be found in the FAQ.

    Experimental Features

    Sometimes a feature is added that might not be rock solid, or the developers aren’t sure if it is useful. Try these out and give us some feedback.

    Here are a few under development that you can play with now:

    • Assign a mouse button or stylus button to bring up a toolbox of toolbars right under the cursor. You can also modify what is in the toolbox through the usual View → Toolbars → Customize although it won’t appear unless you’ve assigned a button in preferences: mouse or stylus (or selected a toolbar configuration that uses it).

      • This is an experimental feature because not everything you can put in the toolbox behaves. So be aware.

    • Keep your eyes out for other experimental features in preferences as seen here:

      DrawingTools: When drawing a box, circle etc, simulate ctrl or shift modifiers by the initial direction you move the mouse.

      Action on Tool Tap: Allow a brief tap on the screen to bring up the floating toolbox and/or select an object. May work with pen and highlighter only.

    Installing

    The official releases of Xournal++ can be found on the Releases page. We provide binaries for Debian, Ubuntu, MacOS and Windows. For other GNU/Linux distributions (or older/newer ones), we also provide an AppImage that is binary compatible with any distribution released around or after Ubuntu 22.04. For installing Xournal++ Mobile on handheld devices, please check out Xournal++ Mobile’s instructions

    A note for Ubuntu/Debian users: The official binaries that we provide are only compatible with the specific version of Debian or Ubuntu indicated by the file name. For example, if you are on Ubuntu 20.04, the binary whose name contains Ubuntu-bionic is only compatible with Ubuntu 18.04. If your system is not one of the specific Debian or Ubuntu versions that are supported by the official binaries, we recommend you use either the PPA (Ubuntu only), the Flatpak, or the AppImage.

    There is also an unstable, automated nightly release that includes the very latest features and bug fixes.

    With the help of the community, Xournal++ is also available on official repositories of some popular GNU/Linux distros and platforms.

    Debian

    On Debian bookworm and Debian sid the xournalpp package (stable version) is contained in the official repositories. Simply install via

    sudo apt install xournalpp

    There are also the official Stable releases and unstable automated nightly releases.

    Ubuntu and derivatives

    On distros based on Ubuntu 22.04 Jammy Jellyfish (and later) the xournalpp package (stable version) is contained in the official repositories. Simply install via

    sudo apt install xournalpp

    Stable PPA

    The latest stable version is available via the following unofficial PPA:

    sudo add-apt-repository ppa:apandada1/xournalpp-stable
    sudo apt update
    sudo apt install xournalpp

    Unstable PPA

    An unstable, nightly release is available for Ubuntu-based distributions via the following PPA:

    sudo add-apt-repository ppa:andreasbutti/xournalpp-master
    sudo apt update
    sudo apt install xournalpp

    This PPA is provided by the Xournal++ team. While it has the latest features and bug fixes, it has also not been tested thoroughly and may break periodically (we try our best not to break things, though).

    Fedora

    The released version of xournalpp is available in the main repository via Software application or the following command:

    sudo dnf install xournalpp

    or

    pkcon install xournalpp

    The bleeding edge packages synced to xournalpp git master on a daily basis are available from COPR luya/xournalpp. Copr build status

    openSUSE

    On openSUSE Tumbleweed, the released version of Xournal++ is available from the main repository:

    sudo zypper in xournalpp

    For openSUSE Leap 15.0 and earlier, use the install link from X11:Utilities.

    For all versions of openSUSE, bleeding edge packages synced to xournalpp git master on a weekly basis are available from home:badshah400:Staging.

    Arch Linux

    The latest stable release is available in the [extra] repository.

    To build the latest state of the master branch yourself, use this AUR package.

    Solus

    The latest stable release is available in the main repository:

    sudo eopkg it xournalpp

    Flatpak

    The Xournal++ team officially supports a FlatHub release, which can be installed with

    flatpak install flathub com.github.xournalpp.xournalpp

    Note that for Xournal++ to work properly, you must have at least one GTK theme and one icon theme installed on Flatpak. To enable LaTeX support, you will also need to install the TeX Live extension:

    flatpak install flathub org.freedesktop.Sdk.Extension.texlive

    The Flatpak manifest can be found at the Xournal++ Flatpak packaging repository, and all Flatpak-related packaging issues should be reported there.

    Android and Chrome OS

    Android is supported by Xournal++ Mobile. It can be downloaded either on the Tags page or from Google Play.

    iOS

    Unfortunately, the iOS app is not published yet in the Apple App Store. See here to learn, why. Anyway, in the Building section you can learn how to build an early preview.

    Windows

    Official Windows releases are provided on the Releases page.

    Mac OS X

    Mac OS X releases are provided on the Releases page.

    Notes:

    • There have been compatibility problems with Mac OS X Catalina regarding both file permissions and stylus support (#1772 and #1757). Unfortunately, we don’t have the resources to adequately support Catalina at this time. Help would be appreciated!
    • Xournal++ will be delivered with a patched GTK. Else, pressure sensitivity will not work on Mac #569.

    Building

    GNU/Linux Build

    Mac Build

    Windows Build

    Android Build

    iOS Build

    File format

    The file extension .xopp is a gzipped XML file. PDFs are not embedded into the file, so if the PDF is deleted, the background is lost. .xopp is basically the same file format as .xoj, which is used by Xournal. Therefore, Xournal++ is able to read .xoj files, and can also export to .xoj. As soon as notes are exported to a .xoj file, all Xournal++ specific extensions like additional background types, are lost.

    .xopp files can theoretically be read by Xournal, as long as you do not use any new features. Xournal does not open files that contain new attributes or unknown values, so Xournal++ will add the extension .xopp to all saved files to indicate the potential presence of Xournal++-only features.

    All new files will be saved as .xopp. If an .xoj file that was created by Xournal is opened, the Save-As dialog will be displayed on save. If the .xoj file was created by Xournal++, the file will be overwritten on save and the file extension will not change.

    We are currently introducing a new file format that can efficiently store attached PDF files and other attachments internally. We will still allow for attachments that are linked to external files. Please refer to #937 for further details.

    Building

    We support building on three operating systems:

    Contributing

    See CONTRIBUTING.md

    Visit original content creator repository https://github.com/xournalpp/xournalpp
  • xournalpp

    Xournal++

    Build Status Join the chat at https://gitter.im/xournalpp/xournalpp

    Translations

    Would you like to see Xournal++ in your own language? Translators are welcome to contribute to Xournal++.

    You can contribute translations on Crowdin

    Interested in translating a new language? Discuss on Gitter or create a new issue to unlock the language on Crowdin.

    Thanks in advance!

    Features

    Xournal++ (/ˌzɚnl̟ˌplʌsˈplʌs/) is a hand note-taking software written in C++ with the target of flexibility, functionality and speed. Stroke recognizer and other parts are based on Xournal Code, which you can find at SourceForge.

    Xournal++ features:

    • Supports pressure-sensitive styluses and digital pen tables (e.g. Wacom, Huion, XP Pen, etc. tablets)
    • Paper backgrounds for note-taking, scratch paper, or whiteboarding
    • Annotate on top of PDFs
    • Select text from the background PDF, copy, highlight or underline it or strike it through
    • Follow links from the background PDF
    • Export to a variety of formats including SVG, PNG and PDF, both from the GUI and command line
    • Different drawing tools (e.g. pen, highlighter) and stroke styles (e.g. solid, dotted)
    • Shape drawing (line, arrow, circle, rectangle, spline)
    • Use the set-square and compass tools for measurements or as a guide for drawing straight lines, circular arcs and radii
    • Fill shape functionality
    • Shape resizing and rotation
    • Rotation and grid snapping for precise alignment of objects
    • Input stabilization for smoother writing/drawing
    • Text tool for adding text in different fonts, colors, and sizes
    • Enhanced support for image insertion
    • Eraser with multiple configurations
    • LaTeX support (requires a working LaTeX installation) with customizable template and a resizable editor with syntax highlighting
    • Sidebar containing page previews with advanced page sorting, PDF bookmarks and layers (can be individually hidden/edited)
    • Allows mapping different tools/colors etc. to stylus/mouse buttons
    • Customizable toolbar with multiple configurations, e.g. to optimize toolbar for portrait/landscape
    • Custom color palette support using the .gpl format
    • Page template definitions
    • Bug reporting, auto-save, and auto backup tools
    • Audio recording and playback alongside with handwritten notes
    • Multi language support (over 20 languages supported)
    • Plugins using Lua scripting

    Mobile & web app

    From mid 2020 to May 2021, a Flutter-written mobile app for Android, Chrome OS and iOS (unreleased) and the web has been developed, which supports the file format and most of the basic features of Xournal++. Unfortunately development has stalled and we have lost contact to the (single) developer. The web app is no longer available. You can still check out the separate repository on GitLab or Get it on Google Play

    GNU/Linux

    Windows 10

    macOS Catalina

    Xournal++ Mobile on Chromium OS

    Toolbar / Page Background / Layer

    Multiple page background, easy selectable on the toolbar

    Layer sidebar and advanced layer selection

    Multiple predefined and fully customizable toolbars

    User Manual and FAQ

    For general usage, consult the User Manual. Answers to some common questions can be found in the FAQ.

    Experimental Features

    Sometimes a feature is added that might not be rock solid, or the developers aren’t sure if it is useful. Try these out and give us some feedback.

    Here are a few under development that you can play with now:

    • Assign a mouse button or stylus button to bring up a toolbox of toolbars right under the cursor. You can also modify what is in the toolbox through the usual View → Toolbars → Customize although it won’t appear unless you’ve assigned a button in preferences: mouse or stylus (or selected a toolbar configuration that uses it).

      • This is an experimental feature because not everything you can put in the toolbox behaves. So be aware.

    • Keep your eyes out for other experimental features in preferences as seen here:

      DrawingTools: When drawing a box, circle etc, simulate ctrl or shift modifiers by the initial direction you move the mouse.

      Action on Tool Tap: Allow a brief tap on the screen to bring up the floating toolbox and/or select an object. May work with pen and highlighter only.

    Installing

    The official releases of Xournal++ can be found on the Releases page. We provide binaries for Debian, Ubuntu, MacOS and Windows. For other GNU/Linux distributions (or older/newer ones), we also provide an AppImage that is binary compatible with any distribution released around or after Ubuntu 22.04. For installing Xournal++ Mobile on handheld devices, please check out Xournal++ Mobile’s instructions

    A note for Ubuntu/Debian users: The official binaries that we provide are only compatible with the specific version of Debian or Ubuntu indicated by the file name. For example, if you are on Ubuntu 20.04, the binary whose name contains Ubuntu-bionic is only compatible with Ubuntu 18.04. If your system is not one of the specific Debian or Ubuntu versions that are supported by the official binaries, we recommend you use either the PPA (Ubuntu only), the Flatpak, or the AppImage.

    There is also an unstable, automated nightly release that includes the very latest features and bug fixes.

    With the help of the community, Xournal++ is also available on official repositories of some popular GNU/Linux distros and platforms.

    Debian

    On Debian bookworm and Debian sid the xournalpp package (stable version) is contained in the official repositories. Simply install via

    sudo apt install xournalpp

    There are also the official Stable releases and unstable automated nightly releases.

    Ubuntu and derivatives

    On distros based on Ubuntu 22.04 Jammy Jellyfish (and later) the xournalpp package (stable version) is contained in the official repositories. Simply install via

    sudo apt install xournalpp

    Stable PPA

    The latest stable version is available via the following unofficial PPA:

    sudo add-apt-repository ppa:apandada1/xournalpp-stable
    sudo apt update
    sudo apt install xournalpp

    Unstable PPA

    An unstable, nightly release is available for Ubuntu-based distributions via the following PPA:

    sudo add-apt-repository ppa:andreasbutti/xournalpp-master
    sudo apt update
    sudo apt install xournalpp

    This PPA is provided by the Xournal++ team. While it has the latest features and bug fixes, it has also not been tested thoroughly and may break periodically (we try our best not to break things, though).

    Fedora

    The released version of xournalpp is available in the main repository via Software application or the following command:

    sudo dnf install xournalpp

    or

    pkcon install xournalpp

    The bleeding edge packages synced to xournalpp git master on a daily basis are available from COPR luya/xournalpp. Copr build status

    openSUSE

    On openSUSE Tumbleweed, the released version of Xournal++ is available from the main repository:

    sudo zypper in xournalpp

    For openSUSE Leap 15.0 and earlier, use the install link from X11:Utilities.

    For all versions of openSUSE, bleeding edge packages synced to xournalpp git master on a weekly basis are available from home:badshah400:Staging.

    Arch Linux

    The latest stable release is available in the [extra] repository.

    To build the latest state of the master branch yourself, use this AUR package.

    Solus

    The latest stable release is available in the main repository:

    sudo eopkg it xournalpp

    Flatpak

    The Xournal++ team officially supports a FlatHub release, which can be installed with

    flatpak install flathub com.github.xournalpp.xournalpp

    Note that for Xournal++ to work properly, you must have at least one GTK theme and one icon theme installed on Flatpak. To enable LaTeX support, you will also need to install the TeX Live extension:

    flatpak install flathub org.freedesktop.Sdk.Extension.texlive

    The Flatpak manifest can be found at the Xournal++ Flatpak packaging repository, and all Flatpak-related packaging issues should be reported there.

    Android and Chrome OS

    Android is supported by Xournal++ Mobile. It can be downloaded either on the Tags page or from Google Play.

    iOS

    Unfortunately, the iOS app is not published yet in the Apple App Store. See here to learn, why. Anyway, in the Building section you can learn how to build an early preview.

    Windows

    Official Windows releases are provided on the Releases page.

    Mac OS X

    Mac OS X releases are provided on the Releases page.

    Notes:

    • There have been compatibility problems with Mac OS X Catalina regarding both file permissions and stylus support (#1772 and #1757). Unfortunately, we don’t have the resources to adequately support Catalina at this time. Help would be appreciated!
    • Xournal++ will be delivered with a patched GTK. Else, pressure sensitivity will not work on Mac #569.

    Building

    GNU/Linux Build

    Mac Build

    Windows Build

    Android Build

    iOS Build

    File format

    The file extension .xopp is a gzipped XML file. PDFs are not embedded into the file, so if the PDF is deleted, the background is lost. .xopp is basically the same file format as .xoj, which is used by Xournal. Therefore, Xournal++ is able to read .xoj files, and can also export to .xoj. As soon as notes are exported to a .xoj file, all Xournal++ specific extensions like additional background types, are lost.

    .xopp files can theoretically be read by Xournal, as long as you do not use any new features. Xournal does not open files that contain new attributes or unknown values, so Xournal++ will add the extension .xopp to all saved files to indicate the potential presence of Xournal++-only features.

    All new files will be saved as .xopp. If an .xoj file that was created by Xournal is opened, the Save-As dialog will be displayed on save. If the .xoj file was created by Xournal++, the file will be overwritten on save and the file extension will not change.

    We are currently introducing a new file format that can efficiently store attached PDF files and other attachments internally. We will still allow for attachments that are linked to external files. Please refer to #937 for further details.

    Building

    We support building on three operating systems:

    Contributing

    See CONTRIBUTING.md

    Visit original content creator repository https://github.com/xournalpp/xournalpp
  • gsls-svm

    gsls-svm

    Greedy Sparse Least-Squares (GSLS) SVM and how to use it in regression analysis. This algorithm was invented by Gavin C. Cawley and Nicola L.C. Talbot.

    example

    Requirements

    There are no requirements for GSLS_SVM function from GSLS-SVM.jl

    But if you want to test it with test.jl you should install:
    Plots
    Distributions

    Launch

    From Julia REPL:

    julia> include("main.jl")

    Description

    As you might guess, GSLS is a Greedy algorithm. Its purpose is to construct Sparse approximation of the LS-SVM solution to the regularized least-squares regression problem. Given training data

    data

    where

    domains

    LS-SVM with kernel function

    kernel

    determines coefficients

    coefficients

    for the solution to the mentioned regression problem

    solution

    which minimises LS-SVM objective function.

    We aim to find such an approximation (which we call sparse) that for some proper subset (which we call dictionary)

    subset

    coefficients

    coefficients

    of the function

    function

    will minimise GSLS SVM objective function

    objective function

    as much as possible. γ is the regularization parameter. At each iteration GSLS chooses some new vector from dataset as support vector, calculates value of the objective function and in a greedy maner, incorporates best possible support vector (on current iteration) to the dictionary, than proceeds to the next iteration. This process is terminated once dictionary has reached some pre-determined size. More detailed description of this simple, but efficient algorithm can be found in paper.

    Usage

    Let’s figure out on how to use GSLS SVM in regression analysis.

    1. Given values X::Vector{Float64} of predictor and outcomes y::Vector{Float64} you have to prepare data to train GSLS SVM like this:
    𝑿 = [[x] for x in X]
    𝒚 = transpose(y)
    1. Then you have to choose number of support vectors sv_num::Int, regularization parameter γ::Float and kernel function kernel (construct it using higher-order functions kernel = kernel_RBF(σ) or kernel = kernel_polynomial(n, r)) and pass all this stuff to GSLS SVM algorithm like this:
    dict_indices, 𝜷, b = GSLS_SVM(kernel, 𝑿, 𝒚, γ, sv_num)
    1. Finally, you have all you need to build the empirical estimation of the theoretical regression model:
    f(x) = b + sum([𝜷[i] * kernel(𝑿[dict_indices[i]], [x])
                                            for i=1:length(dict_indices)])
    Visit original content creator repository https://github.com/zhenyatos/gsls-svm
  • skultrafast

    ***skultrafast***

    Documentation Status

    What is skultrafast?

    skultrafast is a Python package for ultrafast spectroscopy data analysis. It provides tools for analyzing various types of time-resolved spectroscopy data, including pump-probe, transient absorption, and two-dimensional infrared (2D-IR) spectroscopy. The package includes functionality for data import, visualization, processing, and fitting. It is built on top of the scientific Python ecosystem, including NumPy, SciPy, and Matplotlib.

    The latest version of the package is available on github. A build of the documentation can be found at Read the docs. The documentation includes Installtion notes.

    Funding

    The package was created and is maintained by Till Stensitzki. The package was created while being employed in the Heyne group and was therefore founded by the DFG via SFB 1078 and SFB 1114. Recent development focussed on 2D-spectroscopy is part of my stay in the Ultrafast Structual Dynamics Group in Potsdam under Müller-Werkmeister.

    Scope of the project

    I like to include any kind of algorithm or data structure which comes up in ultrafast spectropy. I am also open to add a graphical interface to the package, but as experience shows, a GUI brings in a lot of maintenance burden. Hence, the first target is a interactive data-explorer for the jupyter notebook.

    This package also tries its best to follow modern software practices. This includes version control using git, continues integration testing via github action and a decent documentation hosted on Read the docs.

    Features

    The current releases centers around working with time-resolved spectra:

    • Generate publication-ready plots with minimal effort.
    • Perform global fitting of transient data, including DAS, SAS, and compartment modeling.
    • Analyze polarization-resolved datasets.
    • Easily process data by selecting, filtering, and recalibrating it.
    • Correct dispersion automatically in the case of chirped spectra.
    • Obtain accurate error estimates for fitting results using lmfit <http://lmfit.github.io/lmfit-py/>_.
    • Analyze lifetime-density using regularized regression.
    • Analyze 2D spectroscopy data, including CLS-decay, diagonal extraction, pump-slice-amplitude spectrum, integration, and Gaussian fitting.

    Users

    At the moment it is mostly me and other people in my groups. I would be happy if anyone would like to join the project!

    Citiation

    If you use this package in your research, please cite the zenodo entry at the top.

    License

    Standard BSD-License. See the LICENSE file for more details.

    Visit original content creator repository https://github.com/Tillsten/skultrafast
  • LoseLess

    Icon

    Smart and easy-to-use Add-In for Microsoft Office Word for text recovering if keyboard layout was wrong

    Overview

    The algorithm is pretty straightforward – based on character replacement according the chosen keyboard layout. LoseLess is an enclosure to the algorithm – beautiful Microsoft Office Word plugin with some features and settings.

    You can:

    • rely on our automatic language detector, or
    • manually switch the languange necessary
    • normalize Letter Case in text
    • undo the recovery

    Some info

    Features

    Text is in wrong keyboard layout? Don’t lose it again! Just select it and press “Recovery text”. LoseLess will do the dirty work for you.

    Performance

    LoseLess recovers 10,000 words 100x faster that Usain Bolt runs 200 meters*.

    Intellect

    LoseLess knows that “ghbdtn” is “привет” and “рщц фку нщг,” is “how are you?”.

    This project also contains the ready project for Visual Studio (Lossless.csproj).

    Language support

    Currently, LoseLess supports english and russian only. The main difficulty is connected with the support of keyboard layout – special letters. At current state we are limited with the VSTO API, and it is imposible to track when system keys are pressed. Therefore it is impossible to track when the special letters like ā or š are used.

    Nevertheless, LoseLess is localized to english, russian and latvian. The plugin detects the language automatically, according the system language of the Word app. Feel free to add other localizations.

    How to use

    There are two ways to add LoseLess to your Word app:

    • Find publish folder and run setup.exe. Setup will set up everything automatically.
    • Find publish folder and manually add LoseLess.vsto to the office app by opening the Add-In settings in Insert section.

    To recover the text, just select it and press recover text in the Add-In menu.

    IMPORTANT: this version of LoseLess supports Microsoft Office Word for Microsoft Windows only.

    * Based on 2009 Usain Bolt 200m World Record (19.19 seconds) and LoseLess algorithm speed (~3700000 symbols per second, 7.4 symbols per word). Tested on machine with Intel Pentium P6100 processor, 2Gb RAM, Microsoft Windows 10 Enterprise LTSB 64-bit. LoseLess IgnoreCase switched on.

    Visit original content creator repository https://github.com/krlc/LoseLess
  • prngine

    PRNGine

    Build Status Maven Central Javadoc

    PRNGine is a pseudo-random number generator library for sequential and parallel Monte Carlo simulations. All PRNG implementations of this library extends the Java RandomGenerator class, which makes it easily usable in other projects. The PRNGs are not cryptographically strong RNGs.

    The following PRNGs are implemented:

    • KISS32Random: Implementation of an simple PRNG as proposed in Good Practice in (Pseudo) Random Number Generation for Bioinformatics Applications (JKISS32, page 3) David Jones, UCL Bioinformatics Group.
    • KISS64Random: Implementation of an simple PRNG as proposed in Good Practice in (Pseudo) Random Number Generation for Bioinformatics Applications (JKISS64, page 10) David Jones, UCL Bioinformatics Group.
    • LCG64ShiftRandom: This class implements a linear congruential PRNG with additional bit-shift transition. It is a port of the trng::lcg64_shift PRNG class of the TRNG library created by Heiko Bauke.
    • MT19937_32Random: This is a 32-bit version of Mersenne Twister pseudorandom number generator.
    • MT19937_64Random: This is a 64-bit version of Mersenne Twister pseudorandom number generator.
    • XOR32ShiftRandom: This generator was discovered and characterized by George Marsaglia [Xorshift RNGs]. In just three XORs and three shifts (generally fast operations) it produces a full period of 232 – 1 on 32 bits. (The missing value is zero, which perpetuates itself and must be avoided.) High and low bits pass Diehard.
    • XOR64ShiftRandom: This generator was discovered and characterized by George Marsaglia [Xorshift RNGs]. In just three XORs and three shifts (generally fast operations) it produces a full period of 264 – 1 on 64 bits. (The missing value is zero, which perpetuates itself and must be avoided.) High and low bits pass Diehard.

    NOTE

    All implemented random generators are not thread-safe. If they are used in a multi-threaded environment, they must be synchronized externally.

    Requirements

    • JDK 17: You need Java 17 for building the library.

    Building PRNGine

    For building the PRNGine library you have to check out the master branch from Github.

    $ git clone https://github.com/jenetics/prngine.git
    

    Executing the tests:

    $ cd prngine
    $ ./gradle test
    

    Building the library:

    $ ./gradle jar
    

    Examples

    PRNG creation

    All random generators can be created with new or via the RandomGenerator.of("<name>") or RandomGeneratorFactory.of("<name>") factory method.

    final LCG64ShiftRandom random1 = new LCG64ShiftRandom();
    final RandomGenerator random2 = RandomGenerator.of("LCG64ShiftRandom");
    final RandomGenerator random3 = RandomGeneratorFactory.of("LCG64ShiftRandom").create();

    PRNG seeding

    The library also contains methods for creating random seed values, which can be used for initializing the available PRNGs.

    // Creating a new 64 bit seed value.
    final long seed = Seeds.seed();
    final Random ranomd = new LCG64ShiftRandom(seed);

    Every random engine has a seedBytes() method, which return the seed byte[] array with the length required by the PRNG.

    // This random creation is equivalent to...
    final RandomGenerator random1 = new LCG64ShiftRandom();
    
    // ...creating it with the seed bytes of the PRNG. 
    final byte[] seed = LCG64ShiftRandom.seedBytes();
    final RandomGenerator random2 = new LCG53ShiftRandom(seed);

    Test results

    Statistical tests (dieharder)

    All implemented PRNGs has been tested with the dieharder test suite.

    PRNG Passed Weak Failed
    KISS32Random 113 1 0
    KISS64Random 109 5 0
    LCG64ShiftRandom 111 3 0
    MT19937_32Random 111 3 0
    MT19937_64Random 108 6 0
    XOR32ShiftRandom 103 6 5
    XOR64ShiftRandom 113 1 0
    L64X256MixRandom 111 3 0

    Runtime performance tests

    The runtime performance of the PRNGs was tested with the JMH testing framework on an Intel Core i7-6700HQ CPU @ 2.60GHz with Java SE Runtime Environment (build 1.8.0_112-b15)—Java HotSpot.

    PRNG 10e6 ints/s 10e6 floats/s F range 10e6 longs/s 10e6 doubles/s
    KISS32Random 169 143 126 124 108
    KISS64Random 128 124 100 131 120
    LCG64ShiftRandom 234 168 19 244 185
    MT19937_32Random 164 127 113 92 82
    MT19937_64Random 148 120 107 148 120
    XOR32ShiftRandom 206 160 144 135 120
    XOR64ShiftRandom 189 156 143 207 166
    L64X256MixRandom 162 136 121 166 142

    License

    The library is licensed under the Apache License, Version 2.0.

    Copyright 2017-2021 Franz Wilhelmstötter
    
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
    
    http://www.apache.org/licenses/LICENSE-2.0
    
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    

    Release notes

    • Make the random generators work seamlessly with the new Java 17 RandomGenerator API.

    Improvements

    • #26: Convert Gradle build scripts from Groovy to Kotlin and prepare for Java 11.

    Improvements

    • #21: Update Gradle version and add CI build for Java 11.

    Bugs

    Improvements

    • #3: Define stable module name. Set the Automatic-Module-Name to io.jenetics.prngine.
    Visit original content creator repository https://github.com/jenetics/prngine
  • SYRCoffeeAndTea

    Visit original content creator repository
    https://github.com/emipa606/SYRCoffeeAndTea

  • spring-boot-native-samples

    Spring Boot 3.0 Native Samples

    build

    Samples of using Spring Boot 3.0 to build native executables

    • Java 17 required (GraalVM Java 17 required for native profile)
    • Spring Boot 3.0.0
    • Tested with GraalVM 22.3.0 Java 17 CE

    Samples

    Metrics captured on Windows 10 with GraalVM 22.3.0 Java 17 CE

    gRPC

    Simple gRPC service

    Mode Binary size Startup time Memory
    JVM 21.5 (JAR) 0.96s 96MB
    Native 47.8MB 0.124s 24.8MB

    Spring Data JPA with WebMvc

    A microservice with REST API and RDBMS backend

    Mode Binary size Startup time Memory
    JVM 42.7 (JAR) 2.72s 183MB
    Native 129MB 0.277s 62.3MB

    Features:

    • Spring Data JPA
    • Spring Web MVC
    • Flyway
    • PostgreSQL
    • Testcontainers

    Reactive JDBC & WebFlux

    A reactive microservice with REST API and RDBMS backend

    Mode Binary size Startup time Memory
    JVM 32.1 (JAR) 1.929s 142.7MB
    Native 79.4MB 0.217s 56.9MB

    Features:

    • Spring Data R2dbc
    • Spring WebFlux
    • Flyway
    • PostgreSQL
    • Testcontainers
    Visit original content creator repository https://github.com/alexcheng1982/spring-boot-native-samples
  • LEGO

    LEGO: Modern Web Components layer

    LEGO (Light Embedded Gluten-free Objects) is a thin layer to build bricks for your browser that are easy to digest.

    It comes along the WebComponentsJS polyfill to create more readable Web Components.

    Create your element

    Using render()

    <my-component>Content of my component</my-component>
    <script src=./src/lego.js></script>
    <script>
      // Create your own class
      class MyComponent extends Component {
        render() {
          return `My component content: <slot></slot>!`
        }
      }
      // Enable <my-component> HTML element
      customElements.define('my-component', MyComponent)
    </script>

    Using <template>

    <link rel=import href=./mycomponent.html>
    <my-component>Content of my component</my-component>

    mycomponent.html:

    <template>
      My component content: <slot></slot>!
    </template>
    
    <script src=./src/lego.js></script>
    <script>
      class MyComponent extends TemplateComponent {}
      customElements.define('my-component', MyComponent)
    </script>

    Not much happening, but you have a custom web component!

    Just a thin layer

    When extending Component, you basically add some shortcuts to native HTMLElement.

    It’s still fully compatible with native custom elements. No magic behind the scene,
    no complexity, just a couple of useful methods to write native web components easier.

    It also enables the power of using <template> and <style> with imports.
    See the template with import demo.

    Available methods

    watch(): should return the array of names of attributes to watch for a change.
    When the attribute is changed, the component is re-rendered.

    defaults(): should return an object with the name of the attributes and their matching
    default values. If the attribute is not declared, this value will be taken.

    value(attributeName): a method to retrieve the attribute value. If the attribute
    has no value, the default value will be taken.

    render(): should return a string which is the HTML content of the component.
    If <slot></slot> is in the string, it will be replaced by the children of your custom element.

    Visit original content creator repository
    https://github.com/neomad-team/LEGO

  • E-commerce-Customer-Segmentation

    E-Commerce-Customer-Segmentation

    Abstract

    A key challenge for e-commerce businesses is to analyze the trend in the market to increase their sales. The trend can be easily observed if the companies can group the customers; based on their activity on the e-commerce site. This grouping can be done by applying different criteria like previous orders, mostly searched brands and so on.

    Problem Statement

    Given the e-commerce data, use k-means clustering algorithm to cluster customers with similar interest.

    Dataset Information

    Column Description
    Cust_ID Unique Numbering of Customers
    Gender Gender of Customer
    Orders No. of Past orders placed by the customers

    Remaining 35 features (brands) contains the number of times customers have searched them.

    Work Flow

    • First Import the necessary libraries needed for the project. Below are the libraries that I have used
      • import pandas as pd
      • import numpy as np
      • import matplotlib.pyplot as plt
      • import seaborn as sns
      • from sklearn.preprocessing import MinMaxScaler
      • from sklearn.metrics import silhouette_score
      • from sklearn.cluster import KMeans
      • from yellowbrick.cluster import KElbowVisualizer
    • Load the dataset using pandas.
    • Understand the data with basic statistics, info, total records, features and their data types also number of null values.
    • Perform the data cleaning techniques like treating the missing values.
    • Visualize the data with the help of Matplotlib or Seaborn to get better understanding of the features.
      • In my project I have used Seaborn’s
      • Boxplot(To visualize the Outliers present in the data)
      • Barplot (To get to 10 customer ID based on Total searches)
      • Countplot (To get gender count and Prior orders count)
      • Heatmap (To find the Correlation)
      • Histogram (To get know how the data is distributed)
      • Below are some of the charts that I have plotted

    image image

    • Perform the data scaling using minmaxscaler and data will be scaled between 0 and 1.
    • Implement the Elbow method or Silhouette method to find the optimum number of K. Also visualize them with plots.

    image

    • After getting optimum K value use it as number of clusters and perform the model fit.
    • The model will provide the output with different clusters.
    • Analyed each clusters using visualization techniques to find the insights.

    image

    Visit original content creator repository https://github.com/sriram2098/E-commerce-Customer-Segmentation