Skip to content

Instantly share code, notes, and snippets.

@allmwh
allmwh / jupyter.service
Last active September 25, 2021 16:03 — forked from whophil/jupyter.service
A systemd script for running a Jupyter notebook server.
# After Ubuntu 16.04, Systemd becomes the default.
# It is simpler than https://gist.github.com/Doowon/38910829898a6624ce4ed554f082c4dd
[Unit]
Description=Jupyter Notebook
[Service]
Type=simple
PIDFile=/run/jupyter.pid
ExecStart=/home/wenlin/.pyenv/shims/jupyter-notebook --config=/home/wenlin/.jupyter/jupyter_notebook_config.py
@allmwh
allmwh / ptt_stock
Last active December 28, 2020 15:04
from PttWebCrawler.crawler import *
import json
import re
# change here
message_filters = ['今天','什麼','還是']
article_id = 'M.1609135202.A.69E'
c = PttWebCrawler(as_lib=True)
c.parse_article(board='Stock',article_id=article_id)