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 matplotlib.pyplot as plt | |
| >>> plt.ion() | |
| >>> fig = plt.figure() | |
| >>> ax = fig.add_subplot(111) | |
| >>> ax.plot([1, 2, 3]) | |
| >>> plt.show() |
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 matplotlib.pyplot as plt | |
| import matplotlib.cm as cm | |
| import numpy as np | |
| import pyproffx as pfx | |
| fp = '~/Dropbox/work/dgemm/autoparallel/' | |
| p, d = pfx.load_pa(fp, 'dgemm') | |
| el= pfx.ElapsedTime(p, d) |
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
| #!/usr/bin/env python3.3 | |
| # Find a file from a given directory recursively. | |
| """ | |
| The MIT License (MIT) | |
| Copyright (c) 2014 Haruhiko Matsuo. | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights |
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
| rgb = ((99,170,254), (221,8,6), (153,204,0), (31,183,20), (255,124,128), | |
| (134,83,87), (204,204,255), (0,0,144), (204,153,255), (255,0,255), | |
| (252,243,5), (255,153,0), (70,0,165), (128,0,0), (0,0,212), | |
| (0,204,255)) | |
| for c in rgb: | |
| h = "{0:02x}{1:02x}{2:02x}".format(*c) | |
| print( h+','), | |
| print('') |
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
| awk '{if (NF == 21) sum += $21} END { print sum }' |
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 sympy | |
| sympy.factorint(524288) |
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
| awk '{sum += $8} END {print sum/NR}' |