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 sys | |
# this is the file's name or path to the file | |
fname = 'vox.gsf' | |
def gsf_read(fname): | |
if fname.rpartition('.')[1] == '.': | |
fname = fname[0:fname.rfind('.')] |
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
# Final equations from Procedure for measuring electrical resistivity of anisotropic materials: | |
# A revision of the Montgomery method by Dos Santos et al. (2011) in the Journal of Applied Physics | |
# dx.doi.org/10.1063/1.3652905 | |
# These equations can be used to determine the electrical resistivity in the two planar directions of an anisotropic material in the form of a thin film | |
# They are only valid if L3/(L1*L2)^(1/2) < 0.5, note that L1, L2 and L3 are the dimensions of the isotropic mapping of the anisotropic material and can't be determined a priori | |
# Refer to Section III of the paper for a discussion | |
R2 = np.array([10, 10, 10]) # Measured resistance in direction "2" in ohms | |
R1 = np.array([1, 1, 1]) # Measured resistance in direction "1" in ohms |
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
Verifying my Blockstack ID is secured with the address 1NMkspC4rwJ6b6vPupyKvgduMpHY2Hqrwg https://explorer.blockstack.org/address/1NMkspC4rwJ6b6vPupyKvgduMpHY2Hqrwg |
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 jinja2.filters import environmentfilter | |
@environmentfilter | |
def wrap_email(environment, s): | |
'''Return an email at '@' with a line break''' | |
email = s.split('@') | |
return email[0] + '@<br>' + email[1] | |
# after app is declared | |
app.jinja_env.filters['wrap_email'] = wrap_email |
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
Verifying that "davidrpmorris.id" is my Blockstack ID. https://onename.com/davidrpmorris |
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
# Skip to Line 56 to see how to set things up with JSON | |
# Normally each FormField is represented by its own row in a database. In this example | |
# each FormField is a row in the Specification table. | |
# models.py | |
class Specification(db.Model): | |
... | |
name = db.Column(db.String) |