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 crc_remainder(input_bitstring, polynomial_bitstring, initial_filler): | |
''' | |
Calculates the CRC remainder of a string of bits using a chosen polynomial. | |
initial_filler should be '1' or '0'. | |
''' | |
polynomial_bitstring = polynomial_bitstring.lstrip('0') | |
len_input = len(input_bitstring) | |
initial_padding = initial_filler * (len(polynomial_bitstring) - 1) | |
input_padded_array = list(input_bitstring + initial_padding) | |
while '1' in input_padded_array[:len_input]: |
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
input: "image" | |
input_dim: 1 | |
input_dim: 3 | |
input_dim: 1 # This value will be defined at runtime | |
input_dim: 1 # This value will be defined at runtime | |
layer { | |
name: "conv1_1" | |
type: "Convolution" | |
bottom: "image" | |
top: "conv1_1" |
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
public class RC4 { | |
private final byte[] S = new byte[256]; | |
private final byte[] T = new byte[256]; | |
private final int keylen; | |
public RC4(final byte[] key) { | |
if (key.length < 1 || key.length > 256) { | |
throw new IllegalArgumentException( | |
"key must be between 1 and 256 bytes"); | |
} else { |
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
<script type="text/javascript"> | |
if (document.location.protocol != "https:") { | |
location.href = location.href.replace(/^http:/,"https:"); | |
} | |
</script> |