This file contains hidden or 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 requests | |
import bs4 | |
import re | |
import time | |
def get_collection_uri(hatena_id, blog_id, password): | |
service_doc_uri = "https://blog.hatena.ne.jp/{hatena_id:}/{blog_id:}/atom".format(hatena_id=hatena_id, blog_id=blog_id) | |
res_service_doc = requests.get(url=service_doc_uri, auth=(hatena_id, password)) | |
if res_service_doc.ok: | |
soup_servicedoc_xml = bs4.BeautifulSoup(res_service_doc.content, features="xml") |
This file contains hidden or 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 requests | |
import bs4 | |
hatena_id = "<hatena id>" | |
blog_id = "<blog_id>" | |
password = "<api key>" | |
def get_collection_uri(hatena_id, blog_id, password): | |
service_doc_uri = "https://blog.hatena.ne.jp/{hatena_id:}/{blog_id:}/atom".format(hatena_id=hatena_id, blog_id=blog_id) | |
res_service_doc = requests.get(url=service_doc_uri, auth=(hatena_id, password)) |
This file contains hidden or 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
#! /usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
load codes of jupyter notebook(.ipynb). | |
http://jupyter-notebook.readthedocs.io/en/latest/examples/Notebook/Importing%20Notebooks.html | |
""" | |
import io, os, sys, types |
This file contains hidden or 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 pandas as pd | |
import urllib | |
def get_holidays_list( | |
holidays_jpn_url="http://www8.cao.go.jp/chosei/shukujitsu/syukujitsu.csv", | |
column_name="国民の祝日月日", | |
encoding="SHIFT-JIS", | |
update_csv=False): | |
file_name = holidays_jpn_url.split("/")[-1] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.