Twisted tests will generally look like:
@twisted_utils.reacts # marks the test as needing a reactor
# marks the function as a coroutine, a poor immitation of a Python3 async/def
# coroutine
@twisted_utils.inlineCallbacks
def test_foo(fixtures)| # /opt/libreofficedev7.1/program/python test2.py | |
| 2004 177 | |
| 2003 176 | |
| 2002 175 | |
| 2005 178 | |
| 2002 181 | |
| 2003 180 | |
| 2004 179 | |
| 2005 182 | |
| ^Cunhandled exception during asyncio.run() shutdown |
| FROM ubuntu:xenial | |
| COPY ./apt-keys.pub /tmp/apt-keys.pub | |
| RUN echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main" > /etc/apt/sources.list.d/deadsnakes.list \ | |
| && apt-key add /tmp/apt-keys.pub && rm /tmp/apt-keys.pub \ | |
| && apt-get update && apt-get install -y --no-install-recommends libgtk2.0 libwebkitgtk-3.0 \ | |
| build-essential python2.7-dev python3.7-dev python3.7-venv python-virtualenv \ | |
| libjpeg8 libtiff5 libsdl1.2debian libnotify4 freeglut3 libsm6 \ | |
| libgl1-mesa-glx libgstreamer-plugins-base0.10 libwebkit2gtk-4.0-37 git \ | |
| && rm -rf /var/lib/apt/lists/* |
| import pathlib | |
| import ast | |
| def _packages(path): | |
| return _include_parents(path.with_suffix('').parts) | |
| def _include_parents(parts): | |
| p = list(parts) |
| import json | |
| with open('./foo.json') as df: | |
| dump = json.load(df) | |
| for f in dump: | |
| fp = f['filePath'] | |
| rules = ', '.join(sorted(set(m['ruleId'] for m in f['messages']))) | |
| if not rules: | |
| continue |
| f@omoikane:~$ scala | |
| Welcome to Scala version 2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_31). | |
| Type in expressions to have them evaluated. | |
| Type :help for more information. | |
| scala> :load Workshop/mine/scala-misc/voldemort.scala | |
| Loading Workshop/mine/scala-misc/voldemort.scala... | |
| defined module Dungeon | |
| scala> val nemesis = Dungeon curse "fedesilva" |
| map.on('click', function(event){ | |
| var x1_wgs; | |
| var y1_wgs; | |
| async function ajax(x,y){ | |
| const data = $.ajax({ | |
| url:'/geocoding/egsa_2_wgs.php?x='+x+'&y='+y, | |
| async:true, | |
| type:'GET', |
| class List { | |
| constructor() { | |
| this.arr = undefined; | |
| this.length = 0; | |
| this.inLength = 0; | |
| this.dirty = false; | |
| this.prev = undefined; | |
| } | |
| push(v) { |
| FROM selenium/node-base:3.4.0-dysprosium | |
| USER root | |
| ARG CHROME_VERSION="google-chrome-beta" | |
| RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ | |
| && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \ | |
| && apt-get update -qqy \ | |
| && apt-get -qqy install \ |
| $FILES="*.rs" | |
| $REGEX="s#(.*)\n(.*)/\2\n\1/" | |
| find . -name "$FILES" | xargs perl -0777 -pi -e '$REGEX' | |
| # flag: -0777 tells perl to read the file as a whole | |
| # replace '-pi' with '-pi.bak' to create backups |