This file contains hidden or 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 | |
| class NeuralNetwork(): | |
| def __init__(self, inputs): | |
| np.random.seed(1) | |
| # Set synaptic weights to a 3x1 matrix, | |
| # with values from -1 to 1 and mean 0 |
This file contains hidden or 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 keras | |
| from keras.datasets import cifar10 | |
| from keras.preprocessing.image import ImageDataGenerator | |
| from keras.models import Sequential | |
| from keras.layers import Dense, Dropout, Activation, Flatten | |
| from keras.layers import Conv2D, MaxPooling2D | |
| import os | |
| batch_size = 32 |
This file contains hidden or 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 pynput.keyboard import Key, Controller | |
| import time | |
| keyboard = Controller() | |
| while True: | |
| text = input("text:") | |
| time.sleep(1) | |
| for char in text: | |
| keyboard.press(char) |
This file contains hidden or 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
| weakest_enemies=0 | |
| WEAKEST_ENEMIES_LIST_LENGTH = 5 | |
| def find_strongest_allies(pw, x): | |
| strongList = list() | |
| i = 0 | |
| if x > len(pw.enemy_planets()): | |
| x = len(pw.enemy_planets()) | |
| while i < x: |