Skip to content

Instantly share code, notes, and snippets.

View knedlsepp's full-sized avatar
🍍
🖋️

Josef Kemetmüller knedlsepp

🍍
🖋️
View GitHub Profile
@knedlsepp
knedlsepp / CUDA deadlock reproducing testcase
Created February 15, 2019 15:05 — forked from 0xee/ CUDA deadlock reproducing testcase
CUDA deadlock reproducing testcase
-
[ 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
[ 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] 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
--- 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
{ config, pkgs, ... }:
{
users.users."sepp" = {
isNormalUser = true;
initialPassword = "";
extraGroups = [ "wheel" "networkmanager" "input" ];
};
networking.hostName = "flakephone";
networking.wireless = {
@knedlsepp
knedlsepp / default.nix
Last active April 25, 2020 21:44
Playing our with asyncpg and the hydra build server
let
pkgs = import <nixpkgs> {};
python = pkgs.python3;
sqlacodegen = python.pkgs.buildPythonApplication rec {
pname = "sqlacodegen";
version = "2.1.0";
src = python.pkgs.fetchPypi {
inherit pname version;
sha256 = "0z0hh7lcfhw5n0zjn1v1anmkfkidalsa4d9xakcqvkixdkimiqpa";
};
@knedlsepp
knedlsepp / CMakeLists.txt
Last active April 18, 2020 13:12
hdf5-fortran-nix
cmake_minimum_required(VERSION 3.5)
project(test-hdf5 C Fortran)
find_package(HDF5 REQUIRED COMPONENTS Fortran)
add_library(hdf5::hdf5 INTERFACE IMPORTED)
set_property(TARGET hdf5::hdf5 PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${HDF5_Fortran_INCLUDE_DIRS})
set_property(TARGET hdf5::hdf5 PROPERTY
INTERFACE_LINK_LIBRARIES ${HDF5_Fortran_LIBRARIES} ${HDF5_Fortran_HL_LIBRARIES})
add_executable(test test.f95)
target_link_libraries(test hdf5::hdf5)
@knedlsepp
knedlsepp / default.nix
Last active November 18, 2022 23:41
custom unixodbc
let
pkgs = import <nixpkgs> {};
unixODBC-cache = pkgs.stdenv.mkDerivation {
name = "unixODBC-cache";
src = pkgs.fetchurl {
url = "ftp://ftp.intersystems.com/pub/cache/odbc/2014/cache.2014.1.3.ODBC-lnxrhx64.tar.gz";
sha256 = "0rgmpac45q126capd32gyhxk0pjjyg9kad5gqs9k0iyj022csxl8";
};
sourceRoot = "bin";
installPhase = ''
@knedlsepp
knedlsepp / CMakeLists.txt
Last active June 19, 2020 11:30
cmake-transitive-linking
cmake_minimum_required(VERSION 3.14)
project(asdf LANGUAGES CXX)
find_package(Boost REQUIRED COMPONENTS thread)
add_library(low SHARED low.cpp)
target_link_libraries(low PRIVATE Boost::thread)