Skip to content

Instantly share code, notes, and snippets.

@sharpTrick
sharpTrick / InterpolatedMandelbrot.jl
Created December 6, 2021 23:28
To create a smoothly interpolated Mandelbrot fractal: https://youtu.be/qmXgUyHy42g
module InterpolatedMandelbrot
using GLMakie
# function mandelbrot_func(z::ComplexF64, c::ComplexF64=0.0+0.0im)::ComplexF64
# z^2 + c
# end
const N = 32
function plot_dots!(fig, ax)
@sharpTrick
sharpTrick / ArrayGallopSearch.java
Last active April 19, 2018 00:16
Java Array Gallop Search
/*
* Copyright (c) 2018 Patrick Sharp
*
* 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 furnished to do so, subject to
* the following conditions:

Keybase proof

I hereby claim:

  • I am sharptrick on github.
  • I am sharptrick (https://keybase.io/sharptrick) on keybase.
  • I have a public key ASBjh7U5r6THbj2g3bavHz44M2IBQY_qdx3HLxyoFhz7Lwo

To claim this, I am signing this object:

@sharpTrick
sharpTrick / DataFrameTreeModel.py
Created August 26, 2017 01:22
Simple script demonstrating a custom Gtk.TreeModel wrapping a Pandas DataFrame for Gtk 3 (known as GenericTreeModel in PyGtk 2).
# I stole most of this from https://gist.github.com/andialbrecht/4463278
import gi
import pandas as pd
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GObject
class DataFrameTreeModel(GObject.GObject, Gtk.TreeModel, Gtk.TreeSortable):