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 bash | |
[ ! -d "models" ] && git clone https://github.com/tensorflow/models.git | |
cd models/research/slim/ | |
MODEL_NAME="nasnet_large" | |
TRAIN_DIR=/tmp/flowers-models/${MODEL_NAME} | |
DATASET_DIR=/tmp/flowers | |
export TF_CUDNN_WORKSPACE_LIMIT_IN_MB=500 | |
export CUDA_DEVICE_ORDER="PCI_BUS_ID" | |
export CUDA_VISIBLE_DEVICES="0,1" |
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
name: "CUB_GoogleNet_ST" | |
layer { | |
name: "data" | |
type: "ImageData" | |
top: "data" | |
top: "label" | |
include { | |
phase: TRAIN | |
} | |
transform_param { |
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
public class SVLibSVM { | |
public static void main(String[] args) throws Exception { | |
BufferedReader reader = new BufferedReader(new FileReader("data/diabetes.arff")); | |
Instances data = new Instances(reader); | |
reader.close(); | |
data.setClassIndex(data.numAttributes() - 1); | |
// create Model | |
LibSVM libsvmModel = new LibSVM(); |
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
<?php | |
public static function maxUploadFilesize($dir, $freeSpace = null) { | |
if (is_null($freeSpace) || $freeSpace < 0){ | |
$freeSpace = self::freeSpace($dir); | |
} | |
return $freeSpace === INF ? self::uploadLimit() : min($freeSpace, self::uploadLimit()); | |
} |
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
<?php | |
/* | |
* Copyright (C) 2015 David Wiesner | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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
// ==UserScript== | |
// @name | |
// @namespace events.script | |
// @include http://duckduckgo.com/* | |
// @include https://duckduckgo.com/* | |
// @match http://duckduckgo.com/* | |
// @match https://duckduckgo.com/* | |
// @run-at document-end | |
// ==/UserScript== | |
(function () { |
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
#!/bin/bash | |
function echoError(){ | |
red='\e[0;31m'; NC='\e[0m' # No Color | |
[ $# -gt 0 ] && echo -e "${red}$1${NC}" >&2 | |
} | |
function echoInfo(){ | |
COLOR='\e[0;32m'; NC='\e[0m' # No Color | |
[ $# -gt 0 ] && echo -e "${COLOR}$1${NC}" >&2 |