Skip to content

Instantly share code, notes, and snippets.

View helo9's full-sized avatar
🐒

Jonathan Hahn helo9

🐒
View GitHub Profile
#!/usr/bin/env python
from gi.repository import Gtk
import sys
class GUI:
def __init__(self):
@helo9
helo9 / customtreemodel.py
Created January 27, 2016 00:07 — forked from andialbrecht/customtreemodel.py
Simple script demonstrating a custom Gtk.TreeModel for Gtk 3 (known as GenericTreeModel in PyGtk 2).
#!/usr/bin/env python3
# This script demonstrates a custom TreeModel (known as
# GenericTreeModel in PyGtk 2).
#
# Note: This script requires python-gi (pygobject) >= 3.4.
from gi.repository import GObject, Gtk
@helo9
helo9 / xfoil.py
Last active October 18, 2024 16:19
use python to run xfoil analysis
# -*- coding: utf-8 -*-
import os
import numpy as np
import subprocess as sp
import re
def polar(afile, re, *args,**kwargs):
"""calculate airfoil polar and load results
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# -*- coding: utf-8 -*-
"""
Spyder Editor
This is a temporary script file.
"""
import numpy as np
import pandas as pd
import glob, re
@helo9
helo9 / ctypes_bitfield_problem.ipynb
Created February 19, 2022 22:51
Problem with ctypes bitfield
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@helo9
helo9 / pcan_trace.py
Created August 15, 2024 09:47
Read Peak PCAN Traces in Python
import binascii
import re
def read_pcan_trace(trace_path: str):
with open(trace_path, "r") as candump:
c = 0
HEADER_LINES_COUNT = 14
regex = re.compile(