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 numpy as np | |
import cv2 as cv | |
def color_transfer(source, dest): | |
s_mean, s_std = cv.meanStdDev(source, mask=cv.inRange(source, 1, 254)) | |
d_mean, d_std = cv.meanStdDev(dest, mask=cv.inRange(dest, 1, 254)) | |
s_mean, s_std = np.hstack(s_mean)[0], np.hstack(s_std)[0] | |
d_mean, d_std = np.hstack(d_mean)[0], np.hstack(d_std)[0] | |
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.ArrayList; | |
import java.util.Random; | |
class Neuron { | |
public double value; | |
public ArrayList<Double> weights; | |
} | |
class Layer { | |
public ArrayList<Neuron> neurons; |
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 pkg.*; | |
import java.util.ArrayList; | |
public class starter { | |
private static Rectangle add(ArrayList<Rectangle> list, Rectangle rect) { list.add(rect); return rect; } | |
public static void main(String args[]) { | |
ArrayList<Rectangle> list = new ArrayList<Rectangle>(); | |
Text scroll = new Text(0, 130, "AMERICA YEAH"); | |
scroll.draw(); | |
for (int i = 0; i <= 120; i += 20) add(list, new Rectangle(0, i, 247, 10)).setColor(Color.RED); | |
add(list, new Rectangle(0, 0, 100, 70)).setColor(Color.BLUE); |
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
'use strict'; | |
const PASSIVE_COUNT = 50; | |
const AGGRESS_COUNT = 50; | |
const FOOD_COUNT = 50; | |
const GAME_LOOPS = 50; | |
var entities = []; | |
for (let i = 0; i < PASSIVE_COUNT; i++) { |
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
#! /bin/sh | |
FILE=$HOME/screenshots/`date +'%Y-%m-%d_%H-%M-%S'`.png | |
scrot $FILE | |
mpv $HOME/sounds/snap.mp3 ; | |
while getopts "u c" opt; do | |
case $opt in | |
u) | |
curl -F image=@$FILE "https://i.piyo.cafe/post.php" | xclip -selection c && mpv $HOME/sounds/bell.mp3 | |
;; |
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
diff --git a/comment.c b/comment.c | |
index 13ba7f0..4b3894d 100644 | |
--- a/comment.c | |
+++ b/comment.c | |
@@ -60,7 +60,7 @@ int track_is_compilation(const struct keyval *comments) | |
int track_is_va_compilation(const struct keyval *comments) | |
{ | |
- const char *c, *a, *aa; | |
+ /*const char *c, *a, *aa; |