Skip to content

Instantly share code, notes, and snippets.

@none53
none53 / 20190416_vgg19_models.ipynb
Last active April 16, 2019 04:56
20190416_vgg19_models.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@none53
none53 / fastai_split_by_idx.py
Last active April 10, 2019 08:49
fastai split_by idxs
#その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',
@none53
none53 / google-search-images.js
Created February 26, 2019 19:20 — forked from aranajhonny/google-search-images.js
google search images for deep learning
// 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';
@none53
none53 / test_total_variation.ipynb
Created November 29, 2018 13:14 — forked from Hvass-Labs/test_total_variation.ipynb
Test for new TensorFlow feature total_variation()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@none53
none53 / gist:a53b76f90f5126d76a87e01806b61abb
Created November 14, 2018 00:19
How to use pyplot with Google colab
!apt-get -q install graphviz
!pip install -q pydot-ng
!pip install -q graphviz
!pip install -q pydot3
import pydot_ng as pydot
@none53
none53 / LayoutGraph.py
Last active November 12, 2018 21:54
Layout Graph
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))
@none53
none53 / mnist_for_ml_beginners.py
Created October 18, 2018 22:19 — forked from uramonk/mnist_for_ml_beginners.py
TensorFlow MNIST For ML Beginners チュートリアルのコード
# -*- 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
@none53
none53 / Fast.ai install script
Last active October 10, 2018 08:32 — forked from gilrosenthal/Fast.ai install script
Fast.ai Install on Google Colab
# 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 *
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);
@none53
none53 / hexdump.java
Created March 29, 2012 03:58
Java Hex Dump
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);