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
| #その3 | |
| #fastai/fastai/vision/data.py | |
| ''' | |
| data = ImageDataBunch.from_csv(path, ds_tfms=tfms, size=128) | |
| print(data) | |
| ''' | |
| ''' | |
| @classmethod | |
| def from_csv(cls, path:PathOrStr, folder:PathOrStr=None, label_delim:str=None, csv_labels:PathOrStr='labels.csv', |
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
| // pull down jquery into the JavaScript console | |
| var script = document.createElement('script'); | |
| script.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"; | |
| document.getElementsByTagName('head')[0].appendChild(script); | |
| var urls = $('.rg_di .rg_meta').map(function() { return JSON.parse($(this).text()).ou; }); | |
| var textToSave = urls.toArray().join('\n'); | |
| var hiddenElement = document.createElement('a'); | |
| hiddenElement.href = 'data:attachment/text,' + encodeURI(textToSave); | |
| hiddenElement.target = '_blank'; | |
| hiddenElement.download = 'urls.txt'; |
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
| !apt-get -q install graphviz | |
| !pip install -q pydot-ng | |
| !pip install -q graphviz | |
| !pip install -q pydot3 | |
| import pydot_ng as pydot |
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 matplotlib.pyplot as plt | |
| acc = history.history['acc'] | |
| val_acc = history.history['val_acc'] | |
| loss = history.history['loss'] | |
| val_loss = history.history['val_loss'] | |
| epochs = range(len(acc)) | |
| fig = plt.figure(figsize=(10, 5)) |
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
| # -*- coding: utf-8 -*- | |
| # TensowFlowのインポート | |
| import tensorflow as tf | |
| # MNISTを読み込むためinput_data.pyを同じディレクトリに置きインポートする | |
| # input_data.pyはチュートリアル内にリンクがあるのでそこから取得する | |
| # https://tensorflow.googlesource.com/tensorflow/+/master/tensorflow/examples/tutorials/mnist/input_data.py | |
| import input_data | |
| import time |
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
| # Install fastai | |
| !pip3 install fastai | |
| #Install pytorch | |
| !pip3 install http://download.pytorch.org/whl/cu92/torch-0.4.1-cp36-cp36m-linux_x86_64.whl | |
| !pip3 install torchvision | |
| from fastai.imports import * | |
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
| protected override void OnPaint(PaintEventArgs e) | |
| { | |
| base.OnPaint(e); | |
| Point[] pts = { | |
| new Point(100, 200), new Point(140, 100), | |
| new Point(160, 100), new Point(200, 200), | |
| new Point(120, 150), new Point(180, 150) | |
| }; | |
| Pen pen = new Pen(Color.Black); |
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
| if (true) { | |
| String dump = "Code[" + Integer.toHexString(code) + "]="; | |
| for (int i = 0; i < 16; i++) { | |
| dump += Integer.toHexString(Array[i]); | |
| dump += ","; | |
| if ((i % 16 == 0) && (i != 0)) { | |
| dump += "%n"; | |
| } | |
| } | |
| Log.d(TAG, dump); |
NewerOlder