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 | |
s=r"void LIBNOVA_EXPORT ln_get_equ_from_ecl (struct ln_lnlat_posn *object, double JD, struct ln_equ_posn *position)" | |
def parse_typed_name(x): | |
tokens = x.rsplit() | |
n = tokens.pop(-1) | |
t = " ".join(tokens) | |
return (t.strip(), n.strip()) |
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/sh | |
BODY='\00\00\00\01\00\00\00\00' | |
BODY64=$(echo -ne $BODY | base64) | |
S='{"properties":{},"routing_key":"test","payload":"'$BODY64'","payload_encoding":"base64"}' | |
echo $S | curl --data-binary @- -i -u guest:guest http://192.168.185.182:15672/api/exchanges/%2f/amq.default/publ ish -X POST |
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/Rscript | |
expectation <- function(y, params) { | |
pi <- params$pi | |
mu1 <- params$mu1 | |
mu2 <- params$mu2 | |
s1 <- params$s1 | |
s2 <- params$s2 | |
pi * dnorm(y, mean=mu2, sd=s2) / ((1-pi)*dnorm(y, mean=mu1, sd=s1) + pi*dnorm(y, mean=mu2, sd=s2)) |
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 <tuple> | |
#include <iostream> | |
#include "types.h" | |
template <class T, T... n> | |
struct expand { | |
template <template <class T2, T...> class U> using type = U<T, n...>; | |
}; | |
template <class T, T S, T N> | |
struct range { |
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 <cassert> | |
#include <tuple> | |
#include <iostream> | |
#include "types.h" | |
using std::size_t; | |
// Basic typelist object | |
template<typename... TL> | |
struct TypeList{ |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
int main(int argc, char** argv) { | |
struct file_handle* handle; | |
int mnt_id; |
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 <boost/math/special_functions/spherical_harmonic.hpp> | |
#include <boost/math/special_functions/legendre.hpp> | |
#include <boost/math/constants/constants.hpp> | |
#include <cmath> | |
#include <iostream> | |
#include <type_traits> | |
#include <limits> | |
using namespace boost::math; |
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> | |
#include <cmath> | |
int main(int argc, char** argv) { | |
const size_t n = 10000000; | |
double phi = 0.5; | |
double cos1 = std::cos(phi); | |
double sin1 = std::sin(phi); | |
double cosi = cos1; |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <jpeglib.h> | |
unsigned char buf[3][64] = {{ | |
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | |
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, | |
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, | |
0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, |
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
a.out: main.cpp | |
g++ -O3 -DNDEBUG -DEIGEN_NO_DEBUG --std=c++11 main.cpp -o a.out -I/usr/include/eigen3 -I/home/matwey/lab/chelyabinsk/include -L/home/matwey/lab/chelyabinsk/build -lboost_random -lchelyabinsk |
OlderNewer