Skip to content

Instantly share code, notes, and snippets.

View jagaudin's full-sized avatar

Jacques Gaudin jagaudin

View GitHub Profile
import clr
rsa_lib_path = (
r'C:\Program Files\Autodesk\Robot Structural Analysis Professional 2023'
r'\Exe\Interop.RobotOM.dll'
)
clr.AddReference(rsa_lib_path)
clr.setPreload(True) # Preloading the namespace
@jagaudin
jagaudin / getmeminfo.py
Last active April 17, 2020 18:56
Get mem info
import platform
from subprocess import check_output, PIPE, CalledProcessError
# Linux man page for `/proc`:
# http://man7.org/linux/man-pages/man5/proc.5.html
# Windows documentation for `wmic OS`:
# https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/cim-operatingsystem
# MacOS man page for `sysctl`:
import matplotlib.pyplot as plt
from scipy import interpolate
from scipy.optimize import curve_fit
import numpy as np
def func(r, kb, b0):
return kb * (r - b0)**2
# This function generates total functions for a given number of objects
def total_factory(n):