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
/* | |
* qualy.c by Gonzalo Gasca -- 2013-06-01 -- v.1.0 | |
* | |
* Copyright (c) 2013 Gonzalo Gasca | |
* | |
* | |
* This program is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU General Public License | |
* as published by the Free Software Foundation; either version 2 | |
* of the License, or (at your option) any later version. |
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
__author__ = 'gogasca' | |
#!/usr/bin/python | |
import websocket | |
import thread | |
import time | |
import ssl | |
register = "REGISTER sip:open-ims.test SIP/2.0\r\n" +\ | |
"Test-Header: 0\r\n" + \ |
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 nltk.tokenize import word_tokenize | |
import pickle | |
import pprint | |
import json | |
""" | |
(heads, descs, keywords) = ([headline], [description], ) | |
""" |
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
"""Honeypot classifier. Based on https://www.kaggle.com/mrklees/applying-keras-scikit-learn-to-titanic""" | |
import pandas as pd | |
import numpy as np | |
from keras.utils import to_categorical | |
from keras.models import Sequential | |
from keras.layers import Dense, Dropout | |
from sklearn.model_selection import train_test_split |
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
"""Extract important information from AppAnnie via API.""" | |
import pandas as pd | |
from absl import app | |
from absl import flags | |
from absl import logging | |
from bs4 import BeautifulSoup as BS | |
from collections import namedtuple | |
from retrying import retry |
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 | |
import numpy | |
seed = 7 | |
numpy.random.seed(seed) | |
# Cargar el dataset de los indios Pima. | |
dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=",") |
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
model = Sequential() | |
model.add(Dense(12, input_dim=8, init='uniform', activation='relu')) | |
model.add(Dense(8, init='uniform', activation='relu')) | |
model.add(Dense(1, init='uniform', activation='sigmoid')) |
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
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']) |
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
model.fit(X, Y, nb_epoch=150, batch_size=10) |
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
scores = model.evaluate(X, Y) | |
print("%s: %.2f%%" % (model.metrics_names[1], scores[1]*100)) |
OlderNewer