Author: q0v1jiho21d6

  • file_transfer

    File Transer

    A Simple Software Application for transferring files from phone to pc. This is done by starting a server on your android device using the application called [SimpleHttpServer](https://play.google.com/store/apps/details?id=jp.ubi.common.http.server). The IP/URL displayed after starting the server is required to be entered to be connected. Once connected android device files and folder can be explored and downloaded.

    The application allows multiple files located in different folder to be downloaded simultaneously. It also provides a minimal and interactive user interface.

    Warning The application is still in development stage some unwanted bugs might occur. Feel free to raise issues on this github page.

    Setup

    Requirements:

    • Premake5 – Configuration Generator
    • Visual Studio 2022 – Compiling
    • SimpleHttpServer

    CPRLIB

    Build as static library using cmake with release config cmake --build build --config Release cmake --install . --config Release copy the lib and include directory from the install location into packages/cpr

    GLFW

    Build as static library using cmake with release config and copy include and lib dir to packages/glfw

    ImGui LunaSVG spdlog

    Just clone the repository and the respective folder and that’s it.

    Note Place all the required imgui files from the repository along with the one used for interfacing with glfw backend and that’s all. All the files should be located in the packages/imgui

    Visit original content creator repository https://github.com/akash1474/file_transfer
  • Medical-Chatbot-Gen-AI

    Medical-Chatbot-Gen-AI 🏥🤖

    Welcome to Medical-Chatbot-Gen-AI, a sophisticated medical chatbot built using Python, Llama3, Langchain, Flask, and Retrieval-Augmented Generation (RAG) architecture. This project aims to provide an interactive platform where users can get medical-related advice and information through an AI-powered chatbot. The chatbot is integrated with the Llama3 model and utilizes RAG for enhanced responses based on a large corpus of medical knowledge.

    Features 🌟

    • AI-Powered Medical Chatbot

      • Provides medical advice and information based on user queries.
      • Utilizes advanced AI techniques to improve accuracy and relevance.
    • Llama3 Integration

      • Uses the Llama3 model for generating natural language responses with medical knowledge.
      • Llama3 powers the core of the chatbot’s ability to answer complex queries.
    • Langchain Support

      • Utilizes Langchain to manage conversational flows and integrate multiple tools for a seamless user experience.
    • Retrieval-Augmented Generation (RAG)

      • Enhances the chatbot’s capabilities by retrieving relevant information from a medical knowledge base and generating context-aware responses.
    • Flask Web Interface

      • A simple and intuitive Flask-based web interface to interact with the chatbot.
    • Medical Knowledge Base

      • Integration with publicly available medical datasets or custom medical knowledge bases for accurate and reliable information.

    Tech Stack 🛠️

    • Python: The core programming language for building the application.
    • Flask: Web framework to deploy the chatbot and provide the web interface.
    • Llama3: A powerful language model for generating AI-driven responses.
    • Langchain: Tool for managing conversational workflows and integrating external data sources.
    • RAG (Retrieval-Augmented Generation): A technique to retrieve relevant information from a knowledge base for more accurate responses.
    • Medical Knowledge Base: The backend database for storing medical information (can be customized).

    Prerequisites 📝

    Before you begin, ensure you have the following installed:

    1. Python 3.x
    2. pip for package management
    3. Flask
    4. Langchain
    5. Llama3 (or your preferred model)
    6. OpenAI or any other LLM API key (for integration)

    Installation 🚀

    Follow the steps below to set up the project on your local machine.

    1. Clone the Repository

    git clone https://github.com/zeeshanali90233/Medical-Chatbot-Gen-AI.git
    cd Medical-Chatbot-Gen-AI

    Visit original content creator repository
    https://github.com/zeeshanali90233/Medical-Chatbot-Gen-AI

  • 2023-CSEE-reproducible-workflows-workshop

    Reproducible workflows workshop

    Workshop at CSEE 2023: developing a reproducible workflow in R using functions, {targets} and {renv}

    Developed and delivered by:

    • Alec L. Robitaille (Memorial University of Newfoundland and Labrador)
    • Isabella C. Richmond (Concordia University)

    Schedule

    Projects

    • Directories
    • READMEs
    • RStudio Projects

    Short break

    Functions

    • Introduction
    • Recommended approach
    • Checks
    • Options

    Lunch break

    {targets}

    • Introduction
    • Writing workflows
    • Visualizing
    • Running workflows
    • Extensions

    Short break

    {renv} + {conflicted}

    • Saving package versions
    • Checking conflicts

    Learning goals

    Overall

    • Approach analyses in a more holistic way (whole project vs script by script)
    • Share data across projects and software versions with minimal stress 
    • Use workflows that reduce analysis errors and mental load

    Section 1: Projects

    • Construct a RStudio project that is thoroughly documented using file structure and data management best practices
    • Use RStudio projects to effectively share their own work, and use other people’s

    Section 2: Functions

    • Read and understand structure of functions in R
    • Refactor code into functions that do one thing
    • Add tests and checks to ensure functions work and error when expected
    • Recognize the value of functions as chunks of code that are reusable and easier to debug

    Section 3: {targets}

    • (For a given project) map out relationships between inputs, outputs and analysis steps
    • Identify discrete chunks/steps and write corresponding (or use available) functions 
    • Execute a workflow in {targets} that reads in data, performs a function, and saves an output
    • Recognize the value of workflows for reducing mental load and improving efficiency

    Section 4: {renv} + {conflicted}

    • Use {renv} to preserve current package versions to ensure the environment is reproducible, portable and isolated
    • Use {conflicted} to detect conflicting function names

    Setup

    This workshop is aimed at improving our ability to use and create reproducible workflows. All the materials should be accessible from the side bar (slides, exercises, resources for further reading, and the link to the GitHub repository can be accessed by clicking on the GitHub icon).

    We don’t have any strict dependencies on specific versions of R or R packages, but it would be good to have at least R version 4.0 and a recent version of RStudio. 

    We are using Quarto to build the workshop’s website and exercises, so it could be helpful for you to install it too. If you don’t have time to, you can always complete exercises in an R script – so no pressure. 

    Install first the Quarto CLI from the here then the package with the command at the bottom.

    Please install the following packages (after updating R):

    pkgs <- c(
      'targets',
      'igraph',
      'data.table',
      'dplyr',
      'ggplot2',
      'testthat',
      'janitor',
      'renv',
      'rlang',
      'conflicted',
      'palmerpenguins',
      'visNetwork',
      'quarto',
      'xml2',
      'downlit',
      'usethis'
    )
    
    install.packages(pkgs)

    To download the workshop materials for a participant, use this command:

    library(usethis)
    
    # (Set your own destination directory)
    use_course(
        'https://github.com/robitalec/2023-CSEE-reproducible-workflows-workshop/archive/refs/heads/participant.zip', 
        destdir = '~/Documents')

    Or by downloading and unziping the ZIP file at this link: https://github.com/robitalec/2023-CSEE-reproducible-workflows-workshop/archive/refs/heads/participant.zip.

    Then open up the RStudio project.

    Data

    Example data for this workshop is borrowed from the Palmer Long-Term Ecological Research (LTER). Here is the study description from the Palmer LTER site:

    The Palmer Long-Term Ecological Research (LTER) study area is located to the west of the Antarctic Peninsula extending South and North of the Palmer Basin from onshore to several hundred kilometers off shore. Palmer Station is one of the three United States research stations located in Antarctica. It is on Anvers Island midway down the Antarctic Peninsula at latitude 64.7 South, longitude 64.0 West.

    The Palmer LTER studies a polar marine biome with research focused on the Antarctic pelagic marine ecosystem, including sea ice habitats, regional oceanography and terrestrial nesting sites of seabird predators. The Palmer LTER is one of more than 26 LTER research sites located throughout the United States, Puerto Rico and Tahiti; each focused on a specific ecosystem, that together constitute the LTER Network.

    We gratefully acknowledge the Palmer LTER for releasing data freely and openly for diverse uses – in our case for training analytical skills of researchers in ecology.

    Penguins

    The first dataset is already available in R through the palmerpenguins R package. There is a raw version and a cleaned version. They contain data for 344 penguins, with the following variables (cleaned version):

    • species
    • island
    • bill_length_mm
    • bill_depth_mm
    • flipper_length_mm
    • body_mass_g
    • sex
    • year

    Weather timeseries

    The following datasets are available directly from the Palmer LTER Data Catalog. To download the data to the raw-data/ directory, run the function download_example_data() (R/download_example_data.R).

    This second dataset contains monthly averaged weather timeseries from Palmer Station, Antarctica, with the following variables:

    • Date
    • Year
    • Month
    • Average Temperature
    • Temperature Count
    • Average Pressure
    • Pressure Count
    • Average Melted Precipitation
    • Precipitation Count

    Data package summary

    Data package metadata

    Link to data (CSV):

    https://portal.edirepository.org/nis/dataviewer?packageid=knb-lter-pal.189.8&entityid=ab357b4c92531a07d98ff1c4f4809a1e

    Monthly sea ice area

    The third dataset contains monthly sea ice area from the region around the Palmer Station, Antarctica, with the following variables:

    • Year
    • Month
    • Area

    Note: this data is formatted with months as columns, years as rows, and cells filled with the corresponding area.

    Data package summary

    Data package metadata

    Link to data (TXT):

    https://portal.edirepository.org/nis/dataviewer?packageid=knb-lter-pal.34.7&entityid=0fccb4e99aaa0c0cc85c23284288ec81

    Adelie penguin adult and chick counts

    The fourth dataset contains Adelie penguin adult and chick counts

    • studyName
    • Date GMT
    • Time GMT
    • Island
    • Colony
    • Adults
    • Chicks

    Data package summary

    Data package metadata

    Link to data (CSV):

    https://portal.edirepository.org/nis/dataviewer?packageid=knb-lter-pal.88.8&entityid=b4062890db09a72628786650dacfbf1f

    LICENSE

    This project is released under the GNU General Public License v3.0. Read it here.

    Visit original content creator repository
    https://github.com/robitalec/2023-CSEE-reproducible-workflows-workshop

  • geo

    Geo Information Library For Go

    CircleCI codecov

    The library currently supports reads MaxMind GeoIP2 database and provide a thin decorator/helper function on the returned data for easy access and decoration on top of the geo info provided by MaxMind. It also provides a normalized way to represent the geo info in standard ISO format the scenario of unknown.

    The implementation of this library is based upon other 2 open source repositories:

    1. https://github.com/biter777/countries
    2. https://github.com/oschwald/geoip2-golang

    Goal

    The library is visioned to support more features related to processing of the geo info data in the future. That means, support reading from multiple geo database providers and expose more helpers on the data for commonly encountered user scenarios.

    Features

    1. Support easy lookup for geo information from MaxMind DB using IP string.
    2. Support both alpha2 country code and alpha3 country code.
    3. Support any io.Reader for user to provide the MaxMind .mmdb file.
    4. Support easy access of the database metadata info like build time and version.
    5. Provide default return value of ZZ and ZZZ as specified in ISO standard if the country could not be found by the input IP using helper functions.

    Installation

    go get github.com/blockthrough/geo@v1.0.0
    

    How To Use

    Read Maxmind DB and LookUp Geo With IP

    package main 
    
    import (
        "embed"
        "fmt"
        "github.com/blockthrough/geo"
    )
    
    // go:embed <your_maxmind_db_file_path>
    var embedFS embed.FS
    
    func main() {
    	file, err := embedFS.Open("<your_maxmind_db_file_path>")
    	if err != nil {
    		return
    	}
    
    	maxmind, err := geo.NewMaxMindFromReader(file)
    	if err != nil {
    		return
    	}
    
    	// check the meta information of the database
    	fmt.Sprintf("test db: %t", maxmind.IsTestDB())
    	fmt.Sprintf("db build time: %s", maxmind.BuildTimestamp())
    	fmt.Sprintf("db version: %s", maxmind.Version())
    
    	// you can pass ipv4 or ipv6  address
    	country, err := maxmind.CountryByIPString("127.0.0.1")
    	if err != nil {
    		return 
    	}
    
    	fmt.Sprintf("unknown country: %s", country.IsUnknown())               // is the country unknown?
    	fmt.Sprintf("country code: %s", country.CountryAlpha2Code())          // 2-letter country code
    	fmt.Sprintf("country 3-letter code: %s", country.CountryAlpha3Code()) // 3-letter country code
    	fmt.Sprintf("continent code: %s", country.ContinentCode())            // 2-letter continent code
    
    	// you can also use adapter function directly if you want to get alpha3 code
    	fmt.Sprintf("country 3-letter code", geo.CountryAlpha2CodeToAlpha3Code(country.CountryAlpha2Code()))
    }
    Visit original content creator repository https://github.com/blockthrough/geo
  • BigFraction

    BigFraction

    Java library that represents a fraction as a ratio of two BigIntegers, reduced to lowest terms. A rich set of mathematical functions are supported.

    Creating BigFractions

    Constructors are protected. Create new BigFractions using valueOf(Number numerator), valueOf(Number numerator, Number denominator), or valueOf(String):

    BigFraction.valueOf(11);      // 11/1
    BigFraction.valueOf(11, 17);  // 11/17
    BigFraction.valueOf("19/81"); // 19/81
    

    Fractions are always reduced to lowest terms:

    BigFraction.valueOf(17, 34);  // 1/2
    BigFraction.valueOf(0, 999);  // 0/1
    

    The sign is always carried by the numerator:

    BigFraction.valueOf(-9, 4);   // -9/4
    BigFraction.valueOf(9, -4);   // -9/4
    BigFraction.valueOf(-9, -4);  // 9/4  (negatives cancel out)
    

    You can use floating point numbers to create the fraction:

    BigFraction.valueOf(0.625);  // 5/8
    BigFraction.valueOf(-8.5, 6.25); //-34/25
    

    But be careful, what you get is exactly equal to the value you provide:

    BigFraction.valueOf(1.1);  // 2476979795053773/2251799813685248
    BigFraction.valueOf(1.1f); // 9227469/8388608
    

    The version that takes a String may be more like what you expect:

    BigFraction.valueOf("1.1");                // 11/10
    BigFraction.valueOf(Double.toString(1.1)); // 11/10
    BigFraction.valueOf(Float.toString(1.1f)); // 11/10
    

    You can also use BigInteger and BigDecimal:

    BigFraction.valueOf(new BigInteger("9999999999999999999"), BigInteger.valueOf(1));
    // ->  9999999999999999999/1   (note that this is larger than Long.MAX_VALUE)
    
    BigFraction.valueOf(new BigDecimal("1.23456789012345678901E-50"));
    // ->  123456789012345678901/10000000000000000000000000000000000000000000000000000000000000000000000
    

    You can even mix different Number types for numerator and denominator:

    BigFraction.valueOf(1.5, BigInteger.valueOf(17)); // 3/34
    

    A few exceptions:

    BigFraction.valueOf(1,0); // ArithmeticException - divide by zero
    BigFraction.valueOf(0,0); // ArithmeticException - divide by zero
    BigFraction.valueOf(Double.POSITIVE_INFINITY); //IllegalArgumentException
    BigFraction.valueOf(Double.NaN); //IllegalArgumentException
    

    Mathematical Operations

    BigFraction a = BigFraction.valueOf(1,2);
    BigFraction b = BigFraction.valueOf(3,4);
    BigFraction z = BigFraction.ZERO;
    
    a.add(a); // 1/2 + 1/2 = 1/1
    a.add(b); // 1/2 + 3/4 = 5/4
    b.add(z); // 3/4 + 0/1 = 3/4
    z.add(a); // 0/1 + 1/2 = 1/2
    
    a.subtract(a); // 1/2 - 1/2 = 0/1
    a.subtract(b); // 1/2 - 3/4 = -1/4
    b.subtract(z); // 3/4 - 0/1 = 3/4
    z.subtract(a); // 0/1 - 1/2 = -1/2
    
    a.multiply(a); // (1/2) * (1/2) = 1/4
    a.multiply(b); // (1/2) * (3/4) = 3/8
    b.multiply(z); // (3/4) * (0/1) = 0/1
    z.multiply(a); // (0/1) * (1/2) = 0/1
    
    a.divide(a); // (1/2) / (1/2) = 1/1
    a.divide(b); // (1/2) / (3/4) = 2/3
    b.divide(z); // => ArithmeticException - divide by zero
    z.divide(a); // (0/1) / (1/2) = 0/1
    
    a.pow(3);  // (1/2)^3 = 1/8
    b.pow(4);  // (3/4)^4 = 81/256
    a.pow(0);  // (1/2)^0 = 1/1
    z.pow(0);  // (0/1)^0 = 1/1  => Mathematicians may not like it, but this is consistent with Math.pow()
    
    a.pow(-3); // (1/2)^(-3) = 8/1
    b.pow(-4); // (3/4)^(-4) = 256/81
    z.pow(-1); // => ArithmeticException (divide by zero)
    
    a.reciprocal(); // (1/2)^(-1) = 2/1
    b.reciprocal(); // (3/4)^(-1) = 4/3
    z.reciprocal(); // => ArithmeticException (divide by zero)
    

    Complement is 1 - n. Useful in statistics a lot:

    a.complement(); // 1 - 1/2 = 1/2
    b.complement(); // 1 - 3/4 = 1/4
    z.complement(); // 1 - 0/1 = 1/1
    

    LongFraction

    There is also a LongFraction that represents a fraction as a ratio of two longs, with the same methods as BigFraction. The mathematics are much faster, but you run the risk of overflows.

    How to Get BigFraction

    The library is available via Maven Central and can be used in any project built using Maven or a compatible build tool (Ivy, Gradle, etc.).

    You can also download the jar file from the repository and manually add it to your project, if you are not utilizing a supported build tool.

    Support for Older Java Versions

    I am currently building my jar files using Java 8, with source compatibility only for Java 8+. These jar files will not run in older versions of Java. If you need support for Java 6 or Java 7, notice that there are -java6 or -java7 versions available from Maven. These are compiled with compatibility to that Java version.

    Visit original content creator repository
    https://github.com/kiprobinson/BigFraction

  • foliant_academia_rus

    Foliant для научных текстов

    Проект-шаблон для написания научных текстов в markdown и генерации файлов в формате docx.

    Установка

    Сборка производится с помощью Фолианта. Самый простой способ установить его и все зависимости — собрать докер-образ. Для этого нужно:

    1. Установить и запустить Докер.
    2. Собрать образ: docker compose build.

    Структура документа

    Основная конфигурации документа настраивается в файле foliant.yml.

    Выходной документ собирается из маркдаун-файлов, которые должны лежать в папке src.

    Структура документа задаётся в блоке chapters — маркдаун-файлы будут собираться в том порядке, в котором они указаны в этом разделе:

    chapters:
        - master_thesis/1_intro.md
        - master_thesis/2_main.md
        - master_thesis/3_extra.md
        - master_thesis/4_outro.md
        - master_thesis/5_references.md
    

    Подробнее про настройку параметров документа.

    Сборка документа

    Запустить в директории с проектом: make docx.

    Word-шаблоны

    Проект содержит два шаблона для сборки Word-документов:

    • templates/gost-2-105.docx — в целом соотвествует требованиям ГОСТ 2.105-95, подходит для большинства текстовых документов, включая дипломы, диссертации, отчеты НИОКР и документацию, написанную по ГОСТ-19 (ЕСПД).
    • templates/gost-2-104.docx — в целом соотвествует требованиям ГОСТ 2.104-2006, с «рамками». Подходит для конструкторских документов по ЕСКД и ГОСТ-34 (АСУ ТП). Шаблон основан на шаблонах Руслана Шавалиева.

    Работа с библиографией

    Фолиант поддерживает работы с библиографическими файлами формата BibTeX. Путь к файлу со списком ссылок указывается в файле foliant.yml: bibliography: templates/refs.bib .

    В самом тексте ссылка указывается так:

    Библиографические ссылки по ГОСТ. [@gost7-2008]
    

    Список используемых материалов автоматически добавится в конец файла.

    Форматирование этого списка можно настроить подключением файла с конфигурацией стилей в foliant.yml: csl: templates/gost-numeric.csl. Больше стилей можно найти здесь.

    Ссылки на изображения, таблицы, формулы

    В образе подключено дополнение pandoc-xnos с помощью которого можно автоматически нумеровать и ссылаться на изображения, таблицы, формулы.

    Подробнее, как им пользоваться, написано здесь.

    С нумерацией формул в Word-документе может быть проблема, см. эту задачу.

    Параметры отображения этих ссылок (и заодно заголовка содержания документа) настраиваются в файле templates/metadata.yaml.

    Ещё подключённые фичи

    В образ подключены несколько препроцессоров, чтобы:

    • ссылаться на произвольные места в документе (anchors)
    • подгружать CSV-диаграммы (csvtables)
    • показывать или скрывать какие-то разделы документы (flags)
    • использовать диаграммы Grahviz (graphviz)
    • использовать диаграммы PlantUML (plantuml)
    • использовать диаграммы Mermaid (mermaid)
    • переиспользовать разделы документа или подгружать внешние файлы (includes)
    • задавать переменные и использовать их в тексте (macros)

    Visit original content creator repository
    https://github.com/kvaleev/foliant_academia_rus

  • Melodify

    Melodify

    Yet another spotify client that focuses on presentation and user statistics, exposing a number of API calls.
    This program uses SpotifyAPI-NET in a WPF .NET Core application.

    Features

    Miniplayer with playing track info Progress bar and controls Full screen view with album art
    Playlist control and playback Top songs playback and preview Favorite song from miniplayer
    Music Videos in full screen Full user statistics and info 🚧 .NET 5.0 🚧

    Overview

    The default view of the application! Click the gifs for a sound preview.

    Hovering over it reveals four buttons that perform the following:

    Location Symbol Purpose
    Expands the program to be fullscreen with blur
    Menu with various views based on your taste
    Opens the playlist view, public and private
    Likes a song, adding it to your favorite tracks

    Mouse clicks and Keyboard controls are also supported.

    Color Keystroke Purpose
    Green spacebar Plays/Pauses current song
    Blue left/right Returns to previous song or skips current song
    Black Allows dragging of window to desired location
    f Resizes to fullscreen

    User Info View (click for sound)

    Top Songs View (click for sound)

    Top Artists View (click for sound)

    Fullscreen View

    Installation

    Windows Users

    Go to the Releases page and download the latest release

    Currently only supports Windows 10, planning on further expansion if this picks up.

    Development setup

    Developed on Visual Studio 2019 – a WPF application using .NET

    You’ll need to get your own Spotify API and YouTube API access. Set up a Resources.resx file under the Solution Properties. You’ll then need three variables, with their respective keys:

    • SpotID
    • SpotSecret
    • YoutubeAPI

    Known Issues

    • Running as an admin breaks the music video feature

    Various Views

    Just to give an idea on what it generally looks like, the miniature view blurs and darkens the album art and uses it as the background as such:

    Visit original content creator repository https://github.com/novatorem/Melodify
  • gocalc

    interactive calculator

    features

    • float numbers, basic operators(+, -, *, /, (, ))
    • enhanced error handling with indication of problem position in input
    • tokenizer is enough smart to proccess arbitrary formatted expressions
    • parser upgraded to work with unary operators
    • variables
    • simple functions (one line formulas, without subcalls)
    • meta commands(show something and etc…)
    • script mode, options
    • uses readline library(interactive editing)
    • autocomplete(functions and variables)
    • can create config file with predefined functions and variables
    • optimize(minimize) function expressions
    • api to interact with interpreter objects from go code

    testing

    go test .

    building

    go build -o calc ./cmd
    ./calc – to run

    quick run

    go run ./cmd

    syntax

    • identifier: starts with letter, can consist of letters and digits(case-sensetive)

    • number: floating point number (dot as fraction separator)

    • variable:

      • variable_name: identifier
      • assignment: varable_name = expression variable variable_name with value of expression
        • example: var = 2 * 2 variable var with value 4
      • usage: variable_name => gives value of variable variable_name
        • example: var => 4
    • function:

      • function_name: @identifier
      • declaration: function_name = (variable_name [,variable_name]): expression function with name function_name with zero or more parameters(separated with comma), that used for calculate expression
        • example: @foo = (a, b): 2 * a - b
      • usage: function_name(expression [,expression]) call function function_name
        • example: @foo(4 - 1, 2) => 4
    • expression: consists of numbers, operators, function calls, variables

      • example -(a - @bar(1, (2.34 + c) * b)) * 5.1 - d / (100 - 1)
    • operators:

      • unary: +-
      • binary: +-/*
      • parentheses: ()
    • meta command: ;identifier

      • ;mem (show existing variables and functions)
    • instruction:

      • variable assignment (create variable)
      • function declaration (create function)
      • expression (calculate and print value)
      • meta command
    • interpreter: processes instructions

    Visit original content creator repository
    https://github.com/TuM0xA-S/gocalc

  • ku

    ku

    A fast and lightweight C++ project to generate, solve, and export Sudoku puzzles with varying constraints.

    BuildAndTest Status

    Description

    The library handles any supported constraint through the following steps:

    1. Constraints are reduced from a Sudoku problem to an Exact Covering with Colors problem (XCC).
    2. The resulting problem is fed into an XCC solver heavily inspired by Donald Knuth’s SSXCC program.
    3. The solutions to the XCC problem found, if any, are then reduced back to a Sudoku solution.

    The XCC problem may be built with both primary and secondary items, depending on the constraints provided by the Sudoku problem, for which the following applies:

    • Primary items must be covered exactly once.
    • Secondary items must be covered at most once.
      • Secondary items can have a color assigned to them. These colored items are allowed to be covered by one or more options, as long as the colors are compatible.

    Generated Sudokus can be exported to svg, where each constraint provides its own way of being drawn on the board. The matrix-likedata structure used by Algorithm C can also be exported to an svg file for visual debugging.

    The project consists of:

    • The libku library, used by the following executables
    • A ku_sandbox executable, useful for experimenting
    • A ku_unit_test executable
    • A ku_performance_test executable (generated only for Release builds)

    Available Constraints

    These are the classic sudoku constraints that are supported:

    • Sudoku Cell
    • Sudoku Row
    • Sudoku Column
    • Sudoku Box

    The following are the non-classic constraints supported:

    • Anti-King
    • Anti-King (Torus)
    • Anti-Knight
    • Anti-Knight (Torus)
    • Asterisk
    • Disjoint Boxes
    • Hyper Sudoku
    • Negative Diagonal
    • Negative Diagonal Even
    • Negative Diagonal Odd
    • Positive Diagonal
    • Positive Diagonal Even
    • Positive Diagonal Odd

    Getting Started

    • The build system used by the project is Meson, download and install it on your system.
    • Make sure you have a C++23-capable compiler.

    The /bin directory is gitignored, the easiest way to generate a Debug build is to run the following in the root of the repository:

    meson setup bin/Debug
    meson compile -C bin/Debug
    

    Or, for a Release build:

    meson setup --buildtype=release bin/Release
    meson compile -C bin/Release
    

    Dependencies

    Visit original content creator repository https://github.com/SilvoSposetti/ku
  • qrr

    QMK for gnu/linux

    Reason

    https://github.com/qmk/qmk_firmware

    https://github.com/rvaiya/keyd

    https://github.com/kmonad/kmonad

    https://github.com/manna-harbour/xmk

    keyd and kmonad are both nice, but typing feels different (not necessarily
    bad, just different) from qmk (ok, typing on laptop feels bad anyway…)

    xmk has x86 but only for zmk. I like qmk better and probably hacking this
    together took the same amount of time I would have needed to fight with Weston
    and Zephyr and their weird config and unintelligible errors (I did that some
    time ago and it was no fun)

    How does it work

    Input/output same as keyd (grab device / output on uinput), processing qmk.

    You’ll have to run as root (or change permissions for uinput and add your
    user to input group – bad security!)

    Config

    Do a make first to rule out other problems. If the build is ok, look in

    Makefile

    First couple of lines, should be obvious. This is instead of qmk’s config.h
    and rules.mk. Of course, there’s only a fraction of qmk’s settings to worry
    about.

    keyboards/<some_kb>/kb.c

    This is qmk’s <kb_name>.c.

    keyboards/<some_kb>/keymap.c

    qmk‘s layers

    keyboards/<some_kb>/layout.cpp

    kbName and kbBlacklist are for picking the input (you can check your
    keyboard’s name with xinput for instance).

    layout – rows on your physical keyboard. For key names look in
    platforms/x86/cpp/keynames.cpp.

    It doesn’t matter how you distribute your keys on rows/columns, it just has to
    be the same in layout/keymap (it doesn’t have to look like a picture of your
    keyboard)

    Hacking

    Besides qmk, almost all relevant code is in platforms/x86. I did very few
    changes to qmk (but removed a lot from it, mostly to be able to search for
    things more easily).

    Makefile… well, can’t build qmk with g++ and I was too lazy to write C.

    For other qmk features (like leader key, tap-dance, …) you’ll have to enable
    them in Makefile, find the needed files, add them to the Makefile and fix build
    errors.

    I think at least a mutex is needed for catrix (var name to avoid “matrix”).
    But it hasn’t crashed on me yet.

    Plenty of room for improvement, like sleeping longer than 20ms in main loop and
    waking it with an interrupt. Integrating with upstream qmk as another platform
    (even though I don’t think future improvements in qmk will benefit a standard or
    laptop keyboard).

    Copyright

    Whatever qmk and keyd have (this is mostly copy/paste from those 2
    projects).

    Visit original content creator repository
    https://github.com/rrveex/qrr