예제 #1
0
파일: user.py 프로젝트: ElliottBregni/pytin
 def is_liked(self):
     """Returns True if the messages is liked, otherwise False"""
     liked_messages = [x['message_id'] for x in session.Session().get_updates()['liked_messages']]
     for mess_id  in liked_messages:
         if mess_id == self.message_id:
             return True
     return False
예제 #2
0
 def get_match_data(self):
     """Returns a [] of match data"""
     return [
         x for x in session.Session().list_matches()
         if x['_id'] == self.match_id
     ][0]
예제 #3
0
 def __init__(self, uid):
     self.id = uid
     self.me_id = session.Session().get_id()
     self.user_type = self._decode_user_type()
     self.data = self.get_data()
     self.const = JsonWrapper(self.data, iter_keys_only=False)
예제 #4
0
from pathlib import Path
import base64

from openface_api.wrapper import process_pics
import glob
import pandas as pd
import numpy as np
import sys
import urllib.request
import shutil

sys.path.insert(0, 'tinder_api')
import tinder_api.session as session

# Init session
sess = session.Session()

# Set the like threshold
SIM_THRESHOLD = 200
P_AT_THRES = 0.66

STATIC_FOLDER = 'static/'
BASE_FOLDER = 'base/'
PROCESSED_FOLDER = 'processed/'
COMPARISON_FOLDER = 'comparison/'

app = Flask(__name__)
app._static_folder = STATIC_FOLDER

token_dict = {} # to keep track of currently active tokens