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
#include <Servo.h> | |
#define SERVO_PIN 3 | |
Servo servo; | |
void setup() { | |
Serial.begin(9600); | |
servo.attach(SERVO_PIN); | |
servo.write(60); | |
} |
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 numpy as np | |
import cv2 | |
orig = cv2.imread('src.png').astype(np.float32) | |
width, height, _ = orig.shape | |
center_x, center_y = width/4, height/2 | |
blur, iterations = 0.008, 20 | |
map_x1 = np.fromfunction(lambda y, x: x, (width, height), dtype=np.float32) | |
map_y1 = np.fromfunction(lambda y, x: y, (width, height), dtype=np.float32) |
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
# 写真を白黒の線画風の画像にするプログラム | |
# orig/*.jpg を読み込んで output/*.jpg として出力する | |
# http://tadaoyamaoka.hatenablog.com/entry/2017/02/19/172744 | |
# http://gori-naru.blogspot.com/2012/11/blog-post_8647.html | |
import os | |
import shutil | |
import glob | |
import cv2 | |
from tqdm import tqdm |
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 java.util.*; | |
float len = 20.0; | |
float deg = 87.5; | |
void setup() | |
{ | |
fullScreen(); | |
background(255); | |
strokeWeight(2); |
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
function getSheet(name) { | |
return SpreadsheetApp.getActiveSpreadsheet().getSheetByName(name); | |
} | |
function getEndRow(sheet, col) { | |
var endRow = 0; | |
var lastRow = sheet.getLastRow() | |
for(var i = 1; i <= lastRow; i++) { | |
if(sheet.getRange(i, col).getValue() === "") break; | |
endRow++; |
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
# MIT License | |
# Copyright (c) 2017 Ming | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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
function onChange(){ | |
var ss = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('シート1'); | |
var endRow = 0; | |
for(var i = 1; i <= ss.getLastRow(); i++) { | |
if(ss.getRange(i, 2).getValue() == "") break; | |
endRow++; | |
} | |
ss.getRange(endRow, 3).setValue(ss.getRange(endRow, 2).getValue()) | |
} |
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 ddf.minim.spi.*; | |
import ddf.minim.signals.*; | |
import ddf.minim.*; | |
import ddf.minim.analysis.*; | |
import ddf.minim.ugens.*; | |
import ddf.minim.effects.*; | |
Minim minim; | |
AudioPlayer player; | |
FFT fft; |
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 java.util.List; | |
import java.util.Iterator; | |
import java.util.Arrays; | |
Stage stage; | |
Population population; | |
int LIFE_TIME = 400; | |
float MUTATION_RATE = 0.025; | |
int POPULATION_NUM = 20; |
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: "AnimeFace" | |
layer { | |
name: "train-data" | |
type: "Data" | |
top: "data" | |
top: "label" | |
data_param { | |
batch_size: 30 | |
} |