Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
from requests_oauthlib import OAuth1Session
import json
import datetime, time, sys
from abc import ABCMeta, abstractmethod
import codecs
CK = 'XXXXXXXXXXXXXXXXXXXXXXXXX' # Consumer Key
<html>
<head>
<title>だみーぺーじ</title>
</head>
<body>
<p>だみーぺーじ</p>
</body>
</html>
pre.code.lang-html,
pre.code.lang-css,
pre.code.lang-javascript,
pre.code.lang-markdown,
pre.code.lang-hatena {
background: #f2f1e8;
color: #07a;
/* font-family: Raleway, sans-serif; */
font-family: inherit;
border: solid 2px #2e3034;
@yFGq-Ziw
yFGq-Ziw / precode.scss
Created October 4, 2023 13:24
precode scss for hatena
pre.code {
&.lang-html, &.lang-css, &.lang-javascript, &.lang-markdown, &.lang-hatena {
background: #f2f1e8;
color: #07a;
font-family: inherit;
border: solid 2px #2e3034;
-webkit-hyphens: none;
-moz-tab-size: 4;
text-shadow: 0 1px var(--hcb-color--text-shadow, #fff);
font-weight: 600;
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<h2 id="about">ハテブカスタムについて</h2>
<div class="profile-center">
<!--真ん中寄せ-->
<div style="margin-bottom: 20px;">
<div class="hatena-module hatena-module-search-box">
<div id="original-search-box" class="hatena-module-body">
<form class="search-form" role="search" action="https://rubirubi.hateblo.jp/search" method="get">
<input type="text" name="q" class="search-module-input" value="" placeholder="ブログ内を検索" required>
<input type="submit" value="検索" class="search-module-button" />
</form>
</div>
</div>
<div class="hatena-module hatena-module-entries-access-ranking"
data-count="5"
data-display_entry_category="0"
data-display_entry_image="1"
data-display_entry_image_size_width="100"
data-display_entry_image_size_height="100"
data-display_entry_body_length="0"
data-display_entry_date="0"
data-display_bookmark_count="1"
data-source="access"
<!-- Internet Explorerなど非対応のブラウザに対応させるためのスクリプトリンク -->
<script src="https://polyfill.io/v2/polyfill.min.js?features=IntersectionObserver"></script>
<script>
document.addEventListener("DOMContentLoaded", function () {
var lazyImages = [].slice.call(document.querySelectorAll("img.lazy"));
if ("IntersectionObserver" in window) {
let lazyImageObserver = new IntersectionObserver(function (entries, observer) {
entries.forEach(function (entry) {
if (entry.intersectionRatio > 0) {
import codecs
text_file = codecs.open('tweets.txt','r','utf-8')
txt = text_file.read()
# テキストを改行で区切った配列にする
sentences = txt.split('\n')
# janomeでテキスト分解
from janome.tokenizer import Tokenizer
t = Tokenizer()
# -*- coding: utf-8 -*-
from requests_oauthlib import OAuth1Session
import json
import datetime, time, sys
from abc import ABCMeta, abstractmethod
import codecs
CK = 'XXXXXXXXXXXXXXXXXXXXXXXXX' # Consumer Key