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
    
  
  
    
  | .markdown-preview.markdown-preview { | |
| & { font-size: 1.0em; } | |
| h1 { font-size: 2.0em; } | |
| h2 { font-size: 2.0em; } | |
| h3 { font-size: 1.6em; } | |
| h4 { font-size: 1.2em; } | |
| h5 { font-size: 1.2em; } | |
| h6 { font-size: 1.2em; } | |
| } | 
  
    
      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
    
  
  
    
  | extension Data { | |
| /** | |
| 生のテキストデータをバイナリのまま改行コードを探し,改行コードごとにバイトストリームを切り分けて,テキストにデコードする. | |
| 戻り値はテキストのArrayになる. | |
| - returns: 文字列のArray. | |
| */ | |
| func lines() throws -> [String] { | |
| return try self.withUnsafeBytes({ (pointer: UnsafePointer<UInt8>) -> [String] in | |
| let buffer = [UInt8](UnsafeBufferPointer(start: pointer, count: self.count)) | |
| var lines: [String] = [] | 
  
    
      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
    
  
  
    
  | '''Trains a simple convnet on the MNIST dataset. | |
| Gets to 99.25% test accuracy after 12 epochs | |
| (there is still a lot of margin for parameter tuning). | |
| 16 seconds per epoch on a GRID K520 GPU. | |
| ''' | |
| from __future__ import print_function | |
| import keras | |
| from keras.datasets import mnist | |
| from keras.models import Sequential | 
  
    
      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
    
  
  
    
  | #!/usr/bin/env ruby | |
| require 'json' | |
| lines = $stdin.map {|line| line }.reverse | |
| titles = lines.pop.split(",") | |
| results = Array.new | 
  
    
      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
    
  
  
    
  | func read(handle: UnsafeMutablePointer<FILE>) throws -> Int { | |
| var buffer: [Int] = [Int](repeating: 0, count: 1) | |
| guard fread(&buffer, Int(MemoryLayout<Int>.size), 1, handle) == 1 else { | |
| throw NSError(domain: "com.sonson.2tch", code: 0, userInfo: ["message": "An error occurred during writing to the handle (errno: \(errno))"]) | |
| } | |
| return buffer[0] | |
| } | |
| func write(value: Int, handle: UnsafeMutablePointer<FILE>) throws { | |
| do { | 
      
      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
    
  
  
    
  | xargs rm < install_manifest.txt | 
  
    
      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
    
  
  
    
  | (cd ./Demitasse/data/vgg_16/; bash ./fetch_data.sh) | |
| (cd ./Demitasse/data/ilsvrc/; bash ./fetch_data.sh) | |
| ./build_Demitasse/tools/caffe2demitasse \ | |
| ./Demitasse/data/vgg_16/VGG_ILSVRC_16_layers_deploy.prototxt \ | |
| ./Demitasse/data/vgg_16/VGG_ILSVRC_16_layers.caffemodel \ | |
| ./converted.bin | |
| (cd build_Demitasse/examples; ./vgg_bench ../../converted.bin) | 
  
    
      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
    
  
  
    
  | docker rm $(docker ps -aq) | 
  
    
      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
    
  
  
    
  | docker rm $(docker ps -f status=exited -q) |