Skip to content

Instantly share code, notes, and snippets.

View is1394's full-sized avatar

Israel Fernández is1394

View GitHub Profile
@is1394
is1394 / compare.py
Created October 11, 2018 20:49
Similar strings
import difflib
string_1 = "hola"
string_2 = "holita"
sequence = difflib.SequenceMatcher(isjunk=None, a=string_1, b=string_2)
difference = sequence.ratio()*100
difference = round(difference, 1)
print("Match {} %".format(difference))
@is1394
is1394 / curve_example.py
Created September 1, 2017 02:56 — forked from bellbind/curve_example.py
[python3][keras][tensorflow] number recognition with mnist dataset
# simple LSTM model
from keras.models import Sequential
from keras.layers import Activation, Dense, LSTM
model = Sequential()
model.add(LSTM(128, input_shape=(32, 1))) # 32 timespan 1 value unit
model.add(Dense(1))
model.add(Activation("linear"))
model.compile(optimizer="rmsprop", loss="mse")
@is1394
is1394 / web-servers.md
Created August 19, 2016 21:20 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000