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 ABC(): | |
def __init__(my_parameter): | |
self.my_object_variable = my_parameter | |
def whatever_shit(): | |
print(self.my_object_variable) |
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 plot_digits(data): | |
fig, axes = plt.subplots(10, 10, figsize=(10, 10), | |
subplot_kw={'xticks':[], 'yticks':[]}, | |
gridspec_kw=dict(hspace=0.1, wspace=0.1)) | |
for i, ax in enumerate(axes.flat): | |
ax.imshow(data[i], | |
cmap='binary', interpolation='nearest', | |
clim=(0, 16)) | |
plt.show() |
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 dateparser | |
def detect_date(line=""): | |
"""Detect multiple, multi language date and datetime entries in a given string. | |
@param type: String to detect occuring_dates in, ideally a single line. | |
@type type: String | |
@return: Returns the list of found DateTime objects or None | |
@rtype: List or None | |
""" |
NewerOlder