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 bs4 import BeautifulSoup | |
from word2number import w2n | |
import unidecode | |
class TextProcessor: | |
def __init__(self, nlp): | |
""" | |
class for text preprocessing, it includes: | |
- lowercasing |
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
import com.borisruzanov.russianwives.models.SearchModel; | |
import com.borisruzanov.russianwives.models.Users; | |
import com.borisruzanov.russianwives.utils.Consts; | |
import com.borisruzanov.russianwives.utils.UsersListCallback; | |
import com.google.android.gms.tasks.OnCompleteListener; | |
import com.google.android.gms.tasks.Task; | |
import com.google.firebase.firestore.CollectionReference; | |
import com.google.firebase.firestore.DocumentSnapshot; | |
import com.google.firebase.firestore.FirebaseFirestore; | |
import com.google.firebase.firestore.Query; |
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
class DbService @Inject constructor(private val rxSchedulers: SchedulersProvider) { | |
private val config = Realm.getDefaultConfiguration() | |
fun <T : RealmObject> save(`object`: T, clazz: Class<T>): Observable<RealmObject> { | |
val realm = Realm.getInstance(config) | |
val id: Long = try { (realm.where(clazz).max("id").toInt() + 1).toLong() } | |
catch (e: Exception) { 0L } |
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
import cv2 | |
import numpy as np | |
import itertools | |
import sys | |
def findKeyPoints(img, template, distance=200): | |
detector = cv2.FeatureDetector_create("SIFT") | |
descriptor = cv2.DescriptorExtractor_create("SIFT") | |
skp = detector.detect(img) |
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
{ | |
"data": { | |
"children": [ | |
{ | |
"data": { | |
"image": "https://image.ibb.co/cEACEv/rd_logo.jpg", | |
"name": "cEACEv/rd_logo.jpg", | |
"fileName": "rd_logo" | |
} | |
}, |
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
{ | |
"data": { | |
"children": [ | |
{ | |
"data": { | |
"image": "https://image.ibb.co/edRkZv/WAll2.png", | |
"name": "edRkZv/WAll2.png", | |
"fileName": "WAll2" | |
} | |
}, |