
Tishka17
14.03.2019
07:35:51

GamiD
14.03.2019
07:36:18
Клики проверка и все остальное

Ruslan
14.03.2019
07:36:29
уточни, что ты имеешь в виду

Google

Nikolay
14.03.2019
07:36:42
this=self

Tishka17
14.03.2019
07:36:44

Nikolay
14.03.2019
07:37:22
Сейчас я буду кликать на питоне в игре

Alex
14.03.2019
07:37:34
import websockets
Пишет что нет такого модуля

Tishka17
14.03.2019
07:38:05

Alex
14.03.2019
07:38:06
и чем websockets отличается от websoket?
Ставил
и нифига

Tishka17
14.03.2019
07:38:20

Ruslan
14.03.2019
07:38:43

Tishka17
14.03.2019
07:39:14

Google

Alex
14.03.2019
07:39:15
D:\>pip install websokets
Collecting websokets
Could not find a version that satisfies the requirement websokets (from versions: )
No matching distribution found for websokets
You are using pip version 18.1, however version 19.0.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Ruslan
14.03.2019
07:39:38

Tishka17
14.03.2019
07:39:39

Roman
14.03.2019
07:39:45

Tishka17
14.03.2019
07:39:52

Alex
14.03.2019
07:39:59
3,7,2

Tishka17
14.03.2019
07:40:23
3,7,2
а может надо pip3 install?

Ruslan
14.03.2019
07:40:36

Alex
14.03.2019
07:41:19
D:\>pip3 install websokets
Collecting websokets
Could not find a version that satisfies the requirement websokets (from versions:
No matching distribution found for websokets
You are using pip version 18.1, however version 19.0.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Roman
14.03.2019
07:41:20
Я предпочитаю указывать в конфиге, чтобы не писать каждый раз.

Nikolay
14.03.2019
07:43:26
Ubuntu Windows

Tishka17
14.03.2019
07:43:33

Alex
14.03.2019
07:43:36
Сори апечатку допустил в слове вебсокетс

Ruslan
14.03.2019
07:43:40

Nikolay
14.03.2019
07:43:56

Alex
14.03.2019
07:44:01
Да винда, погамать люблю :)

Tishka17
14.03.2019
07:44:18
ну для игр и у меня винда, только я там кодить боюсь

Nikolay
14.03.2019
07:44:25
Игры остались в детстве вроде

Alex
14.03.2019
07:44:25
Стим конечно молодцы с вулканом :)

Alex
14.03.2019
07:44:43

Google

Alex
14.03.2019
07:44:58
Почему ? в старкрафт минут 20 погамать по сети можно :)
Так же ребёнку показать нормальные игры а не то фуфло что сейчас делают

Roman
14.03.2019
07:45:43

Ruslan
14.03.2019
07:46:05

Nikolay
14.03.2019
07:46:33
-r mems.txt

Ruslan
14.03.2019
07:47:01
а стоп, видимо не прочитало сначала

Nikolay
14.03.2019
07:47:05

Roman
14.03.2019
07:47:11

Andrew
14.03.2019
07:49:29

Alex
14.03.2019
07:50:22
Завелась конструкция :
import asyncio
import websockets
async def hello():
async with websockets.connect(
'wss://stream.binance.com:9443/ws/btcusdt@trade/btcusdt@depth20/btcusdt@kline_1m') as websocket:
#name = input("What's your name? ")
#await websocket.send(name)
#print(f"> {name}")
greeting = await websocket.recv()
print(f"< {greeting}")
while True:
asyncio.get_event_loop().run_until_complete(hello())
Но работает очень медленно

Ruslan
14.03.2019
07:50:45

Alex
14.03.2019
07:51:38
Это вообще огонь быстро как работает
import websocket
def on_message(ws, message):
print(message)
def on_error(ws, error):
print(error)
def on_close(ws):
print("### closed ###")
def on_open(ws):
print("### connected ###")
if name == "main":
#ws = websocket.WebSocketApp("wss://stream.binance.com:9443/stream?streams=ltcbtc@aggTrade/ethbtc@aggTrade",
ws = websocket.WebSocketApp("wss://stream.binance.com:9443/ws/ltcbtc@aggTrade/ethbtc@aggTrade",
on_message = on_message,
on_error = on_error,
on_close = on_close)
ws.on_open = on_open
ws.run_forever()
В чём нюанс ?
Последнее за 0,0 секунд

Max
14.03.2019
07:52:58
Почему для питона 3.7 не работает aioklivereload, пишет, что нет модуля, хотя ставил через pip3?

Andrew
14.03.2019
07:53:05

Khachatur
14.03.2019
07:53:18
def echo():
output = None
while True:
received = yield (output)
print('1 received: '+ str(received))
print('1 output: '+ str(output))
output = received[::-1]
print('2 received: '+ received)
print('2 output: '+ output)
yield output
print('--------------')
e = echo()
result = next(e)
print("result", result)
r = e.send('stressed')
print(r)
Почему в r записано 'desserts'

Google

Forevka ÐΞV
14.03.2019
07:53:28

Max
14.03.2019
07:54:14

Alex
14.03.2019
07:54:14
Жесть какая то за 2 секунды отрабатывает :(

Forevka ÐΞV
14.03.2019
07:54:21

Alex
14.03.2019
07:54:25
Так нафига эта асинхронность нада тогда ?
если оно медленне ...

Andrew
14.03.2019
07:54:40

Alex
14.03.2019
07:54:44
у меня когнитивный диссонанс

Forevka ÐΞV
14.03.2019
07:54:48

Alex
14.03.2019
07:55:01
у меня вебсокет

Admin
ERROR: S client not available

Khachatur
14.03.2019
07:55:26

Andrew
14.03.2019
07:55:46

Max
14.03.2019
07:55:55

Alex
14.03.2019
07:56:38
ОК: КАК В БЫСТРЫ СИНХРОННЫЙ ПРИЁМ ИНФЫ ВСТРОИТЬ АСИНХРОННЫЙ ПРИЁМ ИНФЫ ПО ХТТПС, ЧТОБЫ ПОСЛЕДНИЙ НЕ ТУПИЛ ПЕРВЫЙ ?

Khachatur
14.03.2019
07:56:48

Forevka ÐΞV
14.03.2019
07:57:04
неправильно понял вопрос.
У тебя получился генератор который принимает значение по .send() дальше ты его оборачиваешь по ::-1 индексу и возвращаешь

Tishka17
14.03.2019
07:57:19

Alex
14.03.2019
07:57:55
да

Google

Alex
14.03.2019
07:58:00
и они тупят

Tishka17
14.03.2019
07:58:03
чойто
не должно быть

Alex
14.03.2019
07:58:06
2 сек обработка

Tishka17
14.03.2019
07:58:15
показывай код

Alex
14.03.2019
07:58:24
import asyncio
import websockets
import time
async def hello():
async with websockets.connect(
'wss://stream.binance.com:9443/ws/btcusdt@trade/btcusdt@depth20/btcusdt@kline_1m') as websocket:
#name = input("What's your name? ")
#await websocket.send(name)
#print(f"> {name}")
greeting = await websocket.recv()
print(f"< {greeting}")
while True:
start_time = time.time()
asyncio.get_event_loop().run_until_complete(hello())
print("--- %s seconds ---" % (time.time() - start_time))

Cykooz
14.03.2019
07:58:26

Khachatur
14.03.2019
07:58:29

Andrew
14.03.2019
07:58:33

Alex
14.03.2019
07:58:53

Cykooz
14.03.2019
07:59:07
Наверное научиться программировать ?
Или не соваться в asyncio пока что

Tishka17
14.03.2019
07:59:16


Alex
14.03.2019
07:59:52
Да
Это иммено от туда

Tishka17
14.03.2019
08:00:01
вообще нет

Cykooz
14.03.2019
08:00:36
asyncio - это про "параллельное" выполнение кода использующего ввод-вывод (как правильо сетевой). Ни в одном товоём примере даже не видно что и с чем должно "параллелиться" - у тебя всё последовательно выполняется.

Tishka17
14.03.2019
08:01:25

Alex
14.03.2019
08:01:35
Клиент

Tishka17
14.03.2019
08:01:54
ок
испраилв копипасту