I hereby claim:
- I am tehrengruber on github.
- I am tehrengruber (https://keybase.io/tehrengruber) on keybase.
- I have a public key whose fingerprint is 675A 2D63 6334 66F9 E5E6 BDD1 D07E 4BB3 AF4C 76E3
To claim this, I am signing this object:
template<typename T, typename Arch, typename DomainDescriptor, typename Order> | |
void export(py::class_<gridtools::ghex::structured::regular::field_descriptor<T, Arch, DomainDescriptor, Order>>> cls) { | |
// add bindings to cls | |
// ... | |
} | |
using orders = gridtools::meta::list<int_tuple_constant<0, 1, 2>, int_tuple_constant<2, 1, 0>>; | |
GHEX_PYBIND11_EXPORT_TYPE(gridtools::ghex::structured::regular::field_descriptor, | |
ghex4py::type_list::architecture_types, |
immutable Bla{A} | |
end | |
a() = Bla{3*2} | |
@code_warntype a() |
# given some code | |
code = """ | |
for(int i=0; i<10; ++i) { | |
a=2 | |
} | |
""" | |
# turn code into an array of tokens | |
# write a function tokenize(code) using https://www.lysator.liu.se/c/ANSI-C-grammar-y.html | |
# and https://github.com/iamed2/PyLexYacc.jl that allows you to do this |
/** | |
* Functor behaving like an unset function pointer (nullptr) with | |
* arbitrary number of arguments. | |
* | |
* Usage: | |
* ``` | |
* #include "Utils/void_cb.hpp" | |
* | |
* template <typename CB=void_cb> | |
* void f(CB callback=nullptr) { |
I hereby claim:
To claim this, I am signing this object:
julia> c=b.args[2]^C | |
julia> c = Condition() | |
@Condition(Any[]) | |
julia> @as^C | |
julia> @async begin | |
wait(c) | |
println("im notifyed") |
A=rand(20) | |
[A[ceil(step*i)+1:floor(step*(i+1)-0.1)+1] for i=0:parts-1, step=length(A)/parts] |
#include <type_traits> | |
#include <dune/common/fvector.hh> | |
#include <dune/common/fmatrix.hh> | |
#include <Eigen/Dense> | |
namespace NPDE15 { | |
template <class T1, class T2, class Enable = void> | |
struct Convert{}; | |
/* |
# open a subtitle file (typically srt format) from src, shift the time by Δt and write it to dest | |
Δt = Dates.Second(0) | |
src = "" | |
dest = "" | |
subs = readall(src); | |
new_subs = replace(subs, r"(\d+):(\d+):(\d+),(\d+)", | |
(match) -> begin | |
time_point = DateTime(match, "H:M:S,s")-Δt | |
@sprintf "%02d:%02d:%02d,%03d" Dates.hour(time_point) Dates.minute(time_point) Dates.second(time_point) Dates.millisecond(time_point) |