Category: Blog

  • TirsvadCLI.Linux.LinuxIsoWithPreseed

    Visit original content creator repository
    https://github.com/Tirsvad/TirsvadCLI.Linux.LinuxIsoWithPreseed

  • go-anthropic

    Anthropic Go

    Go Report Card Go Reference

    This Go package provides a straightforward and idiomatic way to interact with the Anthropic API. It supports creating and sending message requests to generate responses using the Claude-3 model. This document will guide you through the installation process and basic usage of the package.

    Installation

    To use this package, first ensure you have Go installed on your machine. You can download and install Go from golang.org.

    Once Go is installed, you can add this package to your project by running:

    go get -u github.com/sky-dtu/go-anthropic

    Configuration

    To use the package, you need to provide your Anthropic API key. You can obtain an API key by signing up on the Anthropic website. Once you have an API key, you can set it in your environment variables:

    Usage

    Creating a Client

    First, import the package and create a new client instance. If you don’t specify a model, the default claude-3-opus-20240229 model will be used.

    package main
    
    import (
        "github.com/sky-dtu/go-anthropic"
        "log"
    )
    
    func main() {
        // create a new client with your API key 
        // and model [default: claude-3-opus-20240229]
        client, err := anthropic.NewClient("your_api_key_here", "")
        if err != nil {
            log.Fatalf("Failed to create client: %v", err)
        }
    }

    Create Completion Request

    To send a completion request and receive a response, use the CreateCompletionRequest function. Ensure you pass a context to manage request cancellation and timeouts.

    import (
        "context"
        "github.com/sky-dtu/anthropic"
    )
    
    func main() {
        // Assume client has been initialized as shown above
    
        // Create a completion request
        request := anthropic.ChatCompletionRequest{
            Messages:  []anthropic.ChatCompletionMessage{
                {
                    Role: anthropic.UserRole,
                    Content: "Hello, how are you?",
                },
            },
            Model:     client.Model,
            MaxTokens: 150,
        }
    
        // Send the completion request
        response, err := client.CreateChatCompletion(context.Background(), request)
        if err != nil {
            log.Fatalf("Failed to send completion request: %v", err)
        }
    
        log.Printf("Response: %+v", response)
    }

    Handling Errors

    The package utilizes the errors package to provide detailed error messages. Always check for errors after making API calls.

    Full Example

    Here is a full example that demonstrates how to create a client, send a completion request, and handle the response:

    package main
    
    import (
        "context"
        "github.com/sky-dtu/go-anthropic"
        "log"
    )
    
    func main() {
        // Create a new client
        client, err := anthropic.NewClient("your_api_key_here", "")
        if err != nil {
            log.Fatalf("Failed to create client: %v", err)
        }
    
        // Create completion request
        request := anthropic.CreateCompletionRequest{
            Messages:  []anthropic.ChatCompletionMessage{
                {
                    Role:    anthropic.UserRole,
                    Content: "Hello, how are you?",
                },
            },
            Model:     client.Model,
            MaxTokens: 150,
        }
    
        // Create the completion request
        response, err := client.CreateCompletionRequest(context.Background(), request)
        if err != nil {
            log.Fatalf("Failed to send completion request: %v", err)
        }
    
        log.Printf("Response: %+v", response)
    }

    Contributing

    Contributions are welcome! Please feel free to submit pull requests, report issues, or suggest improvements via the GitHub repository.

    License

    This package is released under the MIT License. See the LICENSE file for more information.

    Visit original content creator repository https://github.com/sky-dtu/go-anthropic
  • OS_Translator

    OS_Translator

    OS Translator is a desktop application that can translate text very accurately and very fast, with an awesome Auto Fast Translate shortcut.

    Features

    • Supports over one hundred different languages 🤯🤯
    • Very similar to Google Translate 🌟
    • Supports Auto Fast Translate using the Ctrl + C shortcut 😉
    • Comes with six different themes to choose from – Dark-blue, Dark-Dark-blue, Dark-green, Light-blue, Light-Dark-blue, and Light-green ❤❤
    • Supports Star Translate ⭐ – you can bookmark any translation you want.
    • Features a progress bar that keeps moving while there is internet, and stops when you’re offline to notify you.

    There are many more features to discover!

    Application Inside

    Change the Theme to Light Green

    Six Different Themes to Choose From

    Auto Fast Translate

    Just press Ctrl+C and let our program do the rest.

    Star & Bookmark

    Press the star button to bookmark any translation.

    Instructions

    1. Don’t separate the data folder from Translator.exe – they must be in the same folder.
    2. To make Auto Fast Translate work, just enable your Clipboard by pressing Win + V, then press the Enable button.
    3. If Auto Translate doesn’t appear, just restart the app.

    Download Links

    Visit original content creator repository https://github.com/OsamaM0/OS_Translator
  • Cadastro_Cliente

    Boas vindas ao repositório Cadastro de Cliente!

    Projeto de atividade final do nível básico do curso ABAP 4 Girls

    image

    Habilidades desenvolvidas:

    1. Criação e Manipulação de Dados:
      • Criação de objetos de dicionário de dados e tabela
      • Uso de tabelas internas e estruturas de dados para armazenamento temporário
    2. Desenvolvimento de Interface de Usuário:
      • Utilização de parâmetros e select-options em telas de seleção
      • Implementação de radiobuttons para alternar entre diferentes operações
      • Controle de visibilidade e editabilidade de campos na interface com base na operação selecionada
    3. Operações CRUD:
      • Desenvolvimento das operações de criação, leitura, atualização e exclusão de registros
    4. Validação e Mensagens:
      • Validação de dados de entrada
      • Exibição de mensagens de erro e sucesso para o usuário
    5. Interação com Banco de Dados:
      • Inserção, consulta, atualização e exclusão de registros na base de dados

    Objetivo do projeto

    O projeto visa criar um sistema de gerenciamento de clientes, abrangendo operações CRUD (Create, Read, Update, Delete). Ele permite o cadastro de novos clientes com informações como nome, CPF, RG, data de nascimento e endereço. Além disso, oferece funcionalidades para exibir, editar e excluir dados de clientes. O sistema utiliza uma interface de usuário com rádio botões para alternar entre as operações e interage com uma tabela de clientes.

    Especificações do projeto

    1. Radiobuttons:
      • Cadastrar Cliente DEFAULT ‘X’
      • Exibir Dados do Cliente
      • Editar Dados do Cliente
      • Deletar Cadastro

    image

    1. Tela: Cadastrar Cliente
      • Confirmar mensagem de sucesso quando cadastro for inserido.
      • Campos nome, cpf e rg precisam ser obrigatoriamente informados.

    image

    1. Tela: Exibir Dados do Cliente
      • Informar na tela todos os registros encontrados, com a descrição dos campos.

    image

    1. Tela: Editar Dados do Cliente
      • Verificar se cpf e rg estão preenchidos.
      • Selecionar o registro na tabela de acordo com cpf e rg informado. Caso encontrado realizar modificação da linha na nova tabela.

    image

    1. Tela: Deletar Cadastro
      • Realizar a exclusão do registro com base nos valores de cpf e rg fornecidos na entrada.

    image

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

    Boas vindas ao repositório Cadastro de Cliente!

    Projeto de atividade final do nível básico do curso ABAP 4 Girls

    image

    Habilidades desenvolvidas:

    1. Criação e Manipulação de Dados:
      • Criação de objetos de dicionário de dados e tabela
      • Uso de tabelas internas e estruturas de dados para armazenamento temporário
    2. Desenvolvimento de Interface de Usuário:
      • Utilização de parâmetros e select-options em telas de seleção
      • Implementação de radiobuttons para alternar entre diferentes operações
      • Controle de visibilidade e editabilidade de campos na interface com base na operação selecionada
    3. Operações CRUD:
      • Desenvolvimento das operações de criação, leitura, atualização e exclusão de registros
    4. Validação e Mensagens:
      • Validação de dados de entrada
      • Exibição de mensagens de erro e sucesso para o usuário
    5. Interação com Banco de Dados:
      • Inserção, consulta, atualização e exclusão de registros na base de dados

    Objetivo do projeto

    O projeto visa criar um sistema de gerenciamento de clientes, abrangendo operações CRUD (Create, Read, Update, Delete). Ele permite o cadastro de novos clientes com informações como nome, CPF, RG, data de nascimento e endereço. Além disso, oferece funcionalidades para exibir, editar e excluir dados de clientes. O sistema utiliza uma interface de usuário com rádio botões para alternar entre as operações e interage com uma tabela de clientes.

    Especificações do projeto

    1. Radiobuttons:
      • Cadastrar Cliente DEFAULT ‘X’
      • Exibir Dados do Cliente
      • Editar Dados do Cliente
      • Deletar Cadastro

    image

    1. Tela: Cadastrar Cliente
      • Confirmar mensagem de sucesso quando cadastro for inserido.
      • Campos nome, cpf e rg precisam ser obrigatoriamente informados.

    image

    1. Tela: Exibir Dados do Cliente
      • Informar na tela todos os registros encontrados, com a descrição dos campos.

    image

    1. Tela: Editar Dados do Cliente
      • Verificar se cpf e rg estão preenchidos.
      • Selecionar o registro na tabela de acordo com cpf e rg informado. Caso encontrado realizar modificação da linha na nova tabela.

    image

    1. Tela: Deletar Cadastro
      • Realizar a exclusão do registro com base nos valores de cpf e rg fornecidos na entrada.

    image

    Visit original content creator repository https://github.com/Lenakirara/Cadastro_Cliente
  • dungeon-cms

    Dungeon CMS

    Release

    Dungeon is a CMS that offers you advanced features for the management of your game team, sports association or sports! Easy to handle, complete and powerful, you can create your website with modern and customizable interfaces, all for free, without special knowledge.

    Learn more about Dungeon CMS

    Presentation

    Dungeon CMS is a project conceived in 2017, which saw this first version Alpha 0.1.7 launched in June 2019. To learn more and stay informed of the progress of the project, visit us on the official website Dungeon CMS.

    • Its speed of execution allows the loading of the pages in a flash! Dungeon is a small but powerful CMS.
    • Many additional content will be available on the official website Dungeon CMS, graphic themes, modules and widgets can be installed automatically via the management interface of your site.
    • The innovative architecture of Dungeon CMS will allow you to update automatically and simply your site. Advanced management of user permissions via groups.
    • A technical documentation and many video tutorials will be made available so that experienced developers as well as novice users can easily take control of Dungeon CMS.
    • Get an intuitive tool to change the content and layout of live pages on your site. Move a topic with a simple click and enjoy the result live!
    • Interfaces adapted to any type of support in order to offer you optimal access to your content. View your website activity from your tablet or smartphone!

    Prerequisites

    Dungeon CMS requires Apache / PHP / MySQL web hosting to work.

    • PHP 5.4 or higher (with curl, gd, json, mbstring, mysql or mysqli and zip extensions)
    • Apache module rewrite_module enabled

    Installation

    • Copy all files and directories on website by FTP
    • Create a MySQL database and import DATABASE.sql
    • Edit database config file in ./config/db.php
    • Connect on your website and login with username: admin and password: admin123
    • Let’s enjoy Dungeon CMS Alpha 0.1.7.7!

    Contribute

    If you are interested in this project and would like to help us, visit us at Dungeon CMS to learn more about how the CMS works.

    Copyright © 2019 Evil

    Visit original content creator repository https://github.com/stfkolev/dungeon-cms
  • Simple-Youtube-DL-GUI

    simpleytdlgui.v1.2

    Simple-Youtube-DL-Gui

    Supported Operating Systems

    Windows 7 (x64), Windows 8 (x64), and Windows 10 (x64)

    How to use

    Main Gui

    1. Extract program from archive to a folder of your choice or Run program from the archive
    2. Paste any video link into the “Paste Link” box
    3. Select “Add Link”
    4. Choose from the list of available options
    5. Choose where you’d like to save the final file
    6. Press “Start Job”

    Guide to building the program yourself: (Windows)

    1. Install python x64 3.8.8 (https://www.python.org/ftp/python/3.8.8/python-3.8.8-amd64.exe) (This version supports Win7 – 11 x64)
    2. Download https://github.com/jlw4049/Simple-Youtube-DL-GUI/archive/refs/heads/main.zip and extract
    3. Open command prompt and navigate to where ever you extracted step 2
    4. In command prompt type ‘pip install -r requirements.txt’
    5. After words you can use pyinstaller to make a binary.exe if you’d like with the following command
    • ‘pyinstaller -w –onefile –icon”Runtime\Images\youtubeDLicon.ico” “SimpleYoutubeDLGui.py”‘
    1. Then you can place .exe along side of the runtime/apps folder and you’re good to go
    Visit original content creator repository https://github.com/jessielw/Simple-Youtube-DL-GUI
  • organic-contacts

    organic-contacts

    License
    ko-fi

    A local address book for Emacs

    Background

    Now that we don’t maintain physical diaries with phone numbers against names or transfer contacts between cellphones through SIM cards, for most of us, the greater part of our address book resides with cloud service providers like Google, Apple, Microsoft, etc. while the rest of it is on other social platforms like Facebook, Twitter, Reddit, etc. Though these cloud address books help us carry our contacts across platforms and computers, without a lot of extra effort, it ends up making it decentralized.

    Problems with using web platforms

    • With all our contact information scattered across these platforms and services, looking up a means to communicate with a person may need referring to multiple sources.
    • Each of these platforms may be limited for fields that may be supported for a contact, such that one may not be able to store an ID or alias for a particular platform on another.
    • Referring to one’s address book has a dependency on the internet, without which a large portion of their contacts may not be accessible.

    My wish for better contact management

    My “ideal” address book…

    • should be a single point of reference containing everything including short-term and long-term contacts all in a single data file
    • is available offline, knocking out dependency on any network
    • is available across my devices (I can use a local sync like Syncthing for this)
    • supports unlimited custom fields so that I can store as much information about a contact as I need
    • is stored as plain text for easy editing through any text-editing tool
    • enables searching by any field rather than just by the key fields
    • is accessible through a familiar interface for easy reference (and possibly edits)

    Hence, I created organic-contacts.

    Flexible contact structure

    (("John" "Shepard") ; The first line contains the display fields, which could be First Name, Last Name, etc.
     ("me1" "me2" "me3") ; The second line is dedicated for a list of tags
     (title . "N7 Alliance Marine / Spectre") ; The rest of the lines could be any other name values pairs
     (race . "Human")
     (gender . "Male"))
    

    Installation

    Manual

    Save the file ‘organic-contacts.el’ to disk and add the directory containing it to ‘load-path’ using a command in your ‘.emacs’ file like:

    (add-to-list 'load-path "~/.emacs.d/")
    

    The above line assumes that you’ve placed the file into the Emacs directory ‘.emacs.d’.

    Start the package with:

    (require 'organic-contacts)
    

    Usage

    Loading contacts

    Specify a file to load contacts from

    (organic-contacts/load/db "~/organic-contacts-db.el")
    

    Alternatively, load the supplied sample DB to try the currently available features

    (organic-contacts/load/sample-db)
    

    Searching/Viewing contacts

    1. organic-contacts/view/browse lets you browse through your contacts in form of a list of names. Selecting a name opens up the corresponding contact card in a new buffer.
    2. organic-contacts/view/search lets you search for a contact (or contacts) that contain a specified keyword within any of their fields. One of the contacts can then be viewed upon selection.
    3. organic-contacts/view/find-by-tag lets you find contacts that are tagged by a particular tag. The prompt starts with a list of tags, choosing one turns it into a list of contacts associated with that tag, followed by a contact card upon selection.

    More to come…

    To-Do

    • Import from popular file formats
    • Add new contacts
    • Edit existing contacts
    • Find potential duplicates
    Visit original content creator repository https://github.com/myTerminal/organic-contacts
  • iot-mqtt

    Release 2.0

    • ### 分布式集群架构,基于Raft协议

    • ### 完整支持 MQTT V3.1.1 协议规范

    • ### 完整的实现了QOS0, QOS1, QOS2消息

    • ### 完全开放源码,基于 Apache Version 2.0 开源协议

    架构图

    https://www.yuque.com/cloudshi/ms000x/apuehg

    启动三个节点

    	public static String[] serverPath = new String[] {
    			"src/main/resources/cluster/server1.yaml",
    			"src/main/resources/cluster/server2.yaml",
    			"src/main/resources/cluster/server3.yaml" };
    	public static void main(String[] args) throws Exception {
    		for (int i = 0; i < serverPath.length; i++) {
    			final int num = i;
    			new Thread(new Runnable(){  
    	            public void run(){  
    	            	try {
    						BrokerStartup.start(serverPath[num]);
    					} catch (JoranException e) {
    						e.printStackTrace();
    					}
    	            }}).start();  
    		}
    	}

    server配置文件说明

    serverName: server1 #服务名称,必须配置且不同
    username: admin #mqtt broker用户名
    password: 123456 #mqtt broker密码
    tcpPort: 18081 #mqtt broker端口号
    logBackXmlPath: src/main/resources/logback-test.xml #log配置文件路径
    performanceConfig: #优化配置
      selectorThreadNum: 3
      ioThreadNum: 8
      tcpBackLog: 1024
      tcpNoDelay: false
      tcpReuseAddr: true
      tcpKeepAlive: false
      tcpSndBuf: 65536
      tcpRcvBuf: 65536
      useEpoll: false
      pooledByteBufAllocatorEnable: false
      popSize: 100 #单节点从分布式存储查询消息数量
      popInterval: 1000 # 单节点发送消息到客户端时间间隔
      clientSize: 10000 # 最大单节点连接客户端数量
      queueSize: 50000 # 线程池队列数量
    # 0 rocksdb 1 RheaKV
    storeType: 1
    rocksDbPath: store/rocksdb1/ #必须配置且每个server不同
    datacenterId: 1 #用于生成分布式唯一id的雪花算法配置
    machineId: 1 #用于生成分布式唯一id的雪花算法配置
    #分布式相关配置
    clusterName: rhea_mqtt #必须配置且每个server相同
    placementDriverOptions:
      fake: true
      # 路由表
      regionRouteTableOptionsList:
         #raft协议节点存储路由配置
        - { regionId: -1, nodeOptions: { timerPoolSize: 1, rpcProcessorThreadPoolSize: 4 } }    
    storeEngineOptions:
      rocksDBOptions:
        dbPath: store/rhea_db/ #必须配置且每个server可以相同
      raftDataPath: store/rhea_raft/ #必须配置且每个server可以相同
      serverAddress:
        ip: 127.0.0.1
        port: 18181 #raft协议节点端口
      regionEngineOptionsList:
         #raft协议节点存储分区配置
        - { regionId: -1, nodeOptions: { timerPoolSize: 1, rpcProcessorThreadPoolSize: 4 } }
      leastKeysOnSplit: 10
    initialServerList: 127.0.0.1:18181,127.0.0.1:18182,127.0.0.1:18183 #raft协议节点列表

    欢迎大家一起 交流qq群
    https://cdn.nlark.com/yuque/0/2020/png/1624173/1593050500510-b2821135-c8e0-4969-8417-97ab50bcc65f.png

    Visit original content creator repository
    https://github.com/ShiCloud/iot-mqtt

  • vamosacodearplanetas

    Proyecto: “vamosacodearplanetas” 🌏

    👋🏻 Bienvenidx al Proyecto de FrontEnd-Mentor desarrollada por la comunidad de Discord de 👩🏻‍💻 vamoacodear 👩🏻‍💻!

    Descripción

    En este reto, construiremos un sitio de datos de 8 páginas para todos los planetas de nuestro sistema solar. 🎨 Lucirá muy bien en tu portfolio.

    Lo que intetamos hacer con este proyecto es simular un espacio de trabajo. Donde si bien no aplicamos al 100% metodologia Agile, ni marco Scrum, intentamos hacer lo posible considerando que es un grupo de trabajo interdiciplinario con diferentes usos horarios.

    Para ello mediante Trello creamos y asignamos tareas, donde van cambiando de columna según su estado. Una vez realizada, el/la colaborador/a realiza un PR, se hace un Code Review y una vez que al menos 2 aprobadores den el ok, recién ahí se mergea a Main. De esta manera aprenderas cosas del día a día de un ambiente laboral!:

    • Metodología Agile
    • Marco Scrum
    • PR
    • Code Review
    • Utilización de diferentes tecnologías que decidimos utilizar en el proyecto, como: Git, Github, React, TypeScript, Tailwind, entre otras!

    Comenzando, clonación de repositorio

    git clone https://github.com/nsdonato/vamosacodearplanetas.git
    

    Permisos para contribuir

    Debes estar en Discord y en el canal #vamosacodearplanetas pedir que agreguemos tu usuario de GitHub al repositorio que quieras aportar, front o back.

    Dependencias, extensiones

    Pre-Instalación

    Utilizar el comando nvm use, esto verifica si hay un archivo .nvmrc en el proyecto y si no estas usando esa versión la setea. Si no la tenes instalada al final del comentario del package, te deja el comando para instalar la versión correspondiente en tu pc.

    Instalar dependencias:

    npm install
    

    Ejecutar la aplicación

    npm run dev
    

    Ayuda

    Si tienes cualquier duda puedes preguntar en nuestro Discord canal #vamosacodearplanetas

    Pull Request

    Por favor utilizar el template de Pull Request para poder darle al code reviewer un mejor panorama de lo que va a revisar, gracias.

    Colaboradores

    Visit original content creator repository https://github.com/nsdonato/vamosacodearplanetas