Blog

  • activerecord-validate_unique_child_attribute

    activerecord-validate_unique_child_attribute

    Guarantee uniqueness of a single attribute value across one or more children of an ActiveRecord object

    A simplistic but functional workaround for rails/rails#4568

    Usage

    Install the gem:

    gem 'activerecord-validate_unique_child_attribute',
      require: 'active_record/validate_unique_child_attribute'

    Add the functionality to your ActiveRecord class:

    class MyParentRecord < ActiveRecord::Base
      include ActiveRecord::ValidateUniqueChildAttribute
    
      has_many :children
      accepts_nested_attributes_for :children
    
      # Add an error to the MyParentRecord object whenever two or
      # more children have the same value of some_attribute
      validates_uniqueness_of_child_attribute :children, :some_attribute
    end

    But wait, Rails already does this!

    Yeah, in theory it does.

    However, if you use accepts_nested_attributes_for in your parent class then the validates_uniqueness_of validations in your child class will only be triggered for existing records. This means that nested attributes in a standard controller #create method will only fail at the DB constraint level, which often results in a very ugly error experience for the end user.

    This is a long-standing Rails bug that is not expected to be fixed any time soon.

    Additional Options

    validates_uniqueness_of_child_attribute :children, :some_attribute,
      validate: true, error_formatter: :my_error_formatter
      
    def my_error_formatter(attribute, duplicates)
      "Oh no! Duplicate #{attribute.singularize.humanize} values: #{duplicates.join(', ')}"
    end
    • validate: Whether to call valid? on each of the children before looking for duplicate values of some_attribute. This is useful if your before_validation code munges the value of some_attribute by stripping, downcasing, or otherwise normalizing its value.
    • error_formatter: A method for formatting the error message that is attached to the parent record’s errors[:children] array. A default formatter is provided. Alternatively you can pass a block to the validates_uniqueness_of_child_attribute class method:
      validates_uniqueness_of_child_attribute :children, :some_attribute do |attribute, duplicates|
        "Oh no! Duplicate #{attribute.singularize.humanize} values: #{duplicates.join(', ')}"
      end

    Contributing

    This is a really simple implementation! Please open a pull request if you’ve got ideas on how to improve it.

    Compatibility

    Tested with active* versions 3.2.22.5, 4.0.13, 4.1.12, 4.2.10, 5.0.0.1, 5.1.4, and 5.2.3. See Appraisals.

    Code Status

    Build Status

    License

    This gem is released under the MIT License

    Visit original content creator repository https://github.com/GSA/activerecord-validate_unique_child_attribute
  • template-generator-maven-plugin

    Template-generator-maven-plugin

    The Apache License Maven Central Build Status

    A Maven plugin that generates code using template engines.

    References

    Contributing

    Git flow with following settings:

    • Branch name for production releases: master
    • Branch name for “next release” development: develop
    • Feature branches? feature/
    • Bugfix branches? bugfix/
    • Release branches? release/
    • Hotfix branches? hotfix/
    • Support branches? support/
    • Version tag prefix? []

    Use

    Stable versions

    <plugin>
        <groupId>com.danidemi</groupId>
        <artifactId>template-generator-maven-plugin</artifactId>
        <version>0.0.5</version>
    </plugin>
    

    Snapshot versions

    Available here: https://oss.sonatype.org/content/repositories/snapshots/com/danidemi/template-generator-maven-plugin/, to use in a project, please enable this

    <repositories>
        <repository>
            <id>central</id>
            <name>Sonatype Snapshot</name>
            <layout>default</layout>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
    

    Dev Notes

    mvn com.danidemi:template-generator-maven-plugin:0.0.1-SNAPSHOT:generate
    mvn install com.danidemi:template-generator-maven-plugin:0.0.1-SNAPSHOT:generate -e -X -Dgenerate.pathToCsv=Hollow
    mvn install com.danidemi:template-generator-maven-plugin:0.0.1-SNAPSHOT:generate -e -X -Dgenerate.pathToCsv=${project.build.testSourceDirectory}
    mvn install com.danidemi:template-generator-maven-plugin:0.0.1-SNAPSHOT:generate -e -X -Dgenerate.pathToCsv=C:\Users\danidemi\workspace\repos\danidemi\template-generator-maven-plugin\src\test\resources\codeAndCountry.csv
    mvn install com.danidemi:template-generator-maven-plugin:0.0.1-SNAPSHOT:generate -e -X -Dgenerate.pathToCsv=${project.build.testSourceDirectory}\..\resources\codeAndCountry.csv
    mvn install com.danidemi:template-generator-maven-plugin:0.0.1-SNAPSHOT:generate -e -X -Dgenerate.pathToCsv=${project.build.testSourceDirectory}\..\resources\codeAndCountry.csv -Dgenerate.pathToTemplate=${project.build.sourceDirectory}\..\resources\Money.java.vm -Dgenerate.pathToOutputFolder=${project.build.directory}\generated
    

    Release

    Stable versions

    mvn versions:set
    mvn clean install
    mvn clean deploy -P release
    mvn versions:set
    

    Snapshot versions

    mvn clean deploy
    
    Visit original content creator repository https://github.com/danidemi/template-generator-maven-plugin
  • arduino

    Arduino

    Different sketches for the arduino and other microcontrollers and IC’s.

    Sketches

    The purpose of most of these sketches is to learn the basics and be able to apply the stuff in my bigger projects! (Also included here)

    ButtonRead Using single 8 bit 74HC575 to read push button inputs

    Using a 74HC595 shift register to read button pushes.

    Circuit diagram

    ButtonReadChain Using several 8 bit 74HC575’s to read push button inputs

    Using two 74HC595 shift registers to read button pushes. Code is scalable to read from a # of shift registers.

    Circuit diagram Implemented

    LedFlasher Using a 8 bit 74HC575 to toggle some LED’s

    Using a 74HC595 shift registers to drive 3 LED’s.

    Circuit diagram

    WebSocket Using Websocket data to control LED status

    Using a 74HC595 shift registers to drive LED status using data received from Websocket connection.

    RaspdusWifi ESP8266-07 Wifi chip, will serve as brain in the Raspdus controller project

    Basically combines the stuff from the other sketches. This is a remote control that connects to my wifi at home that talks to my home automation API to control the lights!

    Components

    • 1 x ESP8266-07 wifi module

    • 1 x LD33V 3.3V regulator

    • 4 x 74HC595 shift registers

    • 1 x 0.1uF ceramic capacitator

    • 1 x 10uF polarized capacitator

    • 1 x 10K resistor

    • 16 x 470 ohm resistors

    • 16 x zener diodes

    • 6 x six-position male pin connector

    • 3 x two-position male pin connectors

    • 1 x two-position screw terminal

    • Tinkercad sketch

    Rough sketch of circuit diagram PCB circuit using Fritzing software

    Ordered the PCB print from PCBway.com, here is what it looked like

    PCB circuit without components

    PCB circuit with components

    Final prototype results

    Box complete

    Prototype build in progress

    Box knobs Box prints Box wiring

    Video on twitter demonstrating the Raspdus box

    Custom 3D prints source files

    Resources

    • Generate circuit diagrams (very simple ones) and 3D prints: Tinkercad
    • Generate circuit diagrams Fritzing
    • Order PCB prototype boards PCBway

    Motor Under development. ROV control

    Under development. Should control 3 ESC’s, 1 servo and a couple of relays to control lights.

    MotorCalibration Under development. ESC calibration script

    ESC calibration script

    Contact

    Erik Andreas Larsen – @grizzifrogeriklarsen.post@gmail.com

    Board config “AllFeatures” for the ESP8266-07

    {
        "board": "esp8266:esp8266:generic",
        "configuration": "xtal=80,vt=flash,exception=disabled,ResetMethod=ck,CrystalFreq=26,FlashFreq=40,FlashMode=dout,eesz=1M64,led=2,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200",
        "sketch": "AllFeatures\\AllFeatures.ino",
        "port": "COM4",
        "output": "../ArduinoOutput"
    }
    Visit original content creator repository https://github.com/larsensolutions/arduino
  • arduino

    Arduino

    Different sketches for the arduino and other microcontrollers and IC’s.

    Sketches

    The purpose of most of these sketches is to learn the basics and be able to apply the stuff in my bigger projects! (Also included here)

    ButtonRead Using single 8 bit 74HC575 to read push button inputs

    Using a 74HC595 shift register to read button pushes.

    Circuit diagram

    ButtonReadChain Using several 8 bit 74HC575’s to read push button inputs

    Using two 74HC595 shift registers to read button pushes. Code is scalable to read from a # of shift registers.

    Circuit diagram Implemented

    LedFlasher Using a 8 bit 74HC575 to toggle some LED’s

    Using a 74HC595 shift registers to drive 3 LED’s.

    Circuit diagram

    WebSocket Using Websocket data to control LED status

    Using a 74HC595 shift registers to drive LED status using data received from Websocket connection.

    RaspdusWifi ESP8266-07 Wifi chip, will serve as brain in the Raspdus controller project

    Basically combines the stuff from the other sketches. This is a remote control that connects to my wifi at home that talks to my home automation API to control the lights!

    Components

    • 1 x ESP8266-07 wifi module

    • 1 x LD33V 3.3V regulator

    • 4 x 74HC595 shift registers

    • 1 x 0.1uF ceramic capacitator

    • 1 x 10uF polarized capacitator

    • 1 x 10K resistor

    • 16 x 470 ohm resistors

    • 16 x zener diodes

    • 6 x six-position male pin connector

    • 3 x two-position male pin connectors

    • 1 x two-position screw terminal

    • Tinkercad sketch

    Rough sketch of circuit diagram PCB circuit using Fritzing software

    Ordered the PCB print from PCBway.com, here is what it looked like

    PCB circuit without components

    PCB circuit with components

    Final prototype results

    Box complete

    Prototype build in progress

    Box knobs Box prints Box wiring

    Video on twitter demonstrating the Raspdus box

    Custom 3D prints source files

    Resources

    • Generate circuit diagrams (very simple ones) and 3D prints: Tinkercad
    • Generate circuit diagrams Fritzing
    • Order PCB prototype boards PCBway

    Motor Under development. ROV control

    Under development. Should control 3 ESC’s, 1 servo and a couple of relays to control lights.

    MotorCalibration Under development. ESC calibration script

    ESC calibration script

    Contact

    Erik Andreas Larsen – @grizzifrogeriklarsen.post@gmail.com

    Board config “AllFeatures” for the ESP8266-07

    {
        "board": "esp8266:esp8266:generic",
        "configuration": "xtal=80,vt=flash,exception=disabled,ResetMethod=ck,CrystalFreq=26,FlashFreq=40,FlashMode=dout,eesz=1M64,led=2,ip=lm2f,dbg=Disabled,lvl=None____,wipe=none,baud=115200",
        "sketch": "AllFeatures\\AllFeatures.ino",
        "port": "COM4",
        "output": "../ArduinoOutput"
    }
    Visit original content creator repository https://github.com/larsensolutions/arduino
  • Robocrypt

    Robocrypt

    Super strong python3 encryption program with file and folder support

    Due to the encryption algorithm in use here, large files should not be encrypted with this tool. Robocrypt keeps data in memory while encrypting/decrypting, so depending on the RAM in your system there will be a limit on the size of files you can handle with this tool.

    Robocrypt is amazing for encrypting small files and folders with sensitive data. It uses symmetric key encryption, plus a salt of random bytes. I guarantee that ain’t nobody gonna break the encryption, unless you use a sub-par password.

    Documentation Index:

    Installation:

    pip3 install robocrypt

    Setup:

    Create a secure directory in /var that only your user can read/write too:

    $ sudo mkdir /var/secure
    $ sudo chmod 740 /var/secure

    If you’re using Windows, do the same thing but in C:\secure.
    Generate a salt to use when encrypting stuff:

    $ robocrypt generate-salt 69173

    Make sure that you decrypt anything you’ve encrypted with your current salt(or back it up) before you change it! Otherwise you will never be able to recover files that you encrypted.
    If you intend to share encrypted files with someone, you also need to share your salt with them, or they will have serious trouble trying to decrypt the files.

    Module robocrypt

    Sub-modules

    Module robocrypt.cli

    Functions

    Function command_line

    def command_line()
    

    This is the command line entry point of robocrypt.

    Module robocrypt.info

    This contains information about the module such as version and author.

    Module robocrypt.library

    This contains all the core functions used by robocrypt.

    Functions

    Function decrypt

    def decrypt(
        message: bytes,
        password: bytes
    ) ‑> bytes
    

    Decrypt a chunk of bytes with a password.

    Args
    message : bytes
    : The bytes to decrypt

    password : bytes
    : The password to decrypt the message with

    Returns
    bytes
    : the decrypted bytes

    Function decrypt_file

    def decrypt_file(
        filepath: str,
        password: str
    )
    

    Decrypts a file and saves it without its robo extension.

    Args
    filepath : str
    : The encrypted file to decrypt

    password : str
    : The password to decrypt the file with

    Function encrypt

    def encrypt(
        message: bytes,
        password: bytes
    ) ‑> bytes
    

    Encrypts a bytes message using the specified bytes password.

    Args
    message : bytes
    : the message to encrypt

    password : bytes
    : the password to encrypt the message with

    Returns
    bytes
    : the encrypted bytes

    Function encrypt_file

    def encrypt_file(
        filepath: str,
        password: str
    )
    

    Encrypts a file and saves it with a .robo for file or .robodir extension for directories. I strongly advise that you not mess with the extensions if you want to be able to properly decrypt your files.

    Args
    filepath : str
    : The file or directory to encrypt

    password : str
    : the password to encrypt the file with

    Function generate_salt

    def generate_salt(
        length: int
    )
    

    Generates a salt and stores it in the file indicated by the ENV var ROBO_SALT_FILE.

    Args
    length : int
    : the number of bytes to contain in the salt

    Returns
    str
    : the location of the new salt file

    Function get_kdf

    def get_kdf()
    

    Gets a KDF object to perform cryptography with.

    Returns
    PBKDF2HMAC
    : the KDF to perform encryption/decryption with

    Function get_salt

    def get_salt(
        salt_file: str = None
    ) ‑> bytes
    

    Gets the salt bytes used to encrypt and decrypt things.
    If a salt file is not specified and the env var ROBO_SALT_FILE is not set, a default salt location for your OS will be used. If there is not a salt at that location, robocrypt will raise an error.
    The salt file location is stored in the environment variable ROBO_SALT_FILE. You can modify this environment variable to point to different salt files if desired.

    Args
    salt_file : str
    : a custom file to read the salt from.

    Returns
    str
    : the salt bytes

    Function get_salt_file

    def get_salt_file() ‑> str
    

    Returns the location of the salt file used for cryptography.
    On Unix systems the salt file is at /var/secure/robocrypt.salt, and on Windows the salt is at C:/secure/robocrypt.salt. If a custom salt is specified in the environment variable ROBO_SALT_FILE, it will be used instead of the OS default.

    Returns
    str
    : the path the to salt file

    Function read_encrypted_file

    def read_encrypted_file(
        filepath: str,
        password: str
    ) ‑> bytes
    

    Returns the decrypted content of an encrypted file without decrypting the file itself.

    Args
    filepath : str
    : the encrypted file to read

    password : str
    : the password to use to read the file

    Returns
    bytes
    : the file’s decrypted content in bytes

    Classes

    Class DecryptionError

    class DecryptionError
    

    This occurs when an invalid password is used to try to decrypt something, or the wrong salt is used.


    Generated by pdoc 0.10.0 (https://pdoc3.github.io). That’s why the documentation looks like crap.

    Robocrypt Command Line:

    Here is the help for the robocrypt CLI:

    usage: robocrypt [-h] [-s SALT_FILE] [-v] {generate-salt,gs,encrypt,en,decrypt,de} ...
    
            ____        __             __ __
           / __ \____  / /_  ____     / // /
          / /_/ / __ \/ __ \/ __ \   / // /_
         / _, _/ /_/ / /_/ / /_/ /  /__  __/
        /_/ |_|\____/_.___/\____/     /_/   
        
    
    positional arguments:
      {generate-salt,gs,encrypt,en,decrypt,de}
        generate-salt (gs)  generate and save a new random salt of a given length
        encrypt (en)        encrypt a file or directory
        decrypt (de)        decrypt a file or directory
    
    optional arguments:
      -h, --help            show this help message and exit
      -s SALT_FILE, --salt-file SALT_FILE
                            specify a salt file to use
      -v, --version         show program's version number and exit

    The commands you can use are these:

    • generate-salt or shortcut gs
    • encrypt or shortcut en
    • decrypt or shortcut de

    To specify a salt file to generate, encrypt, or decrypt, use the argument --salt-file /path/to/saltfile.

    generate-salt:

    Generate a salt in the default location:

    $ sudo robocrypt generate-salt 5829
    Overwriting your old salt will render anything encrypted with it absolutely un-readable, unless you back it up.
    Are you sure you want to do this? yes
    Successfully saved a salt of length 5829 to /var/secure/robocrypt.salt

    Robocrypt will ask you if you really want to overwrite any existing salt files. Answering no at the prompt will exit the program without touching the salt.

    Generate a salt to a specific file:

    $ sudo robocrypt --salt-file /var/secure/myother.salt generate-salt 5829
    Successfully saved a salt of length 5829 to /var/secure/myother.salt

    Here we were not prompted to confirm because there was no previous file at /var/secure/myother.salt.

    encrypt:

    Encrypt a file:

    $ robocrypt encrypt tests/data/Dictionary.java 
    Enter password to encrypt: 🔑
    Successfully encrypted /path/tests/data/Dictionary.java!
    $ ls tests/data/
    Dictionary.java.robo  src
    

    You can see that Dictionary.java was encrypted and saved as Dictionary.java.robo.

    Encrypt a folder with a specified salt:

    $ robocrypt --salt-file /var/secure/alternate.salt encrypt tests/data/src/
    Enter password to encrypt: 🔑
    Successfully encrypted /path/tests/data/src!
    $ ls tests/data/
    Dictionary.java.robo  src.robodir

    The src directory was encrypted and saved as src.robodir using the alternate.salt.

    decrypt:

    Decrypt a file:

    $ robocrypt decrypt tests/data/Dictionary.java.robo 
    Enter password to decrypt: 🔑
    Successfully decrypted /path/tests/data/Dictionary.java.robo!
    $ ls tests/data/
    Dictionary.java  src.robodir

    Dictionary.java was restored to its original state with only the .java extension.

    Decrypt a folder with a specified salt:

    $ robocrypt --salt-file /var/secure/alternate.salt decrypt tests/data/src.robodir
    Enter password to decrypt: 🔑
    Successfully decrypted /path/tests/data/src.robodir!
    $ ls tests/data/
    Dictionary.java  src

    Now the src directory is back to normal, with no .robodir extension.

    Warning!

    When using the tool, don’t jack around with the output files’ extensions (.robo and .robodir). Robocrypt uses these extensions to tell what type of file is encrypted and if change them, you will regret it. Also, I would recommend not double-encrypting anything. Because of the way the program works with extensions, you’ll end up screwing yourself. Encrypt your shit one time with a strong password.

    Visit original content creator repository
    https://github.com/noahbroyles/Robocrypt

  • travis-ergogen-numpad

    travis-ergogen-numpad

    A numpad made with Ergogen v4 and SMD components. Alpha quality!

    keyboard combo outline

    PCB front

    PCB back

    Parts

    JLCPCB PCBA:

    Aliexpress:

    Adafruit:

    References

    Visit original content creator repository https://github.com/dieseltravis/travis-ergogen-numpad
  • travis-ergogen-numpad

    travis-ergogen-numpad

    A numpad made with Ergogen v4 and SMD components. Alpha quality!

    keyboard combo outline

    PCB front

    PCB back

    Parts

    JLCPCB PCBA:

    Aliexpress:

    Adafruit:

    References

    Visit original content creator repository https://github.com/dieseltravis/travis-ergogen-numpad
  • School-42-printf

    School 42 printf()

    This repository contains all files for the printf project from School 42 Málaga cursus. The project consist in duplicate the printf() function, part of the stdio.h library.

    About

    This project consists in duplicate the behavior of the C function printf(). It is not necessary to implement the buffer management of the original function. It must handle the following parameters:

    • char type variables.
    • string type variables.
    • int type variables.
    • unsigned int type variables.
    • hexadecimal int type variables (uppercase and lowercase).
    • pointer type variables.

    You will find more details in the subject of the project.

    Index

    Structure

    The main obstacles during the execution of the project have been: handling a variable number of parameters and the function ft_printf() returning an int.

    va_list

    To deal with the variable number of parameters entered, the macros va_list, va_start, va_arg and va_end have been used. The ft_printf() function calls the ft_fotmat() function when it finds the % sign among the entered parameters, then it checks the next character in the string to call one of the functions that print the different variable types. To use this macro, the libraryt <stdarg.h> is included in the ft_printf.h.

    Returning an integer

    To handle the integer returned by ft_printf(), a pointer is given in the format printing functions. In this way, the function handles the number of characters printed before continuing with the string sent by parameter. Example:

    void	ft_putchar_pf(char c, size_t *counter)
    {
    	write(1, &c, 1);
    	(*counter)++; // increasing the pointer with each character printed
    }
    

    Formats

    The different types of variables are printed using a function for each of the formats:

    • ft_putchar_pf() prints char type variables and is called by each of the following functions to print the character strings one by one. Also, it is where the pointer returned by the ft_printf() function is incremented.
    • ft_puthex_pf() prints hexadecimal integers, using a string included in the ft_printf.h library. There is one string for uppercase and one for lowercase characters.
    • ft_putnbr_pf() recursively prints an integer, handling the maximum negative value with a conditional (if-else) and casting the integer to characters.
    • ft_putptr_pf() prints a pointer, in hexadecimal format (lowercase), preceded by the string “0x”.
    • ft_putstr_pf() prints a char * type variable, calling ft_putchar_pf() in a while loop. It the string is NULL, it returns "(null)".
    • ft_putuint_pf() prints an unsigned int type variable.

    Auxiliary functions

    ft_aux_pf.c() this file contains all the auxiliary functions, specifically the ft_atoi_base function, made during the August pool. This function will be used mainly to change the base in functions that handle hexadecimal numbers and unsigned int type variables.

    Requirements

    The functions are written in C language and need the gcc compiler, with <stdlib.h>, <stdarg.h> and <unistd.h> standard libraries to run.

    Instructions

    1. Compiling the archives

    To compile the proiect, go to its path and run:

    For mandatory functions:

    $ make
    

    2. Cleaning all binary (.o) and executable files (.a)

    To delete all files generated with make, go to the path and run:

    $ make fclean
    

    3. Using it in your code

    To use this project in your code, simply include this header:

    #include "ft_printf.h"
    

    Testing

    This function have been tested with Francinette.

    Visit original content creator repository https://github.com/PublioElio/School-42-printf
  • Android-x32x64_LiveCD_11A_Edition


    Android x32x64 project

    LiveCD 11A Edition

    Status: Not ready

    • Get Android 11.0×64 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 11.0×64 Vanilla Edition
    • Get Android 11.0×64 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 11.0×64 Heavy Edition
    • Get Android 11.0×64 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 11.0×64 DeGoogled Edition
    • Get Android 10.0×64 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 10.0×64 Vanilla Edition
    • Get Android 10.0×64 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 10.0×64 Heavy Edition
    • Get Android 10.0×64 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 10.0×64 DeGoogled Edition
    • Get Android 9.0×64 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 9.0×64 Vanilla Edition
    • Get Android 9.0×64 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 9.0×64 Heavy Edition
    • Get Android 9.0×64 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 9.0×64 DeGoogled Edition
    • Get Android 8.1×64 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 8.1×64 Vanilla Edition
    • Get Android 8.1×64 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 8.1×64 Heavy Edition
    • Get Android 8.1×64 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 8.1×64 DeGoogled Edition
    • Get Android 8.0×64 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 8.0×64 Vanilla Edition
    • Get Android 8.0×64 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 8.0×64 Heavy Edition
    • Get Android 8.0×64 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 8.0×64 DeGoogled Edition
    • Get Android 7.1×64 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 7.1×64 Vanilla Edition
    • Get Android 7.1×64 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 7.1×64 Heavy Edition
    • Get Android 7.1×64 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 7.1×64 DeGoogled Edition
    • Get Android 7.0×64 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 7.0×64 Vanilla Edition
    • Get Android 7.0×64 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 7.0×64 Heavy Edition
    • Get Android 7.0×64 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 7.0×64 DeGoogled Edition
    • Get Android 6.1×64 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 6.1×64 Vanilla Edition
    • Get Android 6.1×64 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 6.1×64 Heavy Edition
    • Get Android 6.1×64 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 6.1×64 DeGoogled Edition
    • Get Android 6.0×64 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 6.0×64 Vanilla Edition
    • Get Android 6.0×64 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 6.0×64 Heavy Edition
    • Get Android 6.0×64 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 6.0×64 DeGoogled Edition
    • Get Android 5.1×64 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 5.1×64 Vanilla Edition
    • Get Android 5.1×64 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 5.1×64 Heavy Edition
    • Get Android 5.1×64 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 5.1×64 DeGoogled Edition
    • Get Android 5.0×64 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 5.0×64 Vanilla Edition
    • Get Android 5.0×64 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 5.0×64 Heavy Edition
    • Get Android 5.0×64 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 5.0×64 DeGoogled Edition
    • Get Android 4.4×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 4.4×32 Vanilla Edition
    • Get Android 4.4×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 4.4×32 Heavy Edition
    • Get Android 4.4×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 4.4×32 DeGoogled Edition
    • Get Android 4.3×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 4.3×32 Vanilla Edition
    • Get Android 4.3×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 4.3×32 Heavy Edition
    • Get Android 4.3×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 4.3×32 DeGoogled Edition
    • Get Android 4.2×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 4.2×32 Vanilla Edition
    • Get Android 4.2×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 4.2×32 Heavy Edition
    • Get Android 4.2×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 4.2×32 DeGoogled Edition
    • Get Android 4.1×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 4.1×32 Vanilla Edition
    • Get Android 4.1×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 4.1×32 Heavy Edition
    • Get Android 4.1×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 4.1×32 DeGoogled Edition
    • Get Android 4.0×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 4.0×32 Vanilla Edition
    • Get Android 4.0×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 4.0×32 Heavy Edition
    • Get Android 4.0×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 4.0×32 DeGoogled Edition
    • Get Android 3.2×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 3.2×32 Vanilla Edition
    • Get Android 3.2×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 3.2×32 Heavy Edition
    • Get Android 3.2×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 3.2×32 DeGoogled Edition
    • Get Android 3.1×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 3.1×32 Vanilla Edition
    • Get Android 3.1×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 3.1×32 Heavy Edition
    • Get Android 3.1×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 3.1×32 DeGoogled Edition
    • Get Android 3.0×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 3.0×32 Vanilla Edition
    • Get Android 3.0×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 3.0×32 Heavy Edition
    • Get Android 3.0×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 3.0×32 DeGoogled Edition
    • Get Android 2.3×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 2.3×32 Vanilla Edition
    • Get Android 2.3×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 2.3×32 Heavy Edition
    • Get Android 2.3×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 2.3×32 DeGoogled Edition
    • Get Android 2.2×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 2.2×32 Vanilla Edition
    • Get Android 2.2×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 2.2×32 Heavy Edition
    • Get Android 2.2×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 2.2×32 DeGoogled Edition
    • Get Android 2.1×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 2.1×32 Vanilla Edition
    • Get Android 2.1×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 2.1×32 Heavy Edition
    • Get Android 2.1×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 2.1×32 DeGoogled Edition
    • Get Android 2.0×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 2.0×32 Vanilla Edition
    • Get Android 2.0×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 2.0×32 Heavy Edition
    • Get Android 2.0×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 2.0×32 DeGoogled Edition
    • Get Android 1.6×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 1.6×32 Vanilla Edition
    • Get Android 1.6×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 1.6×32 Heavy Edition
    • Get Android 1.6×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 1.6×32 DeGoogled Edition
    • Get Android 1.5×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 1.5×32 Vanilla Edition
    • Get Android 1.5×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 1.5×32 Heavy Edition
    • Get Android 1.5×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 1.5×32 DeGoogled Edition
    • Get Android 1.1×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 1.1×32 Vanilla Edition
    • Get Android 1.1×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 1.1×32 Heavy Edition
    • Get Android 1.1×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 1.1×32 DeGoogled Edition
    • Get Android 1.0×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 1.0×32 Vanilla Edition
    • Get Android 1.0×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 1.0×32 Heavy Edition
    • Get Android 1.0×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 1.0×32 DeGoogled Edition
    • Get Android 0.9×32 Vanilla Edition functional and distributable
      • Build a LiveCD environment for Android 0.9×32 Vanilla Edition
    • Get Android 0.9×32 Heavy Edition functional and distributable
      • Build a LiveCD environment for Android 0.9×32 Heavy Edition
    • Get Android 0.9×32 DeGoogled Edition functional and distributable
      • Build a LiveCD environment for Android 0.9×32 DeGoogled Edition
    • Build a new bootloader
    • Make bootable
    • Create large ISO image
    • Test to make sure everything works in all LiveCD modes
      • Android 11.0×64 Vanilla Edition is functional up to its own standards
      • Android 11.0×64 Heavy Edition is functional up to its own standards
      • Android 11.0×64 DeGoogled Edition is functional up to its own standards
      • Android 10.0×64 Vanilla Edition is functional up to its own standards
      • Android 10.0×64 Heavy Edition is functional up to its own standards
      • Android 10.0×64 DeGoogled Edition is functional up to its own standards
      • Android 9.0×64 Vanilla Edition is functional up to its own standards
      • Android 9.0×64 Heavy Edition is functional up to its own standards
      • Android 9.0×64 DeGoogled Edition is functional up to its own standards
      • Android 8.1×64 Vanilla Edition is functional up to its own standards
      • Android 8.1×64 Heavy Edition is functional up to its own standards
      • Android 8.1×64 DeGoogled Edition is functional up to its own standards
      • Android 8.0×64 Vanilla Edition is functional up to its own standards
      • Android 8.0×64 Heavy Edition is functional up to its own standards
      • Android 8.0×64 DeGoogled Edition is functional up to its own standards
      • Android 7.1×64 Vanilla Edition is functional up to its own standards
      • Android 7.1×64 Heavy Edition is functional up to its own standards
      • Android 7.1×64 DeGoogled Edition is functional up to its own standards
      • Android 7.0×64 Vanilla Edition is functional up to its own standards
      • Android 7.0×64 Heavy Edition is functional up to its own standards
      • Android 7.0×64 DeGoogled Edition is functional up to its own standards
      • Android 6.1×64 Vanilla Edition is functional up to its own standards
      • Android 6.1×64 Heavy Edition is functional up to its own standards
      • Android 6.1×64 DeGoogled Edition is functional up to its own standards
      • Android 6.0×64 Vanilla Edition is functional up to its own standards
      • Android 6.0×64 Heavy Edition is functional up to its own standards
      • Android 6.0×64 DeGoogled Edition is functional up to its own standards
      • Android 5.1×64 Vanilla Edition is functional up to its own standards
      • Android 5.1×64 Heavy Edition is functional up to its own standards
      • Android 5.1×64 DeGoogled Edition is functional up to its own standards
      • Android 5.0×64 Vanilla Edition is functional up to its own standards
      • Android 5.0×64 Heavy Edition is functional up to its own standards
      • Android 5.0×64 DeGoogled Edition is functional up to its own standards
      • Android 4.4×32 Vanilla Edition is functional up to its own standards
      • Android 4.4×32 Heavy Edition is functional up to its own standards
      • Android 4.4×32 DeGoogled Edition is functional up to its own standards
      • Android 4.3×32 Vanilla Edition is functional up to its own standards
      • Android 4.3×32 Heavy Edition is functional up to its own standards
      • Android 4.3×32 DeGoogled Edition is functional up to its own standards
      • Android 4.2×32 Vanilla Edition is functional up to its own standards
      • Android 4.2×32 Heavy Edition is functional up to its own standards
      • Android 4.2×32 DeGoogled Edition is functional up to its own standards
      • Android 4.1×32 Vanilla Edition is functional up to its own standards
      • Android 4.1×32 Heavy Edition is functional up to its own standards
      • Android 4.1×32 DeGoogled Edition is functional up to its own standards
      • Android 4.0×32 Vanilla Edition is functional up to its own standards
      • Android 4.0×32 Heavy Edition is functional up to its own standards
      • Android 4.0×32 DeGoogled Edition is functional up to its own standards
      • Android 3.2×32 Vanilla Edition is functional up to its own standards
      • Android 3.2×32 Heavy Edition is functional up to its own standards
      • Android 3.2×32 DeGoogled Edition is functional up to its own standards
      • Android 3.1×32 Vanilla Edition is functional up to its own standards
      • Android 3.1×32 Heavy Edition is functional up to its own standards
      • Android 3.1×32 DeGoogled Edition is functional up to its own standards
      • Android 3.0×32 Vanilla Edition is functional up to its own standards
      • Android 3.0×32 Heavy Edition is functional up to its own standards
      • Android 3.0×32 DeGoogled Edition is functional up to its own standards
      • Android 2.3×32 Vanilla Edition is functional up to its own standards
      • Android 2.3×32 Heavy Edition is functional up to its own standards
      • Android 2.3×32 DeGoogled Edition is functional up to its own standards
      • Android 2.2×32 Vanilla Edition is functional up to its own standards
      • Android 2.2×32 Heavy Edition is functional up to its own standards
      • Android 2.2×32 DeGoogled Edition is functional up to its own standards
      • Android 2.1×32 Vanilla Edition is functional up to its own standards
      • Android 2.1×32 Heavy Edition is functional up to its own standards
      • Android 2.1×32 DeGoogled Edition is functional up to its own standards
      • Android 2.0×32 Vanilla Edition is functional up to its own standards
      • Android 2.0×32 Heavy Edition is functional up to its own standards
      • Android 2.0×32 DeGoogled Edition is functional up to its own standards
      • Android 1.6×32 Vanilla Edition is functional up to its own standards
      • Android 1.6×32 Heavy Edition is functional up to its own standards
      • Android 1.6×32 DeGoogled Edition is functional up to its own standards
      • Android 1.5×32 Vanilla Edition is functional up to its own standards
      • Android 1.5×32 Heavy Edition is functional up to its own standards
      • Android 1.5×32 DeGoogled Edition is functional up to its own standards
      • Android 1.1×32 Vanilla Edition is functional up to its own standards
      • Android 1.1×32 Heavy Edition is functional up to its own standards
      • Android 1.1×32 DeGoogled Edition is functional up to its own standards
      • Android 1.0×32 Vanilla Edition is functional up to its own standards
      • Android 1.0×32 Heavy Edition is functional up to its own standards
      • Android 1.0×32 DeGoogled Edition is functional up to its own standards
      • Android 0.9×32 Vanilla Edition is functional up to its own standards
      • Android 0.9×32 Heavy Edition is functional up to its own standards
      • Android 0.9×32 DeGoogled Edition is functional up to its own standards

    File version: 1 (2022, Thursday, December 22nd at 5:51 pm PST)


    Visit original content creator repository
    https://github.com/seanpm2001/Android-x32x64_LiveCD_11A_Edition

  • spring-ai-workshop

    cover picture

    Exploring interactions with LLMs : Practical insights with Spring AI

    LLM (Large Language Model) concept is widely used to build chatbots, question-answering systems, and other conversational applications.

    In this workshop, we will discover how to interact with a LLM as we craft a conversational agent step-by-step. Throughout this journey, we will understand the capabilities and limitations of LLMs, and explore prompt engineering techniques to elevate their standard behavior.

    For the practical part, we will learn about Spring AI’s chat completion features to interact with LLMs. Spring AI serves as an abstraction layer able to interact with several LLM providers. For the workshop’s purposes, we will use Ollama, a solution for running LLMs locally.

    ✨ Quick start

    If you don’t want to save your work, you can start the workshop directly in a cloud environment.

    Open in GitHub Codespaces

    Open in Gitpod

    🔧 Environment setup

    🔮 Install Mistral 7B model

    Execute this command only once to pull the model.

    docker exec -it ollama sh -c "ollama pull mistral:7b"

    🏗️ Build the project

    Execute this command after code update.

    mvn clean install

    🏃‍♀️ Run the application

    mvn spring-boot:run

    🚀 Hands-on

    1. Zero-shot prompting (15min)
    2. Conversational memory (15min)
    3. Information extraction (20min)
    4. Retrieval Augmented Generation (RAG) (30min)
    5. Conclusion

    🎁 Bonus / Best Practices

    1. Conversational memory with Advisor (10min)
    2. RAG with Advisor (QuestionAnswerAdvisor) (10min)
    3. RAG and safe gard implementation with Advisor (SafeGuardAdvisor) (10min)

    ⭐ Contributors

    This workshop is proposed by AXA France’s Development Guild.

    Maintainers:

    • Clément GIGUEL :octocat:
    • Lamine DIAKHABY :octocat:
    • Benoît CACCINOLO :octocat:
    • Oussama HMANI :octocat:
    • Samir KERROUMI :octocat:
    Visit original content creator repository https://github.com/AxaFrance/spring-ai-workshop