Skip to content

Instantly share code, notes, and snippets.

@imkojima
imkojima / PULL_REQUEST_TEMPLATE.md
Last active April 24, 2018 09:03
PULL_REQUEST_TEMPLATE.md

What's this PR do?

How should this be manually tested?

Local

Any background context you want to provide?

What are the relevant tickets?

#coding:utf-8
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
url = "https://idea.cs.nthu.edu.tw/"
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-gpu')
driver = webdriver.Chrome(chrome_options=chrome_options,executable_path='/Users/kojima/chromedriver')
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <algorithm>
using namespace std;
bool wayToSort(int i, int j) { return i > j; }
#define MAXSIZE 1024
<!DOCTYPE html>
<html>
<head>
<!-- Standard Meta -->
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>Template - MirrorMedia</title>
<link rel="stylesheet" async type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.4/semantic.min.css" >
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
# coding=UTF-8
#
import os
import json
import math
import requests
import numpy as np
from tabulate import tabulate
from nltk.sentiment.vader import SentimentIntensityAnalyzer
@imkojima
imkojima / # pkg-config - 2016-07-21_03-05-38.txt
Created July 20, 2016 19:06
pkg-config on Mac OS X 10.12 - Homebrew build logs
Homebrew build logs for pkg-config on Mac OS X 10.12
Build date: 2016-07-21 03:05:38
traceroute to 207.46.141.140 (207.46.141.140), 30 hops max, 38 byte packets
1 router (192.168.88.1) 11.238 ms 20.995 ms 4.158 ms
2 h254.s98.ts.hinet.net (168.95.98.254) 4.782 ms 38.354 ms 4.751 ms
3 sczs-3302.hinet.net (168.95.25.194) 8.044 ms 4.776 ms 9.645 ms
4 220-128-8-254.hinet-ip.hinet.net (220.128.8.254) 4.795 ms ty-fo-crs11.router.hinet.net (220.128.8.246) 16.084 ms 4.798 ms
5 tpdt-3012.hinet.net (220.128.2.30) 30.193 ms 9.366 ms 220-128-7-58.hinet-ip.hinet.net (220.128.7.58) 15.024 ms
6 r4002-s2.tp.hinet.net (220.128.7.129) 22.997 ms 6.190 ms 6.005 ms
7 r4004-s2.tp.hinet.net (220.128.4.93) 6.233 ms 7.337 ms 6.737 ms
8 r4004-s2.tp.hinet.net (220.128.10.237) 6.348 ms 6.201 ms r4101-s2.tp.hinet.net (220.128.7.181) 7.214 ms
9 p16-7-1-3.r22.tkokhk01.hk.bb.gin.ntt.net (129.250.9.137) 64.081 ms ntt-hk-gw.hinet.net (211.72.233.81) 65.276 ms 68.757 ms
traceroute to 40.74.137.100 (40.74.137.100), 30 hops max, 38 byte packets
1 router (192.168.88.1) 7.267 ms 3.807 ms 0.842 ms
2 h254.s98.ts.hinet.net (168.95.98.254) 4.924 ms 7.455 ms 4.880 ms
3 sczs-3301.hinet.net (168.95.24.194) 4.786 ms 4.546 ms 4.465 ms
4 220-128-8-250.hinet-ip.hinet.net (220.128.8.250) 4.598 ms 15.897 ms ty-fo-crs11.router.hinet.net (220.128.8.242) 4.751 ms
5 tpdt-3011.hinet.net (220.128.1.30) 9.743 ms 220-128-7-58.hinet-ip.hinet.net (220.128.7.58) 10.631 ms tpdt-3012.hinet.net (220.128.2.150) 6.852 ms
6 r4103-s2.tp.hinet.net (220.128.7.29) 6.165 ms r4001-s2.tp.hinet.net (220.128.7.217) 16.011 ms r4103-s2.tp.hinet.net (220.128.7.29) 6.094 ms
7 r4003-s2.tp.hinet.net (220.128.7.221) 6.409 ms 6.447 ms 6.733 ms
8 r4102-s2.tp.hinet.net (220.128.7.173) 6.076 ms 220-128-10-117.hinet-ip.hinet.net (220.128.10.117) 6.389 ms 6.150 ms
9 p64-7-0-1.r20.osakjp02.jp.bb.gin.ntt.net (129.250.66.13) 47.460 ms p64-7-1-2.r20.osakjp02.jp.bb.gin.ntt.net (129.250
@imkojima
imkojima / thsrc-timetable.py
Created February 8, 2016 12:51
THSRC Parser
import sys
import urllib2
import re
import pprint
import time
from BeautifulSoup import BeautifulSoup
# HTTP Download Request
def http_download(url):
try: