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 __future__ import print_function | |
from time import sleep | |
import os | |
type_to_rep = { | |
'empty': '.', | |
'head': 'H', | |
'tail': 'T', | |
'conductor': '=', |
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 __future__ import print_function | |
import theano | |
import theano.tensor as T | |
import numpy as np | |
import time | |
X = theano.shared(value=np.asarray([[0, 1], [1, 0], [0, 0], [1, 1]]), name='X') | |
y = theano.shared(value=np.asarray([[0], [0], [1], [1]]), name='y') | |
rng = np.random.RandomState(1234) |
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
// reference: http://codeforces.com/contest/697/problem/C | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Scanner; | |
public class Codeforces697ProblemC { | |
public static void main(String... args) { | |
Scanner s = new Scanner(System.in); | |
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
[>....................]how compare home insurance | |
Predicted: ([ 0.39381921])in order to calculate your annual premium for home insurance it be necessary answer some basic question about the risk and obtain a quote basic characteristic of the home will include the year build , square footage , type of roof , foundation type , number of bathroom , style of home , prior claim and identify information of the owner you may obtain a quote and buy home insurance online use an online link in multiple state ; it may be use by escrow / closing professional , mortgage professional , real estate agent directly consumer an exemplary online experience for all WEBSITELINK | |
Expected: ([ 0.38000157])start by talk to your Insurance Professional it be important not only compare coverage offering and policy extension and limitation , but also the company that be offer this protection proposal and suggest coverage shall be base upon the result of a careful Reconstruction Analysis which will determine the amount of recommend covera |
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 __future__ import print_function | |
import numpy as np | |
from keras.engine import Input, Model | |
from keras.layers import Dense | |
X = np.asarray([[0, 1], [1, 0], [0, 0], [1, 1]]) | |
y = np.asarray([[0], [0], [1], [1]]) | |
input = Input(shape=(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
#!/usr/bin/env python | |
"""Example of building a model to solve an XOR problem in Keras.""" | |
import keras | |
import numpy as np | |
# XOR data. | |
x = np.array([ | |
[0, 1], | |
[1, 0], |
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 theano | |
import theano.tensor as T | |
import numpy as np | |
X = theano.shared(value=np.asarray([[1, 0], [0, 0], [0, 1], [1, 1]]), name='X') | |
y = theano.shared(value=np.asarray([[1], [0], [1], [0]]), name='y') | |
rng = np.random.RandomState(1234) | |
LEARNING_RATE = 0.01 | |
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
; Finds all factors of a number in O(sqrt n) time. | |
(define (factors n) | |
(define (@factors n i a) | |
(cond ((= (modulo n i) 0) (@factors (quotient n i) i (cons i a))) | |
((>= (* i i) n) (if (= 1 n) a (cons n a))) | |
(else (@factors n (+ i 1) a)))) | |
(@factors n 2 `())) | |
; Multiples all the elements in a list. | |
(define (mult l) |
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.optimizers import SGD, Adagrad, RMSprop, Adadelta, Adam, Adamax | |
import keras.backend as K | |
DEFAULT_NOISE = 0.05 | |
def ballpark_gradient(gradient, noise): | |
return [g * K.random_normal(shape=K.shape(g), mean=1.0, std=noise) for g in gradient] | |
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 python | |
"""The training script for the DANN model.""" | |
from __future__ import division | |
from __future__ import print_function | |
import csv | |
import os | |
import itertools | |
import sys |
OlderNewer