Skip to content

Instantly share code, notes, and snippets.

View Lee-W's full-sized avatar
🇹🇼

Wei Lee Lee-W

🇹🇼
View GitHub Profile
import os
import argparse
from distutils.util import strtobool
from bs4 import BeautifulSoup
def externaljs_to_static(path_suffix, input_file_name, output_file_name):
index_path = os.path.join(path_suffix, input_file_name)
output_path = os.path.join(path_suffix, output_file_name)
import argparse
from urllib.parse import urljoin
import requests
import json
from bs4 import BeautifulSoup
BASE_URL = 'http://facemood.grtimed.com/'
INDEX_URL = urljoin(BASE_URL, 'index.php')
@Lee-W
Lee-W / NLP.ipynb
Last active December 5, 2016 10:45
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import json
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
req = urlopen('http://localhost:4040/api/tunnels')
ngrok_tunnels = json.loads(req.read().decode())
ngrok_public_url = ngrok_tunnels['tunnels'][0]['public_url']
@Lee-W
Lee-W / .pylintrc
Created July 12, 2017 08:57
My Custom pylintrc
[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Add files or directories to the blacklist. They should be base names, not
import argparse
import gspread
from oauth2client.service_account import ServiceAccountCredentials
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('secret_file')
parser.add_argument('url')
@Lee-W
Lee-W / sVimrc
Last active October 2, 2018 13:42
" Settings
set nosmoothscroll
let fullpagescrollpercent = 100
let lastactivetablimit = 50;
let lastclosedtablimit = 50;
let scrollduration = 25
let scrollstep = 65
let zoomstep = 15
let hintcharacters = "1234567890";
let homeurl = "http://google.com";