-
Run the unit tests of Apache commons math.
-
Use JInstrumenter to generate an execution log of the program. Make changes to the instrumenter and/or it's configurations as neccessary.
-
Feed the execution traces MINT to infer a model representing the behavior of commons math library. You will need to preprocess the execution traces to make them in the format that MINT can read. Make changes to the tool's configuration as neccessary.
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
class PandasFloatFormatter: | |
def __init__(self, new_format: str): | |
self.new_format = new_format.format | |
self.old_format = None | |
def __enter__(self): | |
self.old_format = pandas.options.display.float_format | |
pandas.options.display.float_format = self.new_format | |
def __exit__(self, exc_type, exc_val, exc_tb): |
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
@tf.function | |
def has_nan(X): | |
return tf.math.reduce_any(tf.math.is_nan(X)) | |
@tf.function | |
def has_inf(X): | |
return tf.math.reduce_any(tf.math.is_inf(X)) | |
def check_nan(name): | |
@tf.function |
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
#!/bin/sh | |
md5sum * 2>/dev/null | cut -c 2-3 | uniq | xargs mkdir | |
for f in *; do | |
if [ -f $f ]; then | |
mv "$f" $(md5sum "$f" | cut -c 2-3) | |
fi | |
done |
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
#!/bin/sh | |
# | |
# Usage: | |
# ./android-backup.sh com.example.app [example_backup] | |
# | |
# Outputs com.example.app.tar or if second parameter is provided, example_backup.tar | |
# | |
# Tarfile contains application private data such as database, shared preferences and internal files. | |
# |
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
def shima_proof(string): | |
if not string: | |
return '' | |
if string[-1] in {u'ا', u'و'} | |
return u'%sی' % stirng | |
return string |