Skip to content

Instantly share code, notes, and snippets.

View zabop's full-sized avatar

Pal Szabo zabop

View GitHub Profile
import shapely.geometry
import shapely.affinity
import geopandas as gpd
origin = shapely.geometry.Point(67596.000000, 36694.000000)
pixel_count = 256
units_per_pixel_for_each_zoom_level = [
352.77758727788068426889,
176.38879363894034213445,
88.19439681947017106722,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zabop
zabop / Doppler_spectroscop_wiki_to_pd.py
Last active July 29, 2021 18:26
Doppler_spectroscop_wiki_to_pd
dfs = pd.read_html('https://en.wikipedia.org/wiki/Doppler_spectroscopy')
@zabop
zabop / List_of_cities_in_India_by_population_to_df.py
Last active July 29, 2021 18:26
List_of_cities_in_India_by_population_to_df
import pandas as pd
df = pd.read_html('https://en.wikipedia.org/wiki/List_of_cities_in_India_by_population')[0]
plt.figure(figsize=(8,6))
plt.plot(epochs, history_dict1['val_acc'], 'b', linewidth=5, label='Accuracy, ReLU, 16 neurons')
plt.plot(epochs, history_dict2['val_acc'], 'r', linewidth=5, label='Accuracy, Sigmoid, 16 neurons')
plt.plot(epochs, history_dict3['val_acc'], 'c', linewidth=5, label='Accuracy, ReLU, 64 neurons')
plt.plot(epochs, history_dict4['val_acc'], 'k', linewidth=5, label='Accuracy, Sigmoid, 64 neurons')
plt.title('Accuracy vs epochs',fontsize=22)
plt.xlabel('Epochs',fontsize=18)
plt.ylabel('Accuracy',fontsize=18)
plt.figure(figsize=(8,6))
epochs = range(1, 21)
plt.plot(epochs, val_loss_values1, 'b', linewidth=5, label='Validation loss, ReLU, 16 neurons')
plt.plot(epochs, val_loss_values2, 'r', linewidth=5, label='Validation loss, Sigmoid, 16 neurons')
plt.plot(epochs, val_loss_values3, 'c', linewidth=5, label='Validation loss, ReLU, 64 neurons')
plt.plot(epochs, val_loss_values4, 'k', linewidth=5, label='Validation loss, Sigmoid, 64 neurons')
plt.title('Training and validation loss',fontsize=22)
history_dict1 = history1.history
loss_values1 = history_dict1['loss']
val_loss_values1 = history_dict1['val_loss']
model1 = models.Sequential()
model1.add(layers.Dense(16, activation='relu', input_shape=(10000,)))
model1.add(layers.Dense(16, activation='relu'))
model1.add(layers.Dense(1, activation='sigmoid'))
model1.compile(optimizer='rmsprop',
loss='binary_crossentropy',
metrics=['acc'])
history1 = model1.fit(partial_x_train,
dimension=10000
mlb = MultiLabelBinarizer(classes=range(dimension))
x_train = mlb.fit_transform(train_data)
x_test = mlb.fit_transform(test_data)
y_train = np.asarray(train_labels).astype('float32')
y_test = np.asarray(test_labels).astype('float32')
x_val = x_train[:10000]