Skip to content

Instantly share code, notes, and snippets.

View lordofprograms's full-sized avatar

Mikhail Sheleh lordofprograms

View GitHub Profile
from bs4 import BeautifulSoup
from word2number import w2n
import unidecode
class TextProcessor:
def __init__(self, nlp):
"""
class for text preprocessing, it includes:
- lowercasing
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;
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 }
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)
{
"data": {
"children": [
{
"data": {
"image": "https://image.ibb.co/cEACEv/rd_logo.jpg",
"name": "cEACEv/rd_logo.jpg",
"fileName": "rd_logo"
}
},
{
"data": {
"children": [
{
"data": {
"image": "https://image.ibb.co/edRkZv/WAll2.png",
"name": "edRkZv/WAll2.png",
"fileName": "WAll2"
}
},