Skip to content

Instantly share code, notes, and snippets.

View j9ac9k's full-sized avatar

Ogi Moore j9ac9k

View GitHub Profile
@j9ac9k
j9ac9k / convert.py
Last active April 18, 2019 14:52
Python Script to Convert ITerm XML color config files to Putty color registry files
import xml.etree.ElementTree as ET
import sys
try:
input_file = sys.argv[1]
tree = ET.parse(input_file)
except:
raise 'Provide xml filename to convert'
root = tree.getroot()
@j9ac9k
j9ac9k / gauss.py
Last active July 9, 2023 01:52
Gaussian Elimination in Python
def gauss(A):
m = len(A)
assert all([len(row) == m + 1 for row in A[1:]]), "Matrix rows have non-uniform length"
n = m + 1
for k in range(m):
pivots = [abs(A[i][k]) for i in range(k, m)]
i_max = pivots.index(max(pivots)) + k
# Check for singular matrix
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
@j9ac9k
j9ac9k / presentation.ipynb
Created June 18, 2017 22:38
ML Presentation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@j9ac9k
j9ac9k / tikz.py
Created October 21, 2017 03:12
tikz pandoc-filter
#!/usr/bin/env python
"""
Pandoc filter to process raw latex tikz environments into images.
Assumes that pdflatex is in the path, and that the standalone
package is available. Also assumes that ImageMagick's convert
is in the path. Images are put in the tikz-images directory.
"""
import os
@j9ac9k
j9ac9k / graphviz.py
Created October 21, 2017 03:14
graphviz pandoc filter
#!/usr/bin/env python
"""
Pandoc filter to process code blocks with class "graphviz" into
graphviz-generated images.
Needs pygraphviz
"""
import os
@j9ac9k
j9ac9k / gitlab_markdown_math_filter.py
Created October 22, 2017 02:56
pandoc filter to convert gitlab flavor markdown math to pandoc compatible markdown
from pandocfilters import toJSONFilter, Math, Para
"""
Pandoc filter to convert gitlab flavored markdown to pandoc flavored markdown
"""
def gitlab_markdown(key, value, format, meta):
if key == "CodeBlock":
[[identification, classes, keyvals], code] = value
if classes[0] == "math":
@j9ac9k
j9ac9k / project_ideas.md
Created May 16, 2018 03:03
Running list of projects I would like to tackle at some point

Mechanical Engineering Related

  • Truss structure mode of vibration calculator and visualizer
    • Should take inputs definiting structure geometry and material properties, should animate the associated mode of vibration

Eve Online Related

  • Coalition grouping in killmails
  • Safe route generation
@j9ac9k
j9ac9k / vibration_example.ipynb
Last active May 24, 2018 04:24
Notebook showing how to calculate the modal vibration of a structure
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
tap 'homebrew/fuse'
tap 'homebrew/dupes'
tap 'homebrew/cask'
tap 'homebrew/cask-fonts'
tap 'homebrew/cask-versions'
tap 'homebrew/cask-drivers'
cask_args appdir: '/Applications'
brew 'ack'