- Open Automator
- Create a new document
- Select Quick Action
- Set “Service receives selected” to
files or folders
inany application
- Add a
Run Shell Script
action- your default shell should already be selected, otherwise use
/bin/zsh
for macOS 10.15 (”Catalina”) or later - older versions of macOS use
/bin/bash
- your default shell should already be selected, otherwise use
- if you're using something else, you probably know what to do 😉
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
# Python program to create Blockchain | |
# For timestamp | |
import datetime | |
# Calculating the hash | |
# in order to add digital | |
# fingerprints to the blocks | |
import hashlib |
네이버 나눔 글꼴(https://zetawiki.com/wiki/%EB%82%98%EB%88%94%EA%B8%80%EA%BC%B4)
Download and Install
# download and extract font files(.ttf)
wget http://cdn.naver.com/naver/NanumFont/fontfiles/NanumFont_TTF_ALL.zip
wget https://github.com/naver/nanumfont/releases/download/VER2.5/NanumGothicCoding-2.5.zip
unzip NanumFont_TTF_ALL.zip
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
# ported from https://github.com/pvigier/perlin-numpy/blob/master/perlin2d.py | |
import torch | |
import math | |
def rand_perlin_2d(shape, res, fade = lambda t: 6*t**5 - 15*t**4 + 10*t**3): | |
delta = (res[0] / shape[0], res[1] / shape[1]) | |
d = (shape[0] // res[0], shape[1] // res[1]) | |
grid = torch.stack(torch.meshgrid(torch.arange(0, res[0], delta[0]), torch.arange(0, res[1], delta[1])), dim = -1) % 1 |
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
yalmip('clear') | |
T = [0 1 0 1; 1 0 1 0; 0 1 0 1; 1 0 1 0]; | |
x = sdpvar(4, 1); | |
y = sdpvar(4, 1); | |
assign(x, randn(4, 1)); | |
assign(y, randn(4, 1)); | |
const = [x'*x <= 1; y'*y <=1]; | |
% const = []; |
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
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"apigateway:*", | |
"cloudformation:CancelUpdateStack", | |
"cloudformation:ContinueUpdateRollback", | |
"cloudformation:CreateChangeSet", | |
"cloudformation:CreateStack", | |
"cloudformation:CreateUploadBucket", |
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
# This example shows how to use keras TensorBoard callback | |
# with model.train_on_batch | |
import tensorflow.keras as keras | |
# Setup the model | |
model = keras.models.Sequential() | |
model.add(...) # Add your layers | |
model.compile(...) # Compile as usual |
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
def tf_pca(x): | |
''' | |
Compute PCA on the bottom two dimensions of x, | |
eg assuming dims = [..., observations, features] | |
''' | |
# Center | |
x -= tf.reduce_mean(x, -2, keepdims=True) | |
# Currently, the GPU implementation of SVD is awful. | |
# It is slower than moving data back to CPU to SVD there |
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
function alpha=kriAlpha(data,scale) | |
% alpha=kriAlpha(data,scale) | |
% calculates Krippendorff's Alpha as a measure of inter-rater agreement | |
% data: rate matrix, each row is a rater or coder, each column is a case | |
% scale: level of measurement, supported are 'nominal', 'ordinal', 'interval' | |
% missing values have to be coded as NaN or inf | |
% For details about Krippendorff's Alpha see: | |
% http://en.wikipedia.org/wiki/Krippendorff%27s_Alpha | |
% Hayes, Andrew F. & Krippendorff, Klaus (2007). Answering the call for a |
NewerOlder