Skip to content

Instantly share code, notes, and snippets.

@vadimostanin
vadimostanin / keras for juggling
Created December 5, 2017 16:01 — forked from smeschke/keras for juggling
predict juggling patterns using keras
import numpy as np, os, cv2
from keras.utils import to_categorical
from keras.models import load_model
#reads images from folder (images must be labeled 0.png, 1.png, etc...)
def read_from_folder(folder, pattern, image_number, stop):
images = []
while image_number < stop:
path = folder + pattern + '/' + str(image_number) + '.png'
img = cv2.imread(path, 0)
diff --git a/habr/user.py b/habr/user.py
index f6cda91..d641782 100644
--- a/habr/user.py
+++ b/habr/user.py
@@ -186,7 +186,7 @@ class TMUser(object):
doc = html.document_fromstring(requests.get(url).text)
out = dict()
pages = get_pages(doc)
- favs = doc.xpath("//div[@class='user_favorites']//a[@class='post_title']")
+ favs = doc.xpath("//div[@class='user_favorites']//a[@class='post__title_link']")