This file contains 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 SwiftUI | |
private class IntegerTextFieldValue: ObservableObject { | |
@Published var value = "" { | |
didSet { | |
let numbersOnly = value.filter { $0.isNumber } | |
if value != numbersOnly { | |
value = numbersOnly | |
} | |
} |
This file contains 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
void TBBSession::SchedClosure(tbb::task_arena& arena, tbb::task_group& g, std::function<void()> c) { | |
arena.execute( [&g, &c] () {g.run( c ); } ); | |
} | |
=========== | |
Then in TBBSession::Run | |
… Before creating the ExecutorBarrier | |
// Use a task_arena to avoid having unrelated tasks start | |
// running on this thread (which could start deadlocks) |
This file contains 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
from __future__ import print_function | |
from __future__ import absolute_import | |
from __future__ import division | |
import os | |
import h5py | |
import numpy as np | |
import tensorflow as tf | |
# Get path to data |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
////////////////////////////////////////////////////////// | |
// This class has been automatically generated on | |
// Mon Apr 16 09:51:20 2018 by ROOT version 5.34/36 | |
// from TTree NuECCQE/Tuple created by an AnaTuple managed by AnaTupleManager | |
// | |
// found on file: SIM_minerva_00113270_Subruns_0001_NuECCQE_Ana_Tuple_v21r1p1.root | |
// It contains some modifications to deal with stupid ROOT STL errors and some const values | |
////////////////////////////////////////////////////////// | |
#ifndef NuECCQE_h |
This file contains 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
""" | |
Super-Simple logistic regression to test TF framework APIs. | |
MNIST TF records available here: | |
https://github.com/gnperdue/RandomData/tree/master/TensorFlow | |
Sample run script: | |
``` | |
#!/bin/bash |
This file contains 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 python | |
""" | |
MNIST data in TFRecord form available at: | |
https://github.com/gnperdue/RandomData/tree/master/TensorFlow | |
Example run script: | |
``` | |
#!/bin/bash | |
FILEPAT="mnist" |
This file contains 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
;; | |
;; NS CHEATSHEET | |
;; | |
;; * :require makes functions available with a namespace prefix | |
;; and optionally can refer functions to the current ns. | |
;; | |
;; * :import refers Java classes to the current namespace. | |
;; | |
;; * :refer-clojure affects availability of built-in (clojure.core) | |
;; functions. |
This file contains 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
perdue@mic> git diff | |
diff --git a/data/mnist/get_mnist.sh b/data/mnist/get_mnist.sh | |
index 8eb6aee..0219498 100755 | |
--- a/data/mnist/get_mnist.sh | |
+++ b/data/mnist/get_mnist.sh | |
@@ -2,6 +2,7 @@ | |
# This scripts downloads the mnist data and unzips it. | |
DIR="$( cd "$(dirname "$0")" ; pwd -P )" | |
+echo "Going to $DIR..." |
This file contains 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
Interactive GPU job: | |
qsub -q gpu -l nodes=1:gpu -A minervaG -I | |
. caffe_gpu_setup.sh | |
caffe.bin device_query -gpu 0 | |
I0106 16:20:46.109344 29397 caffe.cpp:111] Querying GPUs 0 | |
I0106 16:20:48.749228 29397 common.cpp:168] Device id: 0 | |
I0106 16:20:48.749281 29397 common.cpp:169] Major revision number: 3 | |
I0106 16:20:48.749287 29397 common.cpp:170] Minor revision number: 5 | |
I0106 16:20:48.749294 29397 common.cpp:171] Name: Tesla K20m |
NewerOlder