Skip to content

Instantly share code, notes, and snippets.

@inaniwa3
inaniwa3 / kochikame.gs
Created March 8, 2015 11:24
a Web API that returns the latest Kochikame
function doGet(e) {
var response = UrlFetchApp.fetch("http://books.shueisha.co.jp/CGI/search/zen_list.cgi?siries_isbn=X-08-852811-5&siries_kanren_isbn=&mode=2");
// var regexp = /第1巻〜第(\d+)巻/;
var regexp = /第1巻.第(\d+)巻/; // avoid WAVE_DASH
var match = regexp.exec(response.getContentText("Shift_JIS"));
var latest = -1
if (match !== null) {
latest = +match[1]
}
return ContentService.createTextOutput(JSON.stringify({latest:latest})).setMimeType(ContentService.MimeType.JSON);
const jsdom = require('jsdom');
const { JSDOM } = jsdom;
const fs = require('fs');
const turf = require('@turf/turf');
const request = require('request');
const twitter = require('twitter-lite');
const config = require('./config');
const IMG_PATH = 'tmp/img.jpg';
const MAP_URL_PARAMS = '&heading=0&fov=90&pitch=90';
{comment:https://github.com/receiptline/receiptline}
{comment:32cpl}
{image:iVBORw0KGgoAAAANSUhEUgAAAYAAAAA4CAMAAADD998hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
#!/usr/bin/env python
# ref.
# 伝説の超古代文明「ムー」
# http://www.nazotoki.com/mu.html
import cv2
import numpy as np
kernel7 = np.array([
from flask import Flask, request, abort, render_template
import geoip2.database
app = Flask(__name__)
# https://dev.maxmind.com/geoip/geoip2/geolite2/
reader = geoip2.database.Reader('./GeoLite2-City.mmdb')
@app.before_request
def before_request():
#!/usr/bin/env bash
# ref: http://www.awful.at/visual/index_motion.html
convert -type GrayScale -negate 0.png 2.png
convert -type GrayScale -negate 1.png 3.png
convert -loop 0 -delay 16 +repage *.png fukutome.gif
{
"stage": [
{
"rotation": 0,
"name": "P0",
"x": 485.01,
"type": "vispict",
"y": 172.52
},
{
#!/usr/bin/env ruby
require 'nokogiri'
# ("2015".."2019").each do |y|
# ("01".."12").each do |m|
# url = "https://www.tbsradio.jp/warai954/#{y}/#{m}/index.html"
# e = "curl -f #{url} -o ./html/#{y}_#{m}.html"
# puts e
# # `#{e}`
digraph G {
dpi=192;
graph [rankdir=LR, nodesep=0.15, ranksep=0.2]
node [fontname="Yu Gothic Bold"];
"風" -> "の";
"の" -> "谷";
"谷" -> "の";
"の" -> "ナウシカ";
"天空" -> "の";
"の" -> "城";
{"type":"quickstart","modelVersion":15,"settings":{"name":"motoya","frameRate":30,"dimensions":{"width":800,"height":600},"duration":615,"timeFormat":"frames"},"scenes":[{"worldType":"earth","animationModel":{"roving":false,"logarithmic":true,"groupedPosition":true},"duration":615,"attributes":[{"type":"cameraGroup","attributes":[{"type":"cameraPositionGroup","attributes":[{"type":"position","value":{"maxValueRange":71488366.22893658,"minValueRange":0,"relative":0},"visible":true,"attributesLocked":true,"attributes":[{"type":"longitude","value":{"maxValueRange":180,"minValueRange":-180,"relative":0.8806732967626804},"keyframes":[{"time":0,"value":0.8806732967626804},{"time":0.07317073170731707,"value":0.8806732967626804,"transitionOut":{"x":1,"y":0,"influence":0.2,"type":"custom","logarithmicMode":true}},{"time":0.1951219512195122,"value":0.8807374595444976,"transitionIn":{"x":-0.09259259259259256,"y":0.00005648137606928394,"influence":0.35,"type":"auto","logarithmicMode":true},"transitionOut":{"x":0.09259259