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
| def process_rpt(fname): | |
| with open(fname, 'rb') as f: | |
| lines = f.readlines() | |
| lines_cleaned = [] | |
| for line in lines: | |
| # Strip leading and trailing whitespace | |
| line_cleaned = line.lstrip().rstrip() | |
| # Ignore blank lines | |
| if len(line_cleaned): | |
| # Check if first element is a float |
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
| find ./*/* -type f -print0 | xargs -0 -I % mv % . |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 Crypto.Cipher import AES | |
| from Crypto import Random | |
| BS = 16 | |
| pad = lambda s: s + (BS - len(s) % BS) * chr(BS - len(s) % BS) | |
| unpad = lambda s : s[0:-ord(s[-1])] | |
| class AESCipher: | |
| def __init__( self, key ): | |
| """ |
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
| ## {{{ http://code.activestate.com/recipes/577814/ (r1) | |
| # Lorenz Attractor (projected onto XY-plane) | |
| # http://en.wikipedia.org/wiki/Lorenz_attractor | |
| # FB - 201107317 | |
| import random | |
| from PIL import Image | |
| imgx = 800 | |
| imgy = 600 | |
| image = Image.new("RGB", (imgx, imgy)) |
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 numpy as NP | |
| import math | |
| def isclose(x, y, rtol=1.e-5, atol=1.e-8): | |
| return abs(x-y) <= atol + rtol * abs(y) | |
| def euler_angles_from_rotation_matrix(R): | |
| ''' | |
| From a paper by Gregory G. Slabaugh (undated), | |
| "Computing Euler angles from a rotation matrix |
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 sys, getopt, os, string | |
| import math | |
| from odbAccess import * | |
| from abaqusConstants import * | |
| import numpy as np | |
| from numpy import linalg as LA | |
| def get_p1_vector(s): | |
| ''' | |
| 11, 22, 33, 12, 13, 23 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.