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
Undefined symbols for architecture x86_64: | |
"boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > >::maybe_assign(boost::match_results<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > const&)", referenced from: | |
boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, boost::regex_traits<char, boost::cpp_regex_traits<ch |
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
import theano | |
import theano.tensor as T | |
EPS=1E-10 | |
x=T.dscalar('x') | |
y=(x-3)**2 - T.log(x) | |
dy = T.grad(y,x) | |
ddy = T.grad(dy,x) |
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
#include <stdio.h> | |
#include <string.h> | |
#include <assert.h> | |
int start_with(char const *str, char const *prefix){ | |
if (strlen(str) < strlen(prefix)) | |
return 0; | |
return strstr(str, prefix) == 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
#include <iostream> | |
#include <vector> | |
#include <string> | |
template<typename T, typename Container = std::vector<T>> | |
class ChainContainer : public Container { | |
struct chain{ | |
chain(ChainContainer& c): container(c){} | |
chain& operator()(T val){ |
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
#include <iostream> | |
#include <functional> | |
#include <vector> | |
template<typename Func, | |
typename TIContainer, typename TIValue = typename TIContainer::value_type, | |
typename TOValue = decltype(std::declval<Func>()(std::declval<TIValue>())), | |
typename TOContainer=std::vector<TOValue>> | |
TOContainer map(Func f, TIContainer cont){ | |
TOContainer retval; |
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
app = angular.module 'hoge' | |
app.directive 'json', -> | |
{ | |
require: 'ngModel' | |
link: (scope, elm, attr, ctrl) -> | |
ctrl.$parsers.push (value) -> | |
try | |
parsed = angular.fromJson(value) | |
isValid = true |
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
import numpy as np | |
t = np.arange(-np.pi, np.pi, 0.01) | |
_X = [np.array([1]*t.shape[0])] | |
for n in range(1, 51): | |
_X.append(np.sin(n*t)) | |
_X.append(np.cos(n*t)) | |
X = np.array(_X).T |
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
(define (uniq lst) | |
(define (uniq-detail head tail) | |
(cond | |
((null? tail) (list head)) | |
((eq? head (car tail)) (uniq-detail head (cdr tail))) | |
(else (cons head (uniq-detail (car tail) (cdr tail)))))) | |
(cond | |
((null? lst) '()) | |
(else (uniq-detail (car lst) (cdr lst))))) |
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
#include <iostream> | |
#include <fstream> | |
#include <utility> | |
#include <cstdlib> | |
#include <vector> | |
int main(int argc, char const* argv[]) | |
{ | |
using namespace std; | |
if (argc != 4){ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.