Skip to content

Instantly share code, notes, and snippets.

View jgoldfar's full-sized avatar

Max G jgoldfar

View GitHub Profile
@jgoldfar
jgoldfar / docker-compose.yml
Created March 18, 2024 03:34 — forked from rmoff/docker-compose.yml
Multi-node Kafka cluster (three brokers)
---
version: '3.8'
services:
zookeeper-1:
image: confluentinc/cp-zookeeper:5.5.1
ports:
- '32181:32181'
environment:
ZOOKEEPER_CLIENT_PORT: 32181
ZOOKEEPER_TICK_TIME: 2000
@jgoldfar
jgoldfar / mandelbrot.py
Created March 10, 2022 04:35
Simple Mandelbrot Generator in Python
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 June 24, 2021 19:47
Python Hash Table
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 June 2, 2021 23:57
Python Flask CRUD Application Boilerplate
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> '''
@jgoldfar
jgoldfar / keybase.md
Created May 22, 2019 18:28
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 January 20, 2019 17:17
Output from `make tests` with compiled robypoteau/qlopt source code
/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
--- 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
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 \
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 February 26, 2017 17:14
ODE Build Error
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.