- OS - Sierra 10.12
- Tensorflow - 1.7.0
- Xcode command line tools - 8.2 (Download from here: Xcode - Support - Apple Developer & Switch to different clang version: sudo xcode-select --switch/Library/Developer/CommandLineTools & check version: clang -v)
- Cmake - 3.11
- Bazel - 0.11.1
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
#!/bin/bash | |
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/ | |
# | |
ARGS=2 | |
E_BADARGS=99 | |
if [ $# -ne $ARGS ] # correct number of arguments to the script; | |
then |
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
#config/initializers/redis.rb | |
require 'redis' | |
require 'redis/objects' | |
REDIS_CONFIG = YAML.load( File.open( Rails.root.join("config/redis.yml") ) ).symbolize_keys | |
dflt = REDIS_CONFIG[:default].symbolize_keys | |
cnfg = dflt.merge(REDIS_CONFIG[Rails.env.to_sym].symbolize_keys) if REDIS_CONFIG[Rails.env.to_sym] | |
$redis = Redis.new(cnfg) | |
Redis::Objects.redis = $redis |
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
// code originally adapted from https://github.com/DuncanMC/SwiftPerformanceBenchmark | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <CoreFoundation/CFDate.h> | |
void updateTotal(int newTotal, CFAbsoluteTime startTime) { | |
CFAbsoluteTime now = CFAbsoluteTimeGetCurrent(); | |
CFAbsoluteTime totalTime = now - startTime; |