arch4edu
リポジトリを追加する。paru -Syu rocm-hip-sdk rocm-opencl-sdk python-pytorch-rocm python-torchvision-rocm python-numpy yq
virtualenv --system-site-packages sdenv
source sdenv/bin/activate
git clone https://github.com/CompVis/stable-diffusion.git && cd stable-diffusion
yq '.dependencies[].pip?[]' environment.yaml | sed 's/"//g' | xargs -L1 pip install
https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt
からチェックポイントファイルを入手して、models/ldm/stable-diffusion-v1/model.ckpt
に置くpython scripts/txt2img.py --prompt "a photograph of an astronaut riding a horse" --plms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM rocm/composable_kernel:ck_ub20.04_rocm5.5_rc4 | |
RUN mkdir /SD | |
# Clone SD | |
WORKDIR /SD | |
RUN git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui | |
WORKDIR /SD/stable-diffusion-webui | |
RUN git reset --hard 22bcc7be428c94e9408f589966c2040187245d81 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package my.application.dao; | |
import java.util.List; | |
import my.application.entity.Book; | |
import my.application.restutil.RequestOptions; | |
public interface BookPersister { | |
List<Book> getBooks(RequestOptions requestOptions); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
import redis.clients.jedis.Jedis; | |
public class StoringAccessDataUsingBitmap { | |
public void store(long userCode, String date) { | |
Jedis jedis = new Jedis("localhost"); | |
String key = String.format("access:%s", date); | |
We subscribe to the Git Featrue Branch workflow, briefly described in that link.
In practice, it works as follows:
- Start with an updated local development branch -- by checking out the dev branch and pulling changes:
git checkout development
git pull origin development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import falcon | |
import logging | |
logger = logging.getLogger(__name__) | |
logger.addHandler(logging.FileHandler('test.log')) | |
logger.setLevel(logging.INFO) | |
class ResponseLoggerMiddleware(object): | |
def process_response(self, req, resp): | |
logger.info('{0} {1} {2}'.format(req.method, req.relative_uri, resp.status[:3])) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.baeldung.web.hateoas; | |
import javax.servlet.http.HttpServletResponse; | |
import org.springframework.context.ApplicationListener; | |
import org.springframework.stereotype.Component; | |
import org.springframework.web.util.UriComponentsBuilder; | |
import com.google.common.base.Preconditions; |