def toggle(self): simulate_key(8, 8) if self.currentLang == u'ka': self.currentLang = u'default' self.stop() if self.c('noteSwitch') == 0: return True conf(u("default")) e32.ao_sleep(0.2) #simulate_key(EKeyHash, EScancodeHash) else: self.start() self.currentLang = u'ka' if self.c('noteSwitch') == 0: return True conf(u('ქართული')) e32.ao_sleep(0.2) #simulate_key(EKeyHash, EScancodeHash) return True
def toggle(self): simulate_key(8,8) if self.currentLang == u'ka': self.currentLang = u'default' self.stop() if self.c('noteSwitch') == 0: return True conf(u("default")) e32.ao_sleep(0.2) #simulate_key(EKeyHash, EScancodeHash) else: self.start() self.currentLang = u'ka' if self.c('noteSwitch') == 0: return True conf(u('ქართული')) e32.ao_sleep(0.2) #simulate_key(EKeyHash, EScancodeHash) return True
def handler(event, context): parser = { "bithumb": ParserBithumb, "coinone": ParserCoinone, "korbit": ParserKorbit, "local": ParserLocal, "market": ParserMarket, "world": ParserWorld, } target = event['target'] parser = parser[target](conf(target)) items = parser.get_items() print(*items, sep='\n') # Save to dynamodb dynamodb = boto3.resource('dynamodb', 'ap-northeast-2') table = dynamodb.Table(parser.table) with table.batch_writer() as batch: for each in items: batch.put_item(Item=each) send_message("monitoring", "{} collect finished!".format(target))
from PySide2.QtCore import QUrl from PySide2.QtWidgets import QApplication from PySide2.QtGui import Qt, QIcon from PySide2.QtQml import QQmlApplicationEngine, qmlRegisterType from PySide2.QtWebEngine import QtWebEngine from PySide2.QtWebEngineWidgets import QWebEnginePage, QWebEngineView # to call hook-PySide2.QtWebEngineWidgets.py # easyScience import utils import easyApp as easyApp2 from easyApp.Logic.Translate import Translator from easyApp.Logic.Maintenance import Updater from easyDiffractionApp.Logic.PyQmlProxy import PyQmlProxy # Global vars CONFIG = utils.conf() class App(QApplication): def __init__(self, sys_argv): QApplication.setAttribute( Qt.AA_EnableHighDpiScaling) # DOESN'T WORK?!, USE SCRIPT INSTEAD QApplication.setAttribute(Qt.AA_UseDesktopOpenGL) super(App, self).__init__(sys_argv) def main(): # Arguments parser = argparse.ArgumentParser() parser.add_argument( '-l',
def setUp(self): self.bithumb_conf = conf('bithumb') self.coinone_conf = conf('coinone') self.korbit_conf = conf('korbit')
#!/usr/bin/env python # -*- coding: utf-8 -*- from bottle.ext import auth from utils import conf try: auth_import = conf('auth')['engine'].split('.')[-1] auth_from = u".".join(conf('auth')['engine'].split('.')[:-1]) auth_engine = getattr(__import__(auth_from, fromlist=[auth_import]), auth_import) except: print 'Set valid auth engine' exit(0) callback = u"{}://{}".format( conf('openmining')['protocol'], conf('openmining')['domain']) if conf('openmining')['domain_port'] not in ['80', '443']: callback = "{}:{}".format(callback, conf('openmining')['domain_port']) if auth_import == 'Google': engine = auth_engine( conf('auth')['key'], conf('auth')['secret'], callback) elif auth_import == 'Facebook': # Not working requered parans engine = auth_engine() elif auth_import == 'Twitter': # Not working requered parans engine = auth_engine()
def setUp(self): self.price_conf = conf('stock')
def setUp(self): self.local_conf = conf('local') self.market_conf = conf('market') self.world_conf = conf('world')