This file contains 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
/* Submit requests to ILLiad by populating different fields from a bibtex reference*/ | |
/* We want to do some parsing of input bibtex, files, so we'll include the*/ | |
/* following JS code in our bookmarklet*/ | |
/* keys are the ILLiad field names, values are the bibtex entry keys*/ | |
var replacementDict = { | |
'PhotoJournalTitle' : 'JOURNAL', | |
'PhotoJournalTitle' : 'JOURNAL', | |
'PhotoJournalVolume' : 'VOLUME', | |
'PhotoJournalIssue' : 'NUMBER', |
This file contains 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
Header area. | |
Include any metadata above the `---`. | |
--- | |
# core run settings | |
run_type: full # choose full | dft | mcmc | |
phase_models: input.json | |
datasets: input-datasets # path to datasets. Defaults to current directory. | |
scheduler: dask # can be dask | MPIPool | |
# control output |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 math | |
def float_sigfigs(val, sigfigs): | |
"""Return a string representation of a floating point number rounded to some number of significant figures without scientific notation""" | |
rounded_val = float(f"{val:0.{sigfigs}g}") | |
num_digits = int(abs(math.log10(rounded_val))) + sigfigs | |
return f"{rounded_val:0.{num_digits}f}" | |
print(float_sigfigs(3.141592653589793e-20, 5)) # 0.000000000000000000031416 |
OlderNewer