Skip to content

Instantly share code, notes, and snippets.

View pnavaro's full-sized avatar

Pierre Navaro pnavaro

View GitHub Profile
@ogrisel
ogrisel / bench_blas_lapack.py
Created January 31, 2021 23:28
Running some benchmark of BLAS level 3 and LAPACK on Apple M1
import numpy as np
try:
import tensorflow as tf
except ImportError:
tf = None
from time import perf_counter
def timeit(func, *args, **kwargs):
durations = []
@fkguo
fkguo / fortran-julia.jl
Last active October 18, 2022 08:15 — forked from rafaqz/fortran-julia.jl
Fortran-Julia conversion script
#=
This julia script converts fortran 90 code into julia.
It uses naive regex replacements to do as much as possible,
but the output WILL need further cleanup.
Known conversion problems such as GOTO are commented and marked with FIXME
Most variable declaration lines are entirely deleted, which may or
may not be useful.
using Images
import Base.Threads: @threads, @spawn
function escapetime(z; maxiter=80)
c = z
for n = 1:maxiter
if abs(z) > 2
return n-1
end
z = z^2 + c
@mroavi
mroavi / particle-system.jl
Last active February 6, 2022 15:25
A simple particle system animation in Julia.
using Plots, Distributions
theme(:juno) # sets theme and resets all attributes of the Plots package
gr(
xlims=[-10,10],
ylims=[-10,10],
aspect_ratio=:equal,
framestyle=:grid,
fillalpha=0.3,
leg=false,
size=(1200,800),
@theogf
theogf / sinkhorn.jl
Created May 9, 2020 20:12
Implementation of the sinkhorn algorithm
using Makie
using MakieLayout
using LinearAlgebra, Distances
using Distributions
α = MixtureModel([Normal(0.2, 0.05), Normal(0.6, 0.06), Normal(0.8, 0.04)], [0.3, 0.5, 0.2])
# β = Normal(0.3, 0.09)
β = Laplace(0.5, 0.1)
@fperez
fperez / README.md
Last active July 1, 2021 04:43
Polyglot Data Science with IPython

Polyglot Data Science with IPython & friends

Author: Fernando Pérez.

A demonstration of how to use Python, Julia, Fortran and R cooperatively to analyze data, in the same process.

This is supported by the IPython kernel and a few extensions that take advantage of IPython's magic system to provide low-level integration between Python and other languages.

See the companion notebook for data preparation and setup.

@rafaeltuelho
rafaeltuelho / openshift-cheatsheet.md
Last active July 17, 2024 08:33
My Openshift Cheatsheet

My Openshift Cheatsheet

Project Quotes, Limits and Templates

  • Cluster Quota
oc create clusterquota env-qa \
    --project-label-selector environment=qa \
    --hard pods=10,services=5
    
oc create clusterquota user-qa \
@agramfort
agramfort / lowess.py
Last active August 16, 2023 06:19
LOWESS : Locally weighted regression
"""
This module implements the Lowess function for nonparametric regression.
Functions:
lowess Fit a smooth nonparametric regression curve to a scatterplot.
For more information, see
William S. Cleveland: "Robust locally weighted regression and smoothing
scatterplots", Journal of the American Statistical Association, December 1979,