This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getmxcsr() | |
Base.llvmcall("""%ptr = alloca i32 | |
call void @llvm.x86.sse.stmxcsr(i32 * %ptr) | |
%curval = load i32 * %ptr | |
ret i32 %curval""", UInt32, ()) | |
end | |
function setmxcsr(u::UInt32) | |
Base.llvmcall("""%ptr = alloca i32 | |
store i32 %0, i32 * %ptr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Handy script to allow surgery on MobileSheetsPro SQLite database | |
# from host computer via adb. This means you can use the full history | |
# and CLI features of a feature-complete modern shell, rather than | |
# the crippled crap which Android's "adb shell" gives you. | |
# | |
# Example: | |
# | |
# MSP-sqlite3.sh 'select * from Songs where Title like "%Foo%"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is a part of Julia. License is MIT: http://julialang.org/license | |
module BigFloats | |
export | |
FloatRef, | |
setprecision, | |
BigFlt, Flt, Flt128, Flt256, Flt512 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Compat | |
# Original C version at https://naml.us/post/inverse-of-a-hash-function/ | |
function inverse_hash(key::UInt64) | |
local tmp::UInt64 | |
# Invert key = key + (key << 31) | |
tmp = key-(key<<31) | |
key = key-(tmp<<31) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is machine-generated - editing it directly is not advised | |
[[AbstractFFTs]] | |
deps = ["Compat", "LinearAlgebra"] | |
git-tree-sha1 = "8d59c3b1463b5e0ad05a3698167f85fac90e184d" | |
uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" | |
version = "0.3.2" | |
[[AssetRegistry]] | |
deps = ["Distributed", "JSON", "Pidfile", "SHA", "Test"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file contains code taken from https://github.com/JuliaIntervals/IntervalSpecialFunctions.jl | |
# which is available under the following MIT license: | |
# > Copyright (c) 2018: David Sanders. | |
# > | |
# > Permission is hereby granted, free of charge, to any person obtaining a copy | |
# > of this software and associated documentation files (the "Software"), to deal | |
# > in the Software without restriction, including without limitation the rights | |
# > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# > copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BenchmarkTools, Random | |
Random.seed!(123) | |
BenchmarkTools.DEFAULT_PARAMETERS.time_tolerance = 1.0e-11 # may or may not matter | |
BenchmarkTools.DEFAULT_PARAMETERS.evals = 1 # important | |
#== | |
alternative implementation of square root. | |
#aproximation of the square root using the float representation as a trick | |
used in providing an initial value for calculations of square roots. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Makie | |
using Meshing | |
using GeometryTypes | |
using ColorSchemes | |
using FFTW | |
using LinearAlgebra | |
using Random | |
using Interpolations | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Some useful and/or interesting Julia macros. I haven't seen many | |
## examples online, so I hope this might be useful for people trying | |
## to understand macros. Caveat Emptor; I don't understand them that | |
## well myself. Additions and improvements are more than welcome. | |
## | |
## Everything here is available under the MIT license (see bottom of | |
## file) | |
## | |
## - Gray Calhoun (@grayclhn) 10/17/2014 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Source for math political compass klein bottle meme by @KimPLab on Twitter | |
## Tweet: https://twitter.com/KimPLab/status/1381621398636949511 | |
## Inspired by the math political compass torus meme by @jessebett | |
## https://twitter.com/jessebett/status/1379162611414138885 | |
## @jessebett source code notes: | |
## upcycled from torus knot fibration visualization: | |
## http://www.jessebett.com/TorusKnotFibration/torusknot.html | |
## Note: |
OlderNewer