Skip to content

Instantly share code, notes, and snippets.

Avatar

Max G jgoldfar

View GitHub Profile
@jgoldfar
jgoldfar / mandelbrot.py
Created Mar 10, 2022
Simple Mandelbrot Generator in Python
View mandelbrot.py
import math, cmath;
nsq=100;
ndiv=20;
dval=6;
size(20*cm,20*cm);
#fontsize(10)
for x,y in grid(nsq,nsq,math.floor(WIDTH/nsq),math.floor(HEIGHT/nsq)):
ctrz=complex(6*(x+(math.ceil(WIDTH/nsq)/2)-(WIDTH/2))/(WIDTH),6*(y+(math.ceil(HEIGHT/nsq)/2)-(HEIGHT/2))/(HEIGHT));
tmp=complex(0,0);
@jgoldfar
jgoldfar / hashtable.py
Created Jun 24, 2021
Python Hash Table
View hashtable.py
class HashTable:
"""Create a hash map backed by a Python list"""
store = []
number_elements = 0
def __init__(self, n: int = 1):
"""
Create storage for a HashTable with `n` entries.
"""
if n > 0:
@jgoldfar
jgoldfar / app.py
Created Jun 2, 2021
Python Flask CRUD Application Boilerplate
View app.py
import flask
from flask import request, jsonify
app = Flask(__name__)
app.config["DEBUG"] = True
@app.route('/', methods=['GET'])
def home():
return '''<h1>CRUD Backend</h1><p>A prototype API.</p> '''
View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@jgoldfar
jgoldfar / qlopt-make-tests
Last active Jan 20, 2019
Output from `make tests` with compiled robypoteau/qlopt source code
View qlopt-make-tests
/home/jgoldfar/Documents/research/paramid/qlopt/bin/lotkaVolterraWithType2RegsExample; /home/jgoldfar/Documents/research/paramid/qlopt/bin/lotkaVolterraExample; /home/jgoldfar/Documents/research/paramid/qlopt/bin/ThreeStepMetabolicNetworkExample;
lt = 101
u = 10 50 120
iteration = 1
OdeInt Time: 9952 ms
alpha = 5e-05
View qrupdate-1.1.2_Makeconf.patch
--- Makeconf.orig 2016-09-20 16:33:23.061756020 +0200
+++ Makeconf 2016-09-20 16:39:47.385547117 +0200
@@ -1,26 +1,26 @@
# set this to your compiler's executable name (e.g. gfortran, g77)
FC=gfortran
# requested flags
-FFLAGS=-fimplicit-none -O3 -funroll-loops
+FFLAGS=-fimplicit-none -march=native -O3 -funroll-loops -lgfortran
# set if you need shared library
FPICFLAGS=-fPIC
View octave-deps-Makefile
SHELL=/bin/bash
PWD=$(shell pwd)
export INSTALLDIR?=$(PWD)/../usr
SRCDEPS=fftw-3.3.7 \
glpk-4.65 \
pcre2-10.31 \
readline-8.0-alpha \
bison-3.0.4 \
curl-7.60.0 \
View ShowIssue.jl
module ShowIssue
mutable struct PtrWrapper
ptr
end
function Base.show(io::IO, v::PtrWrapper)
redirect_stdout(()->nothing, io)
end
end
@jgoldfar
jgoldfar / ODE.ipynb
Created Feb 26, 2017
ODE Build Error
View ODE.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View init.lua
-------------------------------------------------------------------
--Hammerspoon config to replace Cinch & Size-up (Microsoft Windows style) window management for free
--By Jayden Pearse (spartanatreyu)
--Sort of messy, forgive me. Never scripted in lua before
-------------------------------------------------------------------
-------------------------------------------------------------------
--Options, feel free to edit these
-------------------------------------------------------------------