• Skip to main content
  • Skip to primary sidebar

学習記録

河副 太智

複数言語のチートシート

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

複数言語のチートシート

Filed Under: python3

Python3チートシート

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

Python3チートシート

その他チートシート多数

Filed Under: python3, チートシート

numpyチートシート

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

numpyチートシート

Filed Under: Numpy, チートシート

forにforを入れる練習 かけ算9×9

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

1
2
3
4
5
6
7
8
9
10
11
import sys  
import math
 
arr = np.empty((0,), int)    
for i in range(1, 10):
    print(" \n")
    for j in range(1,10):
        if int(math.log10(i*j) + 1) == 1:
            print("", i*j ,end=" ")
        else:
            print(i*j, end=" ")

 

Filed Under: 作成実績

Jupyter notebookデバッグチートシート

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

 

以下のコードをデバッグしたいコードの上に書く
from IPython.core.debugger import Tracer; Tracer()()

例:

1
2
3
4
5
6
7
8
9
10
11
12
def test_debug(y):
    x = 10
    # One-liner to start the debugger here.
    from IPython.core.debugger import Tracer; Tracer()()
    x = x + y
    for i in range(10):
        x = x+i
    return x
test_debug(10)

 

実行するとコードの下にコマンド入力欄が出てくるので
変数を入れると変数の中身を表示してくれる。

その他デバッグコードはチートシートを参考にする

Jupyter notebookのデバッグのチートシート

Filed Under: Jupyter, チートシート

forを抜ける

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

breakで抜ける、passで何もしないで再度forに戻る

1
2
3
4
5
6
    for x in range((len(own_delated))):
        if own_delated[x] % 2 == 0:
            arr = np.append(arr, np.array([[1,own_delated[x]]]), axis=0)
            break
        else:
            pass

 

Filed Under: python3

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 21
  • Page 22
  • Page 23
  • Page 24
  • Page 25
  • Interim pages omitted …
  • Page 66
  • 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