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
package main | |
import ( | |
"context" | |
"html/template" | |
"io" | |
"net/http" | |
"encoding/csv" | |
"strings" |
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 setup() { | |
createCanvas(500, 500); | |
colorMode(HSB, 255); | |
} | |
function draw() { | |
background(0, 50, 50); | |
var t = frameCount / 5; | |
var t2 = frameCount / 2; |
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
// https://stackoverflow.com/questions/4856717/javascript-equivalent-of-pythons-zip-function | |
// ex: | |
// zip([[1,2,3],['a','b','c']]) | |
// [[1,'a'],[2, 'b'], [3, 'c']] | |
const zip = rows => rows[0].map((_, c) => rows.map(row => row[c])); | |
function makeCirclePoints(degs, t, offsetX, offsetY) { | |
return degs.map(deg => ({ | |
"x": cos(radians(deg + t)) * 50 + offsetX, | |
"y": sin(radians(deg + t)) * 50 + offsetY, |
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
(ns study-clojure.core | |
(:require [clojure.java.io :as io]) | |
(:import (java.util Date)) | |
(:gen-class)) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; UTIL | |
(defn now [] | |
"the dot of 'Date.' means instanciate 'now' in Java. | |
same like (new java.util.Date)" |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
メモ帳起動して、移動 | |
https://gist.github.com/miau/565417 | |
""" | |
import subprocess | |
import time |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
メモ帳起動して、移動 | |
# インストール | |
pip install pywin32 | |
pip install win32gui |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""COMでPythonからExcelを操作する | |
""" | |
import os | |
from win32com.client import Dispatch | |
def main(): |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import openpyxl | |
import os | |
def recreate_data(filename): | |
if os.path.exists(filename): | |
os.remove(filename) |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
pyautoguiでイメージ認識、キーボード入力 | |
メモ帳を画面キャプチャしてmemo.pngとして保存する必要あり。 | |
""" | |
import pyautogui | |
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
#!/usr/bin/env python | |
""" | |
pyautoguiを使う | |
""" | |
import pyautogui | |
class Status: | |
def __init__(self): | |
self.x, self.y = pyautogui.position() |