When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
'Emulate max() as fully as possible in pure Python.' | |
# https://stackoverflow.com/questions/69997857/implementation-of-max-function-in-python/69997876#69997876 | |
# https://github.com/python/mypy/issues/7231 | |
from typing import TypeVar, Any, Iterator, Iterable, Optional | |
from typing import Union, Protocol, Callable, cast, Tuple, overload | |
class SupportsGT(Protocol): |
def package_local_targets(input_dir, output_dir): | |
trace = 'package_local_targets' | |
os.chdir(input_dir) | |
try: | |
print(f"{trace}: create directory {output_dir}") | |
os.makedirs(output_dir) | |
except FileExistsError: | |
print(f"delete existing {output_dir}") | |
shutil.rmtree(output_dir) |
# webm - mp4 | |
ffmpeg -hide_banner \ | |
-re -f lavfi -i "testsrc2=size=1280x720:rate=30,format=yuv420p" \ | |
-f lavfi -i "sine=frequency=220:beep_factor=4:duration=5" \ | |
-c:v libx264 -preset ultrafast -tune zerolatency -profile:v high \ | |
-b:v 1400k -bufsize 2800k -x264opts keyint=30:min-keyint=30:scenecut=-1 \ | |
-c:a aac -b:a 128k \ | |
-window_size 5 -extra_window_size 10 -remove_at_exit 1 -adaptation_sets "id=0,streams=v id=1,streams=a" \ | |
-fflags +genpts \ | |
-movflags isml+frag_keyframe output.mpd |
https://www.gtplanet.net/how-gran-turismo-is-made/ | |
https://www.fia.com/news/auto-changing-game | |
https://www.youtube.com/watch?v=I8GQCZgCNw8 | |
https://www.gtplanet.net/dr-kazunori-yamauchi-gives-lecture-gran-turismos-driving-physics-production/ | |
https://www.gtplanet.net/polyphony-digital-reveals-gt-sports-iris-ray-tracing-system-at-cedec-2018 | |
https://www.youtube.com/watch?v=VxL9j-j7JaI | |
https://www.youtube.com/watch?v=FPX2qRQAnBo | |
https://www.youtube.com/watch?v=QESGXTFFZXM | |
https://www.youtube.com/watch?v=-FrybeCxDPU | |
https://www.youtube.com/watch?v=ygUqvfeAaa0 |
#! /bin/sh | |
file="bbb_sunflower_2160p_30fps_normal.mp4" | |
timestamp=`date +%s` | |
ffmpeg="docker run --rm -it --workdir /tmp -v $PWD:/tmp kynothon/moviola:4.0-alpine " | |
bento4="docker run -it --rm -u $(id -u):$(id -g) -v $PWD:/tmp --workdir /tmp ggoussard/bento4docker " | |
echo "Getting the file" | |
curl -LO http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_2160p_30fps_normal.mp4 | |
function [ref_ii, ref_jj, blk_residual] = block_match(blk, frame) | |
% frame and block dimensions | |
[H, W] = size(frame); | |
blk_size = size(blk, 1); | |
ref_ii = 1; | |
ref_jj = 1; | |
err = (255 ^ 2) * (blk_size ^ 2); | |
blk_residual = 255 * ones(blk_size, blk_size); |
% it creates a simple gray image (4x4) | |
I = [255, 255, 30, 100 | |
255, 50, 90, 20 | |
70, 70, 20, 10 | |
100, 20, 10, 0]; | |
% it converts it to grayscale | |
I = mat2gray(I); | |
% shows it | |
imshow(I); |