To run the example:
python3 server.py &
python3 client.py
I would expect the output to look like this:
package stanza | |
import ( | |
"encoding/xml" | |
"gosrc.io/xmpp/stanza" | |
) | |
const NSRoster = "jabber:iq:roster" |
import React, { useEffect, useState } from "react"; | |
import { AppState, StyleSheet, Text, View, Button } from "react-native"; | |
import { client } from "@xmpp/client/react-native"; | |
import xml from "@xmpp/xml"; | |
const CREDENTIALS = [ | |
{ | |
name: "Arwen", | |
username: "4h9rd2yd3t58fbwxe257rvjd6", | |
password: "S7yZBsDIe7boi6ruVhhioGHzM6YW6vboMnmlguS5BUU=" |
import logging | |
import os | |
from pyramid.httpexceptions import WSGIHTTPException | |
from pyramid.tweens import EXCVIEW | |
from raven import Client | |
from raven import fetch_package_version | |
from raven.utils.wsgi import get_environ | |
try: | |
from raven.contrib.celery import register_signal, register_logger_signal | |
import celery # NOQA |
// @flow | |
import * as Ably from 'ably' | |
import type Channel from 'ably/common/lib/client/channel' | |
import type ConnectionStateChange from 'ably/common/lib/client/connectionstatechange' | |
// import type ErrorInfo from 'ably/common/lib/types/errorinfo' | |
import winston from 'winston' | |
import EventEmitter from 'events' | |
type AuthHeaders = {[string]: string} |
import os | |
import sys | |
import venusian | |
import jzoo.tasks as jzoo_tasks | |
from celery import Celery | |
from celery import signals | |
from celery.bin import Option | |
from pyramid.paster import bootstrap, get_appsettings | |
from pyramid.scripting import prepare | |
import transaction |
To run the example:
python3 server.py &
python3 client.py
I would expect the output to look like this:
>>> import pprint | |
>>> import requests | |
>>> MAC_URL = 'http://macvendors.co/api/%s' | |
>>> r = requests.get(MAC_URL % 'BC:92:6B:A0:00:01') | |
>>> pprint.pprint(r.json()) | |
{'result': {'address': '1 Infinite Loop Cupertino CA US 95014 ', | |
'company': 'Apple, Inc.', | |
'mac_prefix': 'BC:92:6B'}} |
# This module allows you to use markdown in Chameleon templates from pyramid. | |
# | |
# Markdown rendering is only down for text that is translatable, and has its | |
# message context set to ``markdown``. This is a complete abuse of the translation | |
# system, but currently provides the simplest way to get markdown running in | |
# Chameleon. | |
import CommonMark | |
from chameleon.utils import Markup | |
from translationstring import ChameleonTranslate | |
from pyramid_chameleon.localization import translator |
// Look for all elements with a clip class, and remove words form them | |
// until the text fits in the available space. This requires the element | |
// to have a fixed (maximum) width and height. | |
function cropText(root) { | |
var victims = root.querySelectorAll(".clip"), | |
rest, html, victim, $victim, words, cropped; | |
for (var i=0; i<victims.length; ++i) { | |
$victim=$(victim=victims[i]); | |
// We can only measure when the item is visible, but make it transparent |