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
import tweepy | |
from datetime import datetime, timezone | |
# ここらへん入れてね | |
auth = tweepy.OAuthHandler('', '') | |
auth.set_access_token('', '') | |
api = tweepy.API(auth) | |
tag = '#コンテンツ応用論2017' |
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
import tweepy | |
# ここらへん入れてね | |
auth = tweepy.OAuthHandler('', '') | |
auth.set_access_token('', '') | |
api = tweepy.API(auth) | |
tag = '#コンテンツ応用論2017' | |
class SearchStreamListener(tweepy.StreamListener): | |
def on_status(self, status): |
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
import json | |
class JavaClass: | |
def __init__(self, name): | |
self.name = name | |
self.fields = dict() | |
def add_field(self, java_type, name): | |
self.fields[name] = java_type |
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
from bs4 import BeautifulSoup | |
import requests | |
import unicodedata | |
url = "https://tsukuba-daigaku.com/?bukken=jsearch&shu=2&kalc=0&kahc=0&mad%5B%5D=110&mad%5B%5D=120&tik=0&cor=0" | |
districts = {} | |
count = 0 | |
for i in range(0, 40): | |
request = requests.get(url) | |
soup = BeautifulSoup(request.text, "html.parser") |
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
import java.math.BigInteger; | |
import java.util.ArrayList; | |
import java.util.List; | |
class PrimeFactorization { | |
private final String dividend; | |
PrimeFactorization(String dividend) { | |
this.dividend = dividend; | |
} |
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
class Timer { | |
private long startNanoTime, endNanoTime = 0L; | |
void start() { | |
this.startNanoTime = System.nanoTime(); | |
} | |
void stop() { | |
if (startNanoTime != 0L) { | |
this.endNanoTime = System.nanoTime(); |
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
require 'fileutils' | |
require 'date' | |
if ARGV.size < 2 | |
STDERR.print "Usage: ruby #{$0} <path> <name>\n" | |
exit(1) | |
end | |
PATH = ARGV[0].gsub(File::ALT_SEPARATOR) {File::SEPARATOR} | |
NAME = ARGV[1] |
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 tweepy | |
import ConfigParser | |
import random | |
import locale | |
import datetime | |
import pytz | |
import urllib2 | |
import re | |
from xml.etree import ElementTree |
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
require "twitter" | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = "hoge" | |
config.consumer_secret = "fuga" | |
config.access_token = "piyo" | |
config.access_token_secret = "moge" | |
end | |
File.open("website.txt", "w") do |file| |
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
public class Main { | |
private final int quantity = 1000000; | |
// frequencyの値を増やすほど精度が増す。 | |
private final int frequency = 10; | |
// コンストラクタで要素数指定。 | |
private final List<Integer> list = new ArrayList<>(quantity); | |
private final int[] array = new int[quantity]; | |
public static void main(String[] args) { | |
Main main = new Main(); |