Skip to content

Instantly share code, notes, and snippets.

View kassadin's full-sized avatar
:octocat:
新年好

kassadin

:octocat:
新年好
View GitHub Profile

-> lmg-train.png<-

The Novice's LLM Training Guide

->Written by Alpin<- ->Inspired by /hdg/'s LoRA train rentry<- !!!warning This guide is being slowly updated. We've already moved to the axolotl trainer.


[TOC2]

@foru17
foru17 / auto-renwal-subconver.sh
Created April 3, 2023 02:06
批量更新节点订阅脚本
#!/bin/bash
# 配合定时脚本使用
# 订阅后台接口,建议自己搭建,参考 https://github.com/tindy2013/subconverter
SERVER_API_URL="https://any.sub.domain/subconver"
# 输出的目录位置, nginx 解析目录
OUTPUT_FOLDER="/www/wwwroot/sub.domain.com"
# bark 推动提醒地址
@okmanideep
okmanideep / EventQueue.kt
Last active January 5, 2023 15:27
Event abstraction for Jetpack Compose
import androidx.compose.runtime.*
import kotlinx.coroutines.CoroutineScope
@Stable
internal class Event<T>(val value: T)
class MutableEventQueue<T>
internal constructor(): EventQueue<T>() {
private val events = mutableListOf<Event<T>>()
private val nextEventAsState = mutableStateOf<Event<T>?>(null)
@evansgelist
evansgelist / CenterTopAppBar.kt
Last active January 9, 2023 17:34
top bar with center title
package com.klikatech.rollo.ui.compose.components
import androidx.compose.foundation.layout.*
import androidx.compose.material.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.RectangleShape
import androidx.compose.ui.graphics.Shape
@robdodson
robdodson / .eleventy.js
Last active November 8, 2021 11:54
Memoize an eleventy collection.
const {memoize} = require('find-by-slug');
// Turn collection.all into a lookup table so we can use findBySlug
// to quickly find collection items without looping.
config.addCollection('memoized', function(collection) {
return memoize(collection.getAll());
});
@YumaInaura
YumaInaura / VIM.md
Last active May 12, 2024 12:14
Vim — What is the name of "q and colon" mode? ( A. command-line window )

Vim — What is the name of "q and colon" mode? ( A. command line window )

Or named "command window".

I mean "q and colon" ( q: ).

Not "colon and q" means quit vim ( :q ).

image

@MaskyS
MaskyS / main.dart
Last active November 25, 2022 05:35
An example showing how we can tap on a ListTile to open a PopUpMenuButton in Flutter.
import 'package:flutter/material.dart';
void main() {
runApp(new MaterialApp(
// Title
title: "Example App",
// Home
home: new ListTileWithPopupMenuButton()
));
}
@JoseAlcerreca
JoseAlcerreca / Event.kt
Created April 26, 2018 10:25
An event wrapper for data that is exposed via a LiveData that represents an event.
/**
* Used as a wrapper for data that is exposed via a LiveData that represents an event.
*/
open class Event<out T>(private val content: T) {
var hasBeenHandled = false
private set // Allow external read but not write
/**
* Returns the content and prevents its use again.
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@Pulimet
Pulimet / AdbCommands
Last active May 11, 2024 10:19
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader