Skip to content

Instantly share code, notes, and snippets.

View meisheep's full-sized avatar

Jared (Meng Hsun) Yang meisheep

View GitHub Profile
javascript:(function()%20{const%20injection%20=%20document.createElement('script');%20injection.src%20=%20'https://meisheep.github.io/taiwan-pm2_5-idw-map-on-windyty/dist/bundle.js';%20document.body.appendChild(injection);})()
@meisheep
meisheep / taiwan-pm2_5-idw-map-on-windyty.js
Last active February 26, 2024 07:07
空污污流流
{const injection = document.createElement('script'); injection.src = 'https://meisheep.github.io/taiwan-pm2_5-idw-map-on-windyty/dist/bundle.js'; document.body.appendChild(injection);}
@meisheep
meisheep / udn.py
Created May 12, 2017 13:16
Scrape UDN library by using Selenium and Python3
import sys
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
keyword = None
if len(sys.argv) > 1:
keyword = sys.argv[1]
@meisheep
meisheep / HelloWorld.java
Created April 12, 2017 08:50
Liu's homework
abstract interface iVolume
{
public void showData();
public double vol();
}
abstract class CSphere implements iVolume
{
final double PI = 3.14;
protected int x;
@meisheep
meisheep / stream.py
Last active December 17, 2016 05:43
Tweepy Stream
import json
import atexit
import tweepy
from tweepy import Stream
from tweepy import OAuthHandler
from tweepy.streaming import StreamListener
def exit_handler():
with open('tweets.json') as f:
content = f.readlines()
@meisheep
meisheep / bookmark
Created September 6, 2016 02:11
Chrome jQuery bookmark
javascript:{const jqry = document.createElement('script'); jqry.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js'; document.getElementsByTagName('head')[0].appendChild(jqry);}
@meisheep
meisheep / fetchFile.py
Created June 13, 2016 07:11
Fetch File from S3 using boto3
from __future__ import print_function
import json
import boto3
s3client = boto3.client('s3')
def lambda_handler(event, context):
output = {'success': True, 'results': list()}
try:
@meisheep
meisheep / createJob.py
Created June 13, 2016 07:10
Trigger EMR by Lambda using Boto3
from __future__ import print_function
import json
import boto3
import os
import time
client = boto3.client('emr')
s3client = boto3.client('s3')
job_id = os.urandom(16).encode('hex')
city_dict = {'TPE': 'A','NTP': 'F','TY': 'H','HCC': 'J','HC': 'O','ML': 'K','TC': 'B','NT': 'M','CH': 'N','YUL': 'P','CY': 'I','CYC': 'Q','TN': 'D','KH': 'E','PT': 'T','KL': 'C','YIL': 'G','HL': 'U','TT': 'V'}
package main
import (
"fmt"
"net/http"
)
// hello world, the web server
func HelloServer(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, world!")
<?php
class JudgementController extends \BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()