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
/// @brief a first-time gist for a first-time gister. | |
/// prints Hello World! to std out. | |
#include <iostream> | |
int main() { | |
std::cout << "Hello World!" << std::endl; | |
} |
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
struct request { | |
string commod; | |
double pref; | |
} | |
class context { | |
public: | |
// adding this in the constructor will fix it until resizing occurs | |
// context() { | |
// int reserve_size = 16 // a magic number |
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
def test_abundance_by_z_for_soundness(): | |
for k, vs in data.abundance_by_z.items(): | |
if vs: | |
assert(abs(1-sum([v[1] for v in vs]))<1e-12) |
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
/// @brief execute the full resource sequence | |
void Execute() { | |
// collect resource exchange information | |
ResourceExchange<T> exchng(ctx_); | |
exchng.AddAllRequests(); | |
exchng.AddAllBids(); | |
exchng.DoAllAdjustments(); | |
// translate graph | |
ExchangeTranslator<T> xlator(&exchng.ex_ctx()); |
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
TEST(ExManagerTests, NullTest) { | |
TestContext tc; | |
GreedySolver solver; | |
ExchangeManager<Material> manager(tc.get(), &solver); | |
EXPECT_NO_THROW(manager.Execute()); | |
} |
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
#include <iostream> | |
class Base1 { | |
public: | |
int index; | |
Base1() : index(1) {}; | |
}; | |
class Base2 { | |
public: |
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
** Error in `/usr/bin/python': double free or corruption (fasttop): 0x00000000018a60e0 *** | |
======= Backtrace: ========= | |
/lib/x86_64-linux-gnu/libc.so.6(+0x80996)[0x7ffff7875996] | |
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSsD1Ev+0x1f)[0x7ffff0e8405f] | |
/home/gidden/work/xdress/tests/cppproj/install-gccxml/lib/python2.7/site-packages/cppproj/pybasics.so(_ZN7cppproj18SomeCrazyPairValueD1Ev+0x18)[0x7fffef57807e] | |
/home/gidden/work/xdress/tests/cppproj/install-gccxml/lib/python2.7/site-packages/cppproj/pybasics.so(_ZNSt4pairIiN7cppproj18SomeCrazyPairValueEED1Ev+0x1c)[0x7fffef57809c] | |
/home/gidden/work/xdress/tests/cppproj/install-gccxml/lib/python2.7/site-packages/cppproj/pybasics.so(_ZN7cppproj7TClass2IfED1Ev+0x2d)[0x7fffef579265] | |
/lib/x86_64-linux-gnu/libc.so.6(+0x3c071)[0x7ffff7831071] | |
/lib/x86_64-linux-gnu/libc.so.6(+0x3c0f5)[0x7ffff78310f5] | |
/usr/bin/python[0x4189b9] |
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 is a "normal" job. | |
universe = vanilla | |
# If any information about this submission is written | |
# as output to standard output or standard error, | |
# where should it be saved? | |
output = process.out | |
error = process.err | |
# Where to write a log of your jobs' statuses. |
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 numpy as np | |
import tables as t | |
import uuid | |
id = uuid.uuid4() | |
h5file = t.open_file(".tmp{0}".format(id), mode='w',) | |
dtype = np.dtype([('id', (np.void, 16))]) | |
h5file.create_table(h5file.root, "hi", dtype) |
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
UUID with max number of arc: 8200a48be1384daaa150177f1a57fbc9 (189540 arcs) | |
Coin0506I Presolve 10664 (-10486) rows, 104064 (-85566) columns and 301482 (-455148) elements | |
Clp0006I 0 Obj 0 Primal inf 5459.3801 (90) | |
Clp0006I 278 Obj 3546.3574 Primal inf 1115.8705 (395) | |
Clp0006I 556 Obj 3547.8921 Primal inf 639.72194 (242) | |
Clp0006I 834 Obj 3549.2624 Primal inf 122.41827 (63) | |
Clp0006I 888 Obj 3549.3124 | |
Clp0000I Optimal - objective value 3549.3124 | |
Coin0511I After Postsolve, objective 3549.3124, infeasibilities - dual 1.1480397 (155), primal 0 (0) |
OlderNewer