Skip to content

Instantly share code, notes, and snippets.

View knedlsepp's full-sized avatar
🍍
🖋️

Josef Kemetmüller knedlsepp

🍍
🖋️
View GitHub Profile
--- a/quantities/dimensionality.py
+++ b/quantities/dimensionality.py
@@ -329,6 +329,11 @@ p_dict[np.floor] = _d_copy
p_dict[np.fix] = _d_copy
p_dict[np.ceil] = _d_copy
+def _d_clip(a1, a2, a3, q):
+ return q.dimensionality
+
+p_dict[np.core.umath.clip] = _d_clip
[ 0.000000] Linux version 5.1.18 (nixbld@localhost) (gcc version 7.4.0 (GCC)) #1-NixOS SMP Sun Jul 14 06:09:53 UTC 2019
[ 0.000000] Command line: BOOT_IMAGE=(hd0,msdos1)/nix/store/aljm2hqggrzsh7w85vkqjhj9cjbzy9yx-linux-5.1.18/bzImage systemConfig=/nix/store/418v1pxx525bcs15d046b8v1szlipyx9-nixos-system-pixie-19.03.173104.a6598a6c865 init=/nix/store/418v1pxx525bcs15d046b8v1szlipyx9-nixos-system-pixie-19.03.173104.a6598a6c865/init acpi_backlight=vendor loglevel=4
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: xstate_offset[3]: 832, xstate_sizes[3]: 64
[ 0.000000] x86/fpu: xstate_offse
[ 0.000000] Linux version 5.2.0 (nixbld@localhost) (gcc version 7.4.0 (GCC)) #1-NixOS SMP Sun Jul 7 22:41:56 UTC 2019
[ 0.000000] Command line: BOOT_IMAGE=(hd0,msdos1)/nix/store/c7wbpbmfnf5639kw6ifixdrxf622dr7b-linux-5.2/bzImage systemConfig=/nix/store/k7wchmmykqdblqa29wfxy8i67sf387b2-nixos-system-pixie-19.09pre185176.1036dc66416 init=/nix/store/k7wchmmykqdblqa29wfxy8i67sf387b2-nixos-system-pixie-19.09pre185176.1036dc66416/init acpi_backlight=vendor loglevel=4
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: xstate_offset[3]: 832, xstate_sizes[3]: 64
[ 0.000000] x86/fpu: xstate_offset
[ 0.000000] microcode: microcode updated early to revision 0xcc, date = 2019-04-01
[ 0.000000] Linux version 5.1.3 (nixbld@localhost) (gcc version 7.4.0 (GCC)) #1-NixOS SMP Thu May 16 17:35:40 UTC 2019
[ 0.000000] Command line: initrd=\efi\nixos\q9z2smhldciysn4rgqz9vlyklfsvrlfx-initrd-initrd.efi systemConfig=/nix/store/f603c3bm4hf32ajd8pp5x8pljjial6d7-nixos-system-flakebook-19.03.172655.705986f5a98 init=/nix/store/f603c3bm4hf32ajd8pp5x8pljjial6d7-nixos-system-flakebook-19.03.172655.705986f5a98/init acpi_backlight=vendor splash loglevel=4
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: x
@knedlsepp
knedlsepp / CUDA deadlock reproducing testcase
Created February 15, 2019 15:05 — forked from 0xee/ CUDA deadlock reproducing testcase
CUDA deadlock reproducing testcase
-
@knedlsepp
knedlsepp / default.nix
Created September 5, 2018 22:38
example-nixpkgs-based-docker-image
# Examples taken from:
# https://github.com/NixOS/nixpkgs/blob/c58b11d229f63a85ee1d05fc9940a20fa2b73975/pkgs/build-support/docker/examples.nix
# Usage:
# $ nix-build -A redis
# $ docker load < result
{ nixpkgs ? (builtins.fetchGit {
url = git://github.com/NixOS/nixpkgs-channels;
ref = "nixos-18.09";
rev = "c58b11d229f63a85ee1d05fc9940a20fa2b73975";
})
@knedlsepp
knedlsepp / .profile
Created February 5, 2018 01:09 — forked from jahio/.profile
Some useful aliases for installing and working with NixOS
#!/usr/bin/env $SHELL
alias lsblk="lsblk -o MODEL,VENDOR,NAME,LABEL,SIZE,MOUNTPOINT,FSTYPE"
alias gramps="nix-env -p /nix/var/nix/profiles/system --list-generations"
alias nixos-rebuild="nixos-rebuild -j 6 --cores 8"
#
# -j is how many "jobs" or simultaneous computational processes run in tandem
# --cores is how many CPU cores you want to use
# How do you get these values? `cat /proc/cpuinfo` and look at the number of
# returned "CPUs". They're zero indexed, so if you get the last one as object
# number seven (7), you have 8 cores.
{nixpkgs, ngsolveSrc}:
rec {
build = with import <nixpkgs> { };
releaseTools.nixBuild {
name = "ngsolve";
src = ngsolveSrc;
doCheck = true;
preConfigure = ''
echo "Prevent ngsolve from downloading catch manually"
substituteInPlace CMakeLists.txt \
@knedlsepp
knedlsepp / default.nix
Last active November 19, 2017 09:46
nix: Composing overlays
let
lib = (import <nixpkgs> { overlays = []; }).lib;
composeOverlays = lib.foldl' lib.composeExtensions (self: super: {});
in
composeOverlays [(import ./overlay1.nix)
(import ./overlay2.nix)
(self: super: {package30 = self.htop; })
]
@knedlsepp
knedlsepp / README.md
Created December 5, 2016 20:50 — forked from mbbx6spp/README.md
How to install Nix in your home directory

Nix

Prerequisites

  • wget is installed
  • tar is installed

Purpose

If you really don't want to install Nix under /nix (or you can't) then you can install Nix