Skip to content

Instantly share code, notes, and snippets.

View Edenhofer's full-sized avatar

Gordian Edenhofer Edenhofer

  • Munich, Germany
View GitHub Profile
@Edenhofer
Edenhofer / smap.py
Last active January 12, 2024 15:30
Stupid/sequential map
# Copyright(C) 2022-2023 Gordian Edenhofer
# SPDX-License-Identifier: GPL-2.0+ OR BSD-2-Clause
from functools import partial
import jax
from jax import lax
from jax import numpy as jnp
@Edenhofer
Edenhofer / eggholder_repro.py
Created March 16, 2023 18:31
JAX enteres an infinite loop for trust-ncg minimization
# %%
from functools import partial
from typing import NamedTuple, Optional, Tuple, Union
import jax
from jax import lax
from jax import numpy as jnp
N_RESET = 20
@Edenhofer
Edenhofer / gaussian_kde
Last active December 20, 2021 10:21
Re-Implementation of SciPy's gaussian_kde
#!/usr/bin/env python3
from functools import partial
from jax import vmap, jit
from jax import numpy as jnp
def _det(mat, n_dim=None):
import numpy as np
@Edenhofer
Edenhofer / interpolate.py
Last active August 19, 2023 13:13
Implementation of SciPy's RegularGridInterpolator in JAX
#!/usr/bin/env python3
from jax import numpy as jnp
import numpy as np
from scipy.interpolate import RegularGridInterpolator as _si_RegularGridInterpolator
class RegularGridInterpolator:
# Based on SciPy's implementation which in turn is originally based on an
# implementation by Johannes Buchner
@Edenhofer
Edenhofer / tlp-stat.log
Created May 26, 2017 07:44
tlp-stat full output
--- TLP 1.0 --------------------------------------------
+++ Configured Settings: /etc/default/tlp
TLP_ENABLE=1
TLP_DEFAULT_MODE=AC
TLP_PERSISTENT_DEFAULT=0
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=2
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60
@Edenhofer
Edenhofer / downgrade.sh
Last active June 23, 2018 15:30
downgrade.sh
#!/usr/bin/bash
#
# downgrade: downgrade packages using pacman's database and system log files
#
# Copyright (c) 2008 locci <carlocci_at_gmail_dot_com>
# Copyright (c) 2008-2016 Pacman Development Team <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@Edenhofer
Edenhofer / fix_compilation_errors_encountered_with_kernel_4.6.patch
Created July 26, 2016 13:26
mt7610u_sta-dkms-git: Fix compilation errors encountered with kernel 4.6
From 9738b5ebd677ec5fff3be4ba83e76488b66f076b Mon Sep 17 00:00:00 2001
From: Gordian Edenhofer <[email protected]>
Date: Tue, 26 Jul 2016 15:05:18 +0200
Subject: [PATCH] Fix compilation errors encountered with kernel 4.6
Inspired by Rene Ploetz's <[email protected]> patch for chenhaiq's repository.
Signed-off-by: Gordian Edenhofer <[email protected]>
---
chips/mt76x0.c | 2 +-