• Skip to main content
  • Skip to primary sidebar

学習記録

プログラミング

SiteOriginPostArousalの設定

2018年11月14日 by 河副 太智 Leave a Comment

Filed Under: Wordpress

DFカラム並べ替え

2018年11月13日 by 河副 太智 Leave a Comment

1
2
3
4
5
6
7
8
9
10
11
12
13
df例
'''
    a   b   c  
A   0   1   2  
S   5   6   7  
'''
並べ替え
df.loc[:,['a','c','b']]
'''
 
    a   c   b  
A   0   2   1
S   5   7   6

 

Filed Under: Pandas

DFカラムを複数削除する

2018年11月13日 by 河副 太智 Leave a Comment

1
2
3
4
5
to_remove = [1,2,'Classification','Period Desc."','Aggregate Level','Is Leaf Code','Trade Flow Code','Reporter Code',
             'Partner Code','Partner','Partner ISO','2nd Partner Code','2nd Partner','2nd Partner ISO','Customs Proc. Code',
             'Customs','Mode of Transport Code"','Mode of Transport','Commodity Code','Commodity','Qty Unit Code','Flag','value/unit',
            'CIF Trade Value (US$)','FOB Trade Value (US$)','Gross weight (kg)','Mode of Transport Code','','','']
df = df[df.columns.difference(to_remove)]

 

Filed Under: Pandas

PythonでxserverにFTPアップロード

2018年11月8日 by 河副 太智 Leave a Comment

pythonファイルと同じディレクトリにあるhtmlファイルをすべて
ftpアップロードするコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import glob
import string
import os
from ftplib import FTP
import urllib.request
 
filelist=glob.glob('*.html')
 
ftp=FTP('sv2142.xserver.jp')
ftp.set_pasv("true")
ftp.login('ここにID','ここにパスワード')
ftp.cwd('/aaaa.com/public_html/bbb/') #ホスト側のディレクトリ
 
 
 
for file in filelist:
#     f=open(file,'rb')
    with open(file, "rb") as f:
        filename=os.path.basename(file)
        cmd='STOR '+filename
 
        ftp.storbinary(cmd,f)
        f.close()
ftp.quit()
 
for file in filelist:
    os.remove(file)

 

Filed Under: python3

GenesisにBodyClassを追加する

2018年11月5日 by 河副 太智 Leave a Comment

1
2
3
4
5
6
7
8
9
// sample-categoryというカテゴリスラッグを持つページにBody Classを追加
add_filter( 'body_class', 'sp_body_class' );
function sp_body_class( $classes ) {
 
    if ( is_category( 'sample-category' ) )
        $classes[] = 'custom-class';
        return $classes;
 
}

こちらのページを参照する

Filed Under: css

(CSS設定)統計グラフを左右にストレッチ表示

2018年10月26日 by 河副 太智 Leave a Comment

Wordpressのダッシュボードの外観→カスタマイズ→追加css
で以下のコードを追記する

1
2
3
4
5
6
7
8
9
10
11
12
13
14
@media only screen and (min-width: 960px){
.full-width-content.full-containar .content{
width:100%;
}
.full-width-content.full-containar .site-inner{
max-width:100%;
}
.full-width-content.full-containar .breadcrumb, .full-width-content.full-containar .entry-header, .full-width-content.full-containar .center-block, .full-width-content.full-containar .yarpp-related, .full-width-content.full-containar .entry-footer, .full-width-content.full-containar .comment-respond, .full-width-content.full-containar .after-entry{
max-width:700px;
margin-left:auto;
margin-right:auto;
}
 
}

 

このCSSを投稿画面で全幅レイアウトを選び、
「Custom Body Class」に「full-containar」と入力

投稿画面のhtmlは下記のように入力

1
2
3
4
5
6
<div class="center-block">
 
中央に寄せたい本文をここに入力
100%のグラフはこのブロックの外側に入力
 
</div>

 

Filed Under: css Tagged With: full-stretch, グラフ表示, ストレッチ, 全画面, 左よせ

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 5
  • Page 6
  • Page 7
  • Page 8
  • Page 9
  • Interim pages omitted …
  • Page 55
  • Go to Next Page »

Primary Sidebar

カテゴリー

  • AWS
  • Bootstrap
  • Dash
  • Django
  • flask
  • GIT(sourcetree)
  • Plotly/Dash
  • VPS
  • その他tool
  • ブログ
  • プログラミング
    • Bokeh
    • css
    • HoloViews
    • Jupyter
    • Numpy
    • Pandas
    • PosgreSQL
    • Python 基本
    • python3
      • webアプリ
    • python3解説
    • scikit-learn
    • scipy
    • vps
    • Wordpress
    • グラフ
    • コマンド
    • スクレイピング
    • チートシート
    • データクレンジング
    • ブロックチェーン
    • 作成実績
    • 時系列分析
    • 機械学習
      • 分析手法
      • 教師有り
    • 異常値検知
    • 自然言語処理
  • 一太郎
  • 数学
    • sympy
      • 対数関数(log)
      • 累乗根(n乗根)
    • 暗号学

Copyright © 2025 · Genesis Sample on Genesis Framework · WordPress · Log in