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
#!/usr/bin/env python3 | |
import numpy as np | |
def transition_matrix_for_string_matching( string_to_find, letter_probabilities ): | |
""" | |
string_to_find: An iterable, whose elements are interpreted as letters. E.g., "01001110" or [0,1,0,0,1,1,1,0]. | |
letter_probabilities: If it is a number, then it will be assumed that all letters are equiprobable and the given | |
number is that probability. If it is a dictionary, then all elements in string_to_find are |
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/bash | |
function pmemdump() | |
{ | |
# Adapted from: | |
# https://serverfault.com/questions/173999/dump-a-linux-processs-memory-to-file | |
# Example output for /proc/xxx/maps: | |
# d7d90000-d7ed0000 rwxp 00000000 00:00 0 | |
# d8ab0000-d8bf0000 rwxp 00000000 00:00 0 | |
# f4111000-f43b9000 rw-s 00000000 00:05 429195289 /SYSV00000000 (deleted) |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Trying to reproduce: https://arxiv.org/abs/1609.01117 | |
from urllib.request import urlopen | |
from scipy import misc,ndimage,signal | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import urllib.request, json |