Skip to content

Instantly share code, notes, and snippets.

View elderica's full-sized avatar
🚞
I'm enjoing with trains and computers.

elderica

🚞
I'm enjoing with trains and computers.
View GitHub Profile
@elderica
elderica / sdrocm.md
Last active September 3, 2023 05:22
Stable Diffusion with ROCm and ArchLinux
  1. arch4edu リポジトリを追加する。
  2. paru -Syu rocm-hip-sdk rocm-opencl-sdk python-pytorch-rocm python-torchvision-rocm python-numpy yq
  3. virtualenv --system-site-packages sdenv
  4. source sdenv/bin/activate
  5. git clone https://github.com/CompVis/stable-diffusion.git && cd stable-diffusion
  6. yq '.dependencies[].pip?[]' environment.yaml | sed 's/"//g' | xargs -L1 pip install
  7. https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt からチェックポイントファイルを入手して、 models/ldm/stable-diffusion-v1/model.ckpt に置く
  8. python scripts/txt2img.py --prompt "a photograph of an astronaut riding a horse" --plms
This file has been truncated, but you can view the full file.
<!DOCTYPE html
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--
This HTML was auto-generated from MATLAB code.
To make changes, update the MATLAB code and republish this document.
--><title>ddsk</title><meta name="generator" content="MATLAB 9.12"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="DC.date" content="2022-08-07"><meta name="DC.source" content="ddsk.m"><style type="text/css">
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';c
@elderica
elderica / ddsk.rkt
Last active August 4, 2022 12:22
ドドスコ V1
#lang racket
(require racket/random
racket/generator
data/queue)
(define next-ddsk
(generator ()
(let loop ()
(yield (random-ref (vector "ドド" "スコ")))
(loop))))
https://www.youtube.com/feeds/videos.xml?channel_id=UCgmPnx-EEeOrZSg5Tiw7ZRQ
https://www.youtube.com/feeds/videos.xml?channel_id=UCsUj0dszADCGbF3gNrQEuSQ
https://www.youtube.com/feeds/videos.xml?channel_id=UCO_aKKYxn4tvrqPjcTzZ6EQ
https://www.youtube.com/feeds/videos.xml?channel_id=UCmbs8T6MWqUHP1tIQvSgKrg
https://www.youtube.com/feeds/videos.xml?channel_id=UC3n5uGu18FoCy23ggWWp8tA
https://www.youtube.com/feeds/videos.xml?channel_id=UC8rcEBzJSleTkf_-agPM20g
https://www.youtube.com/feeds/videos.xml?channel_id=UCL_qhgtOy0dy1Agp8vkySQg
https://www.youtube.com/feeds/videos.xml?channel_id=UCMwGHR0BTZuLsmjY_NT5Pwg
https://www.youtube.com/feeds/videos.xml?channel_id=UCyl1z3jo3XHR1riLFKG5UAg
https://www.youtube.com/feeds/videos.xml?channel_id=UCoSrY_IQQVpmIRZ9Xf-y93g
@elderica
elderica / bug
Created June 12, 2022 09:40
bug 1.1 - Simple Bug / ToDo tracker for the command line.
#!/bin/bash
# (encoding: UTF-8)
#
# bug 1.1 - Simple Bug / ToDo tracker for the command line.
# (Instructions below the license)
# LICENSE
# Copyright (C) 2006 Lluís Batlle i Rossell
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@elderica
elderica / list4_24.rs
Created May 1, 2022 06:58
コンセプトから理解するRust リスト4.24
use std::cell::RefCell;
use std::rc::Rc;
struct Node {
data: i32,
child: Option<Rc<RefCell<Node>>>,
}
fn print_link(start_node: Rc<RefCell<Node>>) {
let mut p = start_node;
@elderica
elderica / ct.rs
Last active April 27, 2022 11:29
//SPDX-FileCopyrightText: 2022 Ryuichi Ueda [email protected]
//SPDX-License-Identifier: GPL-3.0-or-later
use fnv::FnvHasher;
use std::collections::HashMap;
use std::hash::BuildHasherDefault;
use std::io::{stdin, stdout, BufRead, BufReader, BufWriter, Write};
fn main() {
let stdin = stdin();
if head <= tail {
tail - head
} else {
(n - head) + tail
}
@elderica
elderica / lib.rs
Last active April 18, 2022 13:08
Union-Find in Rust
pub const NIL: usize = usize::MAX;
pub struct UnionFind {
pub parents: Vec<usize>,
pub ranks: Vec<usize>,
pub sizes: Vec<usize>,
pub mins: Vec<usize>,
}
impl UnionFind {
(setq debug-on-error t)
(setq load-prefer-newer t)
;; <leaf-install-code>
(eval-and-compile
(customize-set-variable
'package-archives '(("org" . "https://orgmode.org/elpa/")
("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)