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
using FunctionWrappers: FunctionWrapper | |
using BenchmarkTools | |
timevec = collect(0.0:1.0:1000); | |
params = [1.0, 1.0] | |
paramstupled = ([1.0, 1.0],) | |
paramsNT = (a = 1.0, b = 1.0,) | |
function G_Unpack_Single(tsing, params) | |
a, b, = params |
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
using MittagLeffler | |
using SpecialFunctions | |
using FunctionWrappers: FunctionWrapper | |
using QuadGK | |
using BenchmarkTools | |
timesingle = 0.5 | |
cₐ, a, cᵦ, β = (1.0, 1.0, 1.0, 0.0) | |
G(t) = cᵦ*t^(-β)*mittleff((a - β), (1 - β), -cᵦ*t^(a - β)/cₐ) |
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
using MittagLeffler | |
using SpecialFunctions | |
using FunctionWrappers: FunctionWrapper | |
using QuadGK | |
timevec = collect(0.0:0.01:10.0); | |
cₐ, a, cᵦ, β = (1.0, 1.0, 1.0, 0.0); | |
# G(t) = cᵦ*t.^(-β).*mittleff.((a - β,), (1 - β,), -cᵦ*t.^(a - β)/cₐ); | |
# Gfw = FunctionWrapper{Vector{Float64}, Tuple{Vector{Float64}}}((t) -> G(t)) |
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
using RHEOS | |
dt = 0.01; | |
t = collect(0.0:dt:10.0); | |
# fm_model = Fract_Maxwell.Ga(t, [1.0, 1.0, 1.0, 0.0]); | |
# maxwell = Maxwell.Ga(t, [1.0, 1.0]); | |
# all(i -> isapprox(fm_model[i], maxwell[i]), eachindex(t)) |
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 <float.h> | |
int main(void) | |
{ | |
printf("%d\n", FLT_EVAL_METHOD); | |
return 0; | |
} |
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> | |
int main(void) | |
{ | |
float foo; | |
double bar; | |
foo = (float)((float)(7.0f/3.0f) - (float)(4.0f/3.0f) - 1.0f); | |
bar = (double)((double)(7.0/3.0) - (double)(4.0/3.0) - 1.0); |
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
.file "begin.c" | |
.def ___main; .scl 2; .type 32; .endef | |
.section .rdata,"dr" | |
LC2: | |
.ascii "\12M.E. for float: %e \12\12\0" | |
LC3: | |
.ascii "M.E. for double: %e \12\12\0" | |
.text | |
.globl _main | |
.def _main; .scl 2; .type 32; .endef |
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
.file "begin.c" | |
.text | |
.def _printf; .scl 3; .type 32; .endef | |
_printf: | |
LFB1: | |
.cfi_startproc | |
pushl %ebp | |
.cfi_def_cfa_offset 8 | |
.cfi_offset 5, -8 | |
movl %esp, %ebp |
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 datapoint as met | |
# api key | |
apikey = "Insert your api key here!" | |
# set lattitude and longitude of Cambridge UK | |
latitude, longitude = 52.2053, 0.1218 | |
# initialise connection and get forecast with hour time-steps | |
conn = met.connection(api_key = apikey) |
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
# using RHEOS; using PyPlot; using PyCall; @pyimport seaborn as sns; | |
# initialise seaborn package with correct parameters | |
pgf_with_latex = Dict("figure.figsize" => (10.5, 9.5), "mathtext.default" => "regular"); | |
sns.set(rc=pgf_with_latex) | |
sns.set_style("ticks") | |
# initialise time data | |
step_size = 1e-3 | |
t_len = 1.0 |
NewerOlder