Skip to content

Instantly share code, notes, and snippets.

View yudhastyawan's full-sized avatar
💭
Computational Geophysics

Yudha Styawan yudhastyawan

💭
Computational Geophysics
View GitHub Profile
@yudhastyawan
yudhastyawan / multiplexml2sacpz.py
Last active August 12, 2021 05:24
convert xml data to polezeros using obspy
import os
import glob
import shutil
from obspy import read_inventory
xmlFiles = glob.glob("./*.xml")
for xmlFile in xmlFiles:
print(xmlFile)
inventory = read_inventory(xmlFile)
@yudhastyawan
yudhastyawan / c_penjumlahan.f90
Created May 24, 2021 12:49
embed Fortran in Python using Cython
module penjumlahan_interface
use iso_c_binding, only: c_double
use penjumlahan_module, only: penjumlahan
implicit none
contains
subroutine c_penjumlahan(a, b, c) bind(c)
real(c_double), intent(in) :: a, b
real(c_double), intent(out) :: c
call penjumlahan(a, b, c)
@yudhastyawan
yudhastyawan / file.pro
Last active September 13, 2021 09:11
Embedded matplotlib inside Qt5 C++
######################################################################
# Automatically generated by qmake (3.1) Mon Sep 13 15:29:11 2021
######################################################################
TEMPLATE = app
TARGET = embedded
INCLUDEPATH += .
INCLUDEPATH += /home/yudha/Miniconda/envs/pyqt5/include/python3.9
# The following define makes your compiler warn you if you use any