Skip to content

Instantly share code, notes, and snippets.

@xkid
xkid / SD WebUI.txt
Last active April 18, 2023 01:42
Jupyter notebooks for Stable Diffusion WebUI
!pip install --upgrade fastapi==0.90.0
!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
!git clone https://github.com/yfszzx/stable-diffusion-webui-images-browser /content/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser
!curl -Lo chilloutmixni.safetensors https://huggingface.co/nolanaatama/chomni/resolve/main/chomni.safetensors
!curl -Lo deliberate_v2.safetensors https://civitai.com/api/download/models/15236
!curl -Lo ulzzang-6500.pt https://huggingface.co/nolanaatama/chomni/resolve/main/ulzzang-6500.pt
!curl -Lo marc-allante.bin https://huggingface.co/sd-concepts-library/style-of-marc-allante/resolve/main/learned_embeds.bin
!curl -Lo low-poly-hd-icons.bin https://huggingface.co/sd-concepts-library/low-poly-hd-logos-icons/resolve/main/learned_embeds.bin
!curl -Lo koreanDollLikeness_v10.safetensors https://huggingface.co/duthanhduoc/chilloutmix-set/resolve/main/koreanDollLikeness_v10.safetensors
!curl -Lo koreanDollLikeness_v15.safetensors https://huggingface.co/amornl
#!/usr/bin/env python
""" .ics parser
Usage:
ics_parser.py [start_date] [end_date] <file>
"""
from icalendar import Calendar
from docopt import docopt
@xkid
xkid / omron_plc.rb
Created August 13, 2018 04:54
Omron PLC SIMULATOR SYSTEM (FINS)
# -*- coding: utf-8 -*-
##################################################################
# exp:
#
# $ ruby omron_plc.rb # default 127:0:0:1:9600
#
# $ ruby omron_plc.rb --address=172.16.15.35 --port=9602
#
# $ ruby omron_plc.rb --address=172.16.15.35 --port=9602 --count_up_dm=3,4,5 --countup_interval=5
@xkid
xkid / subproccall.py
Created January 2, 2018 07:54
Call a process with Multiple quotes and spaces in file path
subprocess.call([r"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe","C:\IronPython 2.7\A-Lin.mp3","vlc://quit"])
@xkid
xkid / python_mqtt.py
Last active November 13, 2017 02:15
MQTT Python Example
import paho.mqtt.client as mqtt
# The callback for when the client receives a CONNACK response from the server.
def on_connect(client, userdata, flags, rc):
print("Connected with result code "+str(rc))
# Subscribing in on_connect() means that if we lose the connection and
# reconnect then subscriptions will be renewed.
client.subscribe("/status")
# The callback for when a PUBLISH message is received from the server.
@xkid
xkid / css.php
Last active March 11, 2022 22:13
Dokuwiki PHP parse_ini_file replacement function
function r_parse_ini_file($ini_file,$bool_section){
$data = file_get_contents($ini_file);
$ini_array = parse_ini_string($data,$bool_section);
return $ini_array;
}
//$data = parse_ini_file($ini, true);
$data = r_parse_ini_file($ini,true);
@xkid
xkid / index.html
Created June 2, 2016 08:37
Jquery Sortable
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Sortable - Connect lists</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<style>
@xkid
xkid / 20160130.jquery.jmapping.js
Created January 30, 2016 03:46
2016 Update jQuery plugin for creating Google Maps from semantic markup
$(document).on('click', location_link_selector ,function(e){
e.preventDefault();
var marker_index = parseInt($(this).attr('href').split('#')[1], 10);
google.maps.event.trigger(gmarkers[marker_index], "click");
});