pandas で データの事前処理後に、statsmodels で重回帰分析を実行したところ、エラーが発生した。
以下、エラーが発生したコードを記載。
- コード
import statsmodels.api as sm
# Fit and summarize OLS model
y = df['平均掲載順位']
// init | |
let xhr = new XMLHttpRequest() | |
let domain = 'https://read.amazon.co.jp/' | |
let items = [] | |
let tsvData = "" | |
// function | |
function getItemsList(paginationToken = null) { | |
// https://read.amazon.co.jp/kindle-library/search?query=&libraryType=BOOKS&paginationToken=19&sortType=recency&querySize=50 | |
let url = domain + 'kindle-library/search?query=&libraryType=BOOKS' + ( paginationToken ? '&paginationToken=' + paginationToken : '' ) + '&sortType=recency&querySize=50' |
(function() { | |
let facilitator; | |
if (document.querySelector("[aria-label='参加者']")) { | |
const names_array = document.querySelector("[aria-label='参加者']").innerText.split("\n").filter((word) => !word.match(/\(|メイン|ミュート|主催者|あなたの画面共有|その他の操作|keep_off|more_vert|keep_pin|keep_pin_outline|domain_disabled/)) | |
const names_set = new Set(names_array) | |
const names_uniq_array = Array.from(names_set) | |
facilitator = names_uniq_array[Math.floor(Math.random() * names_uniq_array.length)] | |
} | |
if (!facilitator) { | |
// chromeを利用して、ユーザ一覧を表示しつつconsoleで↓を実行すると、現在の参加者からランダムで一人表示することができます |
// ==UserScript== | |
// @name My BookMarklet | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description BookMarklet | |
// @author mutter.monotalk | |
// @match *://*/* | |
// ==/UserScript== | |
(function() { | |
'use strict'; |
// ==UserScript== | |
// @name Copy Google Drive sb embed img | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Google Drive image url for Scrapbox | |
// @author K.Sakurai | |
// @match https://drive.google.com/* | |
// @run-at context-menu | |
// @grant GM_setClipboard | |
// ==/UserScript== |
GSC_PROPERTY_NAME = 'gsc_property_name' | |
FILE_DIR_NAME = 'gsc_dir_name' | |
BUCKET_NAME = 'gsc_bucket_name' | |
GOOGLE_APPLICATION_CREDENTIALS_PATH = './credentials.json' | |
CSV_PREFIX = "gsc_" | |
GSC_SERVICE_ACCOUNT_FILE = './gsc_client.json' | |
def main(): | |
import argparse |
inline style で 以下のように、@media クエリで backgroud-image を変更する記載をした。
<header class="intro-header"
style="background-image: url('{% static "img/home-bg-1600.jpg" %}')
@media only screen and (max-width: 768px) {
background-image: url('{% static "img/home-bg-800.jpg" %}')
}">
html - Is it possible to put CSS @media rules inline? - Stack Overflow を見る限り、inline style には @media クエリは付与できない。
// ==UserScript== | |
// @name TSV to Redmine Ticket description | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @author K.Sakurai | |
// @resource CSS1 https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css | |
// @require https://cdn.jsdelivr.net/npm/toastify-js | |
// @match http*://*/* | |
// @run-at context-menu | |
// @grant GM_addStyle |
javascript: (function(e)%7Bvar t%3D%7Beval:%27"!function()%7Bvar n%3Dwindow.prompt(%5C%5C"SpreadSheet の値を markdownのtableに変換%5C%5C")%3Bnull!%3Dn%26%26%5C%5C"%5C%5C"!%3Dn%26%26(!function(n)%7Bvar e%3Ddocument.createElement(%5C%5C"div%5C%5C")%3Be.appendChild(document.createElement(%5C%5C"pre%5C%5C")).textContent%3Dn%3Bvar t%3De.style%3Bt.position%3D%5C%5C"fixed%5C%5C",t.left%3D%5C%5C"-100%25%5C%5C",document.body.appendChild(e),document.getSelection().selectAllChildren(e),document.execCommand(%5C%5C"copy%5C%5C"),document.body.removeChild(e)%7D(function(n)%7Bvar e%3Dn.split(/%5B%5C%5C%5C%5Cn%5C%5C%5C%5Cu0085%5C%5C%5C%5Cu2028%5C%5C%5C%5Cu2029%5D%7C%5C%5C%5C%5Cr%5C%5C%5C%5Cn%3F/g).map((function(n)%7Breturn console.log(n),n.split(%5C%5C"%5C%5C%5C%5Ct%5C%5C")%7D)),t%3De%5B0%5D.map((function(n,t)%7Breturn function(n,e)%7Breturn Math.max.apply(null,n.map((function(n)%7Breturn n%5Be%5D.length%7D)))%7D(e,t)%7D))%3Bconsole.log(t)%3Bvar o%3De.map((function(n,e)%7Breturn%5C%5C"%7C %5C%5C"%2Bn.map((function(n,e)%7Breturn n%2B |
(function()%7B(function() %7B'use strict'%3Bvar url %3D window.location.href%3Burl %3D url.replace(%2F%23%5C%2F%5B0-9%5D*%24%2F%2C '')%3Burl %3D url.replace('%3Fprint-pdf'%2C '')%3Burl %3D url %2B '%3Fprint-pdf'%3Bwindow.location.href %3D url%3B%7D)()%7D)() |