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
from keras.models import Sequential | |
from keras.layers import Dense, Flatten | |
model1 = Sequential() | |
model1.add(Dense(1, input_shape=(10,10))) | |
model2 = Sequential() | |
model2.add(Flatten(input_shape=(10,10))) | |
model2.add(Dense(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
import numpy as np | |
import sgf # pip install sgf -- simple parser for the file format | |
def decode_position(pos_string): | |
# position in .sgf is char[2] and row-first, e.g. "fd" | |
positions = "abcdefghijklmnopqrs" | |
x = positions.index(pos_string[0]) | |
y = positions.index(pos_string[1]) | |
return y, x |
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 numpy as np | |
import sgf # pip install sgf -- simple parser for the file format | |
import timeit | |
def decode_position(pos_string): | |
# position in .sgf is char[2] and row-first, e.g. "fd" | |
positions = "abcdefghijklmnopqrs" | |
x = positions.index(pos_string[0]) | |
y = positions.index(pos_string[1]) | |
return y, x |
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
from collections import deque | |
import sys | |
def get_damage(sequence): | |
current_strength = 1 | |
damage = 0 | |
for char in sequence: | |
if char == "C": | |
current_strength *= 2 |
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 sys | |
def trouble_sort(L): | |
# in place sorting | |
done = False | |
while not done: | |
done = True | |
for idx in range(len(L) - 2): | |
if L[idx] > L[idx + 2]: | |
done = False |
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 | |
# Python3 | |
# | |
# Run from command line | |
# | |
import logging | |
from argparse import ArgumentParser | |
from copy import deepcopy, copy | |
from datetime import timedelta |
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 | |
# Python3 | |
import logging | |
from argparse import ArgumentParser | |
from os import remove | |
from os.path import exists | |
from re import sub | |
from time import time |
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
[ req ] | |
default_bits = 2048 | |
distinguished_name = req_distinguished_name | |
x509_extensions = v3_ca # The extentions to add to the self signed cert | |
string_mask = utf8only | |
[ req_distinguished_name ] | |
countryName = Country Name (2 letter code) | |
countryName_default = AU | |
countryName_min = 2 |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Redirecting to the Survey ...</title> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
</head> |
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
AWS_ACCESS_KEY_ID = "YOUR KEY ID HERE" | |
AWS_SECRET_ACCESS_KEY = "YOUR SECRET KEY HERE" | |
USE_SANDBOX = False |