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
| $main: //*[@id="site-main"]/div/article | |
| title: $main/header/h1 | |
| body: $main/section[1] | |
| author: //*[@id="site-main"]/div/article/footer/section/section/h4/a | |
| author_url: "https://vk.com/nesterione" |
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
| test |
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 pandas as pd | |
| from keras.models import load_model | |
| model = load_model('./nn_dence.h5') | |
| model.load_weights('./nn_dence_weights.h5') | |
| # model = load_model('./nn_cnn.h5') | |
| # model.load_weights('./nn_cnn_weights.h5') | |
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 numpy as np | |
| 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
| # https://keras.io/getting-started/sequential-model-guide/ | |
| from __future__ import print_function | |
| import keras | |
| from keras.models import Sequential | |
| from keras.layers import Dense, Dropout, Activation, Flatten | |
| import pandas as pd | |
| data = pd.read_csv("./data/train.csv") | |
| data_set = data.as_matrix() |
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
| for (KeyValuePair keyValuePair : rootNode.getMetadata()) { | |
| if (StringUtils.startsWith(keyValuePair.getKey(), id)) { | |
| rootNode.getMetadata().remove(keyValuePair); | |
| } | |
| } |
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
| public static List<KeyValuePair> secretMethodName(Tree tree) { | |
| List<KeyValuePair> metadata = new ArrayList<>(); | |
| KeyValuePair treeId = new KeyValuePair(); | |
| treeId.setKey(tree.getId()); | |
| treeId.setValue(tree.getRootNodeIds().get(0)); | |
| metadata.add(treeId); | |
| KeyValuePair description = new KeyValuePair(); | |
| treeId.setKey(tree.getId() + "_" + MetadataConstants.DESCRIPTION_KEY); | |
| treeId.setValue(tree.getDescription()); |
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
| res.write("HTTP/1.1 200 OK\r\n".getBytes()); | |
| res.write("Date: Mon, 23 May 2005 22:38:34 GMT\r\n".getBytes()); | |
| res.write("Server: HApache/1.3.3.7 (Unix) (Red-Hat/Linux)\r\n".getBytes()); | |
| res.write("Content-Type: image/jpg\r\n".getBytes()); | |
| res.write("Content-Disposition: attachment; filename=home.jpg\r\n".getBytes()); | |
| res.write(String.format("Content-Length: %d\r\n",imageInByte.length).getBytes()); | |
| res.write("Accept-Ranges: bytes\r\n".getBytes()); | |
| res.write("Connection: close\r\n".getBytes()); | |
| res.write("\r\n".getBytes()); | |
| res.write(imageInByte); |
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
| # с каждой новой строки | |
| a = int(input("enter something\n")) | |
| b = int(input("enter something else\n")) | |
| print(a,b) | |
| # Если через пробел разделять переменные, то: | |
| s = input("enter two numbers"); | |
| # разбить строку по пробелам | |
| s = s.split() | |
| a = int(s[0]) |
NewerOlder