code stringlengths 3 6.57k |
|---|
self._connect() |
self.auth(self._api_key) |
len(self._sub_topics) |
self.sub(self._sub_topics) |
logger.info("Reconnected to %s.", self._uri) |
_deliver(self, s: str) |
self._inputs.put(s) |
_send(self, s: str) |
self._ws.send(s) |
logger.debug(">>> %s", s) |
logger.exception(exc) |
self._reconnect() |
_broadcast(self, message: Dict) |
self._deliver(json.dumps(data) |
_pong(self, message: Dict[str, int]) |
self._send(json.dumps({"pong": message["ping"]}) |
_run(self) |
self._connect() |
asyncio.create_task(self._ws.recv() |
asyncio.create_task(self._inputs.get() |
incoming.cancel() |
outgoing.cancel() |
incoming.result() |
logger.debug("<<< %s", message) |
logger.exception(exc) |
self._reconnect() |
json.loads(message) |
self._pong(decoded) |
self._outputs.put_nowait(decoded) |
logger.warning("The outputs queue is full.") |
outgoing.result() |
self._send(message) |
self.close() |
close(self) |
ws.close() |
exceptions.format_close(ws.close_code, ws.close_reason) |
logger.info(f"Connection closed: {close_status}.") |
__init__(self, base_url: str, api_key: str) |
base_url.rstrip("/") |
get_robot(self, robot_id: int) |
ROBOT_REQ_PATH.format(robot_id=robot_id) |
self._request("GET", req_path) |
update_robot_asset_record(self, robot_id: int, data: Dict[str, Any]) |
ROBOT_ASSET_RECORD_REQ_PATH.format(robot_id=robot_id) |
self._request("PATCH", req_path, data=data) |
update_robot_strategy_store(self, robot_id: int, data: Dict[str, Any]) |
ROBOT_STRATEGY_STORE_REQ_PATH.format(robot_id=robot_id) |
self._request("PUT", req_path, data=data) |
ROBOT_POSITION_STORE_REQ_PATH.format(robot_id=robot_id) |
self._request("PUT", req_path, data=data) |
update_robot_order_store(self, robot_id: int, data: List[Dict[str, Any]]) |
ROBOT_ORDER_STORE_REQ_PATH.format(robot_id=robot_id) |
self._request("PUT", req_path, data=data) |
ping_robot(self, robot_id: int) |
ROBOT_PING_REQ_PATH.format(robot_id=robot_id) |
self._request("POST", req_path) |
get_robot_strategy_parameters(self, robot_id: int) |
ROBOT_STRATEGY_PARAMETERS_REQ_PATH.format(robot_id=robot_id) |
self._request("GET", req_path) |
get_robot_credential_key(self, robot_id: int) |
ROBOT_CREDENTIAL_KEY_REQ_PATH.format(robot_id=robot_id) |
self._request("GET", req_path) |
req_headers.update(headers) |
httpx.AsyncClient() |
res.raise_for_status() |
res.json() |
discord.Intents.default() |
commands.Bot(command_prefix = "-", case_insensitive = True, intents=intents) |
client.remove_command('help') |
os.listdir('./cogs') |
filename.endswith('.py') |
client.load_extension(f'cogs.{filename[:-3]}') |
client.run('# Discord Bot Token here') |
logging.getLogger(__name__) |
train(reader, train_data, test_data, dev_data, configuration: dict, debug=False) |
isinstance(reader, TFReader) |
train_tensorflow(reader, train_data, test_data, dev_data, configuration, debug) |
train_pytorch(reader, train_data, test_data, dev_data, configuration, debug) |
train_tensorflow(reader, train_data, test_data, dev_data, configuration: dict, debug=False) |
configuration.get('seed', 0) |
random.seed(seed) |
tf.set_random_seed(seed) |
configuration.get('clip_value') |
configuration.get('batch_size') |
configuration.get('dev_batch_size') |
configuration.get('epochs') |
configuration.get('l2') |
configuration.get('optimizer') |
configuration.get('learning_rate') |
configuration.get('min_learning_rate') |
configuration.get('learning_rate_decay') |
configuration.get('log_interval') |
configuration.get('validation_interval') |
configuration.get('tensorboard_folder') |
configuration.get('reader') |
configuration.get('save_dir') |
configuration.get('write_metrics_to') |
abs(clip_value) |
abs(clip_value) |
tf.get_variable("learning_rate", initializer=learning_rate, dtype=tf.float32, trainable=False) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.