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.
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 scipy as sp | |
class FB: | |
def __init__(self): | |
pass | |
class Sigmoid: | |
def __init__(self): | |
self._output = None | |
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.
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
var target = document.getElementsByTagName('main')[0]; | |
var res = document.getElementsByClassName('result')[0]; | |
function createEventScrollX(ele){ | |
this._past_scroll_left = 0; | |
this.ev_scroll_x = new CustomEvent('scroll-x', {bubbles:true, cancelable:true}); | |
this.dispatch_callback = function(ev){ | |
var cuT = ev.currentTarget; | |
var now_l = cuT.scrollLeft; | |
if(now_l !== this.past_scroll_left){ |
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
(function(){ | |
/* | |
- args: lastmod: str | |
*/ | |
function addLastmod(lastmod){ | |
/* ここでlastmodを追加 */ | |
var time = document.createElement("time"); | |
time.setAttribute("itemprop", "dateModified"); | |
time.setAttribute("title", lastmod); | |
time.setAttribute("datetime", lastmod); |
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
def get_soupXML_soupHTML_from_entryid(hatena_id, blog_id, password, entry_id): | |
''' | |
return soup(XML) of respose, soup(HTML) content in reponse | |
''' | |
member_uri = "https://blog.hatena.ne.jp/{hatena_id}/{blog_id}/atom/entry/{entry_id}".format(hatena_id=hatena_id, blog_id=blog_id,entry_id=entry_id) | |
res_member = requests.get(member_uri, auth=(hatena_id, password)) | |
if not res_member.ok: | |
print("status_code: " + str(res_member.status_code)) | |
return False |
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>" | |
entry_id = "8599973812308945752" | |
member_uri = "https://blog.hatena.ne.jp/{hatena_id}/{blog_id}/atom/entry/{entry_id}".format(hatena_id=hatena_id, blog_id=blog_id,entry_id=entry_id) |
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 | |
def get_entry_content_str(hatena_id, blog_id, password, entry_id): | |
member_uri = "https://blog.hatena.ne.jp/{hatena_id}/{blog_id}/atom/entry/{entry_id}".format(hatena_id=hatena_id, blog_id=blog_id,entry_id=entry_id) | |
res_member = requests.get(member_uri, auth=(hatena_id, password)) | |
if not res_member.ok: | |
print("Failed: status_code: " + str(res_member.status_code)) | |
return False | |
soup_response_xml = bs4.BeautifulSoup(res_member.content, features="xml") |