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
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
# 写真を白黒の線画風の画像にするプログラム | |
# 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 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
#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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#define MAX_READ 128 |
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
version: '2.3' | |
services: | |
digits: | |
image: nvcr.io/nvidia/digits:18.06 | |
runtime: nvidia | |
ports: | |
- "5000:5000" | |
volumes: | |
- ./data:/data | |
- ./jobs:/workspace/jobs |
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 isServerAlive() { | |
var serverUrl = PropertiesService.getScriptProperties().getProperty('SERVER_URL'); | |
var options = { | |
muteHttpExceptions: true, | |
}; | |
var res = UrlFetchApp.fetch(serverUrl, options); | |
return res.getResponseCode() == 200; | |
} | |
function postMessage(msg) { |
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
object Main { | |
def main(args: Array[String]): Unit = { | |
def map[T, U](ls: List[T])(f: T => U): List[U] = ls.foldRight(Nil: List[U])((x, y) => f(x) :: y) | |
println(map(List(1, 2, 3))(x => x * 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
version: '3' | |
services: | |
mysql: | |
image: mysql/mysql-server:5.7 | |
ports: | |
- "3306:3306" | |
environment: | |
- MYSQL_ALLOW_EMPTY_PASSWORD=yes | |
- MYSQL_ROOT_HOST=% |