This file contains hidden or 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
| #!/bin/bash | |
| git config --local core.sshCommand "ssh -o IdentitiesOnly=yes -i ~/.ssh/my_rsa" | |
| git config --local user.name "De-Wei Ye" | |
| git config --local user.email [email protected] | |
| git config --local user.signingkey 44EC9F58A7B7702282DFE2E6ED3DB57BD45490F7 |
This file contains hidden or 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 time | |
| from functools import lru_cache | |
| import numpy as np | |
| from matplotlib import pyplot as plt | |
| from decimal import Decimal, getcontext | |
| getcontext().prec = 250 |
This file contains hidden or 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
| name: Deploy GitHub Page | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| deploy: | |
| name: deploy github page |
This file contains hidden or 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
| // ffprobe -show_streams 111-25-1920x1080.mp4 -select_streams v | |
| ffprobe version 4.3.1 Copyright (c) 2007-2020 the FFmpeg developers | |
| built with Apple clang version 11.0.3 (clang-1103.0.32.62) | |
| configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --disable-libjack --disable |
This file contains hidden or 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
| def is_color(img, threshold=1): | |
| """ | |
| check if the mean absolute difference to channel mean > threshold | |
| """ | |
| if img.ndims < 3 or img.shape[0] == 1: | |
| return False | |
| avg = np.mean(img, axis=2, keepdims=True) | |
| return np.mean(np.abs(img - avg)) > threshold |
This file contains hidden or 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
| """ | |
| Download and crop FEC dataset image and write the valid data into new csv file | |
| FEC: facial expression comparison | |
| Please also refer to the dataset website: | |
| https://research.google/tools/datasets/google-facial-expression/ | |
| Usage: | |
| python get_images.py faceexp-comparison-data-[train/test]-public.csv [output_csv] |
This file contains hidden or 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
| A = [] | |
| B = np.array([1,2,3]) # example 1D array | |
| for i in range(N): | |
| A.append(B.reshape(1, -1)) # reshape to 2D | |
| np.concatenate(A, axis=0) |
This file contains hidden or 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
| // create a bookmark and use this code as the URL, you can now toggle the css on/off | |
| // thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
| javascript: (function() { | |
| var elements = document.body.getElementsByTagName('*'); | |
| var items = []; | |
| for (var i = 0; i < elements.length; i++) { | |
| if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) { | |
| items.push(elements[i]); | |
| } | |
| } |
This file contains hidden or 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
| box: debian | |
| build: | |
| steps: | |
| - install-packages: | |
| packages: git | |
| - script: | |
| name: initialize git submodules | |
| code: | | |
| git submodule update --init --recursive |
This file contains hidden or 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
| [submodule "themes/blackburn"] | |
| path = themes/blackburn | |
| url = https://github.com/yoshiharuyamashita/blackburn.git |
NewerOlder