This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#local ip is 10.10.10.11 | |
#PLC ip is 10.10.10.10 | |
#route setup on PLC's ADS router AmsNetID 10.10.10.11.1.1 and IP 10.10.10.11 | |
import gi, shutil, os | |
import pyads | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk, GObject, Gdk | |
def setup_ads(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.interpolate import interp1d | |
import numpy as np | |
old_time = np.linspace(0, 10, num=11, endpoint=True) | |
old_vals = np.sin(old_time) | |
f = interp1d(old_time, old_vals) | |
f2 = interp1d(old_time, old_vals, kind='cubic') | |
new_time = np.linspace(0, 10, num=1000, endpoint=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time, struct | |
import numpy as np | |
import matplotlib.pyplot as plt | |
path = 'E:/big_ass.rdd' | |
ptr = 0 | |
np_ptr = 0 | |
buff = np.zeros([2,2000000], np.float64) | |
t = time.time() | |
with open(path, 'rb') as f: |
NewerOlder