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
Homebrew build logs for homebrew/science/scalapack on macOS 10.12.4 | |
Build date: 2017-05-21 17:50:35 |
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
def latex_table(data, items=None, headers=None, format_str=None): | |
"""Generate a latex tabular for the given data matrix. | |
For example: | |
data_mat = [[1,2,3],[2,4,5]] | |
items = ['Item 1', 'Item 2'] | |
headers = ['col1', 'col2', 'col3'] | |
format_str='.2f' | |
latex_table(data_mat, items, headers, format_str) |
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
/* Base styles (regardless of theme) */ | |
.bs-callout { | |
margin: 20px 0; | |
padding: 15px 30px 15px 15px; | |
border-left: 5px solid #eee; | |
} | |
.bs-callout h4 { | |
margin-top: 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR) | |
project(qt-example) | |
# Find includes in corresponding build directories. | |
set(CMAKE_INCLUDE_CURRENT_DIR ON) | |
# Tell CMake to run moc when needed. | |
set(CMAKE_AUTOMOC ON) | |
# Find the Qt5Widget dependencies. |
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
function [sample] = draw_sample(prob_density) | |
% Draw a sample from 1D probability density. | |
cdf = cumsum(prob_density); | |
sample = sum(rand > cdf) + 1; | |
end |
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
#ifndef _SMART_ASSERT_H_ | |
#define _SMART_ASSERT_H_ | |
#include <string> | |
#include <sstream> | |
#include <ostream> | |
#include <algorithm> | |
#include <stdexcept> | |
namespace utility |
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
#ifndef _SCOPE_GUARD_H_ | |
#define _SCOPE_GUARD_H_ | |
#include <functional> | |
// One shall use ON_SCOPE_EXIT() macro to create a anonymous ScopeGuard object. | |
// The anonymous function "callback" will be automatically called in the | |
// deconstractor when the object is out of the scope. | |
// Usage: |
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
cmake_minimum_required (VERSION 2.6) | |
project (project_name) | |
# Initialize CXXFLAGS. | |
set(CMAKE_CXX_FLAGS "-Wall -std=c++0x") | |
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") | |
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG") | |
set(CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG") | |
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") |