Skip to content

Instantly share code, notes, and snippets.

View danielcosta's full-sized avatar

Daniel Costa danielcosta

View GitHub Profile
@appliedintelligencelab
appliedintelligencelab / dataset.toml
Created August 22, 2024 18:21
Kohya SS' Flux dataset config
[general]
shuffle_caption = false
caption_extension = '.txt'
keep_tokens = 1
# This is a DreamBooth-style dataset
[[datasets]]
resolution = 512
batch_size = 1
keep_tokens = 1
@appliedintelligencelab
appliedintelligencelab / train.sh
Created August 22, 2024 18:20
Kohya SS' Flux training script
accelerate launch --mixed_precision bf16 --num_cpu_threads_per_process 1 flux_train_network.py --pretrained_model_name_or_path /home/hal/assets/models/unet/flux1-dev.sft --clip_l /home/hal/assets/models/clip/clip_l.safetensors --t5xxl /home/hal/assets/models/clip/t5xxl_fp16.safetensors --ae /home/hal/assets/models/vae/ae.sft --cache_latents_to_disk --save_model_as safetensors --sdpa --persistent_data_loader_workers --max_data_loader_n_workers 2 --seed 42 --gradient_checkpointing --mixed_precision bf16 --save_precision bf16 --network_module networks.lora_flux --network_dim 4 --optimizer_type adamw8bit --learning_rate 1e-4 --network_train_unet_only --cache_text_encoder_outputs --cache_text_encoder_outputs_to_disk --fp8_base --highvram --max_train_epochs 16 --save_every_n_epochs 4 --dataset_config dataset.toml --output_dir /home/hal/assets/training-output/hnia --output_name flux-lora-hnia --timestep_sampling sigmoid --model_prediction_type raw --guidance_scale 1.0 --loss_type l2 --optimizer_type adafactor --opti
@superjojo140
superjojo140 / ical_syntax.md
Last active November 11, 2024 12:56
iCalendar / ical / ics basic syntax

ICAL / ICS Syntax

References

Defined in RFC2445
Nice to read on https://www.kanzaki.com/docs/ical/

Basics

Allways start file with BEGIN:VCALENDAR and end with END:VCALENDAR
Events allways start with BEGIN:VEVENT and end with END:VEVENT and are nested in VCALENDAR
Timezones are mandatory for recurring events and recommended for all events.

<!doctype html>
<!-- This is just a very slightly modified tracking.js demo: https://trackingjs.com/examples/face_camera.html -->
<html>
<head>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/tracking.js/1.1.3/tracking-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tracking.js/1.1.3/data/face-min.js"></script>
<style>
video, canvas {
margin-left: 100px;
FROM ubuntu:16.04
RUN PACKAGES="\
php-cli \
php-mysql \
php-intl \
php-xml \
php-curl \
php-dom \
" && \
@chris-jamieson
chris-jamieson / setup.md
Created April 19, 2016 15:43
Set up Franz for Ubuntu
  • Download Franz for your distribution from MeetFranz.com
  • change into the same directory as the downloaded file, then sudo tar -xf Franz-linux-x64-0.9.10.tgz -C /opt/franz
  • (optional) wget "https://cdn-images-1.medium.com/max/360/1*v86tTomtFZIdqzMNpvwIZw.png" -O franz-icon.png then sudo cp franz-icon.png /opt/franz
  • (optional) sudo touch /usr/share/applications/franz.desktop then sudo vim /usr/share/applications/franz.desktop

paste the following lines into the file, then save the file:

[Desktop Entry]
Name=Franz
Comment=
<?php
require_once __DIR__.'/V8JsNodeModuleLoader_FileAccessInterface.php';
require_once __DIR__.'/V8JsNodeModuleLoader_NormalisePath.php';
/**
* Simple Node.js module loader for use with V8Js PHP extension
*
* This class understands Node.js' node_modules/ directory structure
* and can require modules/files from there.
*
# Paste this function in your ".bashrc" to enable the "pomo" command in your terminal
# POMODORO Terminal:
function pomo {
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
echo -e "POMODORO Terminal\n"
echo "usage: pomo 25 minutes timeout"
echo -e " or: pomo [options] see options below\n"
echo "Options:"
echo " short: 05 minutes timeout"
echo " long: 15 minutes timeout"
@mindbat
mindbat / pre-commit.lint
Created June 28, 2013 22:19
Git pre-commit script to run all the modified files through php-lint. Won't let you commit php file with a syntax error.
#!/bin/sh
#
# Hook script to check the changed files with php lint
# Called by "git commit" with no arguments.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD