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
# frozen_string_literal: true | |
dirs = Dir.glob('*/') | |
pwd = Dir.pwd | |
dirs.each do |dir| | |
# git の管理下にありそうな場合はそこに移動して fetch する | |
next unless Dir.exist?("#{pwd}/#{dir}.git/") | |
Dir.chdir "#{pwd}/#{dir}" |
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
// CoinGeckoからモナコイン、Bitzeny、Ethereumの価格を取得して、Discordに投稿 | |
// Google Apps Script用のソースコードです | |
// 毎日1度実行するようにしています | |
function postDiscord() { | |
//payload | |
var payload = { | |
'username': "(*゚ー゚)", | |
'content' : "モナコイン:" + getMONAJPYByCoinGeko() + "/ Bitzeny:" + getZenyJPYByCoinGeko() + "/ Ethereum:" + getETHJPYByCoinGeko() + "\n", // \n で改行 | |
'parse' : "full" |
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
#coding:utf-8 | |
import random | |
def create_base_data(filename, outfile, add_line, limit): | |
file = open(filename,'r', encoding="utf-8") | |
data = file.readlines() | |
file.close() | |
data = random.sample(data, limit) # ランダムに何行か抜く | |
# ファイルに書き出し | |
file = open(outfile, 'w', encoding='utf-8') |
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
#coding:utf-8 | |
# ディレクトリの中にInuフォルダを作って、MarkovInu.exe などを放り込んで動かします | |
# Windows10 + Python3.6.4 | |
import discord | |
import os | |
import subprocess | |
from subprocess import Popen | |
from time import sleep | |
import random |