Skip to content

Instantly share code, notes, and snippets.

View Sean1708's full-sized avatar

Sean Marshallsay Sean1708

View GitHub Profile
@Sean1708
Sean1708 / debug.log
Created May 28, 2023 17:52
Sonarr Debug Logs - Non-Writeable
2023-05-28 18:43:20.6|Debug|Api|[GET] /api/v3/health: 200.OK (1 ms)
2023-05-28 18:43:20.7|Debug|Api|[GET] /api/v3/health: 200.OK (1 ms)
2023-05-28 18:43:22.2|Debug|Api|[GET] /api/v3/config/naming: 200.OK (4 ms)
2023-05-28 18:43:22.2|Debug|Api|[GET] /api/v3/config/mediamanagement: 200.OK (4 ms)
2023-05-28 18:43:22.2|Debug|RootFolderService|Generating list of unmapped folders
2023-05-28 18:43:22.2|Debug|Parser|Parsing string 'S01E01 - The Series Title! - Episode Title (1) HDTV-720p Proper'
2023-05-28 18:43:22.2|Debug|RootFolderService|0 unmapped folders detected.
2023-05-28 18:43:22.2|Debug|Parser|Episode Parsed. - S01E01
2023-05-28 18:43:22.2|Debug|Api|[GET] /api/v3/rootFolder: 200.OK (27 ms)
2023-05-28 18:43:22.2|Debug|Parser|Language parsed: English
@Sean1708
Sean1708 / Benchmark.java
Last active June 22, 2021 14:12
Loops vs Logarithms
import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
import java.util.Arrays;
import java.util.Random;
public class Benchmark {
// From: https://programming.guide/worlds-most-copied-so-snippet.html
public static strictfp String humanReadableByteCountNoLoop(long bytes) {
int unit = 1000;
long absBytes = bytes == Long.MIN_VALUE ? Long.MAX_VALUE : Math.abs(bytes);
#!/usr/bin/env julia
import Markdown
import Statistics
const OPENBLAS_URL = "https://github.com/xianyi/OpenBLAS/archive/v0.2.20.tar.gz"
struct Argument
type::Symbol
@Sean1708
Sean1708 / dictserialize.jl
Created December 10, 2014 15:29
Dict serialization.
a = Matrix{Float64}[[1 2; 3 4], [11 22; 33 44]]
b = Matrix{Float64}[[9 8; 7 6], [99 88; 77 66]]
d = Dict("a" => a, "b" => b)
println(typeof(d))
open("test.bin", "w") do f
serialize(f, d)
end
newd = deserialize(open("test.bin"))
@Sean1708
Sean1708 / nbody optimised
Created November 16, 2014 14:56
Naive optimisation of N-body code
const solMass = 4 * pi^2
# you had the right idea marking solMass as constant but you missed daysPYear
const daysPYear = 365.24
type nby
x::Float64
y::Float64
z::Float64
vx::Float64
vy::Float64