Skip to content

Instantly share code, notes, and snippets.

View tondol's full-sized avatar

tondol tondol

View GitHub Profile
@tondol
tondol / okome.coffee
Last active August 29, 2015 14:15
okome.coffee
# Description
# A Hubot script for shoda script
#
# Configuration:
# None
#
# Commands:
#
# Author:
# tondol
@tondol
tondol / lovelive.coffee
Last active August 29, 2015 14:15
lovelive.coffee
# Description
# A Hubot script for shoda script
#
# Configuration:
# None
#
# Commands:
#
# Author:
# tondol
@tondol
tondol / kssn.coffee
Last active August 29, 2015 14:15
kssn.coffee
request = require 'request'
cheerio = require 'cheerio'
module.exports = (robot) ->
robot.respond /kssn/i, (msg) ->
url = "http://www.eventernote.com/actors/3562"
options =
url: url
timeout: 2000
headers: {'user-agent': 'eventernote scraper'}
@tondol
tondol / chikuwa1.png
Last active August 29, 2015 14:17
#やまぐちくわ姫
chikuwa1.png
puts "カドカワ".split("").zip("ドワンゴ".split("")).map(&:sample).join
@tondol
tondol / gyao.rb
Created December 2, 2015 17:59
GyaoのチャンネルURLからいい感じのコマンドを出力する
# -*- coding: utf-8 -*-
require 'net/https'
require 'pp'
# https://gist.github.com/cielavenir/a858255c4009ecbb9b67
@channel_urls = ARGV
@player_urls = []
@tondol
tondol / twitter.rb
Last active December 18, 2015 18:32
特定アカウントのツイートIDを全件取得する
require 'nokogiri'
require 'pp'
require 'watir-webdriver'
SCREEN_NAME = ARGV.shift
FROM_OLDEST = Date.new(2011, 1, 1)
MY_EMAIL = "foo"
MY_PASSWORD = "barbaz"
@browser = Watir::Browser.new :chrome
@tondol
tondol / instagram.rb
Created December 18, 2015 18:31
Instagramをいい感じに
require 'pp'
require 'watir-webdriver'
directory = File.dirname($0)
config = YAML.load_file(directory + "/config.yml")
USERNAME = ARGV.shift
def instagram(username, password)
browser = Watir::Browser.new :phantomjs
@tondol
tondol / Gemfile
Last active October 11, 2016 02:54
Slackレビュー催促BOT
# frozen_string_literal: true
# A sample Gemfile
source "https://rubygems.org"
# gem "rails"
gem "slack-api"
gem "slack-incoming-webhooks"
@tondol
tondol / README.md
Last active January 6, 2017 18:11
Aqours楽曲の歌詞をテキストマイニングする

README

tfdf.py

  • 各単語のTerm Frequency, Document Frequencyを計算する。
  • MeCab, mecab-ipadic-neologdによる分かち書きを行う。
  • 動詞は原形に変換してから集計する。
  • アルファベットはスペースで分割し、小文字に変換する。
  • 記号のみの単語や、平仮名・片仮名のみからなる1文字の単語は削除する。