This is an OpenPGP proof that connects my OpenPGP key to this Github account. For details check out https://keyoxide.org/guides/openpgp-proofs
[Verifying my OpenPGP key: openpgp4fpr:82E707B0D7283273CB9D53969596671D5E50863D]
# -*- coding: utf-8 -*- | |
import scrapy | |
import datetime | |
import json | |
from TwitterScraper.items import Tweet | |
from urllib.parse import quote | |
from bs4 import BeautifulSoup | |
from scrapy.http import HtmlResponse | |
from dateutil.parser import parse |
This is an OpenPGP proof that connects my OpenPGP key to this Github account. For details check out https://keyoxide.org/guides/openpgp-proofs
[Verifying my OpenPGP key: openpgp4fpr:82E707B0D7283273CB9D53969596671D5E50863D]
\documentclass{minimal} % Default font size and paper size | |
\usepackage{fontspec} % For loading fonts | |
\setmainfont[RawFeature={-calt}, Renderer=Harfbuzz]{PragmataPro Liga}[ | |
UprightFont={*Regular}, | |
ItalicFont={*Italic}, | |
BoldFont={*Bold}, | |
BoldItalicFont={*Bold Italic}, | |
] |
using DiffEqFlux | |
using Zygote | |
nn = FastChain((x,p) -> p) | |
p = rand(2, 2) | |
x = rand(1, 100) | |
function f(p) | |
gz, back = Zygote.pullback(z -> nn(z, p), x) | |
back(gz)[1] |
julia> CuArrays.zeros(128, 32) |> nn | |
┌ Warning: calls to Base intrinsics might be GPU incompatible | |
│ exception = | |
│ You called exp(x::T) where T<:Union{Float32, Float64} in Base.Math at special/exp.jl:75, maybe you intended to call exp(x::Float32) in CUDAnative at /home/guillaume/.julia/packages/CUDAnative/hfulr/src/device/cuda/math.jl:101 instead? | |
│ Stacktrace: | |
│ [1] exp at special/exp.jl:75 | |
│ [2] mish at /home/guillaume/.julia/packages/NNlib/FAI3o/src/activation.jl:206 | |
│ [3] #25 at /home/guillaume/.julia/packages/GPUArrays/1wgPO/src/broadcast.jl:49 | |
└ @ CUDAnative ~/.julia/packages/CUDAnative/hfulr/src/compiler/irgen.jl:111 | |
┌ Warning: calls to Base intrinsics might be GPU incompatible |
#!/usr/bin/env python3 | |
import collections | |
import copy | |
import datetime | |
import functools | |
import itertools | |
import json | |
import lzma | |
import gzip |
g <- function(Z) { | |
prix <- apply(grid,2,cumsum) | |
prix <- grid | |
for (i in 1:n) { | |
prix[i,] <- S0*exp(sigma*prix[i,]+(r-sigma^2/2)*i/n*Time) | |
} | |
prix <- colMeans(prix) - K | |
prix[prix<0] <- 0 | |
return(prix) | |
} |
#include <Rcpp.h> | |
using namespace Rcpp; | |
// [[Rcpp::export]] | |
NumericVector g(NumericMatrix x) { | |
double sigma = 0.25; | |
double S0 = 1; | |
double Time = 1; | |
double r = 0; | |
double K = 1; |
f <- function(s) { | |
exp_barre <- mean(exp(-vector_clean/s)) | |
x_barre <- mean(vector_clean) | |
resul = 1 + log(1/exp_barre) - x_barre/s + 1/exp_barre*mean(exp(-vector_clean/s)*(vector_clean/s-log(1/exp_barre))) | |
return(resul) | |
} | |
uniroot(f,interval=c(10^3, 10^4)) |
\documentclass{article}\usepackage{graphicx, color} | |
%% maxwidth is the original width if it is less than linewidth | |
%% otherwise use linewidth (to make sure the graphics do not exceed the margin) | |
\makeatletter | |
\def\maxwidth{ % | |
\ifdim\Gin@nat@width>\linewidth | |
\linewidth | |
\else | |
\Gin@nat@width | |
\fi |