Skip to content

Instantly share code, notes, and snippets.

@bjodah
bjodah / .gitignore
Last active September 15, 2023 18:50
count byte freqencies
a.out
zeros.bin
output.txt
@bjodah
bjodah / LICENSE.txt
Last active January 4, 2023 16:48
Jenkins-Traub from simbody converted into a class template for float/double/... specializations
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
@bjodah
bjodah / .gitignore
Created December 12, 2022 06:38 — forked from dhermes/.gitignore
Remez Algorithm for log(x)
*.pyc
*.aux
*.log
*.out
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bjodah
bjodah / gist:bf554c4eb6d75837c00b4ec01991da05
Last active April 11, 2022 11:48
Using emacs under windows
1. Install msys2 from msys2.org
2. run msys2.exe: pacman -Syu, restart, pacman -Su
3. run mingw64.exe: pamcan -S mingw-w64-x86_64-emacs
4. create C:\msys2_64\runemacs_patched_path.bat:
cmd /C "set PATH=C:\msys2_64\mingw64\bin;C:\msys2_64\usr\bin;%PATH% && C:\msys2_64\mingw64\bin\runemacs.exe --daemon"
5. Super-R shell:startup [RET]
6. Create shortcut to runemacs_patched_path.bat, call it e.g. "emacs-daemon"
7. Create a short-cut in Start menu:
C:\msys2_64\mingw64\bin\emacsclientw.exe -c -n -a "C:\msys2_64\mingw64\bin\runemacs.exe"
@bjodah
bjodah / main.py
Last active July 12, 2021 12:20
Annotating .py file with pxd for generating fast c-code. Needs Cython 0.19-dev, tested with both Python 2.7 and Python 3.3 Execute by running e.g.: bash run_python.sh bash run_cython_working.sh bash run_cython_not_working.sh
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Mandelbrot example using cython
"""
# stdlib imports
import time
@bjodah
bjodah / .gitignore
Last active July 1, 2021 17:35 — forked from jbboehr/qemu-my-ppc64.sh
qemu provisioned virtual host running ubuntu-ppc64
*.img
*.qcow2
cloud.txt
@bjodah
bjodah / .gitignore
Last active March 15, 2021 02:55
pass_pycallback
_myclib.cpp
_myclib.so
build/
cython_debug/
@bjodah
bjodah / CMakeLists.txt
Created November 5, 2020 19:39
cereal & symengine
cmake_minimum_required(VERSION 3.16.2)
enable_language(CXX)
project(serial)
find_package(SymEngine REQUIRED CONFIG PATH_SUFFIXES lib/cmake/symengine)
add_executable(serial3_syme serial3_syme.cpp)
target_link_libraries(serial3_syme ${SYMENGINE_LIBRARIES})
target_include_directories(serial3_syme PRIVATE ${SYMENGINE_INCLUDE_DIRS})
set_target_properties(serial3_syme PROPERTIES
CXX_STANDARD 17